Closed Bug 1425678 Opened 7 years ago Closed 7 years ago

CSSStyleDeclaration.hasOwnProperty("color") returns a different value than Blink / WebKit.

Categories

(Core :: DOM: CSS Object Model, defect)

defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: emilio, Unassigned)

References

Details

Cameron, you know way better WebIDL than I, do you know what's supposed to happen here? Is this our bug or a Blink / WebKit bug?
Flags: needinfo?(cam)
For the record, a simple STR is: document.body.style.hasOwnProperty("color") In any web page.
false is the correct result per spec, since CSSOM defines CSSStyleDeclaration to have IDL attributes corresponding to every property, e.g. interface CSSStyleDeclaration { attribute CSSOMString color; ... }; and IDL attributes are exposed as access properties on CSSStyleDeclaration.prototype, not on style declaration objects themselves.
Flags: needinfo?(cam)
*accessor properties
Blink/Webkit are known buggy here. The test is buggy as well, if it depends on their behavior. See https://bugs.chromium.org/p/chromium/issues/detail?id=700338 for the Blink bug tracking this; that also includes a link to the spec discussion. I don't know what WebKit's status is in terms of bugs filed.
That is... Unfortunate. I'll fix the test in bug 1425227.
Status: NEW → RESOLVED
Closed: 7 years ago
Resolution: --- → INVALID
You need to log in before you can comment on or make changes to this bug.