FireBreath  1.4.0
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Pages
public void FB::JSAPIAuto::registerAttribute ( const std::string &  name,
const FB::variant value,
bool  readonly = false 
)
virtual

Registers an attribute name and sets the value to _value. Optionally read-only.

Parameters
nameThe name (as seen from JavaScript) of the Attribute
valueThe value
readonlyTrue if the attribute should not be modifiable from JavaScript
Since
1.4a3
See Also
getAttribute
setAttribute

Definition at line 383 of file JSAPIAuto.cpp.

384 {
385  boost::recursive_mutex::scoped_lock lock(m_zoneMutex);
386  Attribute attr = {value, readonly};
387  m_attributes[name] = attr;
388  m_zoneMap[name] = getZone();
389 }
virtual SecurityZone getZone() const
Gets the currently active zone.
Definition: JSAPIImpl.h:238