The contain property for CSS allows an author to indicate that an element and its contents are independent of the rest of the document tree.
object.style.contain = "value";
<'contain'> = none | strict | content | [ size || layout || style || paint ]
none
Indicates that the property has no effect.
strict
Turns on all forms of containment except style containment.
content
Turns on all forms of containment except size containment and style containment.
size
Turns on size containment.
layout
Turns on layout containment.
style
Turns on style containment.
paint
Turns on paint containment.