Fires when a view of the Listen app shows: the first as the app starts, then each one in-page navigation brings, and again when one is drawn again in place. A plugin that added a view with the riff_app_views filter binds its script to what it drew here, or on the riff:app_view event, which bubbles to document.
Also dispatched as the riff:app_view event on #riff, with the same detail. The event bubbles.
Parameters
detailObject- The view.
viewstringIts slug:home,albums,album,postand the rest of Riff's, or the plugin's own.panelHTMLElementThe element the view is drawn in,[data-riff-app-view]; a plugin's is inside it,[data-riff-app-panel="<slug>"].
apiObjectwindow.riff.
More Information
Usage
wp.hooks.addAction( 'riff.app_view', 'my-plugin', ( detail, api ) => {
} );
// Or, without wp-hooks:
window.riff.on( 'app_view', ( detail ) => {} );Source
emit( 'app_view', { view: detail.view, panel: detail.panel } );plugins/riff/assets/riff.jsView on GitHub
Changelog
| Version | Description |
|---|---|
| 6.4.0 | Introduced. |