Start a new topic

Using external JS-Libraries?


is it possible to use external JS-Libraries (such as JQuery or JQueryUI)?

Thanks in advance & Greetings ... Peter

Hi Peter,

So sorry for the late reply! We're still going through growing pains, and one of them is remembering to turn on new topic notifications :)

To your question: we have a few ways of supporting existing libraries - one is bindings (much like the TS definitions in TypeScript), and the second option is using the dynamic keyword - you can write code that works with existing libraries without requiring definitions. We'll be providing binding for common libraries to consume via C# very soon - you'll be able to install via NuGet (or simply include the file in your project).

The other option is to use the dynamic keyword, and reference your .js libraries as is, e.g.: 

dynamic doc = Js.referenceAs<dynamic>("document");
string bodyString = doc.body.toString() as string;


Login or Signup to post a comment