UNPKG

cordova-plugin-wizviewmanager

Version:

This plugin allows managing multiple webviews in a single application.

29 lines (26 loc) 1.03 kB
<!DOCTYPE html> <html> <head> <meta name="viewport" content="width=device-width, initial-scale=1.0, maximum-scale=1.0, user-scalable=no" /> <meta http-equiv="Content-type" content="text/html; charset=utf-8"> <script type="text/javascript" charset="utf-8"> function hideView() { var targetView = 'mainView'; var params = { action: "hide" }; wizViewMessenger.postMessage(params, targetView); } function onBodyLoad() { function wizMessageReceiver(e) { document.body.style.background = e.data.color; } window.addEventListener('message', wizMessageReceiver, false); } </script> </head> <body bgcolor="red" onload="onBodyLoad()"> <h1>Custom View</h1> <div id="customViewId"> <input type="button" value="Hide View" onclick="hideView()" /> </div> </body> </html>