Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@domql/event

Package Overview
Dependencies
Maintainers
0
Versions
91
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@domql/event - npm Package Compare versions

Comparing version 2.5.187 to 2.5.190

animationFrame.js

1

dist/cjs/index.js

@@ -20,1 +20,2 @@ "use strict";

__reExport(event_exports, require("./can.js"), module.exports);
__reExport(event_exports, require("./animationFrame.js"), module.exports);

18

dist/cjs/on.js

@@ -21,3 +21,2 @@ "use strict";

__export(on_exports, {
applyAnimationFrame: () => applyAnimationFrame,
applyEvent: () => applyEvent,

@@ -50,18 +49,9 @@ applyEventUpdate: () => applyEventUpdate,

};
const triggerEventOnUpdate = (param, updatedObj, element, options) => {
const triggerEventOnUpdate = async (param, updatedObj, element, options) => {
const appliedFunction = getOnOrPropsEvent(param, element);
if (appliedFunction) {
const { state, context } = element;
return applyEventUpdate(appliedFunction, updatedObj, element, state, context, options);
return await applyEventUpdate(appliedFunction, updatedObj, element, state, context, options);
}
};
const applyAnimationFrame = (element, options) => {
const { props, on, __ref: ref } = element;
const { frameListeners } = ref.root.data;
if (frameListeners && ((on == null ? void 0 : on.frame) || (props == null ? void 0 : props.onFrame))) {
const { registerFrameListener } = element.context.utils;
if (registerFrameListener)
registerFrameListener(element);
}
};
const applyEventsOnNode = (element, options) => {

@@ -74,5 +64,5 @@ const { node, on } = element;

if ((0, import_utils.isFunction)(appliedFunction)) {
node.addEventListener(param, (event) => {
node.addEventListener(param, async (event) => {
const { state, context } = element;
appliedFunction.call(element, event, element, state, context, options);
await appliedFunction.call(element, event, element, state, context, options);
});

@@ -79,0 +69,0 @@ }

export * from "./on.js";
export * from "./can.js";
export * from "./animationFrame.js";

@@ -21,18 +21,9 @@ import { isFunction } from "@domql/utils";

};
const triggerEventOnUpdate = (param, updatedObj, element, options) => {
const triggerEventOnUpdate = async (param, updatedObj, element, options) => {
const appliedFunction = getOnOrPropsEvent(param, element);
if (appliedFunction) {
const { state, context } = element;
return applyEventUpdate(appliedFunction, updatedObj, element, state, context, options);
return await applyEventUpdate(appliedFunction, updatedObj, element, state, context, options);
}
};
const applyAnimationFrame = (element, options) => {
const { props, on, __ref: ref } = element;
const { frameListeners } = ref.root.data;
if (frameListeners && ((on == null ? void 0 : on.frame) || (props == null ? void 0 : props.onFrame))) {
const { registerFrameListener } = element.context.utils;
if (registerFrameListener)
registerFrameListener(element);
}
};
const applyEventsOnNode = (element, options) => {

@@ -45,5 +36,5 @@ const { node, on } = element;

if (isFunction(appliedFunction)) {
node.addEventListener(param, (event) => {
node.addEventListener(param, async (event) => {
const { state, context } = element;
appliedFunction.call(element, event, element, state, context, options);
await appliedFunction.call(element, event, element, state, context, options);
});

@@ -54,3 +45,2 @@ }

export {
applyAnimationFrame,
applyEvent,

@@ -57,0 +47,0 @@ applyEventUpdate,

@@ -5,1 +5,2 @@ 'use strict'

export * from './can.js'
export * from './animationFrame.js'

@@ -27,19 +27,10 @@ 'use strict'

export const triggerEventOnUpdate = (param, updatedObj, element, options) => {
export const triggerEventOnUpdate = async (param, updatedObj, element, options) => {
const appliedFunction = getOnOrPropsEvent(param, element)
if (appliedFunction) {
const { state, context } = element
return applyEventUpdate(appliedFunction, updatedObj, element, state, context, options)
return await applyEventUpdate(appliedFunction, updatedObj, element, state, context, options)
}
}
export const applyAnimationFrame = (element, options) => {
const { props, on, __ref: ref } = element
const { frameListeners } = ref.root.data
if (frameListeners && (on?.frame || props?.onFrame)) {
const { registerFrameListener } = element.context.utils
if (registerFrameListener) registerFrameListener(element)
}
}
export const applyEventsOnNode = (element, options) => {

@@ -68,5 +59,5 @@ const { node, on } = element

if (isFunction(appliedFunction)) {
node.addEventListener(param, event => {
node.addEventListener(param, async event => {
const { state, context } = element
appliedFunction.call(element, event, element, state, context, options)
await appliedFunction.call(element, event, element, state, context, options)
})

@@ -73,0 +64,0 @@ }

{
"name": "@domql/event",
"version": "2.5.187",
"version": "2.5.190",
"license": "MIT",

@@ -34,3 +34,3 @@ "type": "module",

},
"gitHead": "c150bfbbdd51b19d25c93f10334d54175cea9d1d"
"gitHead": "c4e06a81317c6d43c070d9ad93bbaeba24b3bb3b"
}
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc