Web View Scripting

Omniscope Web View Scripting

Scripting inside the Omniscope Web View browser window

The Omniscope Web Views are browsers that allow browser-friendly scripts in the page content, executed in the system default native browser and embedded within Omniscope, to access certain Omniscope variables, through a global JavaScript object named 'omniscope'. Currently, the current file URL can be retrieved through this mechanism.

This object is only made available after the page has loaded.  You should not access it on page load or earlier, and should use a timeout to ensure the value has been set.

Provide 'omniscope' global object to page scripts

The global object is currently as follows:

omniscope = {
  "currentFileURL" : "http://....."


omniscope.currentFileURL : represents the current Omniscope IOK file URL


      function getGlobalObject(){
         document.getElementById("testId").innerHTML = "URL is " + omniscope.currentFileURL;
      setTimeout ( "getGlobalObject()", 2000 );
      <h1>omniscope global object</h1>
    <div id="testId"/>