Re: [csswg-drafts] [css-syntax] Urange and its problems (#3588)

You just made me curious and I took a look. You're just getting and setting JS properties.

```
> 'unicodeRange' in rule.style
< false
```

You can use `getPropertyValue` to get the value of the descriptor, but `setProperty` throws an ugly NOT_IMPLEMENTED error. That's clearly a bug we should fix.

That being said, I don't know what should make `CSSStyleDeclaration.prototype.unicodeRange` work, spec-wise.

https://drafts.csswg.org/css-fonts-4/#dom-cssfontfacerule-style doesn't say anything.

https://drafts.csswg.org/cssom-1/#cssstyledeclaration says:

> For each CSS property property that is a supported CSS property, the following partial interface applies where camel-cased attribute is obtained by running the CSS property to IDL attribute algorithm for property.

https://drafts.csswg.org/cssom-1/#supported-css-property doesn't say anything about descriptors. And indeed Blink at least returns true for `'unicodeRange' in document.documentElement.style`, which is really weird.

So that part looks a spec issue to me, if you agree I'll file it. @tabatkins maybe you could update the tests to use getPropertyValue / setProperty? I can fix https://bugzilla.mozilla.org/show_bug.cgi?id=443978 (lol, quite an old bug) and file that spec issue about descriptors in `CSSStyleDeclaration`.

-- 
GitHub Notification of comment by emilio
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/3588#issuecomment-460019494 using your GitHub account

Received on Sunday, 3 February 2019 03:21:48 UTC