Re: [csswg-drafts] [css-shadow-parts] IDL for attributes

Posting discussion about programmatic from #2411 to here.

@fergald
> > In my model the partmap is a dictionary where the values are Set()s of part names. So deleting would be partmap['a'].delete('b') and to remove "a" entirely, delete partmap['a'] (although partmap['a'].clear() would have the same effect).

> > What's the tradeoff between a dictionary of sets and something with an explicit API. Are there operations that dictionaries/sets allow that we wouldn't want or conversely are there operations dictionaries/sets don't allow that we would want and couldn't add later without breaking compatibility? I don't really want to write up an API for something that behaves essentially as a dictionary of sets if I can avoid it.

@rniwa
> Well, browser engines can't observe changes to a dictionary so your proposal as currently stands will make partmap readonly, and any changes to it will be discarded. It's even weirder because it has [SameObject] on it. It means the browser engine has to update the dictionary continuously? I don't think it works because then author scripts can override property descriptors of a dictionary, and all sorts of insanity ensues.

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

Received on Tuesday, 27 March 2018 05:43:14 UTC