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

backbone-base-view

Package Overview
Dependencies
Maintainers
1
Versions
9
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

backbone-base-view

Baseview is a extended backbone view with convenient methods for manipulating subviews and events.

  • 2.0.0-beta.4
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
15
increased by7.14%
Maintainers
1
Weekly downloads
 
Created
Source

#Backbone base view Extended backbone view with convenient methods for manipulating subviews and events. Every view that extends baseView is bootstrapped to act as collection view.

###events

events: {
    'click .selector': 'handler',
    'click {{this.someVariable}}': 'handler', // variable will be injected
    'one:submit form': 'oneSubmit', // handler will run only once
    'resize window': 'onWindowResize',
    'keyup document': 'onDocumentKeyup'
}

###addView

addSubview(view, group)

Adds subview to current view. If optional group parameter is provided adds view to subview group.

###removeViews

removeViews(group)

Removes all view subviews recursively. If group is specified removes only views which belong to subview group.

###removeViewByModel

removeViewByModel(model)

Close subview by providing it's model instance.

###getViewByModel

getViewByModel(model)

Get subview by providing it's model instance.

###when

when(resources, doneCallback, failCallback)

Shortcut for $.when with default context set to view instance for all callbacks. Additionally adds all deferreds to view instance deferreds stack so effective cleanup can be performed on view removal. Accepts resources as single or array of deferreds.

Keywords

FAQs

Package last updated on 15 Apr 2016

Did you know?

Socket

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.

Install

Related posts

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