Search completed in 1.17 seconds.
43 results for "nsivariant":
Your results are loading. Please wait...
nsIVariant
xpcom/ds/nsIVariant.idlScriptable 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. Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview ACString getAsACString(); Native code only! nsresult getAsArray(out PRUint16 type, out nsIID iid, out PRUint32 count, out voidPtr ptr); Violates the XPCOM interface guidelines AString getAsAString(); Native code only! AUTF8String getAsAUTF8String(); Native code only! ...
nsIAnnotationService
on-service;1". To use this service, use: var annotationService = Components.classes["@mozilla.org/browser/annotation-service;1"] .getService(Components.interfaces.nsIAnnotationService); Note: The annotation service is not thread-safe. You should only use it from the main thread. ...
... .getService(Components.interfaces.nsIAnnotationService); Note: The annotation service is not thread-safe. You should only use it from the main thread. ...
...g aName,[const, array, size_is(aDataLen)] in octet aData, in unsigned long aDataLen, in AUTF8String aMimeType, in long aFlags, in unsigned short aExpiration); void setItemAnnotationBinary(in long long aItemId, in AUTF8String aName,[const, array, size_is(aDataLen)] in octet aData, in unsigned long aDataLen, in AUTF8String aMimeType, in long aFlags, in unsigned short aExpiration); nsIVariant getPageAnnotation(in nsIURI aURI, in AUTF8String aName); nsIVariant getItemAnnotation(in long long aItemId, in AUTF8String aName); AString getPageAnnotationString(in nsIURI aURI, in AUTF8String aName); AString getItemAnnotationString(in long long aItemId, in AUTF8String aName); long getPageAnnotationInt32(in nsIURI aURI, in AUTF8String aName); long get...
...And 7 more matches
nsIContentPrefService
/ SeaMonkey 2.1) Inherits from: nsISupports Implemented by: @mozilla.org/content-pref/service;1. ...
...rits from: nsISupports Implemented by: @mozilla.org/content-pref/service;1. ...
...ice = Components.classes["@mozilla.org/content-pref/service;1"] .getService(Components.interfaces.nsIContentPrefService); Method overview void addObserver(in AString aName, in nsIContentPrefObserver aObserver); nsIVariant getPref(in nsIVariant aGroup, in AString aName, [optional] in nsIContentPrefCallback aCallback); nsIPropertyBag2 getPrefs(in nsIVariant aGroup); nsIPropertyBag2 getPrefsByName(in AString aName); boolean hasPref(in nsIVariant aGroup, in AString aName); void removeGroupedPrefs(); void removeObserver(in AString aName, in nsIContentPrefObserver aObserver); void removePref(in nsIVariant aGroup, in AString aName); void removePrefsByName(in AString aName); void setPref(in...
...And 6 more matches
amIWebInstallListener
mation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked. ...
... Methods onWebInstallBlocked() Called when the website is not allowed to direct...
...allBlocked(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); void onWebInstallDisabled(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); boolean onWebInstallRequested(in nsIDOMWindow aWindow, in nsIURI aUri, [array, size_is(aCount)] in nsIVariant aInstalls, [optional] in PRUint32 aCount); Note: Prior to Gecko 8.0, all references to nsIDOMWindow used in this interface were nsIDOMWindowInternal. Methods onWebInstallBlocked() Called when the website is not allowed to directly prompt the user to install add-ons. ...
...And 3 more matches
nsITaggingService
rits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/browser/tagging-service;1. ...
...rbird 3.3 / SeaMonkey 2.1) Implemented by: @mozilla.org/browser/tagging-service;1. ...
...nted by: @mozilla.org/browser/tagging-service;1. To use this service, use: var taggingSvc = Components.classes["@mozilla.org/browser/tagging-service;1"] .getService(Components.interfaces.nsITaggingService); Method overview void tagURI(in nsIURI aURI, in nsIVariant aTags); void untagURI(in nsIURI aURI, in nsIVariant aTags); nsIVariant getURIsForTag(in AString aTag); nsIVariant getTagsForURI(in nsIURI aURI, [optional] out unsigned long length, [retval, array, size_is(length)] out wstring aTags); Attributes Attribute Type Description allTags nsIVariant Retrieves all tags used to tag URIs in the data-base (sorted by name). tagContainer...
...And 3 more matches
nsIXPConnect
nsIXPConnectJSObjectHolder holdObject(in JSContextPtr aJSContext, in JSObjectPtr aObject); void initClasses(in JSContextPtr aJSContext, in JSObjectPtr aGlobalJSObj); nsIXPConnectJSObjectHolder initClassesWithNewWrappedGlobal(in JSContextPtr aJSContext, in nsISupports aCOMObj, in nsIIDRef aIID, in nsIPrincipal aPrincipal, in nsISupports aExtraPtr, in PRUint32 aFlags); nsIVariant JSToVariant(in JSContextPtr ctx, in jsval value); nsIVariant jSValToVariant(in JSContextPtr cx, in JSValPtr aJSVal); void moveWrappers(in JSContextPtr aJSContext, in JSObjectPtr aOldScope, in JSObjectPtr aNewScope); [noscript,notxpcom] void noteJSContext(in JSContextPtr aJSContext, in nsCCTraversalCallbackRef aCb); void releaseJSContext(in JSContextPtr aJSC...
...textPtr cx); void setSecurityManagerForJSContext(in JSContextPtr aJSContext, in nsIXPCSecurityManager aManager, in PRUint16 flags); void syncJSContexts(); void updateXOWs(in JSContextPtr aJSContext, in nsIXPConnectWrappedNative aObject, in PRUint32 aWay); Native code only! ...
... in this compartment. Can be null if not on the main thread. aExtraPtr Must be passed if aPrincipal is null. Used to separate code from the same principal into different compartments, as for sandboxes. aFlags One of the flags below specifying what options this global object wants. ...
...And 3 more matches
nsIAbCard/Thunderbird3
: AnniversaryYear, AnniversaryMonth, AnniversaryDay BirthYear, BirthMonth, BirthDay WebPage1 (work), WebPage2 (home) Custom1, Custom2, Custom3, Custom4 Notes Integral properties: LastModifiedDate PopularityIndex PreferMailFormat (see nsIAbPreferMailFormat) Boolean properties: AllowRemoteContent Inherits from: nsIAbItem Method overview nsIVariant getProperty(in AUTF8String name, in nsIVariant defaultValue); [noscript] AString getPropertyAsAString(in string name); [noscript] AUTF8String getPropertyAsAUTF8String(in string name); [noscript] PRUint32 getPropertyAsUint32(in string name); [noscript] boolean getPropertyAsBool(in string name); void setProperty(in AUTF8String name, in nsIVariant value);...
...is true then mailListURI will contain the URI of the associated mail list. This will be removed from the interface at a later date. mailListURI string If isMailList is true then mailListURI will contain the URI of the associated mail list. This will be removed from the interface at a later date. Methods getProperty() Returns a property for the given name. nsIVariant getProperty(in AUTF8String name, in nsIVariant defaultValue); Parameters name The case-sensitive name of the property to get. defaultValue The value to return if the property does not exist. Return value The value of the attribute asked for. Exceptions Thrown NS_ERROR_NOT_AVAILABLE<tt> If the named property does not exist. <tt>NS_ERROR_CANNOT_CONVERT_DATA If the property cann...
...opertyAsUint32() getPropertyAsBool() [noscript] AString getPropertyAsAString(in string name); [noscript] AUTF8String getPropertyAsAUTF8String(in string name); [noscript] PRUint32 getPropertyAsUint32(in string name); [noscript] boolean getPropertyAsBool(in string name); Returns a property for the given name. These functions convert values in the same manner as the default implementation of nsIVariant. Of particular note is that boolean variables are converted to integers as in C/C++ (true is a non-zero value), so that false will be converted to a string of 0 and not false<code>. These functions are marked <code>[noscript] since XPCconnect performs automatic type conversion on nsIVariant such that they are not needed for scripts, only for C++ callers. Parameters name The case-sensitive ...
...And 3 more matches
nsIScriptableIO
erence as with other components: var scriptableIO = Components.classes["@mozilla.org/io/scriptable-io;1"] .getService(); scriptableIO.getFile("Profile", "cookies.txt"); Method overview nsIFile getFile(in AString aLocation, in AString aFileName); nsIFile getFileWithPath(in AString aFilePath); nsISupports newInputStream(in nsIVariant aBase, in AString aMode, [optional] in AString aCharSet, [optional] in AString aReplaceChar, [optional] in unsigned long aBufferSize); nsISupports newOutputStream(in nsIVariant aBase, in AString aMode, [optional] in AString aCharSet, [optional] in AString aReplaceChar, [optional] in unsigned long aBufferSize, [optional] in unsigned long aPermissions); nsIURI newURI...
...se, in AString aMode, [optional] in AString aCharSet, [optional] in AString aReplaceChar, [optional] in unsigned long aBufferSize); nsISupports newOutputStream(in nsIVariant aBase, in AString aMode, [optional] in AString aCharSet, [optional] in AString aReplaceChar, [optional] in unsigned long aBufferSize, [optional] in unsigned long aPermissions); nsIURI newURI(in nsIVariant aUri); Methods getFile() Retrieves a reference to a file or directory on disk. The file does not have to exist already; this method simply creates the file reference which may then be passed to the newInputStream() or newOutputStream() method to open the file for reading or writing. Files are located by starting at a known directory, specified using a location key string. For example, if...
...AString aFilePath ); Parameters aFilePath The absolute pathname of the file to reference, or the value of a file's persistentDescriptor. Return value Returns an nsIFile object referencing the specified file location. Exceptions thrown NS_ERROR_INVALID_ARG aFilePath was null. newURI() Creates a URI object that implements the nsIURI interface. nsIURI newURI( in nsIVariant aUri ); Parameters aUri The file for which to create a new nsIURI object. This parameter may be specified either as a URL string or as an nsIFile object. Return value Returns an nsIURI object corresponding to the specified string or file. Exceptions thrown NS_ERROR_INVALID_ARG aUri was null. newInputStream() Retrieves a stream from which data can be read. nsISup...
...And 2 more matches
mozIStorageBindingParams
nc(). storage/public/mozIStorageBindingParams.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.2 (Firefox 3.6 / Thunderbird 3.1 / Fennec 1.0) Inherits from: nsISupports You can only create mozIStorageBindingParams objects by calling the mozIStorageBindingParamsArray.newBindingParams(). ...
...Int64ByIndex(in unsigned long aIndex, in long long aValue); Native code only! void bindNullByIndex(in unsigned long aIndex); Native code only! void bindStringByIndex(in unsigned long aIndex, in AString aValue); Native code only! void bindUTF8StringByIndex(in unsigned long aIndex, in AUTF8String aValue); Native code only! void bindByName(in AUTF8String aName, in nsIVariant aValue); void bindBlobByName(in AUTF8String aName, [array, const, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize); void bindDoubleByName(in AUTF8String aName, in double aValue); Native code only! void bindInt32ByName(in AUTF8String aName, in long aValue); Native code only! void bindInt64ByName(in AUTF8String aName, in long long aValue); Nativ...
...Value); Native code only! void bindNullByName(in AUTF8String aName); Native code only! void bindStringByName(in AUTF8String aName, in AString aValue); Native code only! void bindUTF8StringByName(in AUTF8String aName, in AUTF8String aValue); Native code only! Methods bindByIndex() Binds a to the specified index. void bindByIndex( in unsigned long aIndex, in nsIVariant aValue ); Parameters aIndex The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on). aValue to be bound to the specified index. bindBlobByIndex() Binds a blob to the specified index. void bindBlobByIndex( in unsigned long aIndex, [array, const, size_is(aValueSize)] i...
...gned long aIndex, in AUTF8String aValue ); Parameters aIndex The zero-based numerical index for the parameter to be bound. This will be one less than the number used in the SQL (<code>?1</code> maps to <code>0</code>, and so on). aValue to be bound to the specified index. bindByName() Binds a value to a parameter with the specified name. void bindByName( in AUTF8String aName, in nsIVariant aValue ); Parameters aName The name of the named index for the parameter to be bound. aValue to be bound to the specified index. bindBlobByName() Binds a blob to the specified index. void bindBlobByName( in AUTF8String aName, [array, const, size_is(aValueSize)] in octet aValue, in unsigned long aValueSize ); Parameters aName The name of the named index for the paramete...
mozIStorageRow
The mozIStorageRow interface represents a row in the result set from a storage database query. storage/public/mozIStorageRow.idlScriptable Please add a summary to this article. ...
...mozIStorageRow interface represents a row in the result set from a storage database query. storage/public/mozIStorageRow.idlScriptable Please add a summary to this article. ...
...anged in Gecko 1.9.1 (Firefox 3.5 / Thunderbird 3.0 / SeaMonkey 2.0) Inherits from: mozIStorageValueArray Method overview nsIVariant getResultByIndex(in unsigned long aIndex); nsIVariant getResultByName(in AUTF8String aName); Methods getResultByIndex() Returns the value from a specific column in the row, using a zero-based index to identify the column. nsIVariant getResultByIndex( in unsigned long aIndex ); Parameters aIndex The zero-based index of the column number whose value is to be returned. Return value An nsIVariant object containing the value of the specified column. ...
...in the row, using a zero-based index to identify the column. nsIVariant getResultByIndex( in unsigned long aIndex ); Parameters aIndex The zero-based index of the column number whose value is to be returned. Return value An nsIVariant object containing the value of the specified column. getResultByName() Returns the value from a specific column in the row, identifying the column by name. nsIVariant getResultByName( in AUTF8String aName ); Parameters aName The name of the column whose value is to be returned. Return value An nsIVariant object containing the value of the specified column. See also Storage mozIStorageResultSet mozIStorageConnection mozIStorageStatement ...
nsIContentPrefService2
When a set() or remove met...
...When a set() or remove method is called, observers are notified after the set() or removal completes but before method's callback is called. The service holds a strong ref...
...bserverForName() Unregisters an observer for the given name. void removeObserverForName( in AString name, in nsIContentPrefObserver observer ); Parameters name The name for which the observer was registered. Pass null if the observer was added with a null name. observer The observer. set() Sets a preference. void set( in AString domain, in AString name, in nsIVariant value, in nsILoadContext context, in nsIContentPrefCallback2 callback Optional ); Parameters domain The preference's domain. name The preference's name. value The preference's value. context The private-browsing context, if any. callback Optional HandleCompletion is called when the preference has been stored. setGlobal()...
...Optional ); Parameters domain The preference's domain. name The preference's name. value The preference's value. context The private-browsing context, if any. callback Optional HandleCompletion is called when the preference has been stored. setGlobal() Sets a preference with no domain. void setGlobal( in AString name, in nsIVariant value, in nsILoadContext context, in nsIContentPrefCallback2 callback Optional ); Parameters name The preference's name. value The preference's value. context The private-browsing context, if any. callback Optional HandleCompletion is called when the preference has been stored. See also Old synchronous API:nsIContentPrefService U...
nsIXSLTProcessor
rocessor.idlScriptable XSLT Processor Inherits from: nsISupports Last changed in Gecko 1.7 Implemented by: @mozilla.org/document-transformer;1?type=xslt. ...
... .createInstance(Components.interfaces.nsIXSLTProcessor); Method overview void clearParameters(); nsIVariant getParameter(in DOMString namespaceURI, in DOMString localName); void importStylesheet(in nsIDOMNode style); void removeParameter(in DOMString namespaceURI, in DOMString localName); void reset(); void setParameter(in DOMString namespaceURI, in DOMString localName, in nsIVariant value); nsIDOMDocument transformToDocument(in nsIDOMNode source); nsIDOMDocumentFragment transformToFragment(in nsIDOMNode source, in nsIDOMDocument output); Methods clearParameters() Removes all set parameters from this nsIXSLTProcessor. This will make the processor use the default-value for all parameters as specified in the stylesheet. void clearParameters(); Parameters None. getParame...
...tFragment transformToFragment(in nsIDOMNode source, in nsIDOMDocument output); Methods clearParameters() Removes all set parameters from this nsIXSLTProcessor. This will make the processor use the default-value for all parameters as specified in the stylesheet. void clearParameters(); Parameters None. getParameter() Gets a parameter if previously set by setParameter(). Returns null otherwise. nsIVariant getParameter( in DOMString namespaceURI, in DOMString localName ); Parameters namespaceURI The namespaceURI of the XSLT parameter. localName The local name of the XSLT parameter. Return value An nsIVariant containing the value of the parameter. importStylesheet() Imports the specified stylesheet into this XSLTProcessor for transformations. void importStylesheet( in nsIDOMNode style ); P...
...ocal name of the XSLT parameter. reset() Remove all parameters and stylesheets from this nsIXSLTProcessor. void reset(); Parameters None. setParameter() Sets a parameter to be used in subsequent transformations with this nsIXSLTProcessor. If the parameter doesn't exist in the stylesheet the parameter will be ignored. void setParameter( in DOMString namespaceURI, in DOMString localName, in nsIVariant value ); Parameters namespaceURI The namespaceURI of the XSLT parameter. localName The local name of the XSLT parameter. value The new value of the XSLT parameter. transformToDocument() Transforms the node source applying the stylesheet imported by importStylesheet(). nsIDOMDocument transformToDocument( in nsIDOMNode source ); Parameters source The node to be transformed. Return value An ...
extIPreferenceBranch
s used in this interface are relative to the root branch. extIPreferenceBranch is defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview boolean has(in AString aName) extIPreference get(in AString aName) nsIVariant getValue(in AString aName, in nsIVariant aDefaultValue) void setValue(in AString aName, in nsIVariant aValue) void reset() Attributes Attribute Type Description root readonly attribute AString The name of the branch root. all readonly attribute nsIVariant Array of extIPreference listing all preferences in this branch. ...
... The name of preference Return value true if the preference exists, false if not get() Gets an object representing a preference extIPreference get(in AString aName) Parameters aName The name of preference Return value a preference object, or null if the preference does not exist getValue() Gets the value of a preference. Returns a default value if the preference does not exist. nsIVariant getValue(in AString aName, in nsIVariant aDefaultValue) Parameters aName The name of a preference aDefaultValue The default value of a preference. This will be passed back to you without any processing and can be something which would not be valid as a preference. For example, null/undefined/an object. Return value The value of the preference or the given default value if preference ...
...ccur. A quoted string in the preference file will always appear as a string, even if the value of the string is "true" or "false". An integer preference appears as a JavaScript Number, and a boolean appears as a JavaScript Boolean. There are no other types supported by the preference subsystem. setValue() Sets the value of a preference with the given name. void setValue(in AString aName, in nsIVariant aValue) Parameters aName The name of a preference aValue The value of a preference Return value reset() Resets all preferences in a branch back to their default values. Note: This function has not been implemented and will raise an exception. See bug 481044 void reset() Parameters Return value Examples var myExt = Application.extensions.get('myapplicationid'); function myFu...
mozIStorageAggregateFunction
ons provided by SQLite. Objects implementing this interface can be registered with mozIStorageConnection.createAggregateFunction(). storage/public/mozIStorageAggregateFunction.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9 (Firefox 3) Inherits from: nsISupports Method overview void onStep(in mozIStorageValueArray aFunctionArguments); nsIVariant onFinal(); Methods onStep() This is called for each row of results returned by the query. The implementation should store or perform some work to prepare to return a value. Note This callback is executed on the thread that the statement or trigger is executing on. If you use mozIStorageConnection.executeAsync() or, mozIStorageStatement.executeAsync() this callback will run on a differ...
...he statement or trigger is executing on. If you use mozIStorageConnection.executeAsync() or, mozIStorageStatement.executeAsync() this callback will run on a different thread from the rest of your code. Likewise, if you execute SQL on a different thread, this callback will be executed on that thread. This callback should be reentrant if any of the above applies to your use of the storage APIs! nsIVariant onFinal() Return value An nsIVariant this is the return value of the function. Sample Code Both of the following code samples assume that the variable dbConn is an opened mozIStorageConnection. JavaScript // First, create our object that will represent our function. var standardDeviationFunc = { _numbers: [], onStep: function(aArguments) { this._numbers.push(aArguments.getInt32(0));...
...ts } } finally { stmt.reset(); } C++ // First, create our class that will represent our function. ...
mozIStorageFunction
vailable to SQL queries and triggers. There are a number of already defined functions provided by SQLite. Objects implementing this interface can be registered with mozIStorageConnection.createFunction(). storage/public/mozIStorageFunction.idlScriptable Please add a summary to this article. Last changed in Gecko 1.9.1.4 (Firefox 3.5.4) Inherits from: nsISupports Method overview nsIVariant onFunctionCall(in mozIStorageValueArray aFunctionArguments); Methods onFunctionCall() The implementation of the function. This is called by the database engine when the function registered with mozIStorageConnection.createFunction() is used in an executing SQL statement or trigger. Note This callback is executed on the thread that the statement or trigger is executing on. If you use m...
...he statement or trigger is executing on. If you use mozIStorageConnection.executeAsync() or, mozIStorageStatement.executeAsync() this callback will run on a different thread from the rest of your code. Likewise, if you execute SQL on a different thread, this callback will be executed on that thread. This callback should be reentrant if any of the above applies to your use of the storage APIs! nsIVariant onFunctionCall( in mozIStorageValueArray aFunctionArguments ); Parameters aFunctionArguments A mozIStorageValueArray holding the arguments passed in to the function. Return value An nsIVariant this is the return value of the function. Sample Code Both of the following code samples assume that the variable dbConn is an opened mozIStorageConnection. JavaScript Starting in Gecko 1.9.
...unction. let stmt = dbConn.createStatement("SELECT square(value) FROM some_table"); try { while (stmt.executeStep()) { // handle the results } } finally { stmt.reset(); } C++ // First, create our class that will represent our function. ...
nsIStructuredCloneContainer
ucturedCloneContainer 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(). Method overview nsIVariant deserializeToVariant(); AString getDataAsBase64(); void initFromBase64(in AString aData,in unsigned long aFormatVersion); void initFromVariant(in nsIVariant aData); Attributes 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 lo...
...s 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. Methods deserializeToVariant() Deserialize the object this container holds, returning it wrapped as an nsIVariant. nsIVariant deserializeToVariant(); Parameters None. Return value An nsIVariant. getDataAsBase64() Get this structured clone container's data as a base-64-encoded string. AString getDataAsBase64(); Parameters None. Return value A base-64-encoded string. initFromBase64() Initialize this structured clone container from a base-64-encoded byte stream. void initFromBase64( in AString aData, in u...
...tainer from a base-64-encoded byte stream. void initFromBase64( in AString aData, in unsigned long aFormatVersion ); Parameters aData A base-64-encoded byte stream. aFormatVersion The version of the structured clone algorithm which was used to generate aData. initFromVariant() Initialize this structured clone container so it contains a clone of the given variant. void initFromVariant( in nsIVariant aData ); Parameters aData A nsIVariant, must be backed by a jsval. ...
extISessionStorage
defined in toolkit/components/exthelper/extIApplication.idl. Implemented via XPCOM service for extIApplication: see the instructions on the FUEL (Firefox), STEEL (Thunderbird) and SMILE (SeaMonkey) pages. Method overview These methods are usually accessed via Application.storage. Return Type Method boolean has(in AString aName) void set(in AString aName, in nsIVariant aValue) nsIVariant get(in AString aName, in nsIVariant aDefaultValue) Attributes Attribute Type Description events readonly attribute extIEvents The events object for the storage supports: "change" Methods has() Determines if a storage item exists with the given name. boolean has(in AString aName) Parameters aName The name of an it...
...ttribute extIEvents The events object for the storage supports: "change" Methods has() Determines if a storage item exists with the given name. boolean has(in AString aName) Parameters aName The name of an item Return value true if an item exists with the given name, false otherwise. set() Sets the value of a storage item with the given name. void set(in AString aName, in nsIVariant aValue) Parameters aName The name of an item Return value get() Gets the value of a storage item with the given name. Returns a default value if the item does not exist. nsIVariant get(in AString aName, in nsIVariant aDefaultValue) Parameters aName The name of an item Return value value of the item or the given default value if no item exists with the given name. See also ...
amIInstallTrigger
toolkit/mozapps/extensions/amIInstallTrigger.idlScriptable Called when an install completes or fails. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview boolean enabled(); boolean install(in nsIVariant aArgs, [optional] in amIInstallCallback aCallback); boolean installChrome(in PRUint32 aType, in AString aUrl, in AString aSkin); Deprecated since Gecko 2.0 boolean startSoftwareUpdate(in AString aUrl, [optional] in PRInt32 aFlags); Deprecated since Gecko 2.0 boolean updateEnabled(); Deprecated since Gecko 2.0 Constants Retained for backwards compatibility. Constant Value Description SKIN 1 ...
... Constants Retained for backwards compatibility. Constant Value Description SKIN 1 LOCALE 2 CONTENT 4 PACKAGE 7 Methods enabled() Tests if installation is enabled. boolean enabled(); Parameters None. Return value install() Starts a new installation of a set of add-ons. boolean install( in nsIVariant aArgs, in amIInstallCallback aCallback Optional ); Parameters aArgs The add-ons to install. This should be a JS object, each property is the name of an add-on to be installed. The value of the property should either be a string URL, or an object with the following properties: URL for the add-on's URL IconURL for an icon for the add-on Hash for a hash of the add-on. aCallback ...
amIWebInstallPrompt
toolkit/mozapps/extensions/amIWebInstallListener.idlScriptable Called when installation by websites is currently disabled. ...
... aUri The URI of the site that triggered the installs. aInstalls The AddonInstalls that were requested. ...
nsIContentPrefObserver
tPrefService.idlScriptable This interface allows code to easily watch for changes to the values of content preferences. 1.0 66 Introduced Gecko 1.9 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void onContentPrefRemoved(in AString aGroup, in AString aName); void onContentPrefSet(in AString aGroup, in AString aName, in nsIVariant aValue); Methods onContentPrefRemoved() Called when a content preference is removed. void onContentPrefRemoved( in AString aGroup, in AString aName ); Parameters aGroup The group to which the removed preference belonged; this may be the URI of a web site. This value is null if the preference was global, applying to all web sites. aName The name of the preference that was rem...
...removed preference belonged; this may be the URI of a web site. This value is null if the preference was global, applying to all web sites. aName The name of the preference that was removed. onContentPrefSet() Called when the value of a preference is set (either by changing its current value or by creating the preference). void onContentPrefSet( in AString aGroup, in AString aName, in nsIVariant aValue ); Parameters aGroup The group to which the preference belongs; this may be the URI of a web site. This value is null if the preference is global, applying to all web sites. aName The name of the preference whose value has changed. aValue The preference's new value. See also nsIContentPrefService Using content preferences ...
nsIDOMUserDataHandler
dom/interfaces/core/nsIDOMUserDataHandler.idlScriptable The callback function for the setUserData method. 1.0 66 Introduced Gecko 1.5 Inherits from: nsISupports Last changed in Gecko 1.9 (Firefox 3) Method overview void handle(in unsigned short operation, in DOMString key, in nsIVariant data, in nsIDOMNode src, in nsIDOMNode dst); Constants Constant Value Description NODE_CLONED 1 The node was cloned. NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. Methods handle() This method is a callback which will be called if a node with user data is being cloned, imported or adopted. void handle( in unsigned short operation,...
...he node was cloned. NODE_IMPORTED 2 The node was cloned into a new document. NODE_DELETED 3 Unimplemented NODE_RENAMED 4 Unimplemented NODE_ADOPTED 5 The node was adopted into a new document. Methods handle() This method is a callback which will be called if a node with user data is being cloned, imported or adopted. void handle( in unsigned short operation, in DOMString key, in nsIVariant data, in nsIDOMNode src, in nsIDOMNode dst ); Parameters operation One of the NODE_* operation type constants from the above table. key The key that was used to set the user data. data The data that was set on the original node. src The original node. dst The new node, for clone and import operations. ...
nsIDOMWindowInternal
self nsIDOMWindowInternal Readonly: Returns an object reference to the window object. n...
... self nsIDOMWindowInternal Readonly: Returns an object reference to the window object. navigator nsIDOMNavigator ...
nsIDocShell
illa.org/docshell;1. Do not create an instance directly. Instead, retrieve an nsIDocShell from a browser or other document container element. Note that out-of-process browsers do not have an nsIDocShell; instead you can access the nsIDocShell object from a frame script. ...
...() Add a WebApps session storage object to the docshell. void addSessionStorage( in nsIPrincipal principal, in nsIDOMStorage storage ); Parameters principal The principal to use for the new storage object. storage The storage object to add. addState() Do either a history.pushState() or history.replaceState() operation, depending on the value of aReplace. void addState( in nsIVariant aData, in DOMString aTitle, in DOMString aURL, in boolean aReplace ); Parameters aData The state object to pass to the popstate event. It must be possible to serialise this in less than 640k characters. aTitle Gecko currently ignores this parameter. aURL The URL associated with the new history entry. For instance, if the user tries to reload the page, then this is ...
nsIJetpack
refox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void sendMessage(in AString aMessageName /* [optional] in jsval v1, [optional] in jsval v2, ... */); void registerReceiver(in AString aMessageName, in jsval aReceiver); void unregisterReceiver(in AString aMessageName, in jsval aReceiver); void unregisterReceivers(in AString aMessageName); void evalScript(in AString aScript); nsIVariant createHandle(); void destroy(); Methods sendMessage() This method asynchronously sends a message to the Jetpack process. void sendMessage( in AString aMessageName, [optional] in jsval v1, Optional [optional] in jsval v2, Optional ... ); Parameters aMessageName The name of the message to send. v1, v2, ... Optional JavaScript values to send with the message; they must be either JSON-...
...pe will include all privileged APIs. Individual lines of the form //@line 1 "foo.js" can be used to specify filename and line number information for debugging purposes. void evalScript( in AString aScript ); Parameters aScript The full contents of the script to evaluate in the Jetpack process. createHandle() This creates an opaque handle that can transparently be exchanged between processes. nsIVariant createHandle(); Parameters None. Return value The new handle. destroy() This terminates the Jetpack process. void destroy(); Parameters None. Special Messages If an exception goes uncaught in the Jetpack process, it will be reported to the chrome process via a message with the name core:exception. The message comes with one argument, which represents the exception object that was thrown. Warnin...
nsIPropertyBag2
xpcom/ds/nsIPropertyBag2.idlScriptable This interface extends nsIPropertyBag with some methods for getting properties in specific formats. ...
...opertyAsInt64(in AString prop); void getPropertyAsInterface(in AString prop, in nsIIDRef iid, [iid_is(iid), retval] out nsQIResult result); PRUint32 getPropertyAsUint32(in AString prop); PRUint64 getPropertyAsUint64(in AString prop); PRBool hasKey(in AString prop); Methods get() This method returns null if the value does not exist, or exists but is null. nsIVariant get( in AString prop ); Parameters prop Property to return the value of. Return value The property value as an nsIVariant. getPropertyAsACString() ACString getPropertyAsACString( in AString prop ); Parameters prop Property to return the value of. Return value The property value as an ACString. Note: Accessing a property of a different type may attempt conversion to this ...
nsIWritablePropertyBag
xpcom/ds/nsIWritablePropertyBag.idlScriptable Please add a summary to this article. 1.0 66 Introduced Gecko 1.8 Inherits from: nsIPropertyBag Last changed in Gecko 1.8 (Firefox 1.5 / Thunderbird 1.5 / SeaMonkey 1.0) Method overview void deleteProperty(in AString name); void setProperty(in AString name, in nsIVariant value); Methods deleteProperty() Delete a property with the given name. ...
...s deleteProperty() Delete a property with the given name. void deleteProperty( in AString name ); Parameters name Property to delete. Exceptions thrown NS_ERROR_FAILURE If a property with that name doesn't exist. setProperty() Set a property with the given name to the given value. If a property already exists with the given name, it is overwritten. void setProperty( in AString name, in nsIVariant value ); Parameters name Property to set the value of. value Value to set the property to. ...
XUL Questions and Answers - Archive of obsolete content
d", function(e) { startup(); }, false); Similarly, for onunload use the code: window.addEventListener("unload", function(e) { shutdown(); }, false); Is there an event which is called when the Firefox browser is initialized? An event is initiated when the application starts up and when the profile is changed. For more information please look at the following link: nsExtensionManager.js Is nsIVariant fully supported using python? Python has full support for variants. Pass a Python string/int/etc to the method requiring an nsIVariant. A Python object is convered when implmenting an interface taking an nsIVariant. How do I close the "showPopup" which is automatically opened when the "oncontextmenu" event is called? If you have a similar code base as the following: onBookmarkContextMenu: f...
extIApplication
events readonly attribute extIEvents The events object for the application. supports: "load", "ready", "quit", "unload" The following interfaces are only available to Firefox: Attribute Type Description bookmarks readonly attribute fuelIBookmarkRoots The root bookmarks object for the application. windows readonly attribute nsIVariant An array of browser windows within the application. activeWindow readonly attribute fuelIWindow The currently active browser window. Methods quit() Attempts to shutdown the application. It is possible for the shutdown to be canceled. boolean quit() Return value boolean value indicating whether the shutdown was successful. restart() Attempts to restart the applica...
Index
Mozilla › Tech › XPCOM › Index
criptable, NeedsContent No summary! 1053 nsIUserCertPicker Cryptography, Interfaces, Interfaces:Scriptable, NeedsContent, XPCOM Interface Reference No summary! 1054 nsIUserInfo Interfaces, Interfaces:Scriptable, Reference, Reference(2), XPCOM, XPCOM Interface Reference Implemented by: @mozilla.org/userinfo;1. To get the service, use: 1055 nsIVariant Interfaces, Interfaces:Scriptable, NeedsContent, XPCOM, XPCOM Interface Reference, XPConnect None. 1056 nsIVersionComparator Interfaces, Interfaces:Scriptable, XPCOM, XPCOM API Reference, XPCOM Interface Reference Version strings are dot-separated sequences of version-parts. A version-part consists of up to four parts, all of which are optional: <number-a><string...
amIWebInstallInfo
communicate with the running application and allow it to warn the user about blocked installs and start the installs running. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void install(); Attributes Attribute Type Description installs nsIVariant An array of AddonInstall objects. Read only. originatingURI nsIURI The URI that started the installs. For example, the referring page for a link to an XPI download. Read only. originatingWindow nsIDOMWindow The window that started the installs. Read only. Note: Prior to Gecko 8.0 (Firefox 8.0 / Thunderbird 8.0 / SeaMonkey 2.5), this was an nsIDOMWindowIn...
nsIBlocklistPrompt
This interface is used, if available, by the default implementation of nsIBlocklistService to display a confirmation user interface to the user before blocking extensions or plugins. 1.0 66 Introduced Gecko 2.0 Inherits from: nsISupports Last changed in Gecko 2.0 (Firefox 4 / Thunderbird 3.3 / SeaMonkey 2.1) Method overview void prompt([array, size_is(aCount)] in nsIVariant aAddons, [optional] in PRUint32 aCount); Methods prompt() Prompt the user about newly blocked addons. The prompt is then responsible for soft-blocking any addons that need to be afterwards. void prompt( [array, size_is(aCount)] in nsIVariant aAddons, in PRUint32 aCount Optional ); Parameters aAddons An array of addons and plugins that are blocked. These are javascript objects ...
nsIContentPref
See also nsIContentPrefService2 nsIContentPrefCallback2 ...
nsINavHistoryQuery
s long Set lower limits for how many times an item has been visited. The default value is "-1", and in that case all items are matched regardless of their visit count. onlyBookmarked boolean When set, returns only bookmarked items, when unset, returns anything. Setting this is equivalent to listing all bookmark folders in the folders parameter. searchTerms AString Text search terms. tags nsIVariant A list of tags to use for filtering query results. This attribute must be an array of strings. Duplicate tags may be specified, but when reading the list, only unique tags are returned. When called as a getter, this returns an array of strings sorted in ascending lexicographical (alphabetical) order. This array may be empty, in which case no filtering by tags is performed. To search for items th...
nsIProperty
xpcom/ds/nsIProperty.idlScriptable Please add a summary to this article. Inherits from: nsISupports Last changed in Gecko 1.7 Attributes Attribute Type Description name AString Get the name of the property. Read only. value nsIVariant Get the value of the property. Read only. ...
nsIPropertyBag
xpcom/ds/nsIPropertyBag.idlScriptable This interface is used to store a set of properties. Inherits from: nsISupports Last changed in Gecko 1.0 Method overview nsIVariant getProperty(in AString name); Attributes Attribute Type Description enumerator nsISimpleEnumerator Get a nsISimpleEnumerator whose elements are nsIProperty objects. Read only. Methods getProperty() Get a property value for the given name. nsIVariant getProperty( in AString name ); Parameters name The name to return the matching property. Return value The property matching the given name. Exceptions thrown NS_ERROR_FAILURE If a property with that name doesn't exist. Examples Get User Agent Information (Operating System Specifics. The windo...
XPCOM Interface Reference
mnnsITreeColumnsnsITreeContentViewnsITreeSelectionnsITreeViewnsIURInsIURIFixupnsIURIFixupInfonsIURLnsIURLFormatternsIURLParsernsIUTF8ConverterServicensIUTF8StringEnumeratornsIUUIDGeneratornsIUpdatensIUpdateCheckListenernsIUpdateCheckernsIUpdateItemnsIUpdateManagernsIUpdatePatchnsIUpdatePromptnsIUpdateTimerManagernsIUploadChannelnsIUploadChannel2nsIUrlListManagerCallbacknsIUserCertPickernsIUserInfonsIVariantnsIVersionComparatornsIWeakReferencensIWebBrowsernsIWebBrowserChromensIWebBrowserChrome2nsIWebBrowserChrome3nsIWebBrowserChromeFocusnsIWebBrowserFindnsIWebBrowserFindInFramesnsIWebBrowserPersistnsIWebContentHandlerRegistrarnsIWebNavigationnsIWebNavigationInfonsIWebPageDescriptornsIWebProgressnsIWebProgressListenernsIWebProgressListener2nsIWebSocketChannelnsIWebSocketListenernsIWebappsSupportnsIWif...
XPCOM primitive
mitives are scriptable, and they all implement an XPCOM interface from the table below. Primitives are rarely useful. The main use case is to store primitive values in a data structure that can only store XPCOM objects, such as nsIArray. Also, certain APIs, such as nsITransferable.setTransferData(), require primitives. ...
XPCOM Interface Reference by grouping
nsISupportsFloat nsISupportsID nsISupportsInterfacePointer nsISupportsPRBool nsISupportsPrimitive nsISupportsPRInt16 nsISupportsPRInt32 nsISupportsPRInt64 nsISupportsPriority nsISupportsPRTime nsISupportsPRUint16 nsISupportsPRUint32 nsISupportsPRUint64 nsISupportsPRUint8 nsISupportsString nsISupportsVoid nsISupportsWeakReference nsIVariant DO NOT USE nsIEnumerator nsIInProcessContentFrameMessageManager nsIScriptableIO nsIXPCScriptable Future nsIXMLHttpRequestUpload Obsolete nsIXmlRpcClient nsIXmlRpcFault Security Auth nsIAuthModule nsIAuthPrompt nsIAuthPromptProvider nsIAuthPromptWrapper nsIAsyncVerifyRedirectCallba...
XPIDL
e reflected more or less normally, with numeric types all representing numbers, booleans as true or false, the various strings (including AString et al) as a JavaScript string, and nsid types as a Components.ID instance. In addition, the jsval type is translated as the appropriate JavaScript value (since a jsval is the internal representation of all JavaScript values), and objects that are marked nsIVariant have their types automatically boxed and unboxed as appropriate. The equivalent representations of all IDL types in native code is given in the earlier tables; parameters of type inout follow their out form. Native code should pay particular attention to not passing in null values for out parameters (although some parts of the codebase are known to violate this, it is strictly enforced at the J...
Activity Manager examples
class myCopyEventUndo : public nsIActivityUndoHandler { public: NS_DECL_ISUPPORTS NS_DECL_NSIACTIVITYUNDOHANDLER myCopyEventUndo() {} private: ~myCopyEventUndo() {} }; NS_IMPL_ISUPPORTS1(myCopyEventUndo, nsIActivityUndoHandler) NS_IMETHODIMP myCopyEventUndo::Undo(nsIActivityEvent *event, nsresult *result) { nsresult rv; // get the subjects of this copy event PRUint32 length; nsIVariant **subjectList; rv = event->GetSubjects(&length, &subjectList); if(NS_FAILED(rv)) return rv; // first subject in the list is the source folder in this particular case nsCOMPtr<nsIMsgFolder> folder = do_QueryInterface(subjectList[0]); // get the initiator nsIVariant *initiator; event->GetInitiator(&initiator); if (initiator) { nsISupports* ptr; rv = object->GetAsISu...
DataTransfer.mozGetDataAt() - Web APIs
The DataTransfer.mozGetDataAt() method is used to retrieve an item in the drag event's data transfer object, based on a given format and index. This method returns null if the specified item does not exist or if the index is not in the range from zero to the number of items minus one. Note: This method is Gecko-specific. Syntax nsIVariant dataTransfer.mozGetDataAt([type], index); Arguments type A string representing the type of the drag data to retrieve from the drag data object. index A unsigned long representing the index of the data to retrieve. Return value nsIVariant The data item requested. If the specified item does not exist, null is returned. Example This example shows the use of the mozGetDataAt() method in a drop event handler. function drop_handler(event) { var...
DataTransfer.mozSetDataAt() - Web APIs
already exists, it is replaced in the same position as the old data. The data should be either a string, a Boolean or number type (which will be converted into a string) or an nsISupports. Note: This method is Gecko-specific. Syntax void dataTransfer.mozSetDataAt([type], data, index); Arguments type A string representing the type of the drag data to add to the drag data object. data A nsIVariant representing the data to add to the drag data object. index A unsigned long representing the index of the data to add. Return value void Example This example shows the use of the mozSetDataAt() method in a dragstart handler. function dragstart_handler(event) { var dt = event.dataTransfer; var idx = dt.mozItemCount; // Add two new items to the drag transfer if (idx >= 0) { ...
DataTransfer.mozTypesAt() - Web APIs
The DataTransfer.mozTypesAt() method returns a list of the format types that are stored for an item at the specified index. If the index is not in the range from 0 to the number of items minus one, an empty string list is returned. Note: This method is Gecko-specific. Syntax nsIVariant dataTransfer.mozTypesAt(index); Arguments index A unsigned long that is the index of the data for which to retrieve the types. Return value nsIVariant A list of data formats (which are strings). If the index is not in the range from 0 to the number of items minus one, an empty string list is returned. Example This example shows the use of the mozTypesAt() method in a drop event handler. function drop_handler(event) { var dt = event.dataTransfer; var count = dt.mozItemCount; output("Items: ...