prevent DOM id confusion
DOM elements with an id are propagated as global variables https://stackoverflow.com/q/6381425
This commit is contained in:
parent
382e0428c6
commit
5064ca1d4e
|
@ -1,5 +1,3 @@
|
||||||
// Not using some slow features of ES6, see http://kpdecker.github.io/six-speed/
|
|
||||||
// like destructring, classes, defaults, spread, calculated key names
|
|
||||||
/* eslint no-var: 0 */
|
/* eslint no-var: 0 */
|
||||||
'use strict';
|
'use strict';
|
||||||
|
|
||||||
|
@ -40,7 +38,7 @@ function requestStyles(options, callback = applyStyles) {
|
||||||
asHash: true,
|
asHash: true,
|
||||||
}, options);
|
}, options);
|
||||||
// On own pages we request the styles directly to minimize delay and flicker
|
// On own pages we request the styles directly to minimize delay and flicker
|
||||||
if (typeof getStylesSafe !== 'undefined') {
|
if (typeof getStylesSafe === 'function') {
|
||||||
getStylesSafe(request).then(callback);
|
getStylesSafe(request).then(callback);
|
||||||
} else {
|
} else {
|
||||||
chrome.runtime.sendMessage(request, callback);
|
chrome.runtime.sendMessage(request, callback);
|
||||||
|
|
Loading…
Reference in New Issue
Block a user