UNPKG

plus-equals

Version:

Web component that allows for incrementing a property of the host. or other "upSearched" components.

10 lines (9 loc) 285 B
import {PassUp} from 'pass-up/pass-up.js'; import {def} from 'trans-render/lib/def.js'; export class PlusEquals extends PassUp{ static is = 'plus-equals'; override doSet(match: any, prop: string, lastVal: any){ match[prop] += lastVal; } } def(PlusEquals);