[wp-trac] [WordPress Trac] #21170: JavaScript actions and filters
WordPress Trac
noreply at wordpress.org
Mon Jul 29 00:07:26 UTC 2013
#21170: JavaScript actions and filters
-----------------------------+-----------------------------
Reporter: koopersmith | Owner: koopersmith
Type: feature request | Status: new
Priority: normal | Milestone: Future Release
Component: General | Version: 3.4
Severity: normal | Resolution:
Keywords: 2nd-opinion |
-----------------------------+-----------------------------
Comment (by MikeSchinkel):
Replying to [comment:52 azaozz]:
> The original idea was to have add_action(), add_filter(), do_action(),
etc. in JS that behave similarly to PHP. Unfortunately neither
Backbone.events nor jQuery.Callbacks() have a way to specify callback
priority. Also missing did_action() which might be useful to have.
Saw this after posting today.
Rather than dismissing `Backbone.Events` you might want to consider
extending them as
[https://github.com/marionettejs/backbone.wreqr/blob/master/readme.md
Backbone.Wreqr] does. It would not be too difficult to add `priority` and
`did_action()` on top of `Backbone.Events`, and it's even possible
[https://github.com/jashkenas/backbone/wiki/Extensions,-Plugins,-Resources
someone else has already written most (all?)] of the needed extensions.
--
Ticket URL: <http://core.trac.wordpress.org/ticket/21170#comment:67>
WordPress Trac <http://core.trac.wordpress.org/>
WordPress blogging software
More information about the wp-trac
mailing list