brenden / node-webshot

Easy website screenshots in Node.js
2.12k stars 286 forks source link

Not compatible with React.js code #81

Open plus- opened 10 years ago

plus- commented 10 years ago

webshot is not working with any site build in https://github.com/facebook/react/

Simple html test page if you want to try:

<!DOCTYPE html>
<html>
  <head>
    <script src="//cdnjs.cloudflare.com/ajax/libs/react/0.11.1/react.min.js"></script>
    <script src="//cdnjs.cloudflare.com/ajax/libs/react/0.11.1/JSXTransformer.js"></script>
  </head>
  <body>
    <div id="example"></div>
    <script type="text/jsx">
      /** @jsx React.DOM */
      React.renderComponent(
        <h1>Hello, world!</h1>,
        document.getElementById('example')
      );
    </script>
  </body>
</html>
plus- commented 10 years ago

Possibly related to phantomjs issue https://github.com/facebook/react/pull/347

rgbkrk commented 9 years ago

Would you be able to switch out for slimerjs (which uses an actually modern rendering engine, using current Firefox)? phantomPath: 'slimerjs'

I've been looking into doing the same thing soon.

marryjin commented 4 years ago

@rgbkrk I checked with slimerjs but not working with react