The HTMLContentElement.select
property reflects the select
attribute. It is a DOMString
containing a space-separated list of CSS selectors that select the content to insert in place of the <content> element.
object.select = "CSSselector CSSselector ...";
// Select <h1> elements and elements with class="error" myContentObject.select = "h1 .error";
This feature is no longer defined by any standards.
Feature | Chrome | Firefox (Gecko) | Internet Explorer | Opera | Safari (WebKit) |
---|---|---|---|---|---|
Basic support | 35 | 28 (28) [1] | No support | 26 | No support |
Feature | Android | Firefox Mobile (Gecko) | IE Phone | Opera Mobile | Safari Mobile |
---|---|---|---|---|---|
Basic support | 37 | 28.0 (28) [1] | No support | ? | ? |
[1] If Shadow DOM is not enabled in Firefox, <content> elements will behave like HTMLUnknownElement
. Shadow DOM was first implemented in Firefox 28 and is behind a preference, dom.webcomponents.enabled
, which is disabled by default.
© 2005–2018 Mozilla Developer Network and individual contributors.
Licensed under the Creative Commons Attribution-ShareAlike License v2.5 or later.
https://developer.mozilla.org/en-US/docs/Web/API/HTMLContentElement/select