I was trying to be DRY so I decided to use an imported function in obj.CustomJS
but had been defeated by bokeh itself…
Example import file:
function hello() {
return 'hello';
}
I then add the script as a module
in the html and so, in my CustomJS I first tried import { hello } from './my_file.js';
but I got:
Uncaught SyntaxError: import declarations may only appear at top level of a module
So I thought I’ll use jQuery.getScript
but I was greeted with:
Uncaught TypeError: $.getScript is not a function
… which I tried to resolve but did not prevail…
Am I doing something wrong or maybe did I actually found a ?
EDIT:
I have found that i made a mistake in import
by not importing module, but the correct import also generates the same error