Revision 139784 of Tabbed browser

  • Revision slug: Talk:Code_snippets/Tabbed_browser
  • Revision title: Tabbed browser
  • Revision id: 139784
  • Created:
  • Creator: Nickolay
  • Is current revision? No
  • Comment

Revision Content

Simplified code in "Detecting page load"

I rewrote this snippet to be a bit more simple

if (foo) { bar; quuz; } else { bar; }

was simplifiable to:

bar; if (foo) quuz;

I've also changed the comments to be clear about what was going on. GijsKruitbosch 11:49, 11 December 2006 (PST)

gBrowser, within an extension

removed confused section --Nickolay 09:14, 9 January 2007 (PST)

 	+	// gBrowser is only accessible from the scope of Firefox, to use gBrowser within an extension you must declare it
 	+	var gBrowser = document.getElementById("content");

Revision Source

<h3 name="Simplified_code_in_.22Detecting_page_load.22"> Simplified code in "Detecting page load" </h3>
<p>I rewrote this snippet to be a bit more simple
</p>
<pre class="eval">if (foo) { bar; quuz; } else { bar; }
</pre>
<p>was simplifiable to:
</p>
<pre class="eval">bar; if (foo) quuz;
</pre>
<p>I've also changed the comments to be clear about what was going on. <a href="User:GijsKruitbosch">GijsKruitbosch</a> 11:49, 11 December 2006 (PST)
</p>
<h3 name="gBrowser.2C_within_an_extension"> gBrowser, within an extension </h3>
<p>removed confused section <a class="external" href="http://developer.mozilla.org/en/docs/index.php?title=Code_snippets:Tabbed_browser&amp;curid=6415&amp;diff=46045&amp;oldid=45762&amp;rcid=46914"> --</a><a href="User:Nickolay">Nickolay</a> 09:14, 9 January 2007 (PST)
</p>
<pre> 	+	// gBrowser is only accessible from the scope of Firefox, to use gBrowser within an extension you must declare it
 	+	var gBrowser = document.getElementById("content");
</pre>
Revert to this revision