- From: biojet1 via GitHub <sysbot+gh@w3.org>
- Date: Sun, 22 May 2022 05:31:37 +0000
- To: public-houdini-archive@w3.org
biojet1 has just created a new issue for https://github.com/w3c/css-houdini-drafts: == Use .item(index) in CSSTransformValue, CSSNumericArray or any array like interface == Use `val.item(index)` instead of `val[index]`, in [CSSTransformValue](https://drafts.css-houdini.org/css-typed-om/#csstransformvalue), [CSSNumericArray](https://drafts.css-houdini.org/css-typed-om/#cssnumericarray) or any array like interface Its easier to implement in javascript/typescript example: ``` const val = new CSSTransformValue ([new CSSRotate(30), new CSSTranslate(3, 4)]); val.item(1); //<-- CSSTranslate(3, 4) val.item(0); //<-- CSSRotate(30) ``` To achieve `val[index]` in javascript/typescript you have to use [proxy](https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Proxy) or assign the array items to the instance itself Please view or discuss this issue at https://github.com/w3c/css-houdini-drafts/issues/1071 using your GitHub account -- Sent via github-notify-ml as configured in https://github.com/w3c/github-notify-ml-config
Received on Sunday, 22 May 2022 05:31:38 UTC