|
Ultralight C++ API 2.0.0
|
#include <Ultralight/dom/Triggers.h>
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:
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. | |
| bool is_main_frame |
Whether or not the page is in the View's main frame.
| const char* origin |
The page's security origin, serialized (eg, "https://example.com", or "null" for an opaque origin).
| bool rules_allow |
Whether or not the origin rules allow the page.
| 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.