Skip to content

Commit 1d662ee

Browse files
committed
refactor internal messaging interface
1 parent 144e70e commit 1d662ee

File tree

6 files changed

+85
-18119
lines changed

6 files changed

+85
-18119
lines changed

README.md

Lines changed: 10 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ comparisons with the help of dedicated console commands.
1616
- function code included in comparison result in form of a string, may help to see if it was altered
1717
- document, dom-elements and other non-serializable objects are filtered-out from the results
1818
- self recurring references displayed only once, the rest of occurrences are filtered-out
19+
- basic integration with search functionality within devtools
1920

2021
### Limitations and workarounds
2122

@@ -73,9 +74,15 @@ with a single argument, that will shift objects from right to left, showing diff
7374

7475
- `jsdiff-devtools.js` registers devtools panel
7576
- injects `console.diff` commands into inspected window's console interface
76-
- each function clones arguments and sends them via `postMessage` to `jsdiff-proxy.js`
77-
- injects `jsdiff-proxy.js` that listens on window message and sends it further to chrome runtime.
78-
- when `jsdiff-panel.js` is visible in devtools, it reflects result of last invocation and listens for future messages
77+
- each function clones arguments and sends them via `postMessage` to `jsdiff-proxy.js` in `jsdiff-console-to-proxy` message
78+
- injects `jsdiff-proxy.js` that listens on window `jsdiff-console-to-proxy` message and sends it further to chrome runtime in `jsdiff-proxy-to-devtools` message
79+
- listens on `jsdiff-proxy-to-devtools` and prepares payload for `vue/panel.js` and sends it with `jsdiff-devtools-to-panel-compare` message
80+
- when user invokes devtools search command - informs `vue/panel.js` with `jsdiff-devtools-to-panel-search` message
81+
- when `vue/panel.js` is visible in devtools
82+
- reflects result of last compare request
83+
- listens on `jsdiff-devtools-to-panel-compare` requests
84+
- listens on `jsdiff-devtools-to-panel-search` and tries to find query in DOM
85+
- if search query contains upper-case letter - the search will be case-sensitive
7986

8087
### Screenshot
8188

0 commit comments

Comments
 (0)