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

@interactjs/core

Package Overview
Dependencies
Maintainers
2
Versions
137
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@interactjs/core - npm Package Compare versions

Comparing version 1.4.0-alpha.29 to 1.4.0-alpha.30

8

package.json
{
"name": "@interactjs/core",
"version": "1.4.0-alpha.29+sha.7c21d3d",
"version": "1.4.0-alpha.30+sha.bdc493e",
"peerDependencies": {
"@interactjs/utils": "1.4.0-alpha.29+sha.7c21d3d"
"@interactjs/utils": "1.4.0-alpha.30+sha.bdc493e"
},
"devDependencies": {
"@interactjs/_dev": "1.4.0-alpha.29+sha.7c21d3d",
"@interactjs/utils": "1.4.0-alpha.29+sha.7c21d3d"
"@interactjs/_dev": "1.4.0-alpha.30+sha.bdc493e",
"@interactjs/utils": "1.4.0-alpha.30+sha.bdc493e"
},

@@ -11,0 +11,0 @@ "publishConfig": {

@@ -79,6 +79,6 @@ import * as utils from '@interactjs/utils';

constructor();
onWindowUnload: (event: BeforeUnloadEvent) => void;
init(window: Window): Scope;
addDocument(doc: Document, options?: any): void | false;
removeDocument(doc: Document): void;
onWindowUnload(event: Event): void;
getDocIndex(doc: Document): number;

@@ -85,0 +85,0 @@ getDocOptions(doc: Document): any;

@@ -33,2 +33,3 @@ import * as utils from '@interactjs/utils';

this.documents = [];
this.onWindowUnload = (event) => this.removeDocument(event.target);
const scope = this;

@@ -79,5 +80,2 @@ this.Interactable = class Interactable extends InteractableBase {

}
onWindowUnload(event) {
this.removeDocument(event.target);
}
getDocIndex(doc) {

@@ -162,2 +160,2 @@ for (let i = 0; i < this.documents.length; i++) {

}
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoic2NvcGUuanMiLCJzb3VyY2VSb290IjoiIiwic291cmNlcyI6WyJzY29wZS50cyJdLCJuYW1lcyI6W10sIm1hcHBpbmdzIjoiQUFBQSx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ICByYWYuaW5pdCh3aW5kb3cpXG4gIGV2ZW50cy5pbml0KHdpbmRvdylcblxuICBpbnRlcmFjdGlvbnMuaW5zdGFsbChzY29wZSlcbiAgc2NvcGUuZG9jdW1lbnQgPSB3aW5kb3cuZG9jdW1lbnRcbiAgc2NvcGUud2luZG93ID0gd2luZG93XG5cbiAgcmV0dXJuIHNjb3BlXG59XG4iXX0=
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