eclipse-paho / eclipse-paho/paho.mqtt.javascript

localStorage issue in Chrome extension

Open
#125 2 comments 0 reactions 1 assignee Claimed by @jpwsutton View on GitHub
help wanted
Dominant language
JavaScript
Stars
1.2k
Forks
466
PR merge metrics
No merged PRs in 30d

Description

Chrome extension does not support window.localStorage, and If you try to use the library to build an extension for Chrome you run into error `window.localStorage is not available in packaged apps. Use chrome.storage.local instead.` Quick fix for that is basically assign chrome.storage.local to
window.localStorage `window.localStorage = chrome.storage.local;` before create client, also to make it work you need to add `storage` permission to a manifest file.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.