4 ms·
The letter after - is uppercased, and the - is removed. So, `div.dataset.MyCoolAttribute`.
by jaffathecake 2y ago
The letter after - is uppercased, and the - is removed. So, `div.dataset.MyCoolAttribute`.
- lelanthran 2y agoWon't that clash in this case, with the version that has double hypens?
- jaffathecake 2y agoI'm talking about your example with double hyphens. It's the initial double hyphen that causes the first letter to be uppercase.
- lelanthran 2y ago> I'm talking about your example with double hyphens. It's the initial double hyphen that causes the first letter to be uppercase. I was asking about the initial example, and made a mistake in the question I asked. To clarify, according to the standards, what do the following transformations result in? data-my--cool-data data-my-cool-data
- jaffathecake 2y agoel.dataset['my-CoolData'] and el.dataset.myCoolData respectively