4

I was just stumbling upon Chapter 7.2 of the W3C HTML5 spec, where it is said

A node (in particular elements and text nodes) can be marked as inert.

Source: http://www.w3.org/TR/html5/single-page.html#inert-subtrees

Unfortunately, the specification does not say how to do it. Does anybody know?

I've already tried setting the "inert[='true']" attribute to an element ... does not work.

It seems to me, as this might be a HTML5 feature that nobody cared to implement or use so far ... caniuse.com does not even know of it ... but maybe I'm wrong?

NicBright
  • 7,289
  • 5
  • 18
  • 19

3 Answers3

2

It looks like the inert attribute may have been removed from the standard. Early 2014. Posts about it seem to have dried up online so it is probably safe to assume we won't be able to use it.

jaredkwright
  • 1,390
  • 2
  • 11
  • 27
2

The attribute inert exists in HTML 5.1.

HTML 5.1 has now progressed to a W3C recommendation, which is is essentially an endorsement that the proposal is ready for deployment to the public, so we should see the major browser makers starting to implement the recommendations if they haven't done so already.

Whilst caniuse has no information on browser support for the inert subtree yet, but I have raised an issue asking for it to be added.

I've written a quick fiddle which lets you see if your browser supports it (though Chromium/Chrome/Safari and FF do not at the time of writing).

toomanyredirects
  • 1,972
  • 15
  • 23
  • 1
    Thanks for the link. But it says right at the top, that there is no content attribute. The section describes just an "abstract concept of inertness". It seems to me that e.g. a modal dialog will implicitly mark the document as inert. – NicBright Nov 21 '16 at 06:15
1

There is a polyfill that could mimic the inert behavior to a node and its corresponding subtree. There is also a YouTube video on Google Chrome Developer's Channel showing this polyfill in action and displaying the power and uses for this behavior.

On buzgilla there is an excellent response explaining why it wasn't and won't be implemented in Firefox as an attribute.

There's no such attribute. If we implement this concept it'll be as part of <dialog>.

It's really confusing, this attribute with pointer-events would have been perfect and helpful for a lot of situations

Ahmad Alfy
  • 13,107
  • 6
  • 65
  • 99