[wp-trac] [WordPress Trac] #30505: Backbone subviews cannot be attached directly to DOM elements

WordPress Trac noreply at wordpress.org
Wed Nov 26 06:22:27 UTC 2014


#30505: Backbone subviews cannot be attached directly to DOM elements
----------------------------+-----------------------------
 Reporter:  rmccue          |      Owner:
     Type:  defect (bug)    |     Status:  new
 Priority:  normal          |  Milestone:  Awaiting Review
Component:  Administration  |    Version:
 Severity:  normal          |   Keywords:
  Focuses:  javascript      |
----------------------------+-----------------------------
 Right now, you need selectors to attach subviews. Even if you have a
 direct reference to an element in the DOM, it's not possible to attach to
 this directly.

 This is an issue when you're working with an existing DOM structure to
 attach views, and the elements don't have unique identifiers for a
 selector.

 Backbone itself is happy to let you do this in a lot of places; this is
 why you can pass in `el` when constructing a view, for example. However,
 `wp.Backbone.Views` uses `! _.isString` to overload some of the function
 parameters, which means you can never pass it through.

--
Ticket URL: <https://core.trac.wordpress.org/ticket/30505>
WordPress Trac <https://core.trac.wordpress.org/>
WordPress publishing platform


More information about the wp-trac mailing list