Skip to content

Instantly share code, notes, and snippets.

@olsonjeffery
Created December 20, 2010 22:21
Show Gist options
  • Save olsonjeffery/749108 to your computer and use it in GitHub Desktop.
Save olsonjeffery/749108 to your computer and use it in GitHub Desktop.
issue with backbone + zepto in ff 3.6
The Error:
element["insertAdjacent" + (html instanceof Element ? "Element" : "HTML")] is not a function
http://localhost:8080/scripts/zepto.js
Line 145
the zepto.js is 5ecaa (HEAD of the zepto repo)
backbone.js is 261059 (HEAD of backbone's repo)
the stack looks like..
during model intiailization in the $() handler, loading models from
json passed from the server-side view.. calling down from Collection.add
to a master view's listener for the collection's 'add' event.. into zepto
via $() .. the last line of my application code before going into the
offending part of zepto looks like:
this.$('#dishes_list').append(view.render().el);
the #dishes_list is a <ul>, to which I'm appending the content of a view (with tagName: 'li');
verified working w/o error in jquery 1.4.4
@olsonjeffery
Copy link
Author

hmm. bummer. i just tested it in chrome and seems to work, but some other stuff is failing. fun!

@drewlesueur
Copy link

Yea. That's one reason why Zepto is so small. Because it doesn't have to worry about cross browser support.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment