Socket
Book a DemoInstallSign in
Socket

web-widgets-knockout

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

web-widgets-knockout

Use generic JavaScript widgets in Knockout, and create generic widgets using Knockout

latest
Source
npmnpm
Version
0.1.1
Version published
Weekly downloads
1
-50%
Maintainers
1
Weekly downloads
 
Created
Source

web-widgets-knockout

Use generic JavaScript widgets in Knockout, and create generic widgets using Knockout.

Example

var shoutingWidget = function(element, options) {
    element.innerHTML = options.name.toUpperCase();
};

var widget = widgetsKnockout.create({
    template: 'Hello <span data-bind="widget: \'shout\', widgetOptions: {name: name}"></span>',
    init: function(options) {
        return {name: options.name};
    },
    dependencies: {
        shout: shoutingWidget
    }
});

widget(element, {name: "Bob"});
// element.innerHTML == 'Hello <span data-bind="widget: \'shout\', widgetOptions: {name: name}">BOB</span>'

FAQs

Package last updated on 23 Jun 2014

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