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

@wordpress/interactivity

Package Overview
Dependencies
Maintainers
24
Versions
74
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@wordpress/interactivity - npm Package Compare versions

Comparing version 5.0.5 to 5.0.6

12

build-module/directives.js

@@ -266,7 +266,15 @@ /* @jsx createElement */

}) => {
const events = new Map();
on.filter(({
suffix
}) => suffix !== 'default').forEach(entry => {
element.props[`on${entry.suffix}`] = event => {
evaluate(entry, event);
const event = entry.suffix.split('--')[0];
if (!events.has(event)) events.set(event, new Set());
events.get(event).add(entry);
});
events.forEach((entries, eventType) => {
element.props[`on${eventType}`] = event => {
entries.forEach(entry => {
evaluate(entry, event);
});
};

@@ -273,0 +281,0 @@ });

@@ -272,7 +272,15 @@ "use strict";

}) => {
const events = new Map();
on.filter(({
suffix
}) => suffix !== 'default').forEach(entry => {
element.props[`on${entry.suffix}`] = event => {
evaluate(entry, event);
const event = entry.suffix.split('--')[0];
if (!events.has(event)) events.set(event, new Set());
events.get(event).add(entry);
});
events.forEach((entries, eventType) => {
element.props[`on${eventType}`] = event => {
entries.forEach(entry => {
evaluate(entry, event);
});
};

@@ -279,0 +287,0 @@ });

4

package.json
{
"name": "@wordpress/interactivity",
"version": "5.0.5",
"version": "5.0.6",
"description": "Package that provides a standard and simple way to handle the frontend interactivity of Gutenberg blocks.",

@@ -36,3 +36,3 @@ "author": "The WordPress Contributors",

},
"gitHead": "f8226c028ffa05f4e863c3346e46058ad09431e8"
"gitHead": "88cd256155d396c639216515e05346c687a64112"
}

@@ -273,9 +273,18 @@ /* @jsx createElement */

directive( 'on', ( { directives: { on }, element, evaluate } ) => {
const events = new Map();
on.filter( ( { suffix } ) => suffix !== 'default' ).forEach(
( entry ) => {
element.props[ `on${ entry.suffix }` ] = ( event ) => {
evaluate( entry, event );
};
const event = entry.suffix.split( '--' )[ 0 ];
if ( ! events.has( event ) ) events.set( event, new Set() );
events.get( event ).add( entry );
}
);
events.forEach( ( entries, eventType ) => {
element.props[ `on${ eventType }` ] = ( event ) => {
entries.forEach( ( entry ) => {
evaluate( entry, event );
} );
};
} );
} );

@@ -282,0 +291,0 @@

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

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