blob: 6959c0a404799fa4157ccf7ba42d48809c375830 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
function forceLoadPluginElement(id) {
var e = document.getElementById(id);
var found = e.pluginFoundElement;
}
function forceLoadPlugin(ids, dontRemoveClassAttribute) {
if (Array.isArray(ids)) {
ids.forEach(function(element, index, array) {
forceLoadPluginElement(element);
});
} else {
forceLoadPluginElement(ids);
}
if (dontRemoveClassAttribute) {
// In some tests we need to do other stuff instead of removing the class
// attribute. In that case we pass a function and run that before returning.
if (typeof dontRemoveClassAttribute === 'function') {
dontRemoveClassAttribute();
}
return;
}
document.documentElement.removeAttribute("class");
}
|