Premium support for our pure JavaScript UI components
Hi team!
You're using some methods on BrowserHelper in examples/_shared/shared.js
(for example in scheduler) to implement the theme switcher in your demos. To store the selected value in LocalStorage you're using: storageAvailable
, setLocalStorageItem
, getLocalStorageItem
, removeLocalStorageItem
. We find them useful. Could you please consider to make them public? Thanks in advance.
Best,
Pavel
Pavlo Miklashevych
Sr. Frontend Developer
Hi Pavel,
Why do you need those public and don't use localStorage directly? We didn't do a lot with that.
Hi Alex! Yes, the helper has many useful stuff in there. So it would be nice to review the file and make things public if possible. What I have seen so far, a developer of my team referred to your shared.js file to see how the theme picker is implemented. He found the usage and copy-pasted the methods to our source code. I don't like the idea of copy-pasting and I believe it is a valid request to make those functions public. They provide a safe way to work with localStorage. So before read/write/delete it checks if the local storage is available.
Pavlo Miklashevych
Sr. Frontend Developer