mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-30 05:08:56 +00:00
LibWeb: Add a flag to track when a browsing context has been discarded
This commit is contained in:
@@ -1329,6 +1329,8 @@ void BrowsingContext::set_system_visibility_state(VisibilityState visibility_sta
|
||||
// https://html.spec.whatwg.org/multipage/window-object.html#a-browsing-context-is-discarded
|
||||
void BrowsingContext::discard()
|
||||
{
|
||||
m_has_been_discarded = true;
|
||||
|
||||
// 1. Discard all Document objects for all the entries in browsingContext's session history.
|
||||
for (auto& entry : m_session_history) {
|
||||
if (entry.document)
|
||||
|
||||
Reference in New Issue
Block a user