generator-steroids
Version:
A Yeoman generator for Steroids
31 lines (18 loc) • 621 B
HTML
<script>
// Listen for window.postMessage() messages that the modal webview sends to us
window.addEventListener("message", function(msg) {
if ( msg.data.action == "closeModal" ) {
steroids.modal.hide();
}
});
// Initialize the modal
var modalView = new steroids.views.WebView("/views/modalExample/show.html");
steroids.view.navigationBar.show("Modal Example");
// Helper functions
function openModal() {
steroids.modal.show(modalView);
}
</script>
<div class="content-padded">
<div class="topcoat-button--cta full center" ontouchend="openModal()">Open modal</div>
</div>