It is too much work to click that small Refresh button to view changes in the dataGrid. The inspected window fires a storage event that can be hooked into to automatically update the data grid. NOTE: I could totally see this as being a "setting". If lots of storage events are firing and the table keeps updating it might not be good for a developer to work with. It may be a good idea to add a permanent setting, and toolbar item, that will allow the user to activate "live updates" or not!
Created attachment 32993 [details] Live Update both DOM Storage Grids NOTES: - Assumes only 2 storages exist (like the current code does with the "isLocalStorage" property. - Tested on localStorage and sessionStorage and it worked great. - register/unregister functions would be great to use for a toolbar item in case this moves into a setting.
Comment on attachment 32993 [details] Live Update both DOM Storage Grids > - * Copyright (C) 2007, 2008 Apple Inc. All rights reserved. > + * Copyright (C) 2007, 2008, 2009 Apple Inc. All rights reserved. You should add your name and copyright on a new line instead. > + inspectedWindow.addEventListener('storage', this._storageEventListener, true); You should use double quotes for strings. > + var flag = (event.storageArea == InspectorController.inspectedWindow().localStorage); > + if (this._domStorage) { An early return would be better here. > + var domStorageLength = this._domStorage.length; > + for (var i = 0; i < domStorageLength; ++i) { > + var domStorage = this._domStorage[i]; > + if (flag == domStorage.isLocalStorage) { Triple equals. > + var view = domStorage._domStorageView; > + if (this.visibleView && view == this.visibleView) Ditto.
Created attachment 33378 [details] Fixed Based on Review
(In reply to comment #2) > You should add your name and copyright on a new line instead. Done. > You should use double quotes for strings. Done. All. > An early return would be better here. Done. > > + var domStorageLength = this._domStorage.length; > > + for (var i = 0; i < domStorageLength; ++i) { > > + var domStorage = this._domStorage[i]; > > + if (flag == domStorage.isLocalStorage) { > > Triple equals. Done. Renamed flag to "isLocalStorage" like the inspect() patch coming for Keishi. > > + var view = domStorage._domStorageView; > > + if (this.visibleView && view == this.visibleView) > > Ditto. Done.
http://trac.webkit.org/changeset/46518
Instead of a setting, another option is to add a timer before doing the update. Both options are valid.