Sha256: c9e47db2e2ce7338d29fff4c9f971a134127a56e63b431885efeeef4037d3d9c
Contents?: true
Size: 767 Bytes
Versions: 6
Compression:
Stored size: 767 Bytes
Contents
/* eslint-disable no-prototype-builtins, no-restricted-syntax, no-param-reassign */ // require self ((exports) => { let callbacks = {}; exports.onpopstate = () => { for (let callbackId in callbacks) { if (callbacks.hasOwnProperty(callbackId)) { callbacks[callbackId](); } } }; const registerCallback = (callbackId, callback) => { callbacks[callbackId] = callback; }; const unregisterCallback = (callbackId) => { callbacks[callbackId] = null; } const pushState = (url) => { if (window.history) { window.history.pushState(null, null, url); } }; exports.Decidim = exports.Decidim || {}; exports.Decidim.History = { registerCallback, unregisterCallback, pushState }; })(window);
Version data entries
6 entries across 6 versions & 1 rubygems