Summary: A way to feature-detect which values of various tokenlist attributes actually do something. Useful for things like which iframe sandbox tokens are supported, or what "rel" values for <link> are supported.

Bug: https://bugzilla.mozilla.org/show_bug.cgi?id=1257849

Link to Standard: If only it were so simple. The basic feature is defined at https://dom.spec.whatwg.org/#dom-domtokenlist-supports but it depends on consumers of token lists defining the set of "supported tokens" for them. In practice that means HTML. HTML defines supported tokens for "rel" on <a>, <area>, and <link>, "sandbox" on <iframe>, and "dropzone" on all elements. Most of these definitions are sane, but the <link> one includes a "yeah, just monkeypatch this" aspect that makes it a bit hard to figure out what the actual set of supported tokens is.

Anyway, the relevant definitions are:
  https://html.spec.whatwg.org/multipage/semantics.html#attr-hyperlink-rel

https://html.spec.whatwg.org/multipage/embedded-content.html#attr-iframe-sandbox

https://html.spec.whatwg.org/multipage/interaction.html#the-dropzone-attribute
  https://html.spec.whatwg.org/multipage/semantics.html#linkTypes

In practice, this is the set of <link rel> values I'm claiming we support: "import" (if IsImportEnabled()), "prefetch", "dns-prefetch", "stylesheet", "next", "alternate", "preconnect", "icon". Anything else I'm missing? Do we do anything useful with rel="feed" anymore?

Estimated or target release: Firefox 49

Preference behind which this is implemented: none.

DevToolks bug: none; I'm not sure we need anything special here.

Support in other browsers: Blink supports this, though only for iframe@sandbox and link@rel (because its a@rel is not a DOMTokenList). Not sure about others.

Security/privacy concerns: none.

-Boris
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to