Re: [whatwg/dom] Proposal to improve the DOM creation api (#150)

I can't imagine how to handle the order of appearance of attributes in a Custom Element.
If for some reason you'll make possible to create an element with some attributes then give me a chance to put the attributes as an array or something similar.

I may assume that the order of appearance could be achieved at ```observedAttributes```.

```javascript
class TestHTMLElement extends HTMLElement {
  constructor() { super(); }
  attributeChangedCallback(name, oldValue, newValue) {
    // I want to see here the order or reaction
    // as indicated in the observedAttributes
  }
  static get observedAttributes() {
    return ['attr1', 'attr4', 'attr2', 'attr3']
  }
}
```

I expose this idea because when you use ```createElement```, then you're free to setup the attributes in the order you need.

-- 
You are receiving this because you are subscribed to this thread.
Reply to this email directly or view it on GitHub:
https://github.com/whatwg/dom/issues/150#issuecomment-318037955

Received on Wednesday, 26 July 2017 12:27:06 UTC