I would like to extend localStorage by executing some code every time a parameter is selected / saved. I could define getter / setter for all existing localStorage properties, but the problem is with the new settings.
For example, localStorage['somenewsetting'] = 123 creates a new parameter. I would like to automatically determine getter / setter for this property so that my add-on code is also executed for new settings.
Basically, I need Object.watch , but for all properties. I found __noSuchMethod__ , but it is not available in Chrome. Is there any gasket for this method? Or is there another way to view all the properties of an object?
Again, I need to make this work in Chrome.
source share