Quantcast
Channel: ClearScript
Viewing all articles
Browse latest Browse all 2297

New Post: Requirejs implementation

0
0
Hi AustinDimmer!

You code looks fine, although you shouldn't need this line:
engine.Execute(@"moduleLoader.LoadModuleAsync(this, 'jsdom', jsdomPath);");
You shouldn't need that because the require call on the next line should call the module loader internally. Also, be careful with this:
engine.Execute(@"var String = System.String;");
That replaces the built-in JavaScript String function, which could affect subsequent scripts.

I have a first chance exception handler, code still runs. Not 100% sure why the code behaves like this!

How are you setting up this handler? It's not in the code above. We're glad you found a way forward, but we'd really like to understand your original issue, and we still can't reproduce it with ModuleLoader defined in a separate class library. Would it by any chance be possible for you to share your project?

Thanks!

Viewing all articles
Browse latest Browse all 2297