Created
March 10, 2014 23:16
-
-
Save yajd/9476471 to your computer and use it in GitHub Desktop.
_ff-addon-snippet-DynamicallyInsertFrameIntoPanel - When you dyanically insert iframe into panel you MUST use namespace HTML or else on DOMContentLoaded or load(with true) the iframe.contentWindow will be undefined!!! Crazyyyyy
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
| var iframe = win.document.createElementNS('http://www.w3.org/1999/xhtml', 'iframe'); | |
| iframe.setAttribute('style','border:0; background-color:rgba(255,255,255,.95); ;margin:0; padding:0; width:300px; height:300px; box-shadow: 0 3px 10px rgba(0, 0, 0, 0.3); border-radius:10px;'); | |
| iframe.addEventListener('DOMContentLoaded', function() { | |
| console.log('done loaded', iframe.contentWindow); | |
| }, false); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment