New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

stump-cycle-dom

Package Overview
Dependencies
Maintainers
1
Versions
16
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

stump-cycle-dom - npm Package Compare versions

Comparing version 0.0.9 to 0.0.10

1

lib/cjs/EventDelegator.d.ts

@@ -41,3 +41,2 @@ import { Stream } from 'xstream';

private resetEventListeners;
private resetNonBubblingListeners;
private putNonBubblingListener;

@@ -44,0 +43,0 @@ private onEvent;

72

lib/cjs/EventDelegator.js

@@ -82,3 +82,3 @@ "use strict";

}
_this.resetNonBubblingListeners();
// this.resetNonBubblingListeners();
_this.nonBubblingListenersToAdd.forEach(function (arr) {

@@ -202,3 +202,3 @@ _this.setupNonBubblingListener(arr);

var subs = element.subs;
if (!element.sub) {
if (!subs || !subs[eventType]) {
count_1 = count_1 + 1;

@@ -243,33 +243,39 @@ var sub = fromEvent_1.fromEvent(element, eventType, false, false, destination.passive).subscribe({

};
EventDelegator.prototype.resetNonBubblingListeners = function () {
var _this = this;
var newMap = new Map();
var insert = utils_1.makeInsert(newMap);
this.nonBubblingListeners.forEach(function (map, type) {
map.forEach(function (value, elm) {
if (!document.body.contains(elm)) {
var sub = value.sub, destination_1 = value.destination;
if (sub) {
sub.unsubscribe();
}
var elementFinder = new ElementFinder_1.ElementFinder(destination_1.scopeChecker.namespace, _this.isolateModule);
var newElms = elementFinder.call();
newElms.forEach(function (newElm) {
var newSub = fromEvent_1.fromEvent(newElm, type, false, false, destination_1.passive).subscribe({
next: function (event) {
return _this.onEvent(type, event, !!destination_1.passive, false);
},
error: function () { },
complete: function () { },
});
insert(type, newElm, { sub: newSub, destination: destination_1 });
});
}
else {
insert(type, elm, value);
}
});
_this.nonBubblingListeners = newMap;
});
};
// private resetNonBubblingListeners(): void {
// const newMap = new Map<string, Map<Element, NonBubblingListener>>();
// const insert = makeInsert(newMap);
// this.nonBubblingListeners.forEach((map, type) => {
// map.forEach((value, elm) => {
// if (!document.body.contains(elm)) {
// const {sub, destination} = value;
// if (sub) {
// sub.unsubscribe();
// }
// const elementFinder = new ElementFinder(
// destination.scopeChecker.namespace,
// this.isolateModule
// );
// const newElms = elementFinder.call();
// newElms.forEach((newElm) => {
// const newSub = fromEvent(
// newElm,
// type,
// false,
// false,
// destination.passive
// ).subscribe({
// next: event =>
// this.onEvent(type, event, !!destination.passive, false),
// error: () => {},
// complete: () => {},
// });
// insert(type, newElm, {sub: newSub, destination});
// })
// } else {
// insert(type, elm, value);
// }
// });
// this.nonBubblingListeners = newMap;
// });
// }
EventDelegator.prototype.putNonBubblingListener = function (eventType, elm, useCapture, passive) {

@@ -276,0 +282,0 @@ var map = this.nonBubblingListeners.get(eventType);

@@ -41,3 +41,2 @@ import { Stream } from 'xstream';

private resetEventListeners;
private resetNonBubblingListeners;
private putNonBubblingListener;

@@ -44,0 +43,0 @@ private onEvent;

@@ -14,3 +14,3 @@ var __assign = (this && this.__assign) || function () {

import { ScopeChecker } from './ScopeChecker';
import { getSelectors, makeInsert } from './utils';
import { getSelectors } from './utils';
import { ElementFinder } from './ElementFinder';

@@ -81,3 +81,3 @@ import SymbolTree from './SymbolTree';

}
_this.resetNonBubblingListeners();
// this.resetNonBubblingListeners();
_this.nonBubblingListenersToAdd.forEach(function (arr) {

@@ -201,3 +201,3 @@ _this.setupNonBubblingListener(arr);

var subs = element.subs;
if (!element.sub) {
if (!subs || !subs[eventType]) {
count_1 = count_1 + 1;

@@ -242,33 +242,39 @@ var sub = fromEvent(element, eventType, false, false, destination.passive).subscribe({

};
EventDelegator.prototype.resetNonBubblingListeners = function () {
var _this = this;
var newMap = new Map();
var insert = makeInsert(newMap);
this.nonBubblingListeners.forEach(function (map, type) {
map.forEach(function (value, elm) {
if (!document.body.contains(elm)) {
var sub = value.sub, destination_1 = value.destination;
if (sub) {
sub.unsubscribe();
}
var elementFinder = new ElementFinder(destination_1.scopeChecker.namespace, _this.isolateModule);
var newElms = elementFinder.call();
newElms.forEach(function (newElm) {
var newSub = fromEvent(newElm, type, false, false, destination_1.passive).subscribe({
next: function (event) {
return _this.onEvent(type, event, !!destination_1.passive, false);
},
error: function () { },
complete: function () { },
});
insert(type, newElm, { sub: newSub, destination: destination_1 });
});
}
else {
insert(type, elm, value);
}
});
_this.nonBubblingListeners = newMap;
});
};
// private resetNonBubblingListeners(): void {
// const newMap = new Map<string, Map<Element, NonBubblingListener>>();
// const insert = makeInsert(newMap);
// this.nonBubblingListeners.forEach((map, type) => {
// map.forEach((value, elm) => {
// if (!document.body.contains(elm)) {
// const {sub, destination} = value;
// if (sub) {
// sub.unsubscribe();
// }
// const elementFinder = new ElementFinder(
// destination.scopeChecker.namespace,
// this.isolateModule
// );
// const newElms = elementFinder.call();
// newElms.forEach((newElm) => {
// const newSub = fromEvent(
// newElm,
// type,
// false,
// false,
// destination.passive
// ).subscribe({
// next: event =>
// this.onEvent(type, event, !!destination.passive, false),
// error: () => {},
// complete: () => {},
// });
// insert(type, newElm, {sub: newSub, destination});
// })
// } else {
// insert(type, elm, value);
// }
// });
// this.nonBubblingListeners = newMap;
// });
// }
EventDelegator.prototype.putNonBubblingListener = function (eventType, elm, useCapture, passive) {

@@ -275,0 +281,0 @@ var map = this.nonBubblingListeners.get(eventType);

{
"name": "stump-cycle-dom",
"version": "0.0.9",
"version": "0.0.10",
"description": "The standard DOM Driver for Cycle.js, based on Snabbdom",

@@ -5,0 +5,0 @@ "license": "MIT",

@@ -119,3 +119,3 @@ import xs, {Stream, Subscription} from 'xstream';

this.resetNonBubblingListeners();
// this.resetNonBubblingListeners();
this.nonBubblingListenersToAdd.forEach(arr => {

@@ -282,4 +282,4 @@ this.setupNonBubblingListener(arr);

elements.forEach((element: Element) => {
const subs = (element as any).subs
if (!(element as any).sub) {
const subs = (element as any).subs
if (!subs || !subs[eventType]) {
count = count + 1;

@@ -339,40 +339,40 @@

private resetNonBubblingListeners(): void {
const newMap = new Map<string, Map<Element, NonBubblingListener>>();
const insert = makeInsert(newMap);
// private resetNonBubblingListeners(): void {
// const newMap = new Map<string, Map<Element, NonBubblingListener>>();
// const insert = makeInsert(newMap);
this.nonBubblingListeners.forEach((map, type) => {
map.forEach((value, elm) => {
if (!document.body.contains(elm)) {
const {sub, destination} = value;
if (sub) {
sub.unsubscribe();
}
const elementFinder = new ElementFinder(
destination.scopeChecker.namespace,
this.isolateModule
);
const newElms = elementFinder.call();
newElms.forEach((newElm) => {
const newSub = fromEvent(
newElm,
type,
false,
false,
destination.passive
).subscribe({
next: event =>
this.onEvent(type, event, !!destination.passive, false),
error: () => {},
complete: () => {},
});
insert(type, newElm, {sub: newSub, destination});
})
} else {
insert(type, elm, value);
}
});
this.nonBubblingListeners = newMap;
});
}
// this.nonBubblingListeners.forEach((map, type) => {
// map.forEach((value, elm) => {
// if (!document.body.contains(elm)) {
// const {sub, destination} = value;
// if (sub) {
// sub.unsubscribe();
// }
// const elementFinder = new ElementFinder(
// destination.scopeChecker.namespace,
// this.isolateModule
// );
// const newElms = elementFinder.call();
// newElms.forEach((newElm) => {
// const newSub = fromEvent(
// newElm,
// type,
// false,
// false,
// destination.passive
// ).subscribe({
// next: event =>
// this.onEvent(type, event, !!destination.passive, false),
// error: () => {},
// complete: () => {},
// });
// insert(type, newElm, {sub: newSub, destination});
// })
// } else {
// insert(type, elm, value);
// }
// });
// this.nonBubblingListeners = newMap;
// });
// }

@@ -379,0 +379,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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