W3C home > Mailing lists > Public > public-fxtf-archive@w3.org > April 2018

Re: [fxtf-drafts] [geometry] Why does DOMQuad have readonly mutable points?

From: Tab Atkins Jr. via GitHub <sysbot+gh@w3.org>
Date: Wed, 18 Apr 2018 18:05:15 +0000
To: public-fxtf-archive@w3.org
Message-ID: <issue_comment.created-382477215-1524074714-sysbot+gh@w3.org>
> What do you think should happen when assigning a dictionary, though? (#124 (comment) above.) Or should there be dedicated methods to replace a point like quad.setP1({ x: 1, y: 2 }) ?

Assigning a dict would continue to throw a TypeError, as standard for something like this. If you have a dict, you should be able to just construct a DOMPoint from it and assign *that* - `quad.p1 = new DOMPoint({x:1, y:2})`.

-- 
GitHub Notification of comment by tabatkins
Please view or discuss this issue at https://github.com/w3c/fxtf-drafts/issues/124#issuecomment-382477215 using your GitHub account
Received on Wednesday, 18 April 2018 18:05:20 UTC

This archive was generated by hypermail 2.4.0 : Friday, 17 January 2020 19:50:22 UTC