Re: [whatwg/dom] Consider boolean interface for properties (#461)

With regards to OP.

A thing we could maybe do is revive `NamedNodeMap` (aka `ele.attributes`) and put a better attribute API there. Although given

```
ele.setAttribute(x, y);
ele.attributes.set(x, y);
```

and the potential savings of not having to allocate such an object if not asked for makes this not worth it. (Main upside I'd see is that we'd make the namespace situation less weird and have a convenient place to put attribute-related functionality. But continuing to use the "Attribute" suffix is probably fine.)

<hr>

With regards to the previous comment.

`<input value>` is reflected by `<input>.defaultValue`, not `<input>.value`. The latter only sometimes matches it as you've experienced (this goes for a number of other attributes too).

It does seem fairly popular in libraries to mix and match DOM attributes and IDL attributes (aka IDL-defined properties / methods), but we never really found a good way to abstract from that. That should probably be a separate discussion though as it's quite a bit different from OP.

-- 
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/461#issuecomment-303283726

Received on Tuesday, 23 May 2017 03:55:32 UTC