android-components / mozilla.components.concept.engine.webextension / ActionHandler

ActionHandler

interface ActionHandler (source)

A handler for web extension (browser and page) actions.

Page action support will be addressed in: https://github.com/mozilla-mobile/android-components/issues/4470

Functions

Name Summary
onBrowserAction open fun onBrowserAction(extension: WebExtension, session: EngineSession?, action: Action): Unit
Invoked when a browser action is defined or updated.
onPageAction open fun onPageAction(extension: WebExtension, session: EngineSession?, action: Action): Unit
Invoked when a page action is defined or updated.
onToggleActionPopup open fun onToggleActionPopup(extension: WebExtension, action: Action): EngineSession?
Invoked when a browser or page action wants to toggle a popup view.

Extension Functions

Name Summary
loadResourceAsString fun Any.loadResourceAsString(path: String): String
Loads a file from the resources folder and returns its content as a string object.