mirror of
https://github.com/gorhill/uBlock.git
synced 2024-10-06 09:37:12 +02:00
multiple shadow roots is deprecated: https://www.chromestatus.com/features/4668884095336448
This commit is contained in:
parent
47cf6384b2
commit
118a7792cc
@ -467,7 +467,12 @@ var uBlockCollapser = (function() {
|
||||
while ( i-- ) {
|
||||
elem = elems[i];
|
||||
shadow = elem.shadowRoot;
|
||||
if ( shadow !== null && shadow.className === sessionId ) {
|
||||
// https://www.chromestatus.com/features/4668884095336448
|
||||
// "Multiple shadow roots is being deprecated."
|
||||
if ( shadow !== null ) {
|
||||
if ( shadow.className !== sessionId ) {
|
||||
elem.style.setProperty('display', 'none', 'important');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/pull/555
|
||||
|
@ -178,7 +178,12 @@ var hideElements = function(selectors) {
|
||||
while ( i-- ) {
|
||||
elem = elems[i];
|
||||
shadow = elem.shadowRoot;
|
||||
if ( shadow !== null && shadow.className === sessionId ) {
|
||||
// https://www.chromestatus.com/features/4668884095336448
|
||||
// "Multiple shadow roots is being deprecated."
|
||||
if ( shadow !== null ) {
|
||||
if ( shadow.className !== sessionId ) {
|
||||
elem.style.setProperty('display', 'none', 'important');
|
||||
}
|
||||
continue;
|
||||
}
|
||||
// https://github.com/gorhill/uBlock/pull/555
|
||||
|
Loading…
Reference in New Issue
Block a user