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.5
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
0
decreased by-100%
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

addView(view, group)

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

###hasView

hasView(view)

Check if target view is subview.

###getGroupViews

getGroupViews(group)

Get group subviews as array

###detachView

detachView()

Detach view from parent registry

###attachToView

attachToView(view, group)

Detach view from parent registry and attach to another view.

###removeViews

removeViews(group)

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

###remove

remove()

Does extended cleanup and triggers "beforeRemove" and "afterRemove" events.

###getViewByModel

getViewByModel(model)

Get subview by providing it's model instance.

###removeViewByModel

removeViewByModel(model)

Close 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 27 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