mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-09-08 08:48:39 +09:00
import FIREFOX_52_6_0esr_RELEASE from mozilla-esr52 hg repo
This commit is contained in:
commit
dcd9973243
150858 changed files with 23884658 additions and 0 deletions
23
layout/reftests/bugs/forceloadplugin.js
Normal file
23
layout/reftests/bugs/forceloadplugin.js
Normal file
|
|
@ -0,0 +1,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");
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue