Currently I am working on a note book.
it require a module online
ObjectA = require(url)
it also has a attached js file with content like this
ObjectA.functionB()
When I try to run the js file in the notebook I can only use eval() like this
jsString = FileAttachment("theJS.js").text()
with
eval(jsString)
I have try
import (await FileAttachment("theJS.js").url())
and
new Function(jsString)()
and similar method and they all return error of ObjectA is not defined
Wonder if there is any way to do that without using eval()