Skip to content

Commit 86afa51

Browse files
authored
Zotero.Utilities.varDump(): Set maxLevel for all Nodes/Windows (zotero#22)
Fixes varDump() practically never returning when called on `document` in the browser or on a node from another frame.
1 parent 3143d55 commit 86afa51

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

utilities.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1480,6 +1480,10 @@ var Utilities = {
14801480
level = maxLevel;
14811481
}
14821482
}
1483+
// Do the same for cross-context Node and Window objects
1484+
if (obj.hasOwnProperty('nodeType') || objType === '[object Window]') {
1485+
level = maxLevel;
1486+
}
14831487

14841488
// Recursion checking
14851489
if(!parentObjects) {

0 commit comments

Comments
 (0)