Skip to content

Instantly share code, notes, and snippets.

@0xPr0xy
Last active November 6, 2024 17:14
Show Gist options
  • Save 0xPr0xy/5b351d7e5a20da47e2eb1f1e6d418d97 to your computer and use it in GitHub Desktop.
Save 0xPr0xy/5b351d7e5a20da47e2eb1f1e6d418d97 to your computer and use it in GitHub Desktop.
test.html
<html>
<head>
<script>
function trigger() {
if (typeof Mobile != 'undefined' && typeof Mobile.OnFlowEnd == "function") {
let textNode = document.createTextNode("Result: 1"); document.body.appendChild(textNode);
//Mobile.OnFlowEnd("receive userId");
}
if (typeof webkit != 'undefined' && typeof webkit.messageHandlers.OnFlowEnd != 'undefined') {
let textNode = document.createTextNode("Result: 2"); document.body.appendChild(textNode);
//webkit.messageHandlers.OnFlowEnd.postMessage("receive userId");
}
if (typeof OnFlowEnd == 'object') {
let textNode = document.createTextNode("Result: 3"); document.body.appendChild(textNode);
//OnFlowEnd.postMessage("receive userId");
}
}
</script>
</head>
<body>
<button onclick="trigger()">Button</button>
</body>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment