|Modifier and Type||Method and Description|
Called when tabs.create is invoked, this method returns a *newly-created* session that GeckoView will use to load the requested page on.
@UiThread @Nullable default GeckoResult<GeckoSession> onNewTab(@NonNull WebExtension source, @NonNull WebExtension.CreateTabDetails createDetails)
source- An instance of
createDetails- Information about this tab.
GeckoResultwhich holds the returned GeckoSession. May be null, in which case the request for a new tab by the extension will fail. The implementation of onNewTab is responsible for maintaining a reference to the returned object, to prevent it from being garbage collected.