Skip to content

Commit

Permalink
Better demo
Browse files Browse the repository at this point in the history
  • Loading branch information
ebidel committed Jan 25, 2016
1 parent a911269 commit a87be7e
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
4 changes: 2 additions & 2 deletions urlsearchparams/index.html
Expand Up @@ -102,11 +102,11 @@ <h3>Live Demo</h3>
}
}
let params = new URLSearchParams(location.search.slice(1));
params[func](paramName.value, paramVal.value);
var val = params[func](paramName.value, paramVal.value);
if (!func.match(/^get|has/)) {
window.history.replaceState({}, '', location.pathname + '?' + params);
} else {
alert(paramName.value + '=' + params.getAll(paramName.value));
ChromeSamples.log(params[func].name + '(' + paramName.value + '): ' + val);
}
}

Expand Down
3 changes: 3 additions & 0 deletions urlsearchparams/page.css
@@ -1,3 +1,6 @@
body {
margin-bottom: 2em;
}
.flex {
display: flex;
}
Expand Down

0 comments on commit a87be7e

Please sign in to comment.