"layer" attribute - what is it exactly?

For instance, Firefox’s #browser-bottombox has it by default.

There’s practically zero documentation on it. I can tell it somehow creates/delimits an area of the browser to be rendered “independently” from the rest, but I have no idea of what it does exactly, or the implications it brings for other adjacent elements in the DOM.

My problem: I’ve got to set layer=“true” in the tabbrowser#content for a feature in one of my add-ons to work properly with other similar features of my other add-ons. And as far as my add-ons are concerned, everything seems to work fine, but because I don’t know the exact nature of the implementation of this attribute, I also can’t tell beforehand what kind of things this can possibly break (in Firefox or in other add-ons), or if anything will break at all.

Does anyone have a clue?

1 Like

From https://bugzilla.mozilla.org/show_bug.cgi?id=882384#c10 I can tell I’m at least right in my assumption. The practical implications come slowly, only by experimenting though. It’s very hard to predict beforehand the exact behavior of this attribute.

Read about what layers means here:
https://wiki.mozilla.org/Gecko:Overview#Graphics

The layer attribute causes an element to be rendered in its own layer.

1 Like

Perfect! There’s a lot in there that’s out of my league to be honest, but it’s definitely what I was looking for. Thank you!