Similar to a regular js file that starts with referenced external query and then your js custom code, I need to do the same in Swift using JavascriptCore.
I saw this Objective-C example:
NSURL *scriptURL = [NSURL URLWithString:@"path/to/fancyLibrary.js"];
NSError *error = nil;
NSString *script = [NSString stringWithContentsOfURL:scriptURL encoding:NSUTF8StringEncoding error:&error];
[context evaluateScript:script];
It does the first part of bringing down an external js file, but I want to also add a js block calling some of the functions in that referenced file. How do I do that!? Can you do it in Swift?