MWebviewPlugin.close()

BFChainAugust 11, 2023
  • Plugin
  • MWebviewPlugin
  • close
Less than 1 minute

Destroys the specified webview.

MWebviewPlugin.close(webview_id)

Parameters

  • webview_id: The webview identifier. String value.

Returns

A Promise that resolves to a boolean. Resolves to true if destroyed successfully, false if failed.

Example

import { mwebviewPlugin } from "@plaoc/plugin";

(async () => {
  const { webview_id } = await mwebviewPlugin.open("http://xxx");
  
  const success = await mwebviewPlugin.close(webview_id);

  if (success) {
    console.log("Success");
  } else {
    console.log("Failed");
  }  
})();

Platform Compatibility

Property/Method/EventAndroidiOSDesktop-DevDesktop
closeX

See Also

MWebviewPlugin

Comments
  • Latest
  • Oldest
  • Hottest
Powered by Waline v2.13.0