W3C home > Mailing lists > Public > public-css-archive@w3.org > October 2017

Re: [csswg-drafts] [css-logical-1] [css-cascade-3] The all longhand probably shouldn't set logical properties.

From: Oriol Brufau via GitHub <sysbot+gh@w3.org>
Date: Mon, 23 Oct 2017 18:11:57 +0000
To: public-css-archive@w3.org
Message-ID: <issue_comment.created-338748247-1508782316-sysbot+gh@w3.org>
Note that, if you need to rely on the order of an iteration, you should not use [for-in loops](http://www.ecma-international.org/ecma-262/8.0/#sec-enumerate-object-properties):

> The mechanics and order of enumerating the properties is not specified

Instead, you should use something like `for (prop of Reflect.ownKeys(props))`, because the order of [OrdinaryOwnPropertyKeys](http://www.ecma-international.org/ecma-262/8.0/#sec-ordinaryownpropertykeys) is explicitly defined.

Other than this, I think the result would always be as expected if you used `removeProperty` just before `setProperty`. Would it be backwards-compatible if CSSOM  automatically did this?

-- 
GitHub Notification of comment by Loirooriol
Please view or discuss this issue at https://github.com/w3c/csswg-drafts/issues/1898#issuecomment-338748247 using your GitHub account
Received on Monday, 23 October 2017 18:12:00 UTC

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