mirror of
https://repo.dactyloidae.xyz/Dactyloidae/UXP.git
synced 2026-08-15 08:53:07 +09:00
devtools: DOMUtils.getCSSValuesForProperty() and DOMUtils.getSubpropertiesForCSSProperty() can fail, wrap them in try-catch blocks
This commit is contained in:
parent
263429ba00
commit
f35b2f4d3d
1 changed files with 8 additions and 2 deletions
|
|
@ -61,13 +61,19 @@ function generateCssProperties() {
|
|||
}
|
||||
|
||||
// Don't send colors over RDP, these will be re-attached by the front.
|
||||
let values = DOMUtils.getCSSValuesForProperty(name);
|
||||
let values = "";
|
||||
try {
|
||||
values = DOMUtils.getCSSValuesForProperty(name);
|
||||
} catch(e) {}
|
||||
if (values.includes("aliceblue")) {
|
||||
values = values.filter(x => !colors.includes(x));
|
||||
values.unshift("COLOR");
|
||||
}
|
||||
|
||||
let subproperties = DOMUtils.getSubpropertiesForCSSProperty(name);
|
||||
let subproperties = [];
|
||||
try {
|
||||
subproperties = DOMUtils.getSubpropertiesForCSSProperty(name);
|
||||
} catch(e) {}
|
||||
|
||||
// In order to maintain any backwards compatible changes when debugging older
|
||||
// clients, take the definition from the static CSS properties database, and fill it
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue