Some rendering scenarios appear to require jQuery, others don't

56 views
Skip to first unread message

Dave Merrill

unread,
Jul 9, 2013, 9:35:43 AM7/9/13
to transpa...@googlegroups.com
Of the first few examples I've tried, both the list of plain values and the nested list examples throw an error if jQuery isn't present. The error is the same in both cases (using transparency.min.js):
  Chrome: Uncaught TypeError: Object <NodeList> has no method 'cloneNode'
  Firefox: TypeError: t.cloneNode is not a function

Several other examples give no-jQuery alternate syntax, and the jQuery versions of them use jQuery only for the convenience of $, so I thought the implication was that it wasn't required.

Am I doing something wrong here, or is jQuery a hard dependency? 

Thanks,
Dave Merrill

Jarno Keskikangas

unread,
Jul 11, 2013, 11:56:43 PM7/11/13
to transpa...@googlegroups.com
That sounds like a bug. I'll take a look during the weekend.


--
Sait tämän viestin, koska olet tilannut seuraavan Google-ryhmän: transparency.js.
Jos haluat peruuttaa tämän ryhmän tilauksen ja sen sähköpostiviestien vastaanottamisen, lähetä sähköpostia osoitteeseen transparencyj...@googlegroups.com.
Näet lisää vaihtoehtoja käymällä osoitteessa https://groups.google.com/groups/opt_out.
 
 

Dave Merrill

unread,
Jul 12, 2013, 9:06:26 AM7/12/13
to transpa...@googlegroups.com
Thanks!

Dave Merrill

Jay Scott ANDERSON

unread,
Jul 25, 2013, 3:21:12 PM7/25/13
to transpa...@googlegroups.com
Similar problem with Transparency and Cheerio.js...getting error:

TypeError: Object [...] has no method 'cloneNode'
at /Users/.../node_modules/transparency/lib/helpers.js:67:15


And the code:

var cheerio = require('cheerio');
var transparency = require('transparency');
var jQuery = cheerio.load('<div id="container"><div id="hello"></div><div class="goodbye"></div></div>');
var hello = { hello: 'Hello', goodbye: 'Goodbye!' };
transparency.render(jQuery('#container'), hello);
console.log(jQuery.html());

Cheerio apparently has "core jQuery" built in.

Jay Scott.

Jarno Keskikangas

unread,
Jul 25, 2013, 4:29:33 PM7/25/13
to transpa...@googlegroups.com
Hi Jay,

Thanks for reporting the issue. Unfortunately, I haven't had a chance to look into the problem yet :/ I'm travelling next week, so it'll be August before I've time to fix the issues. Of course, patches are always welcome.

Br,

Jarno


2013/7/25 Jay Scott ANDERSON <tree...@gmail.com>
Reply all
Reply to author
Forward
0 new messages