You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Many new frameworks are relying on directives rather than prefixing attributes. e.g.:
<pdata-l10n-foo="x">
vs
<pl10n:foo="x">
The benefit here is that namespacing the attribute can have a very specific meaning, including the ability to not really adding it to the DOM. While using data- could probably conflict with data attributes, which will force you to add it to the Element in the DOM, which will imply a perf penalty for something that doesn't really have to go to the DOM.
Additionally, there is a proposal for HTML to claim namespaces for attributes, which might help in the long run to apply special behavior to new custom elements who are receiving attributes with the corresponding namespace.