Skip to content

considering using a namespace for fluent attributes (directives) instead of prefix #54

Closed
@caridy

Description

@caridy

Many new frameworks are relying on directives rather than prefixing attributes. e.g.:

<p data-l10n-foo="x">
vs 
<p l10n: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.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions