debugger-protocol-viewer icon indicating copy to clipboard operation
debugger-protocol-viewer copied to clipboard

"DOM.getFlattenedDocument" -- Different results between the same service sites in two different network environments

Open sxnys opened this issue 4 years ago • 0 comments

Chrome Version 95.0.4638.54

When I use devTools protocol "DOM.getFlattenedDocument", I got different results between the same site in two different network environments. The site has two layers of iframes nested.

What steps will reproduce the problem?

Send commad DOM.getFlattenedDocument with parameters {"depth": -1, "pierce": true}, with "Protocol monitor" in DevTools or using chrome.debugger.sendCommand:

chrome.debugger.sendCommand(debuggeeId, "DOM.getFlattenedDocument", {
            depth: -1,
            pierce: true
        }, function (res) {})

THE SAME SITE DEPLOYED IN TWO DIFFERENT ENVIRONMENTS!

  1. Send commad DOM.getFlattenedDocument in env1, I got node list with 14590 items. image

  2. Otherwise, send commad DOM.getFlattenedDocument in env2, I got node list with 12779 items. image

By comparison, it is found that the innermost iframe is not recognized in the second environment.

More

The document with "DOM.getFlattenedDocument" is following. image And I try to use DOMSnapshot.captureSnapshot instead, but I got the same issuse.

sxnys avatar Nov 03 '21 06:11 sxnys