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

appendVDom need real dom #101

Open
artemave opened this issue Apr 4, 2018 · 1 comment
Open

appendVDom need real dom #101

artemave opened this issue Apr 4, 2018 · 1 comment

Comments

@artemave
Copy link
Member

artemave commented Apr 4, 2018

This code

hyperdom.appendVDom(h('div'), {render: () => 'hello'})

Fails with

     ReferenceError: window is not defined
      at new Mount (node_modules/hyperdom/mount.js:10:44)
      at start (node_modules/hyperdom/rendering.js:64:15)
      at startAttachment (node_modules/hyperdom/rendering.js:56:12)
      at Object.exports.appendVDom (node_modules/hyperdom/rendering.js:34:10)
      at Context.<anonymous> (test/hyperdomIntegrationSpec.js:44:14)

Looks as if deep down hyperdom relies on real window and document being available.

@dereke
Copy link
Member

dereke commented Apr 4, 2018

I think you can pass in window as an option. Then use the global module to get a window

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

2 participants