Documentation

local storage handling

ls (core_ls.js) extension is used to handle the local storage

localStorage works in all modern browsers. IE supports it starting from version 8. Behaviour emulation technique exists for IE7, similar to localStorage. All ерыу methods are unified into single BX.localStorage interface.

Note: connecting the extension provides an option to use additional parameters lsId, lsTimeout and lsForce in BX.ajax.

Function Description
BX.localStorage.set Sets a storage element value.
BX.localStorage.get Gets a storage element value.
BX.onGlobalCustomEvent Function calls eventName custom event handlers in all opened site tabs.


Events

Event Description
BX.onLocalStorageSet When setting a storage element.
BX.onLocalStorageRemove When deleting a storage element.
BX.onLocalStorageChange When modifying a storage element (including adding and deleting)


© «Bitrix24», 2001-2024
Up