Security News
Fluent Assertions Faces Backlash After Abandoning Open Source Licensing
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
ractive-events-tap
Advanced tools
Find more Ractive.js plugins at ractivejs.org
Tap/fastclick event plugin for Ractive.js - eliminates the 300ms delay on touch-enabled devices, and normalises across mouse, touch and pointer events.
Pressing the spacebar while an element is focused, which would normally dispatch a click
event, is also equivalent to 'tapping' it.
<button on-tap='activate()'>
tap me!
</button>
Install from npm...
npm install ractive-events-tap
...or download it and add it as a script tag to your page:
<script src='ractive.js'></script> <!-- must go first! -->
<script src='ractive-events-tap.js'></script>
Note: previous versions of this plugin would 'self-register'. If you are using a module system such as Browserify, Webpack or RequireJS, that's no longer the case - you must explicitly register the plugin.
var Ractive = require( 'ractive' );
// To use the tap event with a specific instance
var ractive = new Ractive({
el: 'body',
template: myTemplate,
events: {
tap: require( 'ractive-events-tap' )
}
});
// To use it with components
MyTappableComponent = Ractive.extend({
template: componentTemplate,
events: {
tap: require( 'ractive-events-tap' )
}
});
// To make it globally available to *all* instances
Ractive.events.tap = require( 'ractive-events-tap' );
define([ 'ractive', 'ractive-events-tap' ], function ( Ractive, tap ) {
var ractive = new Ractive({
el: 'body',
template: myTemplate,
events: {
tap: tap
}
});
});
import Ractive from 'ractive';
var ractive = new Ractive({
el: 'body',
template: myTemplate,
events: { tap }
});
<script>
tagIf you include ractive-events-tap as a script tag, it will 'self-register' with the global Ractive
object, and all Ractive instances will be able to use it.
MIT
0.3.0
FAQs
Tap/fastclick event plugin for Ractive.js
The npm package ractive-events-tap receives a total of 19 weekly downloads. As such, ractive-events-tap popularity was classified as not popular.
We found that ractive-events-tap demonstrated a not healthy version release cadence and project activity because the last version was released a year ago. It has 2 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Fluent Assertions is facing backlash after dropping the Apache license for a commercial model, leaving users blindsided and questioning contributor rights.
Research
Security News
Socket researchers uncover the risks of a malicious Python package targeting Discord developers.
Security News
The UK is proposing a bold ban on ransomware payments by public entities to disrupt cybercrime, protect critical services, and lead global cybersecurity efforts.