And then there's another layer of complication when you assume that any and all styles can change at any time. A big part of "contain"s use-case is when you can guarantee that your JS will never apply certain styles to certain elements. There's no way the browser could ever verify that.