docs
Loading...
Searching...
No Matches
InjectionRequest

#include <Ultralight/dom/Triggers.h>

Overview

Information passed to a DOM triggers filter callback.

When you set a filter callback with dom::SetInjectionFilter(), a View passes this struct each time it's about to add an attached Triggers set to a page. Origin rules run first and provide an initial verdict in rules_allow, which your callback can override.

This filter adds a developer-tools listener set only when a user setting is on:

if (request.triggers == dev_tools.raw())
return request.rules_allow && dev_tools_enabled;
return request.rules_allow;
});
void SetInjectionFilter(View *view, F &&filter)
Set a View's DOM triggers filter with a C++ callable (the typed form of View::SetDOMTriggersInjection...
Definition Triggers.h:605
Information passed to a DOM triggers filter callback.
Definition Triggers.h:113
View * view
The View loading the page (the View you set the filter on).
Definition Triggers.h:117
Note
New members may be added at the end in later versions, so read members by name.
See also
dom::SetInjectionFilter(), dom::ClearInjectionFilter(), dom::Triggers, ultralight::OriginRules

Public Attributes

View * view
 The View loading the page (the View you set the filter on).
ULDOMTriggers triggers
 The set of DOM listeners being decided on.
const char * origin
 The page's security origin, serialized (eg, "https://example.com", or "null" for an opaque origin).
bool is_main_frame
 Whether or not the page is in the View's main frame.
bool rules_allow
 Whether or not the origin rules allow the page.

Member Data Documentation

◆ is_main_frame

bool is_main_frame

Whether or not the page is in the View's main frame.

◆ origin

const char* origin

The page's security origin, serialized (eg, "https://example.com", or "null" for an opaque origin).

◆ rules_allow

bool rules_allow

Whether or not the origin rules allow the page.

◆ triggers

ULDOMTriggers triggers

The set of DOM listeners being decided on.

It's the handle your Triggers' raw() returns, so compare the two to tell your sets apart.

◆ view

View* view

The View loading the page (the View you set the filter on).


The documentation for this struct was generated from the following file: