fune/browser/components/newtab/docs
Shane Hughes 5b20ae82fd Bug 1787532 - Let Feature Callouts perform actions on page events. r=mviar
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
2022-10-18 14:29:27 +00:00
..
v2-system-addon Bug 1787532 - Let Feature Callouts perform actions on page events. r=mviar 2022-10-18 14:29:27 +00:00
index.rst Bug 1753413 - fx doc: Remove whitespaces, trailing lines & windows CR r=andi,perftest-reviewers,sparky 2022-02-03 18:34:58 +00:00