Skip to content

Instantly share code, notes, and snippets.

@kingcos
Last active November 15, 2018 09:21
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save kingcos/f8a5b9d1651d9eda8c876ca1ea6cf848 to your computer and use it in GitHub Desktop.
Save kingcos/f8a5b9d1651d9eda8c876ca1ea6cf848 to your computer and use it in GitHub Desktop.
JavaScript demo of github.com/kingcos/SwiftyJSBrdge.
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>SwiftyJSBridge</title>
</head>
<body></body>
<script>
var url = 'scheme://host?param1=value1&param2=value2';
var iframe = document.createElement('iframe');
iframe.style.display = 'none';
iframe.src = url;
document.body.appendChild(iframe);
setTimeout(function() { iframe.remove(); }, 100);
</script>
<!-- Embed this gist -->
<script src="https://gist.github.com/kingcos/f8a5b9d1651d9eda8c876ca1ea6cf848.js"></script>
</html>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment