mirror of
https://github.com/fergalmoran/ladybird.git
synced 2025-12-26 11:20:03 +00:00
LibWeb: Update Location::reload() to use navigables
This commit is contained in:
committed by
Andreas Kling
parent
dd7bba66ed
commit
083e4a3f30
@@ -359,8 +359,17 @@ WebIDL::ExceptionOr<void> Location::set_hash(String const& value)
|
||||
// https://html.spec.whatwg.org/multipage/history.html#dom-location-reload
|
||||
void Location::reload() const
|
||||
{
|
||||
auto& window = verify_cast<HTML::Window>(HTML::current_global_object());
|
||||
window.did_call_location_reload({});
|
||||
// 1. Let document be this's relevant Document.
|
||||
auto document = relevant_document();
|
||||
|
||||
// 2. If document is null, then return.
|
||||
if (!document)
|
||||
return;
|
||||
|
||||
// FIXME: 3. If document's origin is not same origin-domain with the entry settings object's origin, then throw a "SecurityError" DOMException.
|
||||
|
||||
// 4. Reload document's node navigable.
|
||||
document->navigable()->reload();
|
||||
}
|
||||
|
||||
// https://html.spec.whatwg.org/multipage/history.html#dom-location-replace
|
||||
|
||||
Reference in New Issue
Block a user