Permalink
Browse files

Attempt to make Iframe as hidden as possible by using techniques from h…

  • Loading branch information...
1 parent c164cce commit a62a601cf400a4ca6558ba8e33a0be83127f859c @cowboy committed Jul 5, 2010
@@ -21,7 +21,7 @@
<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Known_issues"></a>Known issues</h3><div class=CBody><p>While this jQuery hashchange event implementation is quite stable and robust, there are a few unfortunate browser bugs surrounding expected hashchange event-based behaviors, independent of any JavaScript window.onhashchange abstraction.&nbsp; See the following examples for more information:</p><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>Chrome: Back Button</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-chrome-back-button/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-chrome-back-button<wbr>/</a></td></tr><tr><td class=CDLEntry>Firefox: Remote XMLHttpRequest</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-firefox-remote-xhr/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-firefox-remote-xhr<wbr>/</a></td></tr><tr><td class=CDLEntry>WebKit: Back Button in an Iframe</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-webkit-hash-iframe/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-webkit-hash-iframe<wbr>/</a></td></tr><tr><td class=CDLEntry>Safari: Back Button from a different domain</td><td class=CDLDescription><a href="http://benalman.com/code/projects/jquery-hashchange/examples/bug-safari-back-from-diff-domain/" class=LURL target=_top>http://benalman.com<wbr>/code<wbr>/projects<wbr>/jquery-hashchange<wbr>/examples<wbr>/bug-safari-back-from-diff-domain<wbr>/</a></td></tr></table></div></div></div>
-<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Release_History"></a>Release History</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1.3pre</td><td class=CDLDescription>(7/5/2010) Reorganized IE6/7 Iframe code to make it more &ldquo;removable&rdquo; for mobile development.&nbsp; Added <a href="#jQuery.hashchangeDomain" class=LProperty id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">jQuery.hashchangeDomain</a>, <a href="#jQuery.hashchangeIframeSrc" class=LProperty id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">jQuery.hashchangeIframeSrc</a> properties and document-domain.html file to address access denied issues when setting document.domain in IE6/7.&nbsp; Note that when using <a href="#jQuery.hashchangeIframeSrc" class=LProperty id=link5 onMouseOver="ShowTip(event, 'tt3', 'link5')" onMouseOut="HideTip('tt3')">jQuery.hashchangeIframeSrc</a>, history won&rsquo;t be recorded in IE6/7 until the Iframe src file loads.&nbsp; Lowered the default <a href="#jQuery.hashchangeDelay" class=LProperty id=link6 onMouseOver="ShowTip(event, 'tt4', 'link6')" onMouseOut="HideTip('tt4')">jQuery.hashchangeDelay</a> to 50 milliseconds.</td></tr><tr><td class=CDLEntry>1.2</td><td class=CDLDescription>(2/11/2010) Fixed a bug where coming back to a page using this plugin from a page on another domain would cause an error in Safari 4.&nbsp; Also, IE6/7 Iframe is now inserted after the body (this actually works), which prevents the page from scrolling when the event is first bound.&nbsp; Event can also now be bound before DOM ready, but it won&rsquo;t be usable before then in IE6/7.</td></tr><tr><td class=CDLEntry>1.1</td><td class=CDLDescription>(1/21/2010) Incorporated document.documentMode test to fix IE8 bug where browser version is incorrectly reported as 8.0, despite inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.</td></tr><tr><td class=CDLEntry>1.0</td><td class=CDLDescription>(1/9/2010) Initial Release.&nbsp; Broke out the jQuery BBQ event.special window.onhashchange functionality into a separate plugin for users who want just the basic event &amp; back button support, without all the extra awesomeness that BBQ provides.&nbsp; This plugin will be included as part of jQuery BBQ, but also be available separately.</td></tr></table></div></div></div>
+<div class="CGeneric"><div class=CTopic><h3 class=CTitle><a name="Release_History"></a>Release History</h3><div class=CBody><table border=0 cellspacing=0 cellpadding=0 class=CDescriptionList><tr><td class=CDLEntry>1.3pre</td><td class=CDLDescription>(7/5/2010) Reorganized IE6/7 Iframe code to make it more &ldquo;removable&rdquo; for mobile development.&nbsp; Added <a href="#jQuery.hashchangeDomain" class=LProperty id=link3 onMouseOver="ShowTip(event, 'tt2', 'link3')" onMouseOut="HideTip('tt2')">jQuery.hashchangeDomain</a>, <a href="#jQuery.hashchangeIframeSrc" class=LProperty id=link4 onMouseOver="ShowTip(event, 'tt3', 'link4')" onMouseOut="HideTip('tt3')">jQuery.hashchangeIframeSrc</a> properties and document-domain.html file to address access denied issues when setting document.domain in IE6/7.&nbsp; Note that when using <a href="#jQuery.hashchangeIframeSrc" class=LProperty id=link5 onMouseOver="ShowTip(event, 'tt3', 'link5')" onMouseOut="HideTip('tt3')">jQuery.hashchangeIframeSrc</a>, history won&rsquo;t be recorded in IE6/7 until the Iframe src file loads.&nbsp; Lowered the default <a href="#jQuery.hashchangeDelay" class=LProperty id=link6 onMouseOver="ShowTip(event, 'tt4', 'link6')" onMouseOut="HideTip('tt4')">jQuery.hashchangeDelay</a> to 50 milliseconds.&nbsp; Attempt to make Iframe as hidden as possible by using techniques from <a href="http://www.paciellogroup.com/blog/?p=604" class=LURL target=_top>http://www.paciellogroup.com/blog/?p=604</a>.</td></tr><tr><td class=CDLEntry>1.2</td><td class=CDLDescription>(2/11/2010) Fixed a bug where coming back to a page using this plugin from a page on another domain would cause an error in Safari 4.&nbsp; Also, IE6/7 Iframe is now inserted after the body (this actually works), which prevents the page from scrolling when the event is first bound.&nbsp; Event can also now be bound before DOM ready, but it won&rsquo;t be usable before then in IE6/7.</td></tr><tr><td class=CDLEntry>1.1</td><td class=CDLDescription>(1/21/2010) Incorporated document.documentMode test to fix IE8 bug where browser version is incorrectly reported as 8.0, despite inclusion of the X-UA-Compatible IE=EmulateIE7 meta tag.</td></tr><tr><td class=CDLEntry>1.0</td><td class=CDLDescription>(1/9/2010) Initial Release.&nbsp; Broke out the jQuery BBQ event.special window.onhashchange functionality into a separate plugin for users who want just the basic event &amp; back button support, without all the extra awesomeness that BBQ provides.&nbsp; This plugin will be included as part of jQuery BBQ, but also be available separately.</td></tr></table></div></div></div>
<div class="CGroup"><div class=CTopic><h3 class=CTitle><a name="Properties"></a>Properties</h3></div></div>
Binary file not shown.
View
@@ -1,4 +1,4 @@
1.4
JavaScript
-/srv/projects/jquery-hashchange-domain/jquery.ba-hashchange.js 1278342314 1 jQuery hashchange event
-/srv/projects/jquery-hashchange-domain/jquery.ba-hashchange.min.js 1278342372 0 /srv/projects/jquery-hashchange-domain/jquery.ba-hashchange.min.js
+/srv/projects/jquery-hashchange/jquery.ba-hashchange.js 1278343229 1 jQuery hashchange event
+/srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js 1278343232 0 /srv/projects/jquery-hashchange/jquery.ba-hashchange.min.js
Binary file not shown.
Binary file not shown.
View
Binary file not shown.
View
@@ -60,7 +60,9 @@
// file to address access denied issues when setting document.domain in
// IE6/7. Note that when using <jQuery.hashchangeIframeSrc>, history
// won't be recorded in IE6/7 until the Iframe src file loads. Lowered
-// the default <jQuery.hashchangeDelay> to 50 milliseconds.
+// the default <jQuery.hashchangeDelay> to 50 milliseconds. Attempt to
+// make Iframe as hidden as possible by using techniques from
+// http://www.paciellogroup.com/blog/?p=604.
// 1.2 - (2/11/2010) Fixed a bug where coming back to a page using this plugin
// from a page on another domain would cause an error in Safari 4. Also,
// IE6/7 Iframe is now inserted after the body (this actually works),
@@ -245,8 +247,9 @@
iframe_src = $[ str_hashchange + 'IframeSrc' ];
iframe_src = iframe_src && iframe_src + get_fragment();
- // Create hidden Iframe.
- iframe = $('<iframe/>').hide()
+ // Create hidden Iframe. Attempt to make Iframe as hidden as possible
+ // by using techniques from http://www.paciellogroup.com/blog/?p=604.
+ iframe = $('<iframe tabindex="-1" title="empty"/>').hide()
// When Iframe has completely loaded, initialize the history and
// start polling.

Some generated files are not rendered by default. Learn more.

Oops, something went wrong.

0 comments on commit a62a601

Please sign in to comment.