Created
October 2, 2012 23:37
-
-
Save ericf/3824010 to your computer and use it in GitHub Desktop.
Uses of iframes in YUI's source
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Searching 1219 files for "createElement\(['"]iframe" (regex, case sensitive) | |
| /Users/eferraiuolo/Code/yui/yui3/src/test/js/Reporter.js: | |
| 115 this._iframe = document.createElement("<iframe name=\"yuiTestTarget\" />"); | |
| 116 } catch (ex){ | |
| 117: this._iframe = document.createElement("iframe"); | |
| 118 this._iframe.name = "yuiTestTarget"; | |
| 119 } | |
| /Users/eferraiuolo/Code/yui/yui3/src/test/tests/unit/assets/bugs-tests.js: | |
| 17 document.body.appendChild(div.firstChild); | |
| 18 } catch (e) { | |
| 19: var iframe = document.createElement('iframe'); | |
| 20 iframe.id = 'fixture2'; | |
| 21 iframe.name = fixture; | |
| 2 matches across 2 files |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| Searching 1220 files for "<iframe" (case sensitive) | |
| /Users/eferraiuolo/Code/yui/yui3/src/dom/tests/unit/assets/dom-core-test.js: | |
| 1046 | |
| 1047 'should create an iframe (self-closed)': function() { | |
| 1048: var el = Y.DOM.create('<iframe/>'); | |
| 1049 Assert.areEqual('IFRAME', el.tagName); | |
| 1050 }, | |
| 1051 | |
| 1052 'should create an iframe': function() { | |
| 1053: var el = Y.DOM.create('<iframe src="http://search.yahoo.com/" id="yui-iframetest"></iframe>'); | |
| 1054 Assert.areEqual('IFRAME', el.tagName); | |
| 1055 }, | |
| 1056 | |
| 1057 'should create an iframe with attributes': function() { | |
| 1058: var html = '<iframe border="0" frameBorder="0" marginWidth="0"' + | |
| 1059 ' marginHeight="0" leftMargin="0" topMargin="0"' + | |
| 1060 ' allowTransparency="true" width="100%" height="99%"></iframe>'; | |
| /Users/eferraiuolo/Code/yui/yui3/src/editor/js/frame.js: | |
| 812 * @type String | |
| 813 */ | |
| 814: //HTML: '<iframe border="0" frameBorder="0" marginWidth="0" marginHeight="0" leftMargin="0" topMargin="0" allowTransparency="true" width="100%" height="99%"></iframe>', | |
| 815: HTML: '<iframe border="0" frameBorder="0" marginWidth="0" marginHeight="0" leftMargin="0" topMargin="0" allowTransparency="true" width="100%" height="99%"></iframe>', | |
| 816 /** | |
| 817 * @static | |
| /Users/eferraiuolo/Code/yui/yui3/src/history/js/history-hash-ie.js: | |
| 95 | |
| 96 iframe = GlobalEnv._iframe = Y.Node.getDOMNode(Y.Node.create( | |
| 97: '<iframe src="javascript:0" style="display:none" height="0" width="0" tabindex="-1" title="empty"/>' | |
| 98 )); | |
| 99 | |
| /Users/eferraiuolo/Code/yui/yui3/src/io/js/io-upload-iframe.js: | |
| 23 */ | |
| 24 function _cFrame(o, c, io) { | |
| 25: var i = Y.Node.create('<iframe src="#" id="io_iframe' + o.id + '" name="io_iframe' + o.id + '" />'); | |
| 26 i._node.style.position = 'absolute'; | |
| 27 i._node.style.top = '-1000px'; | |
| /Users/eferraiuolo/Code/yui/yui3/src/node/js/shim-plugin.js: | |
| 33 * @static | |
| 34 */ | |
| 35: Shim.TEMPLATE = '<iframe class="' + Shim.CLASS_NAME + | |
| 36 '" frameborder="0" title="Node Stacking Shim"' + | |
| 37 'src="javascript:false" tabindex="-1" role="presentation"' + | |
| /Users/eferraiuolo/Code/yui/yui3/src/node-menunav/js/node-menunav.js: | |
| 381 */ | |
| 382 | |
| 383: // <iframe> shim notes: | |
| 384 // | |
| 385 // 1) Need to set the "frameBorder" property to 0 to suppress the default | |
| 386: // <iframe> border in IE. (Setting the CSS "border" property alone doesn't | |
| 387 // suppress it.) | |
| 388 // | |
| 389: // 2) The "src" attribute of the <iframe> is set to "javascript:false;" so | |
| 390 // that it won't load a page inside it, preventing the secure/nonsecure | |
| 391 // warning in IE when using HTTPS. | |
| 392 // | |
| 393: // 3) Since the role of the <iframe> shim is completely presentational, its | |
| 394 // "tabindex" attribute is set to "-1" and its title attribute is set to | |
| 395 // "Menu Stacking Shim". Both strategies help users of screen readers to | |
| 396: // avoid mistakenly interacting with the <iframe> shim. | |
| 397 | |
| 398: NodeMenuNav.SHIM_TEMPLATE = '<iframe frameborder="0" tabindex="-1" class="' + | |
| 399 getClassName("shim") + | |
| 400 '" title="' + NodeMenuNav.SHIM_TEMPLATE_TITLE + | |
| ... | |
| 911 | |
| 912 // Set the width and height of the menu's bounding box - this is | |
| 913: // necessary for IE 6 so that the CSS for the <iframe> shim can | |
| 914: // simply set the <iframe>'s width and height to 100% to ensure | |
| 915: // that dimensions of an <iframe> shim are always sync'd to the | |
| 916 // that of its parent menu. Specifying a width and height also | |
| 917 // helps when positioning decorator elements (for creating effects | |
| /Users/eferraiuolo/Code/yui/yui3/src/test/js/Reporter.js: | |
| 113 //IE won't let you assign a name using the DOM, must do it the hacky way | |
| 114 try { | |
| 115: this._iframe = document.createElement("<iframe name=\"yuiTestTarget\" />"); | |
| 116 } catch (ex){ | |
| 117 this._iframe = document.createElement("iframe"); | |
| /Users/eferraiuolo/Code/yui/yui3/src/test/tests/unit/assets/bugs-tests.js: | |
| 14 var div = document.createElement("div"); | |
| 15 div.id = id; | |
| 16: div.innerHTML = "<iframe id='fixture2' name='yuiTestTest'></iframe>"; | |
| 17 document.body.appendChild(div.firstChild); | |
| 18 } catch (e) { | |
| /Users/eferraiuolo/Code/yui/yui3/src/widget-stack/js/Widget-Stack.js: | |
| 137 * @static | |
| 138 */ | |
| 139: Stack.SHIM_TEMPLATE = '<iframe class="' + Stack.SHIM_CLASS_NAME + '" frameborder="0" title="Widget Stacking Shim" src="javascript:false" tabindex="-1" role="presentation"></iframe>'; | |
| 140 | |
| 141 Stack.prototype = { | |
| 20 matches across 9 files |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment