1
0
mirror of https://github.com/flarum/core.git synced 2025-08-07 17:07:19 +02:00

Extend documentation of withAttr

This commit is contained in:
Franz Liedke
2020-09-11 15:49:12 +02:00
parent 6e7c86ac50
commit abb896d430

View File

@@ -1,8 +1,12 @@
/** /**
* An event handler factory that makes it simpler to implement data * An event handler factory that makes it simpler to implement data binding
* binding for component event listeners. * for component event listeners.
* *
* Replaces m.withAttr for mithril 2.0 * 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 * @see https://mithril.js.org/archive/v0.2.5/mithril.withAttr.html
*/ */
export default (key: string, cb: Function) => export default (key: string, cb: Function) =>