DuoCode comes with complete type definitions of the DOM. See namespace DuoCode.Dom.


Example:

  

using static DuoCode.Dom;
...
string userAgent = navigator.userAgent;
HTMLScriptElement script = (HTMLScriptElement)document.getElementById(scriptId);
var timerToken = window.setInterval((Action)Tick, 500);

// alternative dynamic access
dynamic doc = Js.referenceAs<dynamic>("document");
string innerText = doc.getElementById(scriptId).innerText as string;