Page MenuHomePhabricator

[docs] Add documentation about events
Closed, ResolvedPublic

Description

"Need an explanation if it's possible (makes sense) to bind listener to "change" event of original subject element (without experts or whatever)

i.e.:
var subject = $(...).valueview(...);
subject.change( myListener );

If it is not, need an example with correct event binding."
https://github.com/wmde/ValueView/issues/99

Event Timeline

Lucie raised the priority of this task from to Needs Triage.
Lucie updated the task description. (Show Details)
Lucie added projects: ValueView, Wikidata.
Lucie changed Security from none to None.
Lucie subscribed.

Just noticed that bug. ValueView documentation has been updated via T75987.
As to the documentation (see jquery.valueview.valueview.js), there is no generic change event. Applied to the example, the code should work with subject.on( 'valueviewchange', myListener ) or, if original subject's "change" event should be considered as well, subject.on( 'change valueviewchange', myListener ).
Hopefully, we will have a generated documentation at some point as of T42657.

So can we close this then? Or is more needed for this ticket?