reffy 9.0.1 → 9.1.2
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +4 -4
- package/src/lib/util.js +4 -2
- package/src/postprocessing/events.js +6 -4
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "reffy",
|
|
3
|
-
"version": "9.
|
|
3
|
+
"version": "9.1.2",
|
|
4
4
|
"description": "W3C/WHATWG spec dependencies exploration companion. Features a short set of tools to study spec references as well as WebIDL term definitions and references found in W3C specifications.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -34,9 +34,9 @@
|
|
|
34
34
|
"abortcontroller-polyfill": "1.7.3",
|
|
35
35
|
"commander": "9.4.0",
|
|
36
36
|
"fetch-filecache-for-crawling": "4.1.0",
|
|
37
|
-
"puppeteer": "
|
|
37
|
+
"puppeteer": "17.0.0",
|
|
38
38
|
"semver": "^7.3.5",
|
|
39
|
-
"web-specs": "2.
|
|
39
|
+
"web-specs": "2.23.0",
|
|
40
40
|
"webidl2": "24.2.2"
|
|
41
41
|
},
|
|
42
42
|
"devDependencies": {
|
|
@@ -45,7 +45,7 @@
|
|
|
45
45
|
"nock": "13.2.9",
|
|
46
46
|
"respec": "32.2.3",
|
|
47
47
|
"respec-hljs": "2.1.1",
|
|
48
|
-
"rollup": "2.
|
|
48
|
+
"rollup": "2.79.0"
|
|
49
49
|
},
|
|
50
50
|
"scripts": {
|
|
51
51
|
"test": "mocha --recursive tests/"
|
package/src/lib/util.js
CHANGED
|
@@ -952,7 +952,7 @@ const trees = {
|
|
|
952
952
|
// - Node -> Node
|
|
953
953
|
// - Document -> Window
|
|
954
954
|
// - ShadowRoot -> Element (both derive from Node, so covered by Node -> Node)
|
|
955
|
-
'dom': ['Window', 'Document', 'Node'],
|
|
955
|
+
'dom': ['Window', 'Document', 'Node', 'Node'],
|
|
956
956
|
|
|
957
957
|
// IndexedDB tree (defined through "get the parent" algorithms)
|
|
958
958
|
// https://www.w3.org/TR/IndexedDB/#ref-for-get-the-parent%E2%91%A0
|
|
@@ -990,10 +990,12 @@ function getInterfaceTreeInfo(iface, interfaces) {
|
|
|
990
990
|
while (iface) {
|
|
991
991
|
for (const [tree, nodes] of Object.entries(trees)) {
|
|
992
992
|
if (nodes.includes(iface)) {
|
|
993
|
+
const depth = nodes.lastIndexOf(iface);
|
|
993
994
|
return {
|
|
994
995
|
tree,
|
|
995
996
|
interface: iface,
|
|
996
|
-
depth
|
|
997
|
+
depth,
|
|
998
|
+
bubblingPath: nodes.slice(0, depth).reverse()
|
|
997
999
|
};
|
|
998
1000
|
}
|
|
999
1001
|
}
|
|
@@ -104,7 +104,7 @@ function setBubblingPerTarget(event, parsedInterfaces) {
|
|
|
104
104
|
updatedTargets.push({target: iface});
|
|
105
105
|
continue;
|
|
106
106
|
}
|
|
107
|
-
const { tree, depth } = treeInfo;
|
|
107
|
+
const { tree, depth, bubblingPath } = treeInfo;
|
|
108
108
|
if (!detected[tree]) {
|
|
109
109
|
detected[tree] = {root: false, nonroot: false};
|
|
110
110
|
}
|
|
@@ -113,7 +113,7 @@ function setBubblingPerTarget(event, parsedInterfaces) {
|
|
|
113
113
|
updatedTargets.push({target: iface});
|
|
114
114
|
detected[tree].root = true;
|
|
115
115
|
} else {
|
|
116
|
-
treeInterfaces.push(iface);
|
|
116
|
+
treeInterfaces.push({ iface, bubblingPath });
|
|
117
117
|
detected[tree].nonroot = true;
|
|
118
118
|
}
|
|
119
119
|
}
|
|
@@ -125,9 +125,11 @@ function setBubblingPerTarget(event, parsedInterfaces) {
|
|
|
125
125
|
event.bubbles = false;
|
|
126
126
|
}
|
|
127
127
|
}
|
|
128
|
-
for (let iface of treeInterfaces) {
|
|
128
|
+
for (let { iface, bubblingPath } of treeInterfaces) {
|
|
129
129
|
if (event.hasOwnProperty('bubbles')) {
|
|
130
|
-
updatedTargets.push(
|
|
130
|
+
updatedTargets.push(Object.assign(
|
|
131
|
+
{ target: iface, bubbles: event.bubbles },
|
|
132
|
+
event.bubbles ? { bubblingPath } : {}));
|
|
131
133
|
}
|
|
132
134
|
}
|
|
133
135
|
event.targets = updatedTargets;
|