Issues

Issue #664 open

Javascript domain should have event directive and ref roles

masklinn
created an issue

While event-oriented programming isn't used that much in Python itself, virtually all browser-side javascript code has to deal with events, and through modern javascript libraries it is pretty common for applications to have custom events for intercommunications.

I think an event type (besides class, function and attribute) would be a great addition to the JS domain.

Markup-wise, it would be similar to a function or a class, but the meaning of {{{:param:}}} would be reverted: they would be the objects provided to event listeners when the event fires.

An event directive might also warrant the creation of some kind of //callback// sub-directive which would be used to document how event listeners could or should react when called (in case data or commands can be sent back to the source of the event for instance)

Comments (2)

  1. Log in to comment