Sha256: 992b293abe90f1e56bf37c2b7b6abdfcb71a50ade56360a9babd0f6f658f3cb2
Contents?: true
Size: 501 Bytes
Versions: 3
Compression:
Stored size: 501 Bytes
Contents
var _ = require('../../util') module.exports = { bind: function () { var self = this var el = this.el this.listener = function () { self.set(el.value) } _.on(el, 'change', this.listener) if (el.checked) { this._initValue = el.value } }, update: function (value) { /* eslint-disable eqeqeq */ this.el.checked = value == this.el.value /* eslint-enable eqeqeq */ }, unbind: function () { _.off(this.el, 'change', this.listener) } }
Version data entries
3 entries across 3 versions & 1 rubygems