Top Rounds
| We are Hiring! |

_call ·

This is a Browser Action API.

_call is used execute javascript on the browser. _call should be used sparingly and only if none of the inbuilt Sahi Browser Action APIs work.

Syntax:

_call(js)
The parameters are:

  • js: Javascript to be invoked in on the browser.

Example:

<browser>
function toggleTreeWidget(){
    // some javascript to toggle a tree widget
}
</browser>
_call(toggleTreeWidget());
_call(location.href = "xxx");

Note that _call is different from _eval. _eval takes a string. Eg.

_call(toggleTreeWidget());
is the same as 
_eval("toggleTreeWidget()");

Note: To fetch a value from a function on the browser and store it a variable in script, use _set

<browser>
function getRowCount(){
  return _table("t1").rows.length;
}
</browser>
var $count;
_set($count, getRowCount());
// Use $count
_alert($count);



---


Top Rounds