File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525
3434// https://github.com/chrisaljoudi/uBlock/issues/464
3535if ( document instanceof HTMLDocument === false ) {
3636 // https://github.com/chrisaljoudi/uBlock/issues/1528
37+ // A XMLDocument can be a valid HTML document.
3738 if (
3839 document instanceof XMLDocument === false ||
3940 document . createElement ( 'div' ) instanceof HTMLDivElement === false
Original file line number Diff line number Diff line change 2020*/
2121
2222/* jshint multistr: true */
23- /* global vAPI, HTMLDocument */
23+ /* global vAPI, HTMLDocument, XMLDocument */
2424
2525/******************************************************************************/
2626
3737// https://github.com/chrisaljoudi/uBlock/issues/464
3838if ( document instanceof HTMLDocument === false ) {
3939 // https://github.com/chrisaljoudi/uBlock/issues/1528
40+ // A XMLDocument can be a valid HTML document.
4041 if (
4142 document instanceof XMLDocument === false ||
4243 document . createElement ( 'div' ) instanceof HTMLDivElement === false
Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525
3131
3232// https://github.com/gorhill/uBlock/issues/464
3333if ( document instanceof HTMLDocument === false ) {
34- return ;
34+ // https://github.com/chrisaljoudi/uBlock/issues/1528
35+ // A XMLDocument can be a valid HTML document.
36+ if (
37+ document instanceof XMLDocument === false ||
38+ document . createElement ( 'div' ) instanceof HTMLDivElement === false
39+ ) {
40+ return ;
41+ }
3542}
3643
3744// This can happen
Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525
3131
3232// https://github.com/gorhill/uBlock/issues/464
3333if ( document instanceof HTMLDocument === false ) {
34- //console.debug('cosmetic-off.js > not a HTLMDocument');
35- return ;
34+ // https://github.com/chrisaljoudi/uBlock/issues/1528
35+ // A XMLDocument can be a valid HTML document.
36+ if (
37+ document instanceof XMLDocument === false ||
38+ document . createElement ( 'div' ) instanceof HTMLDivElement === false
39+ ) {
40+ return ;
41+ }
3642}
3743
3844// This can happen
Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525
3131
3232// https://github.com/gorhill/uBlock/issues/464
3333if ( document instanceof HTMLDocument === false ) {
34- //console.debug('cosmetic-on.js > not a HTLMDocument');
35- return ;
34+ // https://github.com/chrisaljoudi/uBlock/issues/1528
35+ // A XMLDocument can be a valid HTML document.
36+ if (
37+ document instanceof XMLDocument === false ||
38+ document . createElement ( 'div' ) instanceof HTMLDivElement === false
39+ ) {
40+ return ;
41+ }
3642}
3743
3844// This can happen
Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525
3131
3232// https://github.com/gorhill/uBlock/issues/464
3333if ( document instanceof HTMLDocument === false ) {
34- //console.debug('cosmetic-survey.js > not a HTLMDocument');
35- return ;
34+ // https://github.com/chrisaljoudi/uBlock/issues/1528
35+ // A XMLDocument can be a valid HTML document.
36+ if (
37+ document instanceof XMLDocument === false ||
38+ document . createElement ( 'div' ) instanceof HTMLDivElement === false
39+ ) {
40+ return ;
41+ }
3642}
3743
3844// This can happen
Original file line number Diff line number Diff line change 1919 Home: https://github.com/gorhill/uBlock
2020*/
2121
22- /* global vAPI, HTMLDocument */
22+ /* global vAPI, HTMLDocument, XMLDocument */
2323
2424/******************************************************************************/
2525/******************************************************************************/
3232
3333// https://github.com/gorhill/uBlock/issues/464
3434if ( document instanceof HTMLDocument === false ) {
35- return ;
35+ // https://github.com/chrisaljoudi/uBlock/issues/1528
36+ // A XMLDocument can be a valid HTML document.
37+ if (
38+ document instanceof XMLDocument === false ||
39+ document . createElement ( 'div' ) instanceof HTMLDivElement === false
40+ ) {
41+ return ;
42+ }
3643}
3744
3845// This can happen
You can’t perform that action at this time.
0 commit comments