mirror of
https://github.com/RGBCube/serenity
synced 2025-05-31 04:48:14 +00:00
LibWeb: Port fire_a_page_transition_event() to new FlyString
This commit is contained in:
parent
bf048da8cb
commit
cbefab21be
6 changed files with 7 additions and 7 deletions
|
@ -567,14 +567,14 @@ Optional<CSS::MediaFeatureValue> Window::query_media_feature(CSS::MediaFeatureID
|
|||
}
|
||||
|
||||
// https://html.spec.whatwg.org/#fire-a-page-transition-event
|
||||
void Window::fire_a_page_transition_event(DeprecatedFlyString const& event_name, bool persisted)
|
||||
void Window::fire_a_page_transition_event(FlyString const& event_name, bool persisted)
|
||||
{
|
||||
// To fire a page transition event named eventName at a Window window with a boolean persisted,
|
||||
// fire an event named eventName at window, using PageTransitionEvent,
|
||||
// with the persisted attribute initialized to persisted,
|
||||
PageTransitionEventInit event_init {};
|
||||
event_init.persisted = persisted;
|
||||
auto event = PageTransitionEvent::create(associated_document().realm(), String::from_deprecated_string(event_name).release_value_but_fixme_should_propagate_errors(), event_init).release_value_but_fixme_should_propagate_errors();
|
||||
auto event = PageTransitionEvent::create(associated_document().realm(), event_name, event_init).release_value_but_fixme_should_propagate_errors();
|
||||
|
||||
// ...the cancelable attribute initialized to true,
|
||||
event->set_cancelable(true);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue