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 styleFrame = document.createElement( 'iframe' ), | |
stylesWaiting = [], | |
styleFrameIsReady = false; | |
styleFrame.setAttribute( 'style', | |
'visibility:hidden;position:absolute;top:0;left:0;width:1px;height:1px;' ); | |
styleFrame.addEventListener( 'load', function () { | |
var doc = styleFrame.contentDocument, | |
html, i, l; |
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
function WindowController () { | |
this.id = Math.random(); | |
this.isMaster = false; | |
this.others = {}; | |
window.addEventListener( 'storage', this, false ); | |
window.addEventListener( 'unload', this, false ); | |
this.broadcast( 'hello' ); |
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 el = ( function () { | |
var doc = document; | |
var directProperties = { | |
'class': 'className', | |
className: 'className', | |
defaultValue: 'defaultValue', | |
'for': 'htmlFor', | |
html: 'innerHTML', |
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
//-------------------------------------------------------------------------------------------------- | |
// | |
// stage 2 of 3 | |
// | |
// challenge: | |
// reveal the solution within VM.mem | |
// | |
// disclaimer: | |
// tested in ie 9, firefox 6, chrome 14 and v8 shell (http://code.google.com/apis/v8/build.html), | |
// other javascript implementations may or may not work. |