How to use a function that from jsdom in node ?

32 views
Skip to first unread message

孔一

unread,
Mar 28, 2020, 1:11:05 PM3/28/20
to jsdom
for example:
var dom = new JSDOM(`<script src="https://###.com/###.min.js"></script>`, {
  runScripts: "dangerously",
  resources: "usable",
});


how to use a function from this script ? it's not in dom.

Sebastian Mayr

unread,
Mar 28, 2020, 1:41:52 PM3/28/20
to js...@googlegroups.com
Any function that's globally defined should be on dom.window afterwards. However without a whole repro, it's rather hard to help you out here.

-Sebastian

--
You received this message because you are subscribed to the Google Groups "jsdom" group.
To unsubscribe from this group and stop receiving emails from it, send an email to jsdom+un...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/jsdom/5a5f02cd-bc14-4f45-8f66-3476d12cc892%40googlegroups.com.
Reply all
Reply to author
Forward
0 new messages