W3C home > Mailing lists > Public > public-css-archive@w3.org > March 2018

Re: [csswg-drafts] [css-shadow-parts] decide on forwarding micro-syntax for partmap

From: Ryosuke Niwa via GitHub <sysbot+gh@w3.org>
Date: Tue, 27 Mar 2018 03:52:40 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-376388584-1522122760-sysbot+gh@w3.org>
I'm not certain either API makes sense. What you're adding is a relationship so `partmap.add({part: 'a', subpart: 'b'})` or `partmap.add('a', 'b')` makes more sense to me. Similarly, `partmap.remove({part: 'a'})` or `partmap.remove('a', 'b')`.

In your model, how do you delete a part in the map? `delete partmap['a']` or `partmap.remove('a')`? If it's latter, do we require developers to explicitly add a part by `partmap.add('a')` before accessing `partmap['a']`?

-- 
GitHub Notification of comment by rniwa
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/2411#issuecomment-376388584 using your GitHub account
Received on Tuesday, 27 March 2018 03:52:55 UTC

This archive was generated by hypermail 2.4.0 : Tuesday, 5 July 2022 06:41:26 UTC