@domql/event 2.28.81 → 2.28.83
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/animationFrame.js
CHANGED
|
@@ -23,6 +23,12 @@ export const initAnimationFrame = (ctx) => {
|
|
|
23
23
|
|
|
24
24
|
function requestFrame () {
|
|
25
25
|
// Iterate over frameListeners
|
|
26
|
+
|
|
27
|
+
if (!frameListeners.size) {
|
|
28
|
+
window.cancelAnimationFrame(requestFrame) // Stop if no listeners
|
|
29
|
+
return
|
|
30
|
+
}
|
|
31
|
+
|
|
26
32
|
for (const element of frameListeners) {
|
|
27
33
|
if (!element.parent.node.contains(element.node)) {
|
|
28
34
|
frameListeners.delete(element) // Remove if node has no parent
|
|
@@ -40,6 +40,10 @@ const applyAnimationFrame = (element, options) => {
|
|
|
40
40
|
const initAnimationFrame = (ctx) => {
|
|
41
41
|
const frameListeners = /* @__PURE__ */ new Set();
|
|
42
42
|
function requestFrame() {
|
|
43
|
+
if (!frameListeners.size) {
|
|
44
|
+
window.cancelAnimationFrame(requestFrame);
|
|
45
|
+
return;
|
|
46
|
+
}
|
|
43
47
|
for (const element of frameListeners) {
|
|
44
48
|
if (!element.parent.node.contains(element.node)) {
|
|
45
49
|
frameListeners.delete(element);
|
|
@@ -15,6 +15,10 @@ const applyAnimationFrame = (element, options) => {
|
|
|
15
15
|
const initAnimationFrame = (ctx) => {
|
|
16
16
|
const frameListeners = /* @__PURE__ */ new Set();
|
|
17
17
|
function requestFrame() {
|
|
18
|
+
if (!frameListeners.size) {
|
|
19
|
+
window.cancelAnimationFrame(requestFrame);
|
|
20
|
+
return;
|
|
21
|
+
}
|
|
18
22
|
for (const element of frameListeners) {
|
|
19
23
|
if (!element.parent.node.contains(element.node)) {
|
|
20
24
|
frameListeners.delete(element);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@domql/event",
|
|
3
|
-
"version": "2.28.
|
|
3
|
+
"version": "2.28.83",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"module": "index.js",
|
|
@@ -28,8 +28,8 @@
|
|
|
28
28
|
"prepublish": "npm run build; npm run copy:package:cjs"
|
|
29
29
|
},
|
|
30
30
|
"dependencies": {
|
|
31
|
-
"@domql/report": "^2.28.
|
|
32
|
-
"@domql/utils": "^2.28.
|
|
31
|
+
"@domql/report": "^2.28.83",
|
|
32
|
+
"@domql/utils": "^2.28.83"
|
|
33
33
|
},
|
|
34
|
-
"gitHead": "
|
|
34
|
+
"gitHead": "5571ba5c167b54a69917fdeb49c1b7989fcfc54c"
|
|
35
35
|
}
|