Created
April 27, 2013 10:40
-
-
Save elkorn/5472655 to your computer and use it in GitHub Desktop.
DOM recipes
This file contains 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
function getCleanContentHolders(argument) { | |
var iframe = document.createElement('iframe'); | |
iframe.style.display = "none"; | |
iframe = document.body.appendChild(iframe); | |
var _window = iframe.contentWindow; | |
var _document = iframe.contentDocument || iframe.contentWindow.document; | |
document.body.removeChild(iframe); | |
return { | |
window: _window, | |
document: _document | |
}; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment