Skip to content

Instantly share code, notes, and snippets.

Embed
What would you like to do?
Window, Self, and Web Workers
if ( window.Blob === undefined ) {
// attach library custom implementation
} else {
// use native implementation
}
function qux() {
var that = this;
that.bar = false;
document.getElementById('foo').addEventListener('click', function(){
that.bar = true;
}, false);
}
function qux() {
var self = this;
self.bar = false;
document.getElementById('foo').addEventListener('click', function(){
self.bar = true;
}, false);
}
if ( self.Blob === undefined ) {
// attach library custom implementation
} else {
// use native implementation
}
var root = this;
if ( typeof module !== 'undefined' && module.exports ) {
module.exports = _;
_._ = _;
} else {
root['_'] = _;
}
if ( typeof Blob === 'undefined' ) {
// attach library custom implementation
} else {
// use native implementation
}
window.open('http://www.google.com', 'googlePopup', 'status=1, toolbar=1');
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.