Skip to content
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

Not working for Node 0.11.14 #16

Open
iliakan opened this issue Nov 5, 2014 · 8 comments
Open

Not working for Node 0.11.14 #16

iliakan opened this issue Nov 5, 2014 · 8 comments

Comments

@iliakan
Copy link

iliakan commented Nov 5, 2014

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.

@3rd-Eden
Copy link

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

@iliakan
Copy link
Author

iliakan commented Dec 18, 2014

Btw I switched to Styler until the issue is fixed.

@sunnylost
Copy link

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.

@OrKoN
Copy link

OrKoN commented Feb 3, 2015

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

@OrKoN
Copy link

OrKoN commented Feb 4, 2015

@sunnylost did you create a pull request?

@sunnylost
Copy link

@OrKoN Not yet.

@naartjie
Copy link

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

@Toub
Copy link

Toub commented Jun 16, 2015

@sunnylost a PR would be really appreciated.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

6 participants