LibWeb: Add getter for history-action activation

This commit is contained in:
Jamie Mansfield 2024-05-25 14:24:07 +01:00 committed by Andrew Kaster
parent a741f68eb9
commit 34b2a4f7ca
Notes: sideshowbarker 2024-07-16 20:31:50 +09:00
2 changed files with 10 additions and 0 deletions

View File

@ -631,6 +631,13 @@ bool Window::has_transient_activation() const
return false;
}
// https://html.spec.whatwg.org/multipage/interaction.html#history-action-activation
bool Window::has_history_action_activation() const
{
// When the last history-action activation timestamp of W is not equal to the last activation timestamp of W, then W is said to have history-action activation.
return m_last_history_action_activation_timestamp != m_last_activation_timestamp;
}
// https://w3c.github.io/requestidlecallback/#start-an-idle-period-algorithm
void Window::start_an_idle_period()
{

View File

@ -122,6 +122,9 @@ public:
// https://html.spec.whatwg.org/multipage/interaction.html#transient-activation
bool has_transient_activation() const;
// https://html.spec.whatwg.org/multipage/interaction.html#history-action-activation
bool has_history_action_activation() const;
WebIDL::ExceptionOr<void> initialize_web_interfaces(Badge<WindowEnvironmentSettingsObject>);
Vector<JS::NonnullGCPtr<Plugin>> pdf_viewer_plugin_objects();