UNPKG

plus-equals

Version:

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

10 lines (9 loc) 255 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'; doSet(match, prop, lastVal) { match[prop] += lastVal; } } def(PlusEquals);