Created
February 11, 2015 21:40
-
-
Save jxpx777/5ae3f3deae8fa3166bc5 to your computer and use it in GitHub Desktop.
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
var WebSocket = null; | |
hiddenFrames.add(hiddenFrames.HiddenFrame({ | |
'onReady': function () { | |
var self = this; // Don't use bind for `this` since GCC warns w/ "dangerous use of the global this object" | |
self.element.contentWindow.location = require("sdk/self").data.url("ui/hidden.html"); | |
self.element.addEventListener("DOMContentLoaded", function () { | |
console.log("Initializing WebSocket for '" + self.element.contentWindow.location + "'"); | |
//noinspection JSUnresolvedVariable | |
WebSocket = self.element.contentWindow.MozWebSocket || self.element.contentWindow.WebSocket; | |
}, true, true); | |
} | |
})); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment