Programmer's Guide > Interfaces > ScriptContext interface > addNamedItem method
  
addNamedItem method
Adds a script object or COM object to the script context's variable namespace. This method makes a given script's methods available to other script instances. Such availability is important when binding events to child controls in an ActiveX component, such as to buttons residing on an HTML form launched within the Microsoft WebBrowser control. Because event binding is name-based, this method gives much greater flexibility than would normally be available from the script host.
addNamedItem(script, name)
Parameters
IDispatchscript
The script object to define.
Stringname
The name to be defined for the object in this script context.
Returns
void