(item, callback, viewName)
| 845 | // Toggle an item open (expand it). After the view updates, fires callback. |
| 846 | // viewName optionally specifies which view to wait for (e.g. 'modules'). |
| 847 | toggleOpen(item, callback, viewName) { |
| 848 | if (!this.isExpandable(item) || !item.value) { |
| 849 | callback(); |
| 850 | return; |
| 851 | } |
| 852 | this.pendingViewName = viewName || 'global'; |
| 853 | this.pendingViewCallback = (items, name) => { |
| 854 | if (name === 'property' && items) { |
| 855 | item.children = items; |
| 856 | item.flags = '-' + item.flags.slice(1); |
| 857 | } |
| 858 | callback(); |
| 859 | }; |
| 860 | this.doToggle(item.value); |
| 861 | } |
| 862 | |
| 863 | // Format a value for display in compact WebKit-style format. |
| 864 | // depth 0 = expand one level of properties; depth 1+ = abbreviate. |
no test coverage detected