1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 18:47:34 +00:00

LibWeb: Add JSON serialization for nested browsing contexts

This changes allows for nested browser contexts to be embedded in the
serialized JSON of their container element (like `iframe`) and enables
their inspection in the DOM Inspector.
This commit is contained in:
Vyacheslav Pukhanov 2021-11-24 19:15:04 +03:00 committed by Andreas Kling
parent 58397f356f
commit 3f006d81fe
4 changed files with 21 additions and 1 deletions

View file

@ -29,6 +29,14 @@ public:
protected:
RefPtr<BrowsingContext> m_nested_browsing_context;
private:
virtual bool is_browsing_context_container() const override { return true; }
};
}
namespace Web::DOM {
template<>
inline bool Node::fast_is<HTML::BrowsingContextContainer>() const { return is_browsing_context_container(); }
}