2 ms·
while this might be true from standard texts perspective, its not how it works in practice. >If you really want to confuse those unfamiliar with boolean attrib
by rasz 5y ago
while this might be true from standard texts perspective, its not how it works in practice.
>If you really want to confuse those unfamiliar with boolean attributes, `contenteditable="false"` is editable
document.querySelector('.content > div').setAttribute('contenteditable',false)
and editing no longer works.
- chrismorgan 5y agoAs observed already in another comment, I erred on the contenteditable attribute, that it’s not actually a boolean attribute like the best-known one disabled; rather, it’s one of the handful of tristate attributes. But take one that’s actually a boolean attribute, and my remarks are completely correct. As for contenteditable, I’d still recommend writing `contenteditable` rather than `contenteditable="true"` (which two are equivalent).