0

I have a "Main.js" script a "index.html" file and a "render.js" script, in the index.html file I specified that his controller script would be "render.js" and everything works, I can access the HTML file from the "render.js" file, the problem is that when I require the "render.js" script from the "Main.js" script to use methods that I defined in "render.js", "I get document is not defined" from the "render.js" script.

any help with that?

Tal Moshel
  • 232
  • 3
  • 18
  • Well there is no DOM in nodejs, not sure what purpose the methods should have on a server? – Jonas Wilms Oct 06 '18 at 16:16
  • 1
    Node.js doesn't work on the browser and obviously it doesn't have DOM. Also, I think this is similar to your question [Node.js document is not defined](https://stackoverflow.com/questions/32126003/node-js-document-is-not-defined) – Spleen Oct 06 '18 at 16:17

0 Answers0