Comments (4)
The easiest workaround I can think of is not extending $ with underscore methods. Probably it shouldn't be done anyway - otherwise, this is prone to happen with other methods like map(), first() or last(). Specifically, underscore.find() is hugely different from bonzo.find() - and they both will be mapped to $.find
At this point I am willing to assume that underscore requires an ender bridge that does not augment the ender object (keeping $ and _ separate), but I could find that is out of the question.
Maybe ender should not extend the $ object automatically. I can do that easily by adding my own script at the end of the chain, e.g.:
var $ = ender;
$.ender(require('qwery'));
$.ender(require('bonzo'));
$.ender(require('reqwest'));
var B = require('backbone')
, _ = require('underscore')
This would give me control over the method overlapping.
from bonzo.
i return this
because it seemed more useful, and had nothing to do with compliance. i don't think i'm going to change this, but i really appreciate the deep dive and full explanation.
from bonzo.
At this point I am not really affected by this bug anymore, but just to make the point clear: if you use
ender build domready bonzo bean qwery underscore
Methods like $('div').html('foo') will be broken. The only solution I could find was NOT to extend $ with the methods of the included library (in this case, underscore), unless it includes an ender bridge.
As I said, this problem no longer affects me (I have gone other ways since) and I see it more of an ender issue than bonzo.
from bonzo.
i'll have to try out that scenario and see how it breaks. bonzo should be using it's own each, and not underscores.
from bonzo.
Related Issues (20)
- $("ele").append() strips text in a mixed string. HOT 4
- toggleClass appends existing classes to className HOT 11
- Why `scrollWidth` and `offsetWidth`? HOT 1
- Add a version tag for bower HOT 4
- Add DOM Insertion, Around methods
- .focus() isn't working HOT 1
- Cannot set value of element if value is not a string
- .closest() skips origin element HOT 8
- Ender Bridge has issues with .width() and .height() on window and document. HOT 1
- Object offset() does not take margin into consideration. HOT 3
- CSS Opacity and Internet Explorer HOT 2
- .replaceWith() doesn't work when replacing a node with itself HOT 1
- Repository Command Error: version not found: 1.4.0 : bonzo/1.4.0 HOT 2
- Data method is not camelcasing hyphen separated properties HOT 2
- Window scrollTop resets scrollLeft and vice versa HOT 1
- Bower
- wrap
- bonzo doesn't specialcase "required" attr
- Only works if url does not have sub directories HOT 1
- Classie not getting included in webpack bundle. HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from bonzo.