Re: [css-houdini-drafts] [css-typed-om] How does Typed OM interact with existing setters on CSSStyleDeclaration?

> After this, what does the following return:

Yes, it's false - you already grabbed `y` when 'color' was "red", so it's a `CSSKeywordValue("red")`. But style maps are live, so the second `get()` returns a `CSSKeywordValue("green")`.

> is the thing in the map z or something else?

The underlying value has been set to the keyword "green".  `z` itself isn't retained; if you called `.get('color')` again you'll get a fresh object reifying the keyword "green".

> but to resolve #719 you need to update the underlying stuff like document.body.style.color = "green" ... except without changing the StylePropertyMap or something.

I don't know what you mean by this. Why does the StylePropertyMap need to not be changed?

> and now is x.get("color") === y true?

No, every call to `get()` reifies a fresh object.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/723#issuecomment-370024216 using your GitHub account

Received on Friday, 2 March 2018 19:17:57 UTC