forked from mirrors/gecko-dev
Add a new module and feature callout functions to support messages
performing actions when a specified event is dispatched from the
content. This will allow Feature Callout messages to be dismissed when a
button is clicked within the page in which they are rendered. A screen
just needs to provide a `page_event_listeners` property, which is an
array of objects, each containing event listener parameters (event type,
target selector, and optional parameters) and an action specification
like those already used for buttons. The event listener will be added to
all elements matching the selector, so multiple different buttons could
dismiss or advance the message, if necessary. The new screen property
has this form:
```
page_event_listeners: [
{
params: {
type: string,
selectors: string,
options?: {
capture?: boolean,
once?: boolean,
preventDefault?: boolean,
},
},
action: {
type?: string,
data?: object,
dismiss?: boolean,
etc...
},
},
]
```
Differential Revision: https://phabricator.services.mozilla.com/D158899
|
||
|---|---|---|
| .. | ||
| v2-system-addon | ||
| index.rst | ||