-
Notifications
You must be signed in to change notification settings - Fork 1.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Make sure $el contains only the el #3426
Make sure $el contains only the el #3426
Conversation
Calling |
I can't find a way in which returning a single element from region.getEl isn't far more complicated. |
0fa0480
to
f930ef0
Compare
Would jQuery |
We shouldn't require jQuery here at all. |
I meant inside the DOM API somewhere. |
I would consider that a breaking change |
I suppose it is still an experimental API. still though.. I'm not sure what the concern is about this change. it is 100% the same code that is currently ready for v3.4.2 it's just that the |
I'm fine with it I just wanted to play devil's advocate 😈 |
Same... The solution just seems clunky even if right, I cannot stop thinking it must be a more elegant way |
I think the more elegant way comes with #3417 and removing any sort of |
What about here ? We could return the 1st element directly. |
Which conflict with #3425 Ok no more ideas :D 👍 |
I'm happy with this, we should add a test, however. |
Alternative solution to marionettejs#3421 I think doing this check once on `_ensureElement` is better than within `attachHtml` And it makes `this.$el` more consistent and matches what happens in the region constructor
f930ef0
to
1e5fe04
Compare
updated with a test |
Alternative solution to #3421
This is a WIP and needs tests, but I think doing this check once on
_ensureElement
is better than withinattachHtml
And it makesthis.$el
more consistent and matches what happens in the region constructorThis still needs a test