MitsuhaKitsune / vuex-webextensions

A Vuex plugin to share store through webextensions components
MIT License
83 stars 30 forks source link

Store state properties save in background script context #11

Closed KBoyarchuk closed 6 years ago

KBoyarchuk commented 6 years ago

In the example that is attached to the repository, if remove from the list of properties "counter" (as example)

VuexWebExtensions({
      persistentStates: ['name']
})

and reopen popup page (preliminary having increased value of a variable "counter"), we will see that the value remains unchanged. Whether it is possible to initializes again all the values that are not in the "persistentStates" array, when reopen popup / content_script ?

MitsuhaKitsune commented 6 years ago

I'm not sure if I understand fine, the persistent states should be filtered by the background script handling based on your config, the filter are on https://github.com/MitsuhaKitsune/vuex-webextensions/blob/master/src/backgroundScript.js#L19

Can't test it now because my HDD crash on the last week, I'm waiting for the replacement to continue working