juice icon indicating copy to clipboard operation
juice copied to clipboard

Not working for Node 0.11.14

Open iliakan opened this issue 10 years ago • 8 comments

Try this:

var inlineContent = require('juice2').inlineContent;

var result = inlineContent("<!DOCTYPE html><html><body>1</body></html>",
  "body { padding: 5px; } ");

console.log(result);

CSS is not inlined.

iliakan avatar Nov 05 '14 12:11 iliakan

Just ran in to the same issue. Are the plans to support 0.11 or should we abandon ship?

3rd-Eden avatar Dec 18 '14 10:12 3rd-Eden

Btw I switched to Styler until the issue is fixed.

iliakan avatar Dec 18 '14 12:12 iliakan

I got the same problem, after debug the code, found out when jsdom parse the raw html, it'd encountered an error "Cannot set property length of [object Object] which has only a getter".

So I just updated jsdom to the newest version 3.0.2, and change a little code, the problem was gone.

My fork here, but i didn't test it much, hope this would be helpful.

sunnylost avatar Jan 25 '15 10:01 sunnylost

@sunnylost thanks a lot! your fork really helped. And it seems to be working fine on 0.11.15 too! :+1:

OrKoN avatar Feb 03 '15 17:02 OrKoN

@sunnylost did you create a pull request?

OrKoN avatar Feb 04 '15 08:02 OrKoN

@OrKoN Not yet.

sunnylost avatar Feb 05 '15 07:02 sunnylost

Take a look at PR andrewrk/swig-email-templates#25, it might help to upgrade jsdom here as well.

naartjie avatar Mar 25 '15 00:03 naartjie

@sunnylost a PR would be really appreciated.

Toub avatar Jun 16 '15 07:06 Toub