Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
var url = new URL(window.location.href);
var data = url.searchParams.get("data");
var params = {};
data.split('&').forEach(element => {
params[element.split('=')[0]] = element.split('=')[1];
function doEmbedding(){
var elmWrapper = document.getElementById("contents");
var div = document.createElement("div");
div.innerText = params.testparam + " " + params.testparam2;
<h1>This is test page</h1>
<div id="contents"></div>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment