MCPcopy Create free account
hub / github.com/ampproject/amphtml / setLocationHashParams

Function setLocationHashParams

validator/js/webui/webui.js:25–33  ·  view source on GitHub ↗
(params)

Source from the content-addressed store, hash-verified

23
24// Sets window.location hash based on a dictionary of parameters.
25function setLocationHashParams(params) {
26 const out = [];
27 for (const key in params) {
28 if (params.hasOwnProperty(key)) {
29 out.push(key + '=' + encodeURIComponent(params[key]));
30 }
31 }
32 window.location.hash = out.join('&');
33}
34
35// Base64 encoded ascii to ucs-2 string.
36function atou(str) {

Callers 1

Calls 1

pushMethod · 0.45

Tested by

no test coverage detected