Created
June 4, 2012 14:37
-
-
Save jugglinmike/2868777 to your computer and use it in GitHub Desktop.
Bocoup.com: Future of 3PJS
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
<div class="container"> | |
<style scoped> | |
p { color: red; } | |
</style> | |
<p>This paragraph has red text.<p> | |
</div> | |
<p>This paragraph does not.</p> |
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 wrapInIframe( iframe, content ) { | |
var win = iframe.contentWindow; | |
var doc; | |
if (!win) { | |
throw("Failed to wrap content in iFrame: \ | |
please ensure the target iFrame is appended \ | |
to the document before writing"); | |
} | |
doc = win.document; | |
doc.open(); | |
doc.write(content); | |
doc.close(); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment