nsISupports
Last changed in Gecko 6.0 (Firefox 6.0 / Thunderbird 6.0 / SeaMonkey 2.3)You can copy an object into an nsIStructuredCloneContainer
using initFromVariant()
or initFromBase64()
. it is an error to initialize an nsIStructuredCloneContainer
more than once.
Once you've initialized the container, you can get a copy of the object it stores by calling deserializeToVariant()
. You can also get a base-64-encoded string containing a copy of the container's serialized data, using getDataAsBase64()
.
nsIVariant deserializeToVariant(); |
AString getDataAsBase64(); |
void initFromBase64(in AString aData,in unsigned long aFormatVersion); |
void initFromVariant(in nsIVariant aData); |
Attribute | Type | Description |
formatVersion | unsigned long | Get the version of the structured clone algorithm which was used to generate this container's serialized buffer. Read only. |
serializedNBytes | unsigned long long | Get the size in bytes of this container's serialized data. Read only. |
Deserialize the object this container holds, returning it wrapped as an nsIVariant
.
nsIVariant deserializeToVariant();
None.
An nsIVariant
.
Get this structured clone container's data as a base-64-encoded string.
AString getDataAsBase64();
None.
A base-64-encoded string.
Initialize this structured clone container from a base-64-encoded byte stream.
void initFromBase64( in AString aData, in unsigned long aFormatVersion );
aData
aFormatVersion
aData
.Initialize this structured clone container so it contains a clone of the given variant.
void initFromVariant( in nsIVariant aData );
aData
nsIVariant
, must be backed by a jsval
.