32
edits
m (fix some typos) |
(Add addMemberByName and info on case sensitivity) |
||
| Line 15: | Line 15: | ||
== nsIScriptable design == | == nsIScriptable design == | ||
We will shamelessly borrow the MS COM IDispatchEx interface as a model. IDispatchEx is designed for this purpose and provides a number of enhancements to the older IDispatch interfaces. We will *not*: | We will shamelessly borrow the MS COM IDispatchEx interface as a model. IDispatchEx is designed for this purpose and provides a number of enhancements to the older IDispatch interfaces. We will *not* implement a number of "Visual Basic-isms" in IDispatch - specifically: | ||
* | * no distinction between a "property put by value" and "property put by reference" (ie, VBs "let" vs "set"), and combining "property get" and "method call" in the flags will be illegal (ie, VB allows you to omit the parens when calling subroutines, making such calls indisinguishable from a property reference) | ||
* names will all be case-sensitive. | |||
Other differences: | |||
* IDispatchEx does not provide semantics for ''adding'' items (in the IExplore case, this is handled by an IActiveScript interface. | |||
=== Identifier mapping === | === Identifier mapping === | ||
| Line 44: | Line 50: | ||
// Deletes a member by DISPID. | // Deletes a member by DISPID. | ||
void deleteMemberByDispID(in nsDISPID aDispID); | void deleteMemberByDispID(in nsDISPID aDispID); | ||
// Adds a member and returns the dispid for the new item. | |||
nsDISPID addMemberByName(in AString aName); | |||
// Deletes a member by name. | // Deletes a member by name. | ||
void deleteMemberByName(in AString aName); | void deleteMemberByName(in AString aName); | ||
edits