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

ampersand-view

Package Overview
Dependencies
Maintainers
3
Versions
71
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ampersand-view - npm Package Compare versions

Comparing version 6.0.10 to 6.0.11

3

ampersand-view.js

@@ -20,2 +20,5 @@ var State = require('ampersand-state');

this._initializeBindings();
if (attrs.el && !this.autoRender) {
this._handleElementChange();
}
this._initializeSubviews();

@@ -22,0 +25,0 @@ this.initialize.apply(this, arguments);

4

package.json
{
"name": "ampersand-view",
"description": "A smart base view for Backbone apps, to make it easy to bind collections and properties to the DOM.",
"version": "6.0.10",
"version": "6.0.11",
"author": "Henrik Joreteg <henrik@andyet.net>",

@@ -17,3 +17,3 @@ "browser": "./ampersand-view.js",

"matches-selector": "^1.0.0",
"underscore": "^1.6.0"
"underscore": "1.6.0"
},

@@ -20,0 +20,0 @@ "devDependencies": {

@@ -625,1 +625,21 @@ var test = require('tape');

});
test('events are bound if there is an el in the constructor', function (t) {
t.plan(1);
var event = document.createEvent("MouseEvent");
var View = AmpersandView.extend({
template: function () {
return document.createElement('div');
},
events: {
'click div': 'divClicked'
},
divClicked: function (e) {
t.ok(true, 'event fired');
t.end();
}
});
var view = new View({el: document.createElement('div')});
event.initMouseEvent('click');
view.el.dispatchEvent(event);
});
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