framework/js/dist-typings/common/utils/withAttr.d.ts
flarum-bot c3a684c7ed Bundled output for commit 3537f76eab
Includes transpiled JS/TS, and Typescript declaration files (typings).

[skip ci]
2021-05-12 23:29:46 +00:00

14 lines
567 B
TypeScript

declare const _default: (key: string, cb: Function) => (this: Element) => void;
/**
* An event handler factory that makes it simpler to implement data binding
* for component event listeners.
*
* The handler created by this factory passes the DOM element's attribute
* identified by the first argument to the callback (usually a bidirectional
* Mithril stream: https://mithril.js.org/stream.html#bidirectional-bindings).
*
* Replaces m.withAttr for Mithril 2.0.
* @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html
*/
export default _default;