Implemented by
XPConnect has magic to transparently convert between nsIVariant and JS types. We mark the interface [scriptable] so that JS can use methods that refer to this interface. But we mark all the methods and attributes [noscript] since any nsIVariant object will be automatically converted to a JS type anyway.
[scriptable, uuid(6c9eb060-8c6a-11d5-90f3-0010a4e73d9a)]
interface nsIVariant : nsISupports
Attributes
[noscript]
readonly attribute
PRUint16
dataType
Methods
[noscript]
ACString
getAsACString()
[notxpcom]
nsresult
getAsArray(out PRUint16 type, out nsIID iid, out PRUint32 count, out voidPtr ptr)
[noscript]
AString
getAsAString()
[noscript]
AUTF8String
getAsAUTF8String()
[noscript]
PRBool
getAsBool()
[noscript]
char
getAsChar()
[noscript]
DOMString
getAsDOMString()
[noscript]
double
getAsDouble()
[noscript]
float
getAsFloat()
[notxpcom]
nsresult
getAsID(out nsID retval)
[noscript]
PRInt16
getAsInt16()
[noscript]
PRInt32
getAsInt32()
[noscript]
PRInt64
getAsInt64()
[noscript]
PRUint8
getAsInt8()
[noscript]
void
getAsInterface(out nsIIDPtr iid, [iid_is(iid), retval] out nsQIResult iface)
[noscript]
nsISupports
getAsISupports()
[noscript]
string
getAsString()
[noscript]
void
getAsStringWithSize(out PRUint32 size, [size_is(size), retval] out string str)
[noscript]
PRUint16
getAsUint16()
[noscript]
PRUint32
getAsUint32()
[noscript]
PRUint64
getAsUint64()
[noscript]
PRUint8
getAsUint8()
[noscript]
wchar
getAsWChar()
[noscript]
wstring
getAsWString()
[noscript]
void
getAsWStringWithSize(out PRUint32 size, [size_is(size), retval] out wstring str)
Compare to: