Re: Custom Elements: 'data-' attributes

On May 12, 2014, at 2:00 AM, Anne van Kesteren <annevk@annevk.nl> wrote:

> On Fri, May 9, 2014 at 12:56 PM, Ryosuke Niwa <rniwa@apple.com> wrote:
>> On the other hand, if the same element had exposed contentEditable property, then UA's native contentEditable property would simply be overridden since it would appear higher up in the prototype chain.  It's true that this custom element's contentEditable would have completely different semantics from that on other elements but that wouldn't break websites that use this custom element as long as authors are only accessing contentEditable property on instances of the custom element for semantics C.
> 
> I forgot the exact details, but we had some amount of trouble when we
> introduced min and max attributes due to sites using expandos with the
> same names.

But expandos are usually added to HTMLElement and other builtin elements, right?

What we're talking about here is adding properties and methods on a custom element, which is a subclass of HTMLElement so I don't think it'll cause the same issue.

- R. Niwa

Received on Monday, 12 May 2014 19:39:05 UTC