This commit is contained in:
gorhill 2015-08-28 10:44:33 -04:00
parent 1a380f0959
commit 94a1d72fc8
7 changed files with 49 additions and 15 deletions

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -34,6 +34,7 @@
// https://github.com/chrisaljoudi/uBlock/issues/464 // https://github.com/chrisaljoudi/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
// https://github.com/chrisaljoudi/uBlock/issues/1528 // https://github.com/chrisaljoudi/uBlock/issues/1528
// A XMLDocument can be a valid HTML document.
if ( if (
document instanceof XMLDocument === false || document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false document.createElement('div') instanceof HTMLDivElement === false

View file

@ -20,7 +20,7 @@
*/ */
/* jshint multistr: true */ /* jshint multistr: true */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -37,6 +37,7 @@
// https://github.com/chrisaljoudi/uBlock/issues/464 // https://github.com/chrisaljoudi/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
// https://github.com/chrisaljoudi/uBlock/issues/1528 // https://github.com/chrisaljoudi/uBlock/issues/1528
// A XMLDocument can be a valid HTML document.
if ( if (
document instanceof XMLDocument === false || document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false document.createElement('div') instanceof HTMLDivElement === false

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -31,7 +31,14 @@
// https://github.com/gorhill/uBlock/issues/464 // https://github.com/gorhill/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
return; // https://github.com/chrisaljoudi/uBlock/issues/1528
// A XMLDocument can be a valid HTML document.
if (
document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false
) {
return;
}
} }
// This can happen // This can happen

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -31,8 +31,14 @@
// https://github.com/gorhill/uBlock/issues/464 // https://github.com/gorhill/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
//console.debug('cosmetic-off.js > not a HTLMDocument'); // https://github.com/chrisaljoudi/uBlock/issues/1528
return; // A XMLDocument can be a valid HTML document.
if (
document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false
) {
return;
}
} }
// This can happen // This can happen

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -31,8 +31,14 @@
// https://github.com/gorhill/uBlock/issues/464 // https://github.com/gorhill/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
//console.debug('cosmetic-on.js > not a HTLMDocument'); // https://github.com/chrisaljoudi/uBlock/issues/1528
return; // A XMLDocument can be a valid HTML document.
if (
document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false
) {
return;
}
} }
// This can happen // This can happen

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
@ -31,8 +31,14 @@
// https://github.com/gorhill/uBlock/issues/464 // https://github.com/gorhill/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
//console.debug('cosmetic-survey.js > not a HTLMDocument'); // https://github.com/chrisaljoudi/uBlock/issues/1528
return; // A XMLDocument can be a valid HTML document.
if (
document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false
) {
return;
}
} }
// This can happen // This can happen

View file

@ -19,7 +19,7 @@
Home: https://github.com/gorhill/uBlock Home: https://github.com/gorhill/uBlock
*/ */
/* global vAPI, HTMLDocument */ /* global vAPI, HTMLDocument, XMLDocument */
/******************************************************************************/ /******************************************************************************/
/******************************************************************************/ /******************************************************************************/
@ -32,7 +32,14 @@
// https://github.com/gorhill/uBlock/issues/464 // https://github.com/gorhill/uBlock/issues/464
if ( document instanceof HTMLDocument === false ) { if ( document instanceof HTMLDocument === false ) {
return; // https://github.com/chrisaljoudi/uBlock/issues/1528
// A XMLDocument can be a valid HTML document.
if (
document instanceof XMLDocument === false ||
document.createElement('div') instanceof HTMLDivElement === false
) {
return;
}
} }
// This can happen // This can happen