UNPKG

@ribajs/core

Version:

Core module of Riba.js

15 lines (12 loc) 338 B
import { IfBinder } from "./if.binder.js"; /** * unless * Removes and unbinds the element and it's child nodes into the DOM when true * (negated version of `if` binder). */ export class UnlessBinder extends IfBinder { static key = "unless"; routine(el: HTMLElement, value: boolean) { return super.routine(el, !value); } }