Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- riot.tag('boolean-attrs', '<p><code>riot.version: {opts.version}</code></p> <p>Try using the toggle button before and after clicking on the checkboxes.</p> <p><code>bool: {String(this.bool)}</code></p> <label><input type="checkbox" __checked="{this.bool}"> <code>checked=\\{this.bool\\}</code></label> <br> <label><input type="checkbox" __checked="{!this.bool}"> <code>checked=\\{!this.bool\\}</code></label> <br> <button type="button" onclick="{toggleBool}">Toggle <code>bool</code></button>', function(opts) {
- this.bool = false
- this.toggleBool = function() {
- this.bool = !this.bool
- }.bind(this);
- });
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement