Search completed in 1.07 seconds.
JSClass.flags
its value is the logical or of zero or more of the following constants: flag meaning jsclass_has_private this class uses private data. if this flag is set, each instance of the class has a field for private data. the field can be accessed using js_getprivate and js_setprivate. mxr id search for jsclass_has_private jsclass_private_is_nsisupports mozilla extension. the private field of each object of this class points to an xpcom object (see nsisupports). this is only meaningful if spidermonkey is built with xpconnect and the jsclass_has_private flag is also set. ...
... indicates that instances of this class have n reserved slots. n is an integer in the range [0..255]. the slots initially contain unspecified valid jsval values. they can be accessed using js_getreservedslot and js_setreservedslot. (the jsclass.reserveslots hook also allocates reserved slots to objects.) mxr id search for jsclass_has_reserved_slots jsclass_global_
flags this flag is only relevant for the class of an object that is used as a global object. (ecmascript specifies a single global object, but in spidermonkey the global object is the last object in the scope chain, which can be different objects at different times. this is actually quite subtle. js_executescript and similar apis set the global object for the code they execute. js_setglobal...
...rototype.) objects that can end up with the wrong prototype object, if this flag is not present, include: arguments objects (ecma 262-3 §10.1.8 specifies "the original object prototype"), function objects (ecma 262-3 §13.2 specifies "the original function prototype"), and objects created by many standard constructors (ecma 262-3 §15.4.2.1 and others). mxr id search for jsclass_global_
flags jsclass_foreground_finalize objects of this class must be finalized on the main thread. if this class has a finalizer that makes use of state shared with the main thread then this option must be specified. it is always safe to specify this option. one of jsclass_foreground_finalize and jsclass_background_finalize must be specified. jsclass_background_...
... jsclass_is_extended obsolete since jsapi 17indicates that this jsclass is really a jsextendedclass. jsclass_mark_is_trace obsolete since jsapi 5 indicates that the mark hook implements the new jstraceop signature instead of the old jsmarkop signature. this is recommended for all new code that needs custom marking. spidermonkey reserves a few other
flags for its internal use. they are jsclass_is_anonymous, jsclass_is_global, jsclass_is_proxy, and jsclass_has_cached_proto. jsapi applications should not use these
flags. see also bug 527805 - removed jsclass_share_all_properties bug 571789 - removed jsclass_is_extended bug 638291 - removed jsclass_mark_is_trace bug 641025 - added jsclass_implements_barriers bug 702507 - removed jsclass_const...
FileSystemFlags - Web APIs
the filesystem
flags dictionary defines a set of values which are used when specifying option
flags when calling certain methods in the file and directory entries api. methods which accept an options parameter of this type may specify zero or more of these
flags as fields in an object, like this: datadirectoryentry.getdirectory("workspace", { create: true }, function(entry) { }); here, we see that the create property is provided, with a value of true, indicating that the directory should be created if it's not already there. note that these option
flags currently don't have any useful meaning when used in the scope of web content, where security precautions prevent the creation of new files or the replacement of existing ones. properties create optional if this property is true, and...
...e user agent should create it. the default is false. the parent directory must already exist. exclusive optional if true, and the create option is also true, the file must not exist prior to issuing the call. instead, it must be possible for it to be created newly at call time. the default is false. values and results the table below describes the result of each possible combination of these
flags depending on whether or not the target file or directory path already exists. option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called ...
... true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystem
flags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for andro...
.... browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. ...
JS_GetRegExpFlags
this article covers features introduced in spidermonkey 17 get the
flags of the given regexp object. syntax unsigned js_getregexp
flags(jscontext *cx, handleobject obj) name type description cx jscontext * a context. obj js::handleobject the object to get the
flags. description js_getregexp
flags returns
flags of the specified object, obj. if successful, js_getregexp
flags returns the
flags, otherwise returns false. ...
... js_getregexp
flags(jscontext *cx, handleobject obj) name type description cx jscontext * a context. obj js::handleobject the object to get the
flags. description js_getregexp
flags returns
flags of the specified object, obj. if successful, js_getregexp
flags returns the
flags, otherwise returns false. ...
...j) name type description cx jscontext * a context. obj js::handleobject the object to get the
flags. description js_getregexp
flags returns
flags of the specified object, obj. ...
RegExp.prototype.flags - JavaScript
the
flags property returns a string consisting of the
flags of the current regular expression object. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. property attributes of regexp.prototype.
flags writable no enumerable no configurable yes description
flags in the
flags property are sorted alphabetically (from left to right, e.g. "gimsuy"). ...
...one https://github.com/mdn/interactive-examples and send us a pull request. property attributes of regexp.prototype.
flags writable no enumerable no configurable yes description
flags in the
flags property are sorted alphabetically (from left to right, e.g. "gimsuy"). ...
... request. property attributes of regexp.prototype.
flags writable no enumerable no configurable yes description
flags in the
flags property are sorted alphabetically (from left to right, e.g. "gimsuy"). polyfill if (regexp.prototype.
flags === undefined) { object.defineproperty(regexp.prototype, '
flags', { configurable: true, get: function() { return this.tostring().match(/[gimsuy]*$/)[0]; } }); } examples using
flags /foo/ig.
flags; // "gi" /bar/myu.
flags; // "muy" specifications specification ecmascript (ecma-262)the definition of 'regexp.prototype.
flags' in that specification. ...
nsMsgMessageFlags
constants name value description read 0x00000001 indicates whether or not the message is read. replied 0x00000002 indicates whether or not the message has been replied to. marked 0x00000004 indicates whether or not the message has been flagged/starred expunged 0x00000008 indicates whether or not the message is deleted (but not compacted) hasre 0x00000010 indicates whether or not 're: ' should be added to the head of the subject to get the proper subject. ...
...ivery receipt was requested. mdnreportsent 0x00800000 indicates whether or not a delivery receipt was sent. template 0x01000000 indicates whether or not the message is a template. attachment 0x10000000 indicates whether or not the message has an attachment. labels 0x0e000000 the set of bits used to identify labels. not returned in header.
flags. runtimeonly 0x00000020 indicates the
flags which are not emitted to the database. ...
nsMsgViewFlagsType
the nsmsgview
flagstype interface contains constants used for view
flags in thunderbird. this interface isn't ever implemented. it is only used to store constants. ...
... the nsmsgview
flagstype interface contains constants used for view
flags in thunderbird. this interface isn't ever implemented. it is only used to store constants. ...
FileSystemFlags.create - Web APIs
the create property on the filesystem
flags dictionary is used to indicate whether or not the file should be created if it's missing. filesystem
flags is only used when calling filesystemdirectoryentry.getfile() or filesystemdirectoryentry.getdirectory(). syntax filesystem
flags.create = booleanvalue values the table below describes the result of each possible combination of these
flags depending on whether or not the target file or directory path already exists. option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called or ...
... true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystem
flags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for andro...
FileSystemFlags.exclusive - Web APIs
the exclusive property on the filesystem
flags dictionary is used in tandem with the create property to determine whether or not it's acceptable to require that the file not already exist when the reference to it is created by calling filesystemdirectoryentry.getfile() or filesystemdirectoryentry.getdirectory(). syntax filesystem
flags.exclusive = booleanvalue values the table below describes the result of each possible combination of these
flags depending on whether or not the target file or directory path already exists. option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is...
... true true path doesn't exist the file or directory is created, then a filesystemfileentry or a filesystemdirectoryentry is passed to the successcallback, as appropriate. [1] when create is false, the value of exclusive is irrelevant and ignored. specifications specification status comment file and directory entries apithe definition of 'filesystem
flags' in that specification. draft initial specification. browser compatibility the compatibility table on this page is generated from structured data. if you'd like to contribute to the data, please check out https://github.com/mdn/browser-compat-data and send us a pull request. desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for andro...
flags - Archive of obsolete content
dont-test-empty: for template generated content, the builder will not check that a container is empty. dont-build-content: this flag may be used on a tree to indicate that content elements should not be generated. this results in a performance enhancement, but you will not be able to use the dom functions to retrieve the tree rows. ...
loadURIWithFlags - Archive of obsolete content
« xul reference home loaduriwith
flags( uri,
flags, referrer, charset, postdata ) return type: no return value load a url into the document, with the specified load
flags, the given referrer, character set, and post data. in addition to the
flags allowed for the reloadwith
flags method, the following
flags are also valid: load_
flags_is_refresh: this flag is used when the url is loaded because of a meta tag refresh or redirect. load_
flags_is_link: this flag is used when the url is loaded because a user clicked on a link. the http referer header is set accordingly. load_
flags_bypass_history: do not add the url to the session history. load_
flags_replace_history: replace the current url in the session history with a new one. this flag might be used for a redirect. (see n...
reloadWithFlags - Archive of obsolete content
« xul reference home reloadwith
flags(
flags ) return type: no return value reloads the document in the browser with the given load
flags. the
flags listed below may be used, which are all constants of the webnavigation property (or the nsiwebnavigation interface). you may combine
flags using a or symbol ( | ). load_
flags_none: no special
flags. the document is loaded normally. load_
flags_bypass_cache: reload the page, ignoring if it is already in the cache. this is the flag used when the reload button is pressed while the shift key is held down. load_
flags_bypass_proxy: reload the page, ignoring the proxy server. load_
flags_charset_change: this flag is used if the document needs to be reloaded because the character set changed. ...
JS_GetFunctionFlags
obsolete since jsapi 19this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. retrieve the function
flags of a given javascript function. syntax unsigned int js_getfunction
flags(jsfunction *fun); name type description fun jsfunction * the function to examine. description js_getfunction
flags retrieves the function
flags of a given javascript function, fun. these
flags are for the javascript engine’s internal use. most applications can’t do anything useful with them. function
flags are a value of type unsigned int, the bitwise or of zero or more of the jsfun
flags described below. once a function is created, its
flags cannot be modified. jsfu...
nsIDOMWindowUtils
void removesheet(in nsiuri sheeturi, in unsigned long type); void resumetimeouts(); void sendcompositionevent(in astring atype); obsolete since gecko 9 void sendcompositionevent(in astring atype, in astring adata, in astring alocale); obsolete since gecko 38.0 void sendco...
...l] in nsitransferable atransferable); void getclassname(in object aobj); boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault); obsolete since gecko 15.0 boolean sendkeyevent(in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in unsigned long aadditional
flags); deprecated since gecko 38.0 void sendmouseevent(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmouseeventtowindow(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); ...
...ong abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmouseeventtowindow(in astring atype, in float ax, in float ay, in long abutton, in long aclickcount, in long amodifiers, [optional] in boolean aignorerootscrollframe); void sendmousescrollevent(in astring atype, in float ax, in float ay, in long abutton, in long ascroll
flags, in long adelta, in long amodifiers); obsolete since gecko 17.0 void sendwheelevent(in float ax, in float ay, in double adeltax, in double adeltay, in double adeltaz, in unsigned long adeltamode, in long amodifiers, in long alineorpagedeltax, in long alineorpagedeltay, in unsigned long aoptions); void sendnativekeyevent(in long anativekeyboardlayout, in long anativekeycode, in...
...And 28 more matches
nsIAnnotationService
ervice, 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. ...
...ts.interfaces.nsiannotationservice); note: the annotation service is not thread-safe. you should only use it from the main thread. ...
...overview void setpageannotation(in nsiuri auri, in autf8string aname, in nsivariant avalue, in long a
flags, in unsigned short aexpiration); void setitemannotation(in long long aitemid, in autf8string aname, in nsivariant avalue, in long a
flags, in unsigned short aexpiration); void setpageannotationstring(in nsiuri auri, in autf8string aname, in astring avalue, in long a
flags, in unsigned short aexpiration); boolean setitemannotationstring(in long long aitemid, in autf8string aname, in astring avalue, in long a
flags, in unsigned short aexpiration); void setpageannotationint32(in nsiuri auri, in autf8string aname, in long avalue, in long a
flags, in unsigned short aexpiration); void setitemannotationint32(in long long aitemid, in autf8string a...
...And 25 more matches
nsIDocShell
boolean isbeingdestroyed(); void loadstream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in a...
...lean create); nsidomstorage getsessionstorageforuri(in nsiuri uri, in domstring documenturi); void historypurged(in long numentries); void internalload(in nsiuri auri, in nsiuri areferrer, in nsisupports aowner, in pruint32 a
flags, in wstring awindowtarget, in string atypehint, in nsiinputstream apostdatastream, in nsiinputstream aheadersstream, in unsigned long aload
flags, in nsishentry ashentry, in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only! boolean isbeingdestroyed(); void loadstream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in acstring acontentcharset, in nsidocshellloadinfo aloadinfo); native code only! void loaduri(in nsiuri uri, in nsidocshellloadinfo loadinf...
... in boolean firstparty, out nsidocshell adocshell, out nsirequest arequest); native code only! boolean isbeingdestroyed(); void loadstream(in nsiinputstream astream, in nsiuri auri, in acstring acontenttype, in acstring acontentcharset, in nsidocshellloadinfo aloadinfo); native code only! void loaduri(in nsiuri uri, in nsidocshellloadinfo loadinfo, in unsigned long aload
flags, in boolean firstparty); native code only! void preparefornewcontentmodel(); void resumerefreshuris(); void setchildoffset(in unsigned long offset); native code only! void setcurrenturi(in nsiuri auri); void suspendrefreshuris(); void tabtotreeowner(in boolean forward, out boolean tookfocus); attributes attribute type d...
...And 20 more matches
nsIDBChangeListener
the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow. ...
... the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow. ...
... the nsidbchangelistener interface is used by components wanting to receive notification when the current database changes somehow. ...
...And 19 more matches
nsIWebBrowserPersist
g/browser/nswebbrowserpersist;1"] .createinstance(components.interfaces.nsiwebbrowserpersist); method overview void cancelsave(); void savechannel(in nsichannel achannel, in nsisupports afile); void savedocument(in nsidomdocument adocument, in nsisupports afile, in nsisupports adatapath, in string aoutputcontenttype, in unsigned long aencoding
flags, in unsigned long awrapcolumn); void saveuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in nsiloadcontext aprivacycontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apost...
...ontext); void saveprivacyawareuri(in nsiuri auri, in nsisupports acachekey, in nsiuri areferrer, in long areferrerpolicy, in nsiinputstream apostdata, in string aextraheaders, in nsisupports afile, in boolean aisprivate); attributes attribute type description currentstate unsigned long current state of the persister object. read only. persist
flags unsigned long
flags governing how data is fetched and saved from the network. it is best to set this value explicitly unless you are prepared to accept the default values. progresslistener nsiwebprogresslistener callback listener for progress notifications. the object that the embbedder supplies may also implement nsiinterfacerequestor and be prepared to return nsiauthprompt ...
...er for progress notifications. the object that the embbedder supplies may also implement nsiinterfacerequestor and be prepared to return nsiauthprompt or other interfaces that may be required to download data. result unsigned long value indicating the success or failure of the persist operation. read only. ...
...And 19 more matches
nsIXPConnect
debugdump(in short depth); void debugdumpevalinjsstackframe(in pruint32 aframenumber, in string asourcetext); void debugdumpjsstack(in prbool showargs, in prbool showlocals, in prbool showthisprops); void debugdumpobject(in nsisupports acomobj, in short depth); [noscript,notxpcom] prbool definedomquickstubs(in jscontextptr cx, in jsobjectptr proto, in pruint32
flags, in pruint32 interfacecount, [array, size_is(interfacecount)] in nsiidptr interfacearray); jsval evalinsandboxobject(in astring source, in jscontextptr cx, in nsixpconnectjsobjectholder sandbox, in prbool returnstringonly); native code only! void
flagsystemfilenameprefix(in string afilenameprefix, in prbool awantnativewrappers); void garbagecollect(); [nosc...
...wantnativewrappers); void garbagecollect(); [noscript,notxpcom] void getcaller(out jscontextptr ajscontext, out jsobjectptr aobject); jsval getcowforobject(in jscontextptr ajscontext, in jsobjectptr aparent, in jsobjectptr awrappedobj); native code only! ...
...cfunctionthistranslator getfunctionthistranslator(in nsiidref aiid); jsobjectptr getjsobjectofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); [noscript, notxpcom] nsisupports getnativeofwrapper(in jscontextptr ajscontext, in jsobjectptr ajsobj); void getsecuritymanagerforjscontext(in jscontextptr ajscontext, out nsixpcsecuritymanager amanager, out pruint16
flags); nsixpconnectwrappednative getwrappednativeofjsobject(in jscontextptr ajscontext, in jsobjectptr ajsobj); nsixpconnectwrappednative getwrappednativeofnativeobject(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nsiidref aiid); nsixpconnectjsobjectholder getwrappednativeprototype(in jscontextptr ajscontext, in jsobjectptr ascope, in nsiclas...
...And 19 more matches
nsIWebProgressListener
s instance as well as any child nsiwebprogress instances. inherits from: nsisupports last changed in gecko 15 (firefox 15 / thunderbird 15 / seamonkey 2.12) nsiwebprogress describes the parent-child relationship of nsiwebprogress instances. ...
... for any given request, onstatechange() is called once with the sta...
...d onsecuritychange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate); void onstatechange(in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate
flags, in nsresult astatus); void onstatuschange(in nsiwebprogress awebprogress, in nsirequest arequest, in nsresult astatus, in wstring amessage); constants state transition
flags these
flags indicate the various states that requests may transition through as they are being loaded. these
flags are mutually exclusive. for any given request, onstatechange() is called once with the state_start flag, zero or more times with the state_transferring flag or once with the state_redirecting flag, and then finally once with the state_stop flag. note: for document requests, a seco...
...And 18 more matches
NSPR Poll Method
r is a wrapper for the underlying network transport. the nspr library provides a reference implementation of the bottom layer using the sockets api, but you can provide your own implementation of the bottom layer using another network transport api. the poll method is one of the functions in the priomethods table. ...
...he underlying network transport. the nspr library provides a reference implementation of the bottom layer using the sockets api, but you can provide your own implementation of the bottom layer using another network transport api. the poll method is one of the functions in the priomethods table. ...
...ementation of the bottom layer using the sockets api, but you can provide your own implementation of the bottom layer using another network transport api. the poll method is one of the functions in the priomethods table. ...
...And 15 more matches
Index
s will cause no security lapses or loss of database integrity. -jar jar-file add a new pkcs #11 module to the database using the named jar file. use this command with the -installdir and -tempdir arguments. the jar file uses the nss pkcs #11 jar format to identify all the files to be installed, the module's name, the mechanism
flags, and the cipher
flags, as well as any files to be installed on the target machine, including the pkcs #11 module library file and other files such as documentation. this is covered in the jar installation file section in the man page, which details the special script needed to perform an installation through a server or with modutil. -lis...
...the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
...t is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
...And 14 more matches
PKCS #11 Module Specs
d, the application/library will strip the value out, processing any outter quotes and escapes appropriately, and pass the parameter to the pkcs #11 library when it calls c_initialize(). a new ck_c_initialize_args structure is defined as typedef struct ck_c_initialize_args { ck_createmutex createmutex; ck_destroymutex destroymutex; ck_lockmutex lockmutex; ck_unlockmutex unlockmutex; ck_
flags flags; ck_void_ptr libraryparameters; ck_void_ptr preserved; } ck_c_initialize_args; applications/libraries must set libraryparameters to null if no parameter value is specified. pkcs #11 libraries which accept parameters must check if the 'new' preserved field is null if and only if libraryparameters field is not null. nss specific parameters in module specs here are the nss application ...
...cs here are the nss application specific parameters in use. this data is currently stored in secmod.db or pkcs11.txt. this isn't part of the generic spec (that is other applications need not parse it, nor pkcs #11 modules need supply them or use them). nss="nss_params" nss_params are themselves name/value pairs, parsed with the same rules described above. valid names inside nss_params are:
flags - comma separated list of flag values, parsed case-insensitive. valid flag values are: internal - this library is actually the netscape internal library fips - this library is the netscape internal fips library. critical - if this library cannot be loaded, completely fail initialization. moduledb - this library includes nss specific functions to supply additional module specs for loadi...
...eneric operation (des/hashing, etc). ciphers - comma separated list of ciphers this token will enable that isn't already enabled by the library (currently only fortezza is defined) (case-insensitive). slotparams - space separated list of name/value pairs where the name is a slotid and the value is a space separated list of parameters related to that slotid. valid slotparams values are: slot
flags - comma separated list of cipher groups which this slot is expected to be the default implementation for (case-insensitive). valid
flags are: rsa - this token should be used for all rsa operations (other than private key operations where the key lives in another token). dsa - this token should be used for all dsa operations (other than private key operations where the key lives in anot...
...And 14 more matches
Index
solete, reference, référence(2), spidermonkey check whether obj[id] may be accessed per mode, returning js_false on error/exception, js_true on success with obj[id]'s stored value in *vp. as for jspropertyop, id is either a string or an int jsval. 90 jsclass jsapi reference, spidermonkey use jsclass to define a custom class of javascript objects. ...
...its value is the logical or of zero or more of the following constants: 93 jsconstdoublespec jsapi reference, spidermonkey jsconstdoublespecs is used to define a set of double values that are assigned as properties to an object using js_defineconstdoubles. ...
...nced customization of object behavior. 91 jsclass.call jsapi reference, spidermonkey note that when a custom object is called, a this argument is calculated for it just as if it were a function. that is, the obj argument received by the jsnative is the this argument, not the custom object that was called! 92 jsclass.
flags jsapi reference, spidermonkey the
flags field is of type uint32_t. its value is the logical or of zero or more of the following constants: 93 jsconstdoublespec jsapi reference, spidermonkey jsconstdoublespecs is used to define a set of double values that are assigned as properties to an object using js_defineconstdoubles. 94 jsconvertop jsapi reference, reference, référence(2), spidermonkey j...
...And 14 more matches
nsIPromptService
g acheckmsg, inout boolean acheckstate); boolean confirm(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext); boolean confirmcheck(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in wstring acheckmsg, inout boolean acheckstate); print32 confirmex(in nsidomwindow aparent,in wstring adialogtitle,in wstring atext, in unsigned long abutton
flags,in wstring abutton0title, in wstring abutton1title,in wstring abutton2title,in wstring acheckmsg, inout boolean acheckstate); boolean prompt(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring avalue, in wstring acheckmsg, inout boolean acheckstate); boolean promptusernameandpassword(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext...
...on windows and os/2, the button...
...rd(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, inout wstring apassword, in wstring acheckmsg, inout boolean acheckstate); boolean select(in nsidomwindow aparent, in wstring adialogtitle, in wstring atext, in pruint32 acount, [array, size_is(acount)] in wstring aselectlist, out long aoutselection); constants the following
flags are combined to form the abutton
flags parameter passed to confirmex. all
flags are defined as unsigned long constants and can be accessed as components.interfaces.nsipromptservice.flagname from javascript and as nsipromptservice::flagname from c++. button position
flags on linux and mac, button 2 is on the left of the prompt, while buttons 1 and 0 are on the right. on windows and os/2, the buttons are centred in the order 0, 2, 1. ...
...And 12 more matches
nsITextInputProcessor
in unsigned long alength, in unsigned long aattribute); boolean begininputtransaction(in nsidomwindow awindow, in nsitextinputprocessorcallback acallback); boolean begininputtransactionfortests(in nsidomwindow awindow, [optional] in nsitextinputprocessorcallback acallback); void cancelcomposition([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean commitcomposition([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean commitcompositionwith(in domstring acommitstring, [optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean flushpendingcomposition([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); ...
...n domstring acommitstring, [optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean flushpendingcomposition([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean getmodifierstate(in domstring amodifierkeyname); boolean keydown([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); boolean keyup([optional] in nsidomkeyevent adomkeyevent, [optional] in unsigned long akey
flags); void setcaretinpendingcomposition(in unsigned long aoffset); void setpendingcompositionstring(in domstring astring); void sharemodifierstateof(in nsitextinputprocessor aother); boolean startcomposition([optional] in nsidomkeyevent adomkeyevent, [optional]...
...true if it has composition. read only. constants constant value description attr_raw_clause 0x02 a clause attribute. ...
...And 12 more matches
nsIWebNavigation
* @mozilla.org/embedding/browser/nswebbrowser;1 * @mozilla.org/docshell;1 gecko 1.9.2 note in gecko 1.9.2 (firefox 3.6), the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead. ...
..., the @mozilla.org/webshell;1 component no longer exists; you need to use @mozilla.org/docshell;1 instead. ...
...er exists; you need to use @mozilla.org/docshell;1 instead. method overview void goback void goforward void gotoindex( in long index ) void loaduri(in wstring uri , in unsigned long load
flags , in nsiuri referrer , in nsiinputstream postdata, in nsiinputstream headers) void reload(in unsigned long reload
flags) void stop(in unsigned long stop
flags) constants load
flags constant value description load_
flags_mask 65535 this flag defines the range of bits that may be specified. ...
...And 12 more matches
Chrome registration
://camelcasepackage/path/to/files". firefox 3, thunderbird 3, and seamonkey 2 support mixed case. bug resolved in mozilla 1.9; see bug 132183. manifest instructions comments # this line is a comment - you can put here whatever you want a line is a comment if it begins with the character '#'. any following character in the same line is ignored. manifest manifest subdirectory/foo.manifest [
flags] this will load a secondary manifest file. this can be useful for separating component and chrome registration instructions, or separate platform-specific registration data. binary-component binary-component components/mycomponent.dll [
flags] instructs mozilla to register and use a binary component. it should be combined with the abi flag, since binary components are abi-specific. prior t...
...separate platform-specific registration data. binary-component binary-component components/mycomponent.dll [
flags] instructs mozilla to register and use a binary component. it should be combined with the abi flag, since binary components are abi-specific. prior to firefox 4, files in the components directory were registered automatically. interfaces interfaces component/mycomponent.xpt [
flags] instructs mozilla to load interface information from a typelib file produced by xpidl. prior to firefox 4, files in the components directory were registered automatically. ...
...firefox 4, files in the components directory were registered automatically. interfaces interfaces component/mycomponent.xpt [
flags] instructs mozilla to load interface information from a typelib file produced by xpidl. prior to firefox 4, files in the components directory were registered automatically. component component {00000000-0000-0000-0000-000000000000} components/mycomponent.js [
flags] informs mozilla about a component cid implemented by an xpcom component implemented in javascript (or another scripting language, if applicable). the classid {0000...} must match the classid implemented by the component. ...
...And 11 more matches
NSS tools : modutil
s will cause no security lapses or loss of database integrity. -jar jar-file add a new pkcs #11 module to the database using the named jar file. use this command with the -installdir and -tempdir arguments. the jar file uses the nss pkcs #11 jar format to identify all the files to be installed, the module's name, the mechanism
flags, and the cipher
flags, as well as any files to be installed on the target machine, including the pkcs #11 module library file and other files such as documentation. this is covered in the jar installation file section in the man page, which details the special script needed to perform an installation through a server or with modutil. -lis...
...the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
...t is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. ...
...And 10 more matches
nsIIOService
d from the main thread. ...
...rotocolhandler getprotocolhandler(in string ascheme); nsichannel newchannel(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); obsolete since gecko 48 nsichannel newchannel2(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri, in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurity
flags, in uint32_t acontentpolicytype); nsichannel newchannelfromuri(in nsiuri auri); obsolete since gecko 48 nsichannel newchannelfromuri2(in nsiuri auri, in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in unsigned long asecurity
flags, in unsigned long acontentpolicytype); nsichannel newchannelfromuriwithloadinfo(in nsiur...
...i auri); obsolete since gecko 48 nsichannel newchannelfromuri2(in nsiuri auri, in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in unsigned long asecurity
flags, in unsigned long acontentpolicytype); nsichannel newchannelfromuriwithloadinfo(in nsiuri auri, in nsiloadinfo aloadinfo); nsichannel newchannelfromuriwithproxy
flags2(in nsiuri auri, in nsiuri aproxyuri, in uint32_t aproxy
flags,in nsidomnode aloadingnode, in nsiprincipal aloadingprincipal, in nsiprincipal atriggeringprincipal, in uint32_t asecurity
flags, in uint32_t acontentpolicytype); nsiuri newfileuri(in nsifile afile); nsiuri newuri(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribut...
...And 10 more matches
tabbrowser - Archive of obsolete content
autocompletepopup type: id th...
... autocompletepopup type: id the id of a popup element used to hold autocomplete results for the elem...
...s read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwith
flags and loaduriwith
flags. webprogress type: nsiwebprogress this read-only property contains an nsiwebprogress object which is used to monitor the progress of a document loading. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattribute...
...And 9 more matches
NSS tools : modutil
n to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity. -jar jar-file add a new pkcs #11 module to the database using the named jar file. use this command with the -installdir and -tempdir arguments. the jar file uses the nss pkcs #11 jar format to identify all the files to be installed, the module's name, the mechanism
flags, and the cipher
flags, as well as any files to be installed on the target machine, including the pkcs #11 module library file and other files such as documentation. this is covered in the jar installation file section in the man page, which details the special script needed to perform an installation through a server or with modutil. -list [modulename] display basic information about the c...
...at describes how to install the module. the jar install script is described in more detail in [1]the section called “jar installation file format”. the jar installation script defines the setup information for each platform that the module can be installed on. for example: platforms { linux:5.4.08:x86 { modulename { "example pkcs #11 module" } modulefile { crypto.so } defaultmechanism
flags{0x0000} cipherenable
flags{0x0000} files { crypto.so { path{ /tmp/crypto.so } } setup.sh { executable path{ /tmp/setup.sh } } } } linux:6.0.0:x86 { equivalentplatform { linux:5.4.08:x86 } } } both the install script and the required libraries must be bundled in a jar file, which is specified with the -jar argument. modutil -dbdir sql:/home/mt"jar-install-filey/sharednssdb -jar in...
...e and the token it is loaded on. ...
...And 9 more matches
JavaScript crypto - Archive of obsolete content
es(nickname, cert, forcebackup); return false; } document.forms[0].onsubmit = loadcertificate; </script> signing text domstring signtext(domstring stringtosign, domstring caoption /* ... */); loading pkcs #11 modules long deletemodule(domstring modulename); long addmodule(domstring modulename, domstring libraryfullpath, long cryptomechanism
flags, long cipher
flags); loads or removes a new pkcs #11 module. in the add case, the module will be placed in the nss secmod.db database and will be loaded automatically on application restart. in the delete case, the module is removed from the nss secmod.db. this function will issue a user prompt to confirm the operation before the add or delete actually occurs. parameters modul...
...d in the nss secmod.db database and will be loaded automatically on application restart. in the delete case, the module is removed from the nss secmod.db. this function will issue a user prompt to confirm the operation before the add or delete actually occurs. parameters modulename name of the module. libraryfullpath the filename of the library prepended with its full path. ...
...e module is removed from the nss secmod.db. this function will issue a user prompt to confirm the operation before the add or delete actually occurs. parameters modulename name of the module. libraryfullpath the filename of the library prepended with its full path. cryptomechanism
flags a bit vector indicating all cryptographic mechanisms should be turned on by default (see below). cipher
flags a bit vector indicating all ssl or s/mime cipher functions supported by the module (see below). ...
...And 8 more matches
JS_LookupProperty
js::mutablehandlevalue vp); bool js_lookuppropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 bool js_lookupelement(jscontext *cx, js::handleobject obj, uint32_t index, js::mutablehandlevalue vp); // ---- obsolete since spidermonkey 31 ---- bool js_lookuppropertywith
flags(jscontext *cx, js::handleobject obj, const char *name, unsigned
flags, js::mutablehandlevalue vp); bool js_lookuppropertywith
flagsbyid(jscontext *cx, js::handleobject obj, js::handleid id, unsigned
flags, js::mutablehandleobject objp, js::mutablehandlevalue vp); // added in spidermonkey 1.8.1 name type description ...
...hreadsafe build, the caller must be in a request on this jscontext. obj js::handleobject object to search on for the property. name or id const char * or const char16_t *or js::handleid name of the property to look up. namelen size_t (only in js_lookupucproperty) the length of name in characters; or -1 to indicate that name is null-terminated.
flags unsigned (only in js_lookuppropertywith
flags) a combination of bits requesting special search behavior. see
flags below. objp js::mutablehandleobject out parameter. on success, *objp receives the object on which the property was found. this will be either obj or an element on obj's prototype chain. vp js::mutablehandleobject out parameter. on success, *vp recei...
...object out parameter. on success, *objp receives the object on which the property was found. this will be either obj or an element on obj's prototype chain. vp js::mutablehandleobject out parameter. on success, *vp receives the stored value of the property, if any. description the functions js_lookupproperty, js_lookupucproperty, js_lookuppropertybyid, js_lookuppropertywith
flags, and js_lookuppropertywith
flagsbyid search a specified object, obj, for a property with the given name. these functions all have similar behavior: the search starts with obj and proceeds along the prototype chain. if the property is found, *vp receives the property's stored value, or true if the property has no stored value; and the return value is true. if neither obj nor any of its prototyp...
...And 8 more matches
browser - Archive of obsolete content
autocompletepo...
... autocompletepopup type: id ...
... read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwith
flags and loaduriwith
flags. webprogress type: nsiwebprogress this read-only property contains an nsiwebprogress object which is used to monitor the progress of a document loading. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattribut...
...And 7 more matches
NSS functions
cert_decodebasicconstraintvalue mxr 3.2 and later cert_decodecertfrompackage mxr 3.4 and later cert_decodecertificatepoliciesextension mxr 3.2 and later cert_decodecertpackage mxr 3.2 and later cert_decodecrldistributionpoints mxr 3.10 and later cert_decodedercrl mxr 3.2 and later cert_decodedercrlwith
flags mxr 3.6 and later cert_decodegeneralname mxr 3.4 and later cert_decodenameconstraintsextension mxr 3.10 and later cert_decodeocspresponse mxr 3.6 and later cert_decodeoidsequence mxr 3.2 and later cert_decodeprivkeyusageperiodextension mxr 3.10 and later cert_decodetruststring mxr 3.4 and later ...
... 3.2 and later pk11_createpbev2algorithmid mxr 3.12 and later pk11_deletetokenprivatekey mxr 3.4 and later pk11_deletetokenpublickey mxr 3.4 and later pk11_deletetokensymkey mxr 3.4 and later pk11_derive mxr 3.2 and later pk11_derivewith
flags mxr 3.2 and later pk11_derivewith
flagsperm mxr 3.9 and later pk11_destroycontext mxr 3.2 and later pk11_destroygenericobject mxr 3.9.2 and later pk11_destroygenericobjects mxr 3.9.2 and later pk11_destroymergelog mxr 3.12 and later ...
... mxr 3.2 and later pk11_freeslotlist mxr 3.2 and later pk11_freeslotlistelement mxr 3.11 and later pk11_freesymkey mxr 3.2 and later pk11_generatefortezzaiv mxr 3.2 and later pk11_generatekeypair mxr 3.2 and later pk11_generatekeypairwith
flags mxr 3.10.2 and later pk11_generatekeypairwithop
flags mxr 3.12 and later pk11_generatenewparam mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later ...
...And 7 more matches
SpiderMonkey Build Documentation
available to your build. the easiest option is to configure with --enable-nspr-build. this configure option builds the in-tree version of nspr which is probably what you want; because spidermonkey uses newer nspr symbols, the nspr that ships with your operating system probably does not work. ...
...t; because spidermonkey uses newer nspr symbols, the nspr that ships with your operating system probably does not work. if --enable-nspr-build does not work, explicitly tell configure where to find nspr using the --with-nspr-c
flags and --with-nspr-libs configure options. ...
...ll directories you pass to configure are recorded in the generated makefile, so you don't need to specify them again until you re-run configure. building spidermonkey as a static library by default, spidermonkey builds as a shared library. however, you can build spidermonkey as a static library by specifying the --disable-shared-js flag when you run configure. ...
...And 7 more matches
nsIMsgDBView
ozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data. ...
... types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data. ...
...msgdbview that provides a different sorting/view of the data. ...
...And 7 more matches
nsIScriptError
d to associate an outer window with a script error, you had to use nsiscripterror2 instead. that subclass offered the nsiscripterror.initwithwindowid() method for that purpose; that method is now available in this interface, however. ...
...d is now available in this interface, however. method overview void init(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32
flags, in string category); void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32
flags, in string category, in unsigned long long innerwindowid); autf8string tostring(); attributes attribute type description category string a string indicating the category of error that occurred see categories for a list. read only. columnnumber pruint32 the column number where the error occurred. this is used to draw the arrow pointing ...
...mnnumber pruint32 the column number where the error occurred. this is used to draw the arrow pointing to the problem character. read only. errormessage astring the error message in a string format without any context/line number information. note: nsiconsolemessage.message will return the error formatted with file/line information. read only.
flags pruint32
flags; see flag constants for a list. read only. innerwindowid unsigned long long the inner window id with which the error is associated. this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid(). read only. linenumber pruint32 the number of the line where the error occurred. read only. outerwind...
...And 7 more matches
BluetoothCharacteristicProperties - Web APIs
full support 56notes notes chromeos and macos only. full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. full support 70notes notes windows 10.edge full support ≤79notes full support ≤79notes notes edgeos and macos only. full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled fro...
... full support 56notes notes chromeos and macos only. full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. full support 70notes notes windows 10.edge full support ≤79notes full support ≤79notes notes edgeos and macos only. full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled fro...
... full support 56notes notes chromeos and macos only. full support 56notes disabled notes linux and versions of windows earlier than 10.disabled from version 56: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. full support 70notes notes windows 10.edge full support ≤79notes full support ≤79notes notes edgeos and macos only. full support ≤79notes disabled notes linux and versions of windows earlier than 10.disabled fro...
...And 7 more matches
NSS Tools modutil
e add the named pkcs #11 module to the database. use this option with the -libfile, -ciphers, and -mechanisms arguments. -jar jar-file add a new pkcs #11 module to the database using the named jar file. use this option with the -installdir and -tempdir arguments. the jar file uses the netscape server pkcs #11 jar format to identify all the files to be installed, the module's name, the mechanism
flags, and the cipher
flags. the jar file should also contain any files to be installed on the target machine, including the pkcs #11 module library file and other files such as documentation. see the section jar installation file for information on creating the special script needed to perform an installation through a server or with the security module database tool (that is, in environments without ...
...r script could be in the file pk11install. ...
...11install. ...
...And 6 more matches
Using the Places annotation service
that you require hundreds of unique annotation names. setting an annotation the annotation provides a variety of scriptable and non-scriptable setters for annotations on both pages and on items in the places database (see nsiannotationservice.idl for the exact declarations). ...
...nnotation the annotation provides a variety of scriptable and non-scriptable setters for annotations on both pages and on items in the places database (see nsiannotationservice.idl for the exact declarations). ...
...scriptable setters for annotations on both pages and on items in the places database (see nsiannotationservice.idl for the exact declarations). ...
...And 6 more matches
imgIContainer
t pruint8 imagedata, out unsigned long imagelength, [array, size_is(palettelength)] out pruint32 palettedata, out unsigned long palettelength); native code only! obsolete since gecko 2.0 void clear(); obsolete since gecko 1.9.2 gfximagesurface copycurrentframe(); native code only! obsolete since gecko 2.0 gfximagesurface copyframe(in pruint32 awhichframe, in pruint32 a
flags); native code only! void decodingcomplete(); obsolete since gecko 2.0 void draw(in gfxcontext acontext, in gfxgraphicsfilter afilter, [const] in gfxmatrix auserspacetoimagespace, [const] in gfxrect afill, [const] in nsintrect asubimage, [const] in nsintsize aviewportsize, in pruint32 a
flags); native code only! void endframedecode(in unsigned long framenumber); obsolet...
...idth, in print32 aheight, in gfximageformat aformat, [array, size_is(imagelength)] out pruint8 imagedata, out unsigned long imagelength); native code only! obsolete since gecko 2.0 imgicontainer extractcurrentframe([const] in nsintrect arect); native code only! obsolete since gecko 2.0 imgicontainer extractframe(in pruint32 awhichframe, [const] in nsintrect arect, in pruint32 a
flags); native code only! void frameupdated(in unsigned long framenum, in nsintrect anewrect); native code only! obsolete since gecko 2.0 void getcurrentframerect(in nsintrect aframerect); native code only! obsolete since gecko 2.0 gfxasurface getframe(in pruint32 awhichframe, in pruint32 a
flags); native code only! gfxiimageframe getframeat(in unsigned long index...
...of the type_* values above). read only. width print32 the width of the container rectangle. in the case of any error, zero is returned, and an exception will be thrown. read only. constants constant value description type_raster 0 enumerated values for the 'type' attribute (below). type_vector 1 flag_none 0x0
flags for imgicontainer operations. meanings: flag_none: lack of
flags. flag_sync_decode: forces synchronous/non-progressive decode of all available data before the call returns. it is an error to pass this flag from a call stack that originates in a decoder (that is, from a decoder observer event). flag_decode_no_premultiply_alpha: do not premultiply alpha if it is not already premulti...
...And 6 more matches
Mozilla DOM Hacking Guide
hanks to the magic of the interaction between xpconnect and the dom. the second example is the history object. other browsers allow the history object to be used like an array, e.g. history[1]. the behavior "act as an array" cannot be reflected in the idl itself. fortunately, xpconnect provides us with a way to make our class available as an array in javascript. i'm talking about the "scriptable
flags". the nsixpcscriptable interface, implemented by the nsdomclassinfo class (see section) defines several
flags, one of which is the want_getproperty flag. when set, it allows us to define a getproperty() function on nshistorysh (the helper class for the history object), which will handle the array behavior. indeed, it will forward the call history[1] to history.item(1), which is defined in the idl...
...define_classinfo_data_with_name. the first one calls the second one. the first argument passed to ns_define_classinfo_data_with_name, _class, is used for debug purposes. the second argument, _name, is the name that should appear in javascript. the third argument, _helper, is the name of the helper class for this dom class. helper classes are detailed in section 1.3. the fourth and last argument, _
flags, is a bitvector of nsixpcscriptable
flags. the macros for those
flags are defined nsdomclassinfo.cpp. the
flags give special behavior through xpconnect. see also section 1.9. the nsdomclassinfodata objects are created in the sclassinfodata array by explicitly initializing it. here is the description of the structure: const char *mname: c-style string that is passed as second argument to the m...
...of the relevant helper class. const nsiid *mprotochaininterface: pointer to the iid of the first interface available to javascript clients. this is used in global resolve functions, when xpconnect has to find the member function to call. const nsiid **minterfaces: pointer to the first element of an array of pointers to all the interfaces available through js for this class. pruint32 mscriptable
flags: 31; : the fourth argument passed to ns_define_classinfo_data_with_name. prbool mhasclassinterface: 1; : help me? mname and mconstructorfptr, mscriptable
flags and mhasinterface are initialized by ns_define_classinfo_data_with_name. mcachedclassinfo, mprotochaininterface and minterfaces, however, are initialized in nsdomclassinfo::init(), described in section 1.5. interface flattening one of ...
...And 5 more matches
Cryptography functions
3.2 and later pk11_createpbev2algorithmid mxr 3.12 and later pk11_deletetokenprivatekey mxr 3.4 and later pk11_deletetokenpublickey mxr 3.4 and later pk11_deletetokensymkey mxr 3.4 and later pk11_derive mxr 3.2 and later pk11_derivewith
flags mxr 3.2 and later pk11_derivewith
flagsperm mxr 3.9 and later pk11_destroycontext mxr 3.2 and later pk11_destroygenericobject mxr 3.9.2 and later pk11_destroygenericobjects mxr 3.9.2 and later pk11_destroymergelog mxr 3.12 and later ...
... mxr 3.2 and later pk11_freeslotlist mxr 3.2 and later pk11_freeslotlistelement mxr 3.11 and later pk11_freesymkey mxr 3.2 and later pk11_generatefortezzaiv mxr 3.2 and later pk11_generatekeypair mxr 3.2 and later pk11_generatekeypairwith
flags mxr 3.10.2 and later pk11_generatekeypairwithop
flags mxr 3.12 and later pk11_generatenewparam mxr 3.2 and later pk11_generaterandom mxr 3.2 and later pk11_generaterandomonslot mxr 3.11 and later pk11_getalltokens mxr 3.2 and later ...
... 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getblocksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefault
flags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later pk11_getfirstsafe mxr 3.2 and later pk11_getinternalkeyslot mxr 3.2 and later pk11_getinternalslot mxr 3.2 and later pk11_getkeygen mxr 3.4 and later pk11_getkeylength ...
...And 5 more matches
Python binding for NSS
ssl_cipher_suite_name ssl.ssl_cipher_suite_from_name the following deprecated module functions were removed: ssl.nssinit ssl.nss_ini ssl.nss_shutdown the following classes were added: sslciphersuiteinfo sslchannelinfo the following class methods were added: certificate.trust_
flags certificate.set_trust_attributes sslsocket.set_ssl_version_range sslsocket.get_ssl_version_range sslsocket.get_ssl_channel_info sslsocket.get_negotiated_host sslsocket.connection_info_format_lines sslsocket.connection_info_format sslsocket.connection_info_str sslciphersuiteinfo.format_lines sslciphersuiteinfo.format sslc...
...l_info sslsocket.get_negotiated_host sslsocket.connection_info_format_lines sslsocket.connection_info_format sslsocket.connection_info_str sslciphersuiteinfo.format_lines sslciphersuiteinfo.format sslchannelinfo.format_lines sslchannelinfo.format the following class properties were added: certificate.ssl_trust_
flags certificate.email_trust_
flags certificate.signing_trust_
flags sslciphersuiteinfo.cipher_suite sslciphersuiteinfo.cipher_suite_name sslciphersuiteinfo.auth_algorithm sslciphersuiteinfo.auth_algorithm_name sslciphersuiteinfo.kea_type sslciphersuiteinfo.kea_type_name sslciphersuiteinfo.symmetric_cipher sslciphersuiteinfo.symmetric...
...ng is terminated. nss.nss_shutdown_context now called from initcontext destructor, this assures the context is shutdown even if the programmer forgot to. it's still best to explicitly shut it down, this is just failsafe. support was added for shutdown callbacks. ...
...And 5 more matches
XPCOM Stream Guide
primitive output streams type native class contract id interface how to bind to a data target generic nsstoragestream @mozilla.org/storagestream;1 nsistoragestream ...
... primitive output streams type native class contract id interface how to bind to a data target generic nsstoragestream @mozilla.org/storagestream;1 nsistoragestream stream.getoutputstr...
...stream. ...
...And 5 more matches
nsIGlobalHistory3
1.0 66 introduced gecko 1.8 obsolete gecko 9.0 inherits from: nsiglobalhistory2 last changed in gecko 1.9 (firefox 3) this interface was originally created as part of nsiglobalhistory2, but was split off during the transition to places. method overview void adddocumentredirect(in nsichannel aoldchannel, in nsichannel anewchannel, in print32 a
flags, in boolean atoplevel); unsigned long geturigecko
flags(in nsiuri auri); void seturigecko
flags(in nsiuri auri, in unsigned long a
flags); methods adddocumentredirect() notifies the history system that the page loading via aoldchannel redirected to anewchannel. implementations should generally add the uri for aoldchannel to history for link coloring, but ar...
...annel to history for link coloring, but are advised not to expose it in the history user interface. this function is preferred if nsiglobalhistory3 is available. otherwise, nsiglobalhistory2.adduri() should be called with redirect=true. this function is preferred to nsiglobalhistory2.adduri() because it provides more information (including the redirect destination, channels involved, and redirect
flags) to the history implementation. for implementors of nsiglobalhistory3: the history implementation is responsible for sending ns_link_visited_event_topic to observers for redirect pages. this notification must be sent for history consumers for all non-redirect pages. the other params to this function are the same as those for nsichanneleventsink.onchannelredirect(). implementors who wish to implem...
...onchannelredirect(). implementors who wish to implement this interface but rely on nsiglobalhistory2.adduri() for redirect processing may throw ns_error_not_implemented from this method. if they do so, then callers must call nsiglobalhistory2.adduri() upon getting the ns_error_not_implemented result. ...
...And 5 more matches
nsIMsgFolder
void clearnewmessages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in unsigned long flag); void onflagchange(in unsigned long flag); void setprefflag(); nsimsgfolder getfolderswithflag(in unsigned long
flags, in unsigned long resultsize, out unsigned long numfolders); nsisupportsarray getallfolderswithflag(in unsigned long aflag); void getexpansionarray(in nsisupportsarray expansionarray); acstring geturiformsg(in nsimsgdbhdr msghdr); void deletemessages(in nsisupportsarray messages,in nsimsgwindow msgwindow, in boolean deletestorage, in boolean ismove, in nsimsgco...
... messages,in boolean ismove, in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener, in boolean isfolder, in boolean allowundo); void copyfolder(in nsimsgfolder srcfolder, in boolean ismovefolder,in nsimsgwindow msgwindow, in nsimsgcopyservicelistener listener ); void copyfilemessage(in nsifile file, in nsimsgdbhdr msgtoreplace,in boolean isdraft, in unsigned long newmsg
flags,in nsimsgwindow msgwindow,in nsimsgcopyservicelistener listener); void acquiresemaphore(in nsisupports semholder); void releasesemaphore(in nsisupports semholder); boolean testsemaphore(in nsisupports semholder); void getnewmessages(in nsimsgwindow awindow, in nsiurllistener alistener); void writetofoldercache(in nsimsgfoldercache foldercache, in boole...
... gettingnewmessages boolean are we running a url as a result of the user clicking get msg. filepath nsilocalfile local path of this folder. basemessageuri acstring readonly charset acstring the charset of this folder. charsetoverride boolean biffstate unsigned long locked boolean readonly
flags unsigned long direct access to the set/get all the
flags at once. knowssearchnntpextension boolean readonly allowsposting boolean readonly relativepathname acstring readonly sizeondisk unsigned long size of this folder on disk (not including .msf file) for imap, it's the sum of the size of the messages. username acstrin...
...And 5 more matches
nsIParserUtils
2.11) warning: do not use this from within gecko--use nscontentutils, nstreesanitizer, and so on directly instead. ...
... sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style> elements and style attributes (wit...
... .getservice(components.interfaces.nsiparserutils); method overview astring converttoplaintext(in astring src, in unsigned long
flags, in unsigned long wrapcol); nsidomdocumentfragment parsefragment(in astring fragment, in unsigned long
flags, in boolean isxml, in nsiuri baseuri, in nsidomelement element); astring sanitize(in astring src, in unsigned long
flags); constants constant value description sanitizerallowcomments (1 << 0) flag for sanitizer: allow comment nodes. sanitizerallowstyle (1 << 1) flag for sanitizer: allow <style> elements and style attributes (with contents sanitized in case of -moz-binding). note: if -moz-binding is absent, properties that might be xss risks in other web...
...And 5 more matches
nsISocketProvider
2.0) implemented by: @mozilla.org/network/socket;2?type=foo. ...
...when set, the hostname parameter passed in this interface will be used instead of the address structure passed for a later request.
...tion is called to allow the socket provider to layer a prfiledesc (a file descriptor) on top of another prfiledesc. for example, ssl via a socks proxy. parameters are the same as newsocket() with the exception of afiledesc, which is an input parameter instead. ...
...And 5 more matches
nsIXPCScriptable
l id, in jsvalptr vp); prbool enumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool newenumerate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 enum_op, in jsvalptr statep, out jsid idp); prbool newresolve(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32
flags, out jsobjectptr objp); prbool convert(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in pruint32 type, in jsvalptr vp); void finalize(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool checkaccess(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in pruint32 mode, in jsvalptr vp); p...
... constants constant value description want_precreate 1 << 0 want_create 1 << 1 want_postcreate 1 << 2 want_addproperty 1 << 3 want_delproperty 1 << 4 want_getproperty 1 << 5 want_setproperty 1 << 6 want_enumerate 1 << 7 want_newenumerate 1 << 8 indicates that t...
... constants constant value description want_precreate 1 << 0 want_create 1 << 1 want_postcreate 1 << 2 want_addproperty 1 << 3 want_delproperty 1 << 4 want_getproperty 1 << 5 want_setproperty 1 << 6 want_enumerate 1 << 7 want_newenumerate 1 << 8 indicates that the object wants to have its newenumerate...
...And 5 more matches
nsMsgFolderFlagType
exactly one will be set. * @{ */ /// this folder is a newsgroup folder. const nsmsgfolderflagtype newsgroup = 0x00000001; /// this folder is a news server. const nsmsgfolderflagtype newshost = 0x00000002; /// this folder is a mail folder. ...
...exactly one will be set. * @{ */ /// this folder is a newsgroup folder. const nsmsgfolderflagtype newsgroup = 0x00000001; /// this folder is a news server. const nsmsgfolderflagtype newshost = 0x00000002; /// this folder is a mail folder. ...
...exactly one will be set. * @{ */ /// this folder is a newsgroup folder. const nsmsgfolderflagtype newsgroup = 0x00000001; /// this folder is a news server. const nsmsgfolderflagtype newshost = 0x00000002; /// this folder is a mail folder. ...
...And 5 more matches
SyntaxError: invalid regular expression flag "x" - JavaScript
the javascript exception "invalid regular expression flag" occurs when the
flags, defined after the second slash in regular expression literal, are not one of g, i, m, s, u, or y. message syntaxerror: syntax error in regular expression (edge) syntaxerror: invalid regular expression flag "x" (firefox) syntaxerror: invalid regular expression
flags (chrome) error type syntaxerror what went wrong? ...
... expression flag" occurs when the
flags, defined after the second slash in regular expression literal, are not one of g, i, m, s, u, or y. message syntaxerror: syntax error in regular expression (edge) syntaxerror: invalid regular expression flag "x" (firefox) syntaxerror: invalid regular expression
flags (chrome) error type syntaxerror what went wrong? there are invalid regular expression
flags in the code. in a regular expression literal, which consists of a pattern enclosed between slashes, the
flags are defined after the second slash. they can also be defined in the constructor function of the regexp object (second parameter). regular expression
flags can be used separately or together in any order, but there are only six of them in ecmascript. to include a flag with the regular exp...
... i case-insensitive search. m multi-line search. s allow . ...
...And 5 more matches
Index - Archive of obsolete content
s that it depends on. 437 fast graphics performance with html no summary! 439 firefox archive, firefox out-of-date information about the firefox project. 440 block and line layout cheat sheet gecko the details of block and line layout are tricky; this document serves as a "cheat sheet" that describes how the vagary of different state
flags control what's going on. it's a work-in-progress, with questions in red highlight. if you know the answer, please pass it along to me so i can update the document. 441 building firefox with rust code build documentation, gecko, junk, build, rust firefox uses the rust programming language extensively. this page is a rough guide for people using rust in firefox. see also the do...
... no summary! 868 findpreviousaccesskey no summary! 869 first-tab xul attributes, xul reference no summary! 870 firstdayofweek xul attributes, xul reference no summary! 871 firstpage xul attributes, xul reference no summary! 872 fixed xul attributes, xul reference no summary! 873
flags xul attributes, xul reference no summary! 874 flex xul attributes, xul reference no summary! 875 focused xul attributes, xul reference no summary! 876 forcecomplete xul attributes, xul reference no summary! 877 fullscreenbutton xul, xul attributes, xul reference no summary! 878 grippyhidden ...
..., xul methods, xul reference no summary! 1260 loadtabs xul methods, xul reference no summary! 1261 loaduri xul methods, xul reference note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. ...
...And 4 more matches
Block and Line Layout Cheat Sheet - Archive of obsolete content
the details of block and line layout are tricky; this document serves as a "cheat sheet" that describes how the vagary of different state
flags control what's going on. it's a work-in-progress, with questions in red highlight. if you know the answer, please pass it along to me so i can update the document. objects this section presents some of the classes involved in block and line reflow, along with important members of each object that control reflow processing. nsframe the base class for all frames. m
flags flags set on the frame to indicate its state. these
flags can be grouped into two categories:
flags which affect all frames ("public"
flags), and
flags that are reserved for an individual frame's private use ("private"
flags). ns_frame_in_reflow this bit is set when the...
...lected_content ns_frame_is_dirty ns_frame_is_unflowable an unflowable frame is an error condition; for example, due to system limitations. currently, the only way to get an unflowable frame is to have a frame tree that is "too deep". (see nsframe::isframetreetoodeep().) ns_frame_has_dirty_children ns_frame_has_view ns_frame_independent_selection ns_frame_is_special nsblockframe m
flags these
flags are the private
flags that are meaningful to block frames. ns_block_shrink_wrap causes the block to "shrink-wrap" around its content. this means the block will determine its children's width and make its content area that wide. finally, it will add padding and border to determine the final width. is this where the "tending towards zero width" stuff comes in? ns_block_no_auto_marg...
...ins ns_block_margin_root indicates that this is a frame from which child margins can be calculated. the absence of this flag implies that child margin calculations should ignore the frame and look further up the parent chain. used in nsblockreflowcontext::computecollapsedtopmargin(). this flag causes the nsblockreflowstate's constructor to set the brs_istopmarginroot and brs_isbottommarginroot
flags. this is set by default for document, table cell inner, and absolutely positioned wrapper frames. ns_block_space_mgr this indicates that a block frame should create its own space manager. this is required by each block frame that can contain floaters: the space manager is used to reserve space for the floated frames. this is set by default for document frames, area frames, table cell inner fram...
...And 4 more matches
Installing Pork
+ refactoring through elsa. hg clone http://hg.mozilla.org/rewriting-and-analysis/pork/ cd pork hg clone http://hg.mozilla.org/rewriting-and-analysis/elsa ./configure make building mozilla with mcpp to build mozilla with mcpp to generate annotated .ii files, use the following configure command: ac_cv_visibility_hidden=no cc="gcc34 -save-temps -wp,-w0,-k" cxx="g++ -save-temps -wp,-w0,-k" cpp
flags=-dns_disable_literal_template $srcdir/configure --enable-debug --disable-optimize --disable-accessibility --enable-application=browser --disable-crashreporter building will probably require disabling warnings_as_errors: make warnings_as_errors= "-wp,-w0,-k" are options that get passed to mcpp. see the mcpp manual. in particular, -k tells mcpp to add the macro annotations we use to get exact ...
...tions. c++ files from other projects can be preprocessed with gcc -e -wp,-w0,-k. building a 32-bit mcpp on a 64-bit system this is dark magic, and i hope i've got it right. first i built gcc in a separate --prefix=/builds/gcc-3.4.6-installed. note: once you do this, you can only use this version of gcc in -m32 mode. apply this patch: note: this doesn't seem necessary in the latest version; cpp
flags is already an argument. index: src/set_mcpp.sh =================================================================== --- src/set_mcpp.sh (revision 78) +++ src/set_mcpp.sh (working copy) @@ -35,14 +35,14 @@ echo " cd ${inc_dir}/mcpp-gcc" cd ${inc_dir}/mcpp-gcc if test ! -f gcc${gcc_maj_ver}${gcc_min_ver}_predef_std.h; then - echo " generating g*.h header files" - ${cc} -e -xc -dm...
...==================== --- src/set_mcpp.sh (revision 78) +++ src/set_mcpp.sh (working copy) @@ -35,14 +35,14 @@ echo " cd ${inc_dir}/mcpp-gcc" cd ${inc_dir}/mcpp-gcc if test ! ...
...And 4 more matches
JSClass
a jsclass describes a class of javascript objects. a c/c++ program can use a jsclass with the js_initclass and js_newobject apis to create objects that have custom methods and properties implemented in c/c++. ...
... addproperty jspropertyop a hook called just after adding a new property. may modify the new property value. use null or js_propertystub (spidermonkey 31 or older) for default behavior. delproperty jsdeletepropertyop a hook ...
... xdrobject; /* obsolete since spidermonkey 13 */ jstraceop trace; /* added in spidermonkey 17 */ jsclassinternal reserved1; /* obsolete since spidermonkey 13 */ void *reserved[n]; /* sizeof 'reserved' depends on version */ }; name type description name const char * class name
flags uint32_t class
flags. this field is the bitwise or of one or more of the jsclass_* constants described in jsclass.
flags. addproperty jspropertyop a hook called just after adding a new property. may modify the new property value. use null or js_propertystub (spidermonkey 31 or older) for default behavior. delproperty jsdeletepropertyop a hook called when deleting a prop...
...And 4 more matches
JS_ReportErrorNumber
report an error with an application-defined error code. ...
...error with an application-defined error code. ...
...st unsigned errornumber, ...); void js_reporterrornumberuc(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterror
flagsandnumber(jscontext *cx, unsigned
flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); bool js_reporterror
flagsandnumberuc(jscontext *cx, unsigned
flags, jserrorcallback errorcallback, void *userref, const unsigned errornumber, ...); void js_reporterrornumberucarray(jscontext *cx, jserrorcallback errorcallback, void *userref, const unsigned errornumber, const char16_t **args); // added in ...
...And 4 more matches
JSAPI reference
api 28 js_compileucfunction obsolete since jsapi 36 js_compileucfunctionforprincipals obsolete since jsapi 28 error handling struct jserrorformatstring added in spidermonkey 17 class jserrorreport class js::autosaveexceptionstate added in spidermonkey 31 enum jsexntype added in spidermonkey 17 js_reporterror js_reportwarning js_reporterrornumber js_reporterrornumberuc js_reporterror
flagsandnumber js_reporterror
flagsandnumberuc js_reporterrornumberucarray added in spidermonkey 24 js_reportoutofmemory js_reportallocationoverflow added in spidermonkey 1.8 js_geterrorreporter js_seterrorreporterobsolete since jsapi 52 js_errorfromexception js_geterrorprototype jsreport_is_exception jsreport_is_strict jsreport_is_warning jsreport_is_strict_mode_error the following functi...
... js_getm...
... js_getmethod obsolete since jsapi 23 js_getmethodbyid obso...
...And 4 more matches
Index
date. properties aren't stored anymore on the card, except for a handful of them. complex properties are expected to be accessed through a call to getproperty. see //github.com/realityripple/uxp/blob/master//mailnews/addrbook/public/nsiabcard.idl for more details. 229 nsiaboutmodule interfaces, interfaces:scriptable, needscontent, xpcom interface reference a method to get the
flags that apply to a given about: uri. the uri passed in is guaranteed to be one of the uris that this module registered to deal with. 230 nsiabstractworker dom, interfaces, interfaces:scriptable, workers, xpcom, xpcom interface reference no summary! 231 nsiaccelerometerupdate interfaces, needscontent, xpcom, xpcom interface reference this method is only used ...
...achenamespace, resources application caches can store a set of namespace entries that affect loads from the application cache. if a load from the cache fails to match on an exact cache entry, the namespace entries are searched for a substring match. 334 nsiapplicationcacheservice dom, interfaces, interfaces:scriptable, offline_resources, xpcom, xpcom interface reference
flags the specified key as one that should be cached opportunistically. 335 nsiapplicationupdateservice interfaces, interfaces:scriptable, update service, xpcom, xpcom api reference, xpcom interface reference adds a listener that receives progress and state information about the update that is currently being downloaded. this information is most commonly used to update a user inter...
...m, xpcom interface reference loads a script into the remote frame. 391 nsichromeregistry interfaces, needscontent, reference, référence(2), xpcom, xpcom interface reference implemented by: @mozilla.org/chrome/chrome-registry;1 as a service: 392 nsiclassinfo interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference bit
flags for '
flags' attribute. 393 classdescription no summary! 394 classid no summary! 395 classidnoalloc no summary! 396
flags no summary! 397 gethelperforlanguage no summary! 398 getinterfaces this content is now available at nsiclassinfo.getinterfaces(). 399 i...
...And 4 more matches
inIDOMUtils
sidomelement aelement); [implicit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optional] in unsigned long a
flags, [optional] out unsigned long acount, [retval, array, size_is(acount)] out wstring aprops); nsisupportsarray getcssstylerules(in nsidomelement aelement, [optional] in domstring apseudo); nsidomnode getparentfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long getruleline(in nsidomcssstylerule arule); unsigned long getrulecolumn(in n...
... value state 1 :active 2 :focus 4 :hover 8 :-moz-drag-over 16 :target 1<<29 :-moz-focusring methods getbindingurls() returns an array of nsiuri objects representing the current xml binding for the specified element. nsiarray getbindingurls( in nsidomeleme...
...t(in nsidomelement aelement, in nsidomcssstylerule arule, in unsigned long aselectorindex, [optional] in domstring apseudo); void setcontentstate(in nsidomelement aelement, in unsigned long long astate); constants constant value description exclude_shorthands (1<<0) include_aliases (1<<1) content state
flags the content state
flags are used in a bitmask. value state 1 :active 2 :focus 4 :hover 8 :-moz-drag-over 16 :target 1<<29 :-moz-focusring methods getbindingurls() returns an array of nsiuri objects representing the current xml binding for the specified element. nsiarray getbindingurls( in nsidomelement aelement ); paramete...
...And 4 more matches
nsIDBFolderInfo
8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) implemented by: ?????????????????????????????????????. ...
... / thunderbird 1.5 / seamonkey 1.0) implemented by: ?????????????????????????????????????. ...
...void getmailboxname(in nsstring boxname); native code only! ...
...And 4 more matches
nsIEditor
ence editor/nsieditor.idlscriptable provides methods and attributes used when editing page content. ...
...ng offset, out nsidomnode newleftnode); void joinnodes(in nsidomnode leftnode, in nsidomnode rightnode, in nsidomnode parent); void deletenode(in nsidomnode child); void marknodedirty(in nsidomnode node); direction controller void switchtextdirection(); output methods astring outputtostring(in astring formattype, in unsigned long
flags); example: //
flags are declared in base/public/nsidocumentencoder.idl // outputselectiononly = 1, outputformatted = 2, // outputraw = 4, outputbodyonly = 8, // outputpreformatted = 16, outputwrap = 32, // outputformatflowed = 64, outputabsolutelinks = 258, // outputencodew3centities = 256, outputcrlinebreak = 512, // outputlflinebreak = 1024, ...
...th <br>. ...
...And 4 more matches
nsIProtocolProxyService
from: nsisupports last changed in gecko 1.7 implemented by: @mozilla.org/network/protocol-proxy-service;1. ...
...etwork/protocol-proxy-service;1. ...
...getservice(components.interfaces.nsiprotocolproxyservice); method overview deprecated since gecko 18 nsiproxyinfo resolve(in nsiuri auri, in unsigned long a
flags); nsicancelable asyncresolve(in nsiuri auri, in unsigned long a
flags,in nsiprotocolproxycallback acallback); nsiproxyinfo newproxyinfo(in acstring atype, in autf8string ahost,in long aport, in unsigned long a
flags, in unsigned long afailovertimeout, in nsiproxyinfo afailoverproxy); nsiproxyinfo getfailoverforproxy(in nsiproxyinfo aproxyinfo, in nsiuri auri, in nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description ...
...And 4 more matches
nsIXULWindow
(firefox 4 / thunderbird 3.3 / seamonkey 2.1) an nsixulwindow is created as part of the creation of a top-level chrome window. when the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. this signals the application in case it needs to quit. ...
...ixulwindow is created as part of the creation of a top-level chrome window. when the window is destroyed, it will fire a "xul-window-destroyed" notification through the global observer service. this signals the application in case it needs to quit. ...
...h the global observer service. this signals the application in case it needs to quit. method overview void addchildwindow(in nsixulwindow achild); void applychrome
flags(); native code only! void assumechrome
flagsarefrozen(); void center(in nsixulwindow arelative, in boolean ascreen, in boolean aalert); nsixulwindow createnewwindow(in print32 achrome
flags, in nsiappshell aappshell); nsidocshelltreeitem getcontentshellbyid(in wstring id); void removechildwindow(in nsixulwindow achild); void showmodal(); attributes attribute type description chrome
flags pruint32 chrome
flags are from nsiwebbrowserchrome. context
flags pruint32 context
flags are from nsiwindowcreator2. ...
...And 4 more matches
Index - Web APIs
218 authenticatorassertionresponse.signature api, authenticatorassertionresponse, property, reference, web authentication api, webauthn the signature read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is the signature of the authenticator for both authenticatorassertionresponse.
...to the file represented by the directory entry. 1385 filesystemfileentry.file() api, file, file system api, file and directory entries api, filesystemfileentry, files, method, non-standard, reference the filesystemfileentry interface's method file() returns a file object which can be used to read data from the file represented by the directory entry. 1386 filesystem
flags api, dictionary, experimental, file system api, file and directory entries api, filesystem
flags, files, interface, non-standard, reference the filesystem
flags dictionary defines a set of values which are used when specifying option
flags when calling certain methods in the file and directory entries api. methods which accept an options parameter of this type may specify zero or more of ...
...pi, dictionary, experimental, file system api, file and directory entries api, filesystem
flags, files, interface, non-standard, reference the filesystem
flags dictionary defines a set of values which are used when specifying option
flags when calling certain methods in the file and directory entries api. ...
...And 4 more matches
JavaScript Debugger Service - Archive of obsolete content
efox 3.6, for 4.x use asyncon if (jsd.ison) jsd.off(); // disables the service hooks jsd operates using the events hook mechanism. next, we add code to the various hooks. ...
....enumeratescripts({ // the enumeratescript method will be called once for every script jsd knows about enumeratescript: function(script) { // your function here } }); a simple stack trace here, we will show how to implement a simple javascript stack trace using the jsd. note that onerror is called for every exception. ...
...implement a simple javascript stack trace using the jsd. note that onerror is called for every exception. ...
...And 3 more matches
Index - Archive of obsolete content
no summary! 121 findpreviousaccesskey no summary! 122 first-tab xul attributes, xul reference no summary! 123 firstdayofweek xul attributes, xul reference no summary! 124 firstpage xul attributes, xul reference no summary! 125 fixed xul attributes, xul reference no summary! 126
flags xul attributes, xul reference no summary! 127 flex xul attributes, xul reference no summary! 128 focused xul attributes, xul reference no summary! 129 forcecomplete xul attributes, xul reference no summary! 130 fullscreenbutton xul, xul attributes, xul reference no summary! 131 grippyhidden ...
...ul, xul methods, xul reference no summary! 529 loadtabs xul methods, xul reference no summary! 530 loaduri xul methods, xul reference note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. ...
...29 loadtabs xul methods, xul reference no summary! 530 loaduri xul methods, xul reference note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. ...
...And 3 more matches
Listening to events on all tabs
.removetabsprogresslistener(myprogresslistener); implementing a listener the listener object itself has five methods it can implement to handle various events: onlocationchange called when the uri of the document displayed in the tab changes. ...
...optional from gecko 10 onprogresschange called when updated progress information for the download of a document is available. ...
...ed. void onsecuritychange( nsidomxulelement abrowser, nsiwebprogress awebprogress, nsirequest arequest, unsigned long astate ); parameters abrowser the browser that fired the notification. awebprogress the nsiwebprogress instance that fired the notification. arequest the nsirequest that has new security state. ...
...And 3 more matches
OS.File for the main thread
ng mode for the file, as an object that may contain a subset of the following fields: read if true, the file will be opened for reading. depending on other fields, it may also be opened for writing. write if true, the file will be opened for writing. depending on other fields, it may also be opened for reading. prior to gecko 27, unless create or truncate are set or explicit unix
flags are given, the file will be opened for appending on unix/linux. however, the file is not opened for appending on windows. see bug 924858. starting with gecko 27, you may use the append flag instead. for an example using append see here. truncate | trunc if true, the file will be opened for writing. if the file does not exist, it will be created. if the file exists, its contents will be ...
...quivalent of .setposition(0, pos_end) is executed before each write. the default is true, i.e. opening a file for appending. specify append: false to open the file in regular mode. optionsoptional platform-specific options for opening the file. for advanced users only. most users will never have need of these options. to specify options, pass an object that may contain some of the following
flags: unix
flags (ignored under non-unix platforms) if specified, file opening
flags, as per libc function open. if unspecified, build these
flags from the contents of mode. you can build these
flags from values os.constants.libc.o_*. unixmode (ignored under non-unix platforms) if specified, file creation mode, as per libc function open. if unspecified, files are created with a default mode o...
...eously by one process, so do not forget to close that file once you have finished it, to ensure that you are not blocking the rest of the process. when opening files for writing, they will be opened for appending unless you specify append: false in gecko 27 and later. in gecko 26 and earlier, on platforms other than windows, the files will be opened for appending unless you specify explicit unix
flags or open the file with either create or truncate
flags. in gecko 26 and earlier on windows, files will never be opened for appending. to open an existing file for writing without appending in a compatible way on all platforms in both gecko 27 and later and gecko 26 and earlier, you should specify both the append flag and unix
flags. // open a file for writing without appending to it. task.spawn(...
...And 3 more matches
JSNewResolveOp
obsolete since jsapi 36this feature is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. jsnewresolveop is the type of the jsclass.resolve callback when the jsclass_new_resolve bit is set in the jsclass.
flags field. ...
...object obj, js::handleid id, js::mutablehandleobject objp); name type description cx jscontext * pointer to the js context in which the property access is taking place. obj js::handleobject pointer to the object whose properties are being accessed. id js::handleid name or index of the property being accessed. ...
... js::mutablehandleobject objp); name type description cx jscontext * pointer to the js context in which the property access is taking place. obj js::handleobject pointer to the object whose properties are being accessed. id js::handleid name or index of the property being accessed.
flags uint32_t obsolete since jsapi 31
flags giving contextual information about the ongoing property access. objp js::mutablehandleobject out parameter. on success, the resolve hook must set *objp to the object in which the property has been defined, or null if it was not defined. description like jsresolveop, but
flags provide contextual information about the property access. on success, the callback must set the *obj...
...And 3 more matches
JS_NewFunction
create a new javascript function that is implemented in c/c++ as a jsnative. ...
... create a new javascript function that is implemented in c/c++ as a jsnative. ...
...requires request. in a...
...And 3 more matches
nsIClassInfo
in pruint32 language); void getinterfaces(out pruint32 count, [array, size_is(count), retval] out nsiidptr array); attributes attribute type description classdescription string a human readable string naming the class, or null. read only. classid nscidptr a classid through which an instance of this class can be created, or null. ...
...assid through which an instance of this class can be created, or null. if the
flags attribute has the singleton bit set, then the value of this attribute specifies a classid through which this class can be accessed as a service using nsiservicemanager.getservice(). read only. classidnoalloc nscid a classid through which an instance of this class can be created, or null. if the
flags attribute has the singleton bit set, then the value of this attribute specifies a classid through which this class can be accessed as a service using nsiservicemanager.getservice(). this attribute is similar to the classid attribute; however, this attribute exists so that c++ callers can avoid allocating and freeing a nscid object, as would happen if they used classid. read only. violates th...
...ttribute exists so that c++ callers can avoid allocating and freeing a nscid object, as would happen if they used classid. read only. violates the xpcom interface guidelines exceptions thrown ns_error_not_available if the class does not have a classid contractid string a contractid through which an instance of this class can be created, or null. if the
flags attribute has the singleton bit set, then the value of this attribute specifies a contractid through which this class may be accessed as a service using nsiservicemanager.getservicebycontractid(). read only.
flags pruint32 specifies various binary properties of this class. possible values for this attribute include a bit-wise combination of the constants read only. impleme...
...And 3 more matches
Building Trees - Archive of obsolete content
results are stored in a list inside the builder. this means that dom nodes are not constructed for any of the items. this is much more efficient; creating large numbers of dom nodes adds a lot of overhead. the performance advantage is possible since trees only display text. as a result, the builder only has a few pieces of information to keep track of. to use the tree builder, you need to add a
flags attribute to the root node: <tree datasources="template-guide-streets.rdf" ref="http://www.xulplanet.com/rdf/myneighbourhood"
flags="dont-build-content"> the dont-build-content flag causes no content to be built for the template. but moreover, it uses a subtype of the main builder called the tree builder. without this flag, the template will be handled by the content builder. note...
...ll be handled by the content builder. note: while a tree builder can only be used with trees, a content builder can be used with any type of content. if you wish, you can also use the content builder for a tree. there may be situations that call for this, typically when handling smaller amounts of data. however, the content builder becomes slower as the amount of data increases. apart from the
flags attribute, the template syntax for the tree builder and the content builder are identical. however, the tree builder requires a very specific form to the action body. specifically, the action body should be a single treeitem with its rows and cells. here is an example (using an rdf source): <tree id="photoslist" flex="1" datasources="template-guide-photos5.rdf" ref="http://www.xulplanet.co...
...template syntax for the tree builder and the content builder are identical. however, the tree builder requires a very specific form to the action body. specifically, the action body should be a single treeitem with its rows and cells. ...
...And 2 more matches
tree - Archive of obsolete content
isplay in the tree. however, the treeitems are not displayed directly; they are used only as data to the content view. however, the content view will automatically update the tree if treeitems are changed. rdf tree nsitreeview, nsixultreebuilder no this tree is generated from an rdf datasource. it is used when a tree has a datasources attribute, and has dont-build-content in its
flags attribute. for this tree, the data comes directly from the rdf datasource. dom treeitems are not created. even though the template uses treeitem elements to define the content, dom nodes for these elements are not created. this is the type that should be used for rdf generated trees with lots of rows. rdf content tree nsitreeview, nsixultreebuilder, nsitreecontentview yes this t...
...tem elements to define the content, dom nodes for these elements are not created. this is the type that should be used for rdf generated trees with lots of rows. rdf content tree nsitreeview, nsixultreebuilder, nsitreecontentview yes this tree is generated from an rdf datasource. it is similar to the previous type but is used when the tree does not have dont-build-content in its
flags attribute. dom treeitems are created, so you can access the data using rdf functions or dom functions. this type is suitable for rdf generated trees with a fairly small number of rows. custom tree view nsitreeview no for this tree you implement the nsitreeview interface yourself. the tree's data is retrieved from this custom view. the custom view should be attached to the tree b...
...g its view property. more information is available in the xul tutorial. also tree widget changes. relevant accessbility guidelines provide alternative access (for example, via menus) to column picker and for header behaviors like sorting (these have no default keyboard access). ...
...And 2 more matches
Adding a new CSS property
her entries for examples, and also see the next section for details about parsing. parsing to start implementing the parsing, first read the syntax line in the property's specification (whose syntax is in turn defined in the css values and units specification) and any prose in the specification that adds additional restrictions to that syntax. ...
...or details about parsing. parsing to start implementing the parsing, first read the syntax line in the property's specification (whose syntax is in turn defined in the css values and units specification) and any prose in the specification that adds additional restrictions to that syntax. every property in nscssproplist.h must have in its
flags field exactly one of the four css_property_parse_*
flags defined in nscssprops.h. ...
... otherwise, set the variant entry in the nscssproplist entry to 0. ...
...And 2 more matches
PR_TransmitFile
sends a complete file across a connected socket. syntax #include <prio.h> print32 pr_transmitfile( prfiledesc *networksocket, prfiledesc *sourcefile, const void *headers, print32 hlen, prtransmitfile
flags flags, printervaltime timeout); parameters the function has the following parameters: networksocket a pointer to a prfiledesc object representing the connected socket to send data over. sourcefile a pointer to a prfiledesc object representing the file to send. headers a pointer to the buffer holding the headers to be sent before sending data. hlen length of the headers buffer in bytes.
flags one of the following
flags: pr_transmitfile_keep_open indicates that the socket will be kept open after the data is sent. pr_transmitfile_close_socket indicates that the...
...curs while sending the file, the pr_transmitfile_close_socket flag is ignored. the reason for the failure can be obtained by calling pr_geterror. ...
...the file, the pr_transmitfile_close_socket flag is ignored. the reason for the failure can be obtained by calling pr_geterror. ...
...And 2 more matches
NSS_3.12_release_notes.html
h) cert_newtempcertificate (see cert.h) cert_setocsptimeout (see certhigh/ocsp.h) cert_setusepkixforvalidation (see cert.h) cert_pkixverifycert (see cert.h) hash_gettype (see sechash.h) nss_initwithmerge (see nss.h) pk11_createmergelog (see pk11pub.h) pk11_creategenericobject (see pk11pub.h) pk11_createpbev2algorithmid (see pk11pub.h) pk11_destroymergelog (see pk11pub.h) pk11_generatekeypairwithop
flags (see pk11pub.h) pk11_getpbecryptomechanism (see pk11pub.h) pk11_isremovable (see pk11pub.h) pk11_mergetokens (see pk11pub.h) pk11_writerawattribute (see pk11pub.h) seckey_ecparamstobasepointorderlen (see keyhi.h) seckey_ecparamstokeysize (see keyhi.h) secmod_deletemoduleex (see secmod.h) sec_getregisteredhttpclient (see ocsp.h) sec_pkcs5isalgorithmpbealgtag (see secpkcs5.h) vfy_createcontextdirec...
...d sec_error_token_not_logged_in sec_error_ocsp_responder_cert_invalid sec_error_ocsp_bad_signature sec_error_out_of_search_limits sec_error_invalid_policy_mapping sec_error_policy_validation_failed sec_error_unknown_aia_location_type sec_error_bad_http_response sec_error_bad_ldap_response sec_error_failed_to_encode_data sec_error_bad_info_access_location sec_error_libpkix_internal new mechanism
flags (see secmod.h) public_mech_aes_flag public_mech_sha256_flag public_mech_sha512_flag public_mech_camellia_flag new oids (see secoidt.h) new ec signature oids sec_oid_ansix962_ecdsa_signature_recommended_digest sec_oid_ansix962_ecdsa_signature_specified_digest sec_oid_ansix962_ecdsa_sha224_signature sec_oid_ansix962_ecdsa_sha256_signature sec_oid_ansix962_ecdsa_sha384_signature sec_oid_ansix96...
...ix code bug 300928: integrate libpkix to nss bug 303457: extensions newly supported in libpkix must be marked supported bug 331096: nss softoken must detect forks on all unix-ish platforms bug 390710: certnameconstraintstemplate is incorrect bug 416928: der decode error on this policy extension bug 375019: cache-enable pkix_ocspchecker_check bug 391454: libpkix does not honor nss's override trust
flags bug 403682: cert_pkixverifycert never succeeds bug 324744: add generation of policy extensions to certutil bug 390973: add long option names to secu_parsecommandline bug 161326: need api to convert dotted oid format to/from octet representation bug 376737: cert_importcerts routinely sets valid_peer or valid_ca override trust
flags bug 390381: libpkix rejects cert chain when root ca cert has no ba...
...And 2 more matches
FC_Initialize
c module for the fips mode of operation. in addition to creating the internal data structures, it performs the fips software integrity test and power-up self-tests. the pinitargs argument must point to a ck_c_initialize_args structure whose members should have the following values: createmutex should be null. destroymutex should be null. lockmutex should be null. unlockmutex should be null.
flags should be ckf_os_locking_ok. libraryparameters should point to a string that contains the library parameters. preserved should be null. the library parameters string has this format: "configdir='dir' certprefix='prefix1' keyprefix='prefix2' secmod='file'
flags= " here are some examples. nss_nodb_init(""), which initializes nss with no databases: "configdir='' certprefix='' keyprefix='' secmo...
...ld be ckf_os_locking_ok. libraryparameters should point to a string that contains the library parameters. preserved should be null. the library parameters string has this format: "configdir='dir' certprefix='prefix1' keyprefix='prefix2' secmod='file'
flags= " here are some examples. ...
...ome examples. ...
...And 2 more matches
Hacking Tips
. note that some functions have been moved under an 'os' object, and help(os) will give brief help on just the members of that "namespace". getting the bytecode of a function (from js shell) the shell has a small function named dis to dump the bytecode of a function with its source notes. without arguments, it will dump the bytecode of its caller. js> function f () { return 1; } js> dis(f);
flags: loc op ----- -- main: 00000: one 00001: return 00002: stop source notes: ofs line pc delta desc args ---- ---- ----- ------ -------- ------ 0: 1 0 [ 0] newline 1: 2 0 [ 0] colspan 2 3: 2 2 [ 2] colspan 9 getting the bytecode of a function (from gdb) in jsopcode.cpp, a function named js::disassembleatpc can print the bytecode of a script. ...
...unctions which are usually dumping some output will do it in the shell where valgrind is started and not in the shell where gdb is started. thus functions such as js::dumpbacktrace, when called from gdb, will print their output in the shell containing valgrind. adding spew for compilations & bailouts & invalidations (from gdb) if you are in rr, and forgot to record with the spew enabled with ion
flags or because this is an optimized build, then you can add similar spew with extra breakpoints within gdb. gdb has the ability to set breakpoints with commands, but a simpler / friendlier version is to use dprintf, with a location, and followed by printf-like arguments. (gdb) dprintf js::jit::ionbuilder::ionbuilder, "compiling %s:%d:%d-%d\n", info->script_->scriptsource()->filename_.mtuple.mfirsta...
...e --vex-iropt-register-updates=allregs-at-mem-access ./js ./run.js the output file can then be use with kcachegrind which provides a graphical view of the call graph. using ionmonkey spew (js shell) ionmonkey spew is extremely verbose (not as much as the infer spew), but you can filter it to focus on the list of compiled scripts or channels, ionmonkey spew channels can be selected with the ion
flags environment variable, and compilation spew can be filtered with ionfilter. ion
flags contains the names of each channel separated by commas. the logs channel produces 2 files in /tmp/, one (/tmp/ion.json) made to be used with iongraph (made by sean stangl) and another one (/tmp/ion.cfg) made to be used with c1visualizer. these tools will show the mir & lir steps done by ionmonkey during the compi...
...And 2 more matches
How to embed the JavaScript engine
tions for building and running the sample below the code. the code differs for each spidermonkey version, please choose right version for your spidermonkey. spidermonkey 24 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object. ...
....tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 31 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object. ...
....tostring(); printf("%s\n", js_encodestring(cx, str)); } js_destroycontext(cx); js_destroyruntime(rt); js_shutdown(); return 0; } spidermonkey 38 // following code might be needed in some case // #define __stdc_limit_macros // #include <stdint.h> #include "jsapi.h" /* the class of the global object. ...
...And 2 more matches
JSErrorReport
linebuf const char * text of the line that caused the error, minus the trailing newline character. tokenptr const char * pointer to the error token in *linebuf. uclinebuf const char16_t * unicode line buffer. this is the buffer that contains the original data. uctokenptr const char16_t * pointer to the error token in *uclinebuf.
flags unsigned the logical or of zero or more of the following
flags: jsreport_warning this "error" is really only a warning. it will not cause the current operation to fail. jsreport_exception an exception is being raised. a jserrorreporter might choose to ignore a jserrorreport that has this flag set, since the exception may be caught an...
...ndition is an error in strict mode code, a warning if js_has_strict_option(cx), and otherwise should not be reported at all. we check the strictness of the context's top frame's script; where that isn't appropriate, the caller should do the right checks itself instead of using this flag. the constant jsreport_error is 0 and can be used to indicate an error report without any of the above
flags. errornumber unsigned the error number. ucmessage const char16_t * the default unicode error message. messageargs const char16_t ** arguments for the error message. exntype int16_t one of the jsexntype constants. description jserrorreport describes a single error that occurs in the execution of script. in the event of an error,...
...ate a buffer to hold the text that generated the error condition. set linebuf to point at the buffer before your application executes a script. for unicode scripts, define a second buffer that holds the unicode version of the text the generated the error. for application that do not use unicode, set uclinebuf and uctokenptr to null. macros name description jsreport_is_warning(
flags) returns true if
flags has jsreport_warning. jsreport_is_exception(
flags) returns true if
flags has jsreport_exception. jsreport_is_strict(
flags) returns true if
flags has jsreport_strict. jsreport_is_strict_mode_error(
flags) returns true if
flags has jsreport_strict_mode_error. see also mxr id search for jserrorreport js_reporterror js_reportwarni...
...And 2 more matches
SpiderMonkey 1.8.5
ices of argv in spidermonkey 1.8.5; the js_callee, js_this, etc. macros must be used instead. see bug 581263. global objects global objects have been specialized, and must be be created with either js_newglobalobject or js_newcompartmentandglobalobject. js_newobject and js_newobjectwithgivenproto remain the correct apis for creating other objects. global objects must also have the jsclass_global_
flags flag set. merely setting jsclass_is_global is insufficient. new c apis js_assert_string_is_flat js_addgcthingroot js_addnamedgcthingroot js_addnamedobjectroot js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefileha...
...some c++ helpers have been introduced into the api, to help embedders writing c++ projects. please note that spidermonkey reserves the js:: namespace for itself. jsautorequest jsautosuspendrequest j...
...ler, invoke configure thus: cxx=/usr/bin/g++-4.0 /path/configure --my-configuration-options js-config the new configure-based build system does not correctly generate the js-config script on many platforms, nor when js-ctypes are enabled. ...
...And 2 more matches
SpiderMonkey 1.8.7
ices of argv in spidermonkey 1.8.5; the js_callee, js_this, etc. macros must be used instead. see bug 581263. global objects global objects have been specialized, and must be be created with either js_newglobalobject or js_newcompartmentandglobalobject. js_newobject and js_newobjectwithgivenproto remain the correct apis for creating other objects. global objects must also have the jsclass_global_
flags flag set. merely setting jsclass_is_global is insufficient. new c apis js_assert_string_is_flat js_addgcthingroot js_addnamedgcthingroot js_addnamedobjectroot js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_alreadyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefileha...
...some c++ helpers have been introduced into the api, to help embedders writing c++ projects. please note that spidermonkey reserves the js:: namespace for itself. jsautorequest jsautosuspendrequest j...
...er, invoke configure thus: cxx=/usr/bin/g++-4.0 /path/configure --my-configuration-options js-config the new configure-based build system does not correctly generate the js-config script on many platforms, nor when js-ctypes are enabled. ...
...And 2 more matches
Places utilities for JavaScript
tions = placesutils.getannotationsforuri(uri); saving you a bit of clumsy code and leaving mozilla to make sure everything is written correctly. it also gives you more information that my hastily written (and probably incorrect) example up above. the annotation objects returned or send from/to all these functions all are arrays of objects which have the properties: name the annotation name
flags annotation
flags expires annotation expiration mimetype mimetype of the annotation, usually only used for binary annotations type the type used for non-binary annotations value the value of the annotation getannotationsforuri() fetch all annotations for a uri, including all properties of each annotation which would be required to recreate it. array object getannotationsforuri(auri) ...
...sed for non-binary annotations value the value of the annotation getannotationsforuri() fetch all annotations for a uri, including all properties of each annotation which would be required to recreate it. array object getannotationsforuri(auri) parameters auri the uri for which annotations are to be retrieved. return array of objects, each containing the following properties: name,
flags, expires, mimetype, type, value getannotationsforitem() fetch all annotations for an item, including all properties of each annotation which would be required to recreate it. array object getannotationsforitem(aitemid) parameters aitemid the identifier of the itme for which annotations are to be retrieved. return type return array of objects, each containing the following properties:...
...es, mimetype, type, value getannotationsforitem() fetch all annotations for an item, including all properties of each annotation which would be required to recreate it. array object getannotationsforitem(aitemid) parameters aitemid the identifier of the itme for which annotations are to be retrieved. ...
...And 2 more matches
nsICommandLine
command line provided remotely by another instance of the application. 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) components may implement the nsicommandlinehandler interface to add custom command line handling behavior. definitions arguments any values found on the command line. switches
flags. in normalized form, these are preceded by a single dash. some
flags may take parameters; for example: "-url <param>" or "-install-xpi <param>". method overview long findflag(in astring aflag, in boolean acasesensitive); astring getargument(in long aindex); boolean handleflag(in astring aflag, in boolean acasesensitive); astring handleflagwithparam(in astring aflag, in boolean acasesens...
...aflag, in boolean acasesensitive ); parameters aflag the flag name to locate. do not include the initial hyphen. acasesensitive whether to do case-sensitive comparisons. return value the position of the flag in the command line, or -1 if the flag is not found.getargument() gets the value an argument from the array of command-line arguments, given the index into the argument list. on windows,
flags of the form /flag are normalized to -flag. /flag:param are normalized to -flag param. on unix/linux and mac os x,
flags of the form --flag are normalized to -flag, and
flags of the form --flag=param are normalized to the form -flag param. astring getargument( in long aindex ); parameters aindex the argument to retrieve. this index is 0-based, and does not include the application name. return...
...gument to retrieve. this index is 0-based, and does not include the application name. return value the value of the specified argument. this is the full text of that argument, so if the argument is a flag, the returned value is "-flag [<flagvalue>]". exceptions thrown ns_error_invalid_arg the specified index is out of bounds. handleflag() finds the specified flag, removing it from the array of
flags. reports whether or not the specified flag was found. this is useful for boolean
flags; that is,
flags that don't accept a parameter. you can determine if the flag was provided and remove it from the list of
flags waiting to be processed in one operation. boolean handleflag( in astring aflag, in boolean acasesensitive ); parameters aflag the flag name to find and remove. acasesensitive whet...
...And 2 more matches
nsIURIFixup
fixup_flag_allow_keyword_lookup 1 allow the fixup to use a keyword lookup service to complete the uri. the fixup object ...
...lla.org/docshell/urifixup;1"] .createinstance(components.interfaces.nsiurifixup); method overview nsiuri createexposableuri(in nsiuri auri); nsiuri createfixupuri(in autf8string auritext, in unsigned long afixup
flags); nsiuri keywordtouri(in autf8string akeyword); nsiurifixupinfo getfixupuriinfo(in autf8string auritext, in unsigned long afixup
flags); constants constant value description fixup_flag_none 0 no fixup
flags. ...
... fixup_flag_use_utf8 4 use utf-8 to encode the uri instead of the platform character set. fixup_flag_fix_scheme_typos 8 fix common scheme typos. ...
...And 2 more matches
Progress Listeners - Archive of obsolete content
ebprogress.domwindow in the callback methods to obtain the tab/window which triggers the state change or event. example: example of listener for anchor change the above example "notification when the value in address bar changes" fires multiple times, one of which is when the tab is changed. in some cases you want to catch only a location change when the anchor changes. ...
...chor change the above example "notification when the value in address bar changes" fires multiple times, one of which is when the tab is changed. in some cases you want to catch only a location change when the anchor changes. to do this the optional a
flags parameter of the onlocationchange listener is used. ...
... example "notification when the value in address bar changes" fires multiple times, one of which is when the tab is changed. in some cases you want to catch only a location change when the anchor changes. to do this the optional a
flags parameter of the onlocationchange listener is used. ...
... is used. ...
Writing to Files - Archive of obsolete content
led to create a new output stream, which will be used to write to the file. in this example, the operations are enclosed in a try-catch block in order to capture any errors that might occur during the process. see file errors for a list of errors that might occur. the newoutputstream method takes two arguments in this example. the first argument is the file to write to, and the second is a set of
flags which control the writing. in this case, the 'text' flag is used which indicates that you will be writing text to the file. when writing text files, characters are writing using a chosen character set, encoded automatically. the default character set is 'utf-8' but this can be changed using an additional, yet optional, argument to the newoutputstream method. see below for more details about this.
... 'text' flag is used which indicates that you will be writing text to the file. when writing text files, characters are writing using a chosen character set, encoded automatically. the default character set is 'utf-8' but this can be changed using an additional, yet optional, argument to the newoutputstream method. see below for more details about this. ...
...ers are writing using a chosen character set, encoded automatically. the default character set is 'utf-8' but this can be changed using an additional, yet optional, argument to the newoutputstream method. see below for more details about this. creating and appending to files a number of
flags control whether a new file is created when writing or whether data is appended to an existing file. these
flags should be included in addition to the 'text' or 'binary'
flags when using the newoutputstream method. the default when writing is to create a new file when the file to write to does not exist, and replace the existing file if it does. however, there are three
flags that can be used to control this behaviour. append if used, always write data to the end of the file. this flag is used when add...
...lready exists, it will be truncated to zero length. notruncate if used, don't truncate an existing file when opening it for writing. instead, just overwrite the existing content. if the new data being written is shorter than the existing data, the existing data will remain in the areas where no new data was written. if this flag is not used, the file is truncated before being written to. the
flags are designed such that the most common case that is needed is with no
flags set, so usually you will not set these
flags. however, here is an example of how they might be used: var stream = io.newoutputstream(file, "text nocreate append"); the
flags are specified in a space separated list as the second argument to the newoutputstream method. in this example, the nocreate flag is used to prevent ...
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
pdatesurl=http://developer.mozilla.org/en/docs/getting_started_with_xulrunner defaultdirname={pf}\my app defaultgroupname=my app allownoicons=yes outputdir=..\build\output outputbasefilename=myapp-1.0-win32 ; setupiconfile= compression=lzma solidcompression=yes [languages] name: english; messagesfile: compiler:default.isl [components] name: main; description: my app; types: full compact custom;
flags: fixed name: runtime; description: xul runner runtime; types: full custom [tasks] name: desktopicon; description: {cm:createdesktopicon}; groupdescription: {cm:additionalicons};
flags: unchecked name: quicklaunchicon; description: {cm:createquicklaunchicon}; groupdescription: {cm:additionalicons};
flags: unchecked [files] source: c:\develop\xulrunnerinstaller\myapp\myapp.exe; destdir: {app}; co...
...ntime; description: xul runner runtime; types: full custom [tasks] name: desktopicon; description: {cm:createdesktopicon}; groupdescription: {cm:additionalicons};
flags: unchecked name: quicklaunchicon; description: {cm:createquicklaunchicon}; groupdescription: {cm:additionalicons};
flags: unchecked [files] source: c:\develop\xulrunnerinstaller\myapp\myapp.exe; destdir: {app}; components: main;
flags: ignoreversion source: c:\develop\xulrunnerinstaller\myapp\application.ini; destdir: {app}; components: main;
flags: ignoreversion source: c:\develop\xulrunnerinstaller\myapp\chrome\*; excludes: .svn; destdir: {app}\chrome; components: main;
flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\defaults\*; excludes: .svn; destdir: {app}\defaults; compone...
...sion source: c:\develop\xulrunnerinstaller\myapp\application.ini; destdir: {app}; components: main;
flags: ignoreversion source: c:\develop\xulrunnerinstaller\myapp\chrome\*; excludes: .svn; destdir: {app}\chrome; components: main;
flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\defaults\*; excludes: .svn; destdir: {app}\defaults; components: main;
flags: ignoreversion recursesubdirs createallsubdirs source: c:\develop\xulrunnerinstaller\myapp\xulrunner\*; destdir: {app}\xulrunner; components: runtime;
flags: ignoreversion recursesubdirs createallsubdirs ; note: don't use "
flags: ignoreversion" on any shared system files [icons] name: {group}\my app; filename: {app}\myapp.exe name: {group}\{cm:uninstallprogram,xul explorer}; filename: {uninstall...
...this will create the compiler, which you need to test by actually trying to install your xulrunner application. don't forget to then test the installed application to be sure the installation did indeed work correctly, since if you acci...
FileUtils.jsm
file (or directory) you want to obtain an nsifile for, you can do so using the file constructor, like this: var f = new fileutils.file(mypath); method overview nsifile getfile(string key, array patharray, bool followlinks); nsifile getdir(string key, array patharray, bool shouldcreate, bool followlinks); nsifileoutputstream openfileoutputstream(nsifile file, int mode
flags); nsifileoutputstream openatomicfileoutputstream(nsifile file, int mode
flags); nsifileoutputstream opensafefileoutputstream(nsifile file, int mode
flags); void closeatomicfileoutputstream(nsifileoutputstream stream); void closesafefileoutputstream(nsifileoutputstream stream); constants constant value description mode_rdonly 0x0...
...ly: var dir = new fileutils.file('c:\\blah\\blah'); if (dir.exists()) { //yes directory exists } openfileoutputstream() opens a file output stream for writing. the stream is opened with the defer_open nsifileoutputstream.behavior flag constant this means the file is not actually opened until the first time it's accessed. nsifileoutputstream openfileoutputstream( nsifile file, int mode
flags ); parameters file the file to write to. mode
flags optional file open
flags (see constants above) return value returns nsifileoutputstream (the non-safe variant) to write to. openatomicfileoutputstream() opens an atomic file output stream for writing. note: 'safe' and 'atomic' file output streams will never append; they will always overwrite an existing file. starting in gecko 38.
...ream (the non-safe variant) to write to. openatomicfileoutputstream() opens an atomic file output stream for writing. note: 'safe' and 'atomic' file output streams will never append; they will always overwrite an existing file. starting in gecko 38.0, passing mode_append without mode_truncate will throw an exception. nsifileoutputstream openatomicfileoutputstream( nsifile file, int mode
flags ); parameters file the file to write to. mode
flags optional file open
flags (see constants above) return value returns nsifileoutputstream (the safe variant) to write to. note: openatomicfileoutputstream() is generally better than opensafefileoutputstream() because flushing is not needed in most of the issues. closeatomicfileoutputstream() closes an atomic file output stream. void ...
...; parameters stream the stream to close. opensafefileoutputstream() opens a safe file output stream for writing. note: 'safe' and 'atomic' file output streams will never append; they will always overwrite an existing file. starting in gecko 38.0, passing mode_append without mode_truncate will throw an exception. nsifileoutputstream opensafefileoutputstream( nsifile file, int mode
flags ); parameters file the file to write to. mode
flags optional file open
flags (see constants above) return value returns nsifileoutputstream (the safe variant) to write to. remarks note: starting in gecko 6 the stream is opened with the defer_open nsifileoutputstream behavior flag constant; this means the file is not actually opened until the first time it's accessed. closesafefileo...
NSS 3.34 release notes
ble on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_34_rtm/src/ notable changes in nss 3.34 the following ca certificates were added: cn = gdca trustauth r5 root sha-256 fingerprint: bf:ff:8f:d0:44:33:48:7d:6a:8a:a6:0c:1a:29:76:7a:9f:c2:bb:b0:5e:42:0f:71:3a:13:b9:92:89:1d:38:93 trust
flags: websites cn = ssl.com root certification authority rsa sha-256 fingerprint: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 trust
flags: websites, email cn = ssl.com root certification authority ecc sha-256 fingerprint: 34:17:bb:06:cc:60:07:da:1b:96:1c:92:0b:8a:b4:ce:3f:ad:82:0e:4a:a3:0b:9a:cb:c4:a7:...
...= ssl.com root certification authority rsa sha-256 fingerprint: 85:66:6a:56:2e:e0:be:5c:e9:25:c1:d8:89:0a:6f:76:a8:7e:c1:6d:4d:7d:5f:29:ea:74:19:cf:20:12:3b:69 trust
flags: websites, email cn = ssl.com root certification authority ecc sha-256 fingerprint: 34:17:bb:06:cc:60:07:da:1b:96:1c:92:0b:8a:b4:ce:3f:ad:82:0e:4a:a3:0b:9a:cb:c4:a7:4e:bd:ce:bc:65 trust
flags: websites, email cn = ssl.com ev root certification authority rsa r2 sha-256 fingerprint: 2e:7b:f1:6c:c2:24:85:a7:bb:e2:aa:86:96:75:07:61:b0:ae:39:be:3b:2f:e9:d0:cc:6d:4e:f7:34:91:42:5c trust
flags: websites cn = ssl.com ev root certification authority ecc sha-256 fingerprint: 22:a2:c1:f7:bd:ed:70:4c:c1:e7:01:b5:f4:08:c3:10:88:0f:e9:56:b5:de:2a:4a:...
...ssl.com ev root certification authority rsa r2 sha-256 fingerprint: 2e:7b:f1:6c:c2:24:85:a7:bb:e2:aa:86:96:75:07:61:b0:ae:39:be:3b:2f:e9:d0:cc:6d:4e:f7:34:91:42:5c trust
flags: websites cn = ssl.com ev root certification authority ecc sha-256 fingerprint: 22:a2:c1:f7:bd:ed:70:4c:c1:e7:01:b5:f4:08:c3:10:88:0f:e9:56:b5:de:2a:4a:44:f9:9c:87:3a:25:a7:c8 trust
flags: websites cn = trustcor rootcert ca-1 sha-256 fingerprint: d4:0e:9c:86:cd:8f:e4:68:c1:77:69:59:f4:9e:a7:74:fa:54:86:84:b6:c4:06:f3:90:92:61:f4:dc:e2:57:5c trust
flags: websites, email cn = trustcor rootcert ca-2 sha-256 fingerprint: 07:53:e9:40:37:8c:1b:d5:e3:83:6e:39:5d:ae:a5:cb:83:9e:50:46:f1:bd:0e:ae:19:51:cf:10:fe:c7:c9:65 trust
flags: web...
...z o.o. ...
sslfnc.html
and secmod.db files (wheren is a numeric digit) in the specified directory. nss_init isnot idempotent, so call it only once. nss_init opens the database files read-only. if you are performing operations that require write permission, for example s/mime operations such as adding a certificate, use nss_initreadwrite instead. before calling nss_init, your program must call pr_init. the policy
flags for all cipher suites are turned off by default, disallowing all cipher suites. therefore, an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions: nss_setdomesticpolicy, nss_setexportpolicy, and nss_setfrancepolicy configure the cipher suites for domestic, international, and frenc...
...an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions: nss_setdomesticpolicy, nss_setexportpolicy, and nss_setfrancepolicy configure the cipher suites for domestic, international, and french versions of software products with encryption features. ssl_cipherpolicyset sets policy
flags for individual cipher suites, one at a time. this may be helpful if you have an export license that permits more or fewer capabilities than those allowed by the other export policy functions. nss_initreadwrite sets up configuration files and performs other tasks required to run network security services. unlike nss_init, nss_initreadwrite provides both read and write access to database fil...
...eyn.db, and secmod.db files (wheren is a numeric digit) with both read and write permission in the specified directory. nss_initreadwrite isnot idempotent, so call it only once. use nss_initreadwrite rather than nss_init if you are performing operations that require write permission, such as some s/mime operations. before calling nss_initreadwrite, your program must call pr_init. the policy
flags for all cipher suites are turned off by default, disallowing all cipher suites. therefore, an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions. nss_nodb_init performs tasks required to run network security services without setting up configuration files. important: this nss f...
...or code. description nss_nodb_init opens only the temporary database and the internal pkcs #112 module. unlike nss_init, nss_nodb_init allows applications that do not have access to storage for databases to run raw crypto, hashing, and certificate functions. nss_nodb_init isnot idempotent, so call it only once. before calling nss_nodb_init, your program must call pr_init. the policy
flags for all cipher suites are turned off by default, disallowing all cipher suites. therefore, an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions. ssl_optionsetdefault changes the default value of a specified ssl option for all subsequently opened sockets as long as the curren...
NSS Tools certutil
or uid=jsm...
... or uid=jsmith, e=jsmith@...
... or uid=jsmith, e=jsmith@netscape.com, cn=john smith, o=netscape commun...
... or uid=jsmith, e=jsmith@netscape.com, cn=john smith, o=netscape communications corp., c=us : expired certificate or uid=jsm...
NSS tools : vfychain
ent, 6=object signer, 9=protectedobjectsigner, 10=ocsp responder, 11=any ca -v verbose mode. prints root cert subject(double the argument for whole root cert info) -w password database password -w pwfile password file revocation options for pkix api (invoked with -pp options) is a collection of the following
flags: [-g type [-h
flags] [-m type [-s
flags]] ...] ... where: -g test-type sets status checking test type. possible values are "leaf" or "chain" -g test type sets status checking test type. possible values are "leaf" or "chain". -h test
flags sets revocation
flags for the test type it follows. possible ...
...possible types are "donotuse", "forbidfetching", "ignoredefaultsrc", "requireinfo" and "failifnoinfo". ...
...possible types are "donotuse", "forbidfetching", "ignoredefaultsrc", "requireinfo" and "failifnoinfo". ...
...possible types are "donotuse", "forbidfetching", "ignoredefaultsrc", "requireinfo" and "failifnoinfo". ...
Thread Sanitizer
mend using clang 3.6 or later. building firefox getting the source if you don't have a source code repository clone yet, you need to get yourself a clone of mozilla-central. adjusting the build configuration create the build configuration file .mozconfig with the following content in your mozilla-central directory: mk_add_options moz_objdir=@topsrcdir@/objdir-ff-tsan mk_add_options moz_make_
flags=-j12 # enable llvm specific code and build workarounds ac_add_options --enable-thread-sanitizer # if clang is already in your $path, then these can simply be: # export cc=clang # export cxx=clang++ export cc="/path/to/clang" export cxx="/path/to/clang++" # llvm-symbolizer displays much more complete backtraces when data races are detected. # if it's not already in your $path, then uncomment...
...r # if clang is already in your $path, then these can simply be: # export cc=clang # export cxx=clang++ export cc="/path/to/clang" export cxx="/path/to/clang++" # llvm-symbolizer displays much more complete backtraces when data races are detected. # if it's not already in your $path, then uncomment this next line: #export llvm_symbolizer="/path/to/llvm-symbolizer" # add tsan to our compiler
flags export c
flags="-fsanitize=thread -fpic -pie" export cxx
flags="-fsanitize=thread -fpic -pie" # additionally, we need the tsan flag during linking. normally, our c/cxx
flags would # be used during linking as well but there is at least one place in our build where # our c
flags are not added during linking. # note: the use of this flag causes clang to automatically link the tsan runtime :) export ldf...
... pass a directory name as the first parameter. the build will then be created in a new subdirectory with that name. ...
... the build will then be created in a new subdirectory with that name. #! /bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 mkdir $1 cd $1 llvm_root="/path/to/llvm" cc="$llvm_root/build/bin/clang" \ cxx="$llvm_root/build/bin/clang++" \ c
flags="-fsanitize=thread -fpic -pie" \ cxx
flags="-fsanitize=thread -fpic -pie" \ ld
flags="-fsanitize=thread -fpic -pie" \ ../configure --disable-debug --enable-optimize="-o2 -gline-tables-only" --enable-llvm-hacks --disable-jemalloc make -j 8 fi using llvm symbolizer for faster/better traces by default, tsan traces are symbolized because otherwise, the runtime suppression list wouldn't work. the default way of symbolizin...
Using the Places history service
ersion has implemented the older interfaces, resulting in functionality spread across many interfaces. the places history service ("navhistory") implements these history interfaces: nsiglobalhistory2: basic add page, is visited functionality used by the docshell when visiting and rendering pages. nsiglobalhistory3: adds extra functions for dealing with redirects and hints for rendering (gecko
flags). nsibrowserhistory: adds functions used by the basic browser like marking pages as typed in the url bar, and removing pages as from the history interface. nsinavhistoryservice: complex query functions, more fine-grained getters and setters. nsiautocompletesearch: url-bar autocomplete from history from 1.9.1 (firefox3.1) on, don't use any places service on (or after) quit-application has bee...
... has been notified, since the database connection will be closed to allow the last sync, and changes will most likely be lost. use quit-application-granted instead. differences from previous implementations the previous nsglobalhistory service stored one entry for each page in history. this entry contained the url, title, visit count, last visit date, first visit date, host name, last referrer,
flags for typed, hidden, and gecko
flags (gecko
flags is trunk only). the navhistory service has broken this into two tables (see history service design). the main url table stores the information about the page: url, host name, title, visit count, hidden, and typed. stored separately is the information specific to each visit. this information is called a "visit" in this document and in the code. a vi...
... redirect can be determined. nsibrowserhistory.addpagewithdetails: called by history importing code. new code should use nsinavhistoryservice.setpagedetails. nsinavhistoryservice.addvisit: this is an advanced function that allows the caller to set the exact referring visit, the time, the session, etc. it is designed for people writing synchronizing or backup services that need access to all the
flags. under normal browsing, adduri and adddocumentredirect will infer this information for you. modifying pages in history nsiglobalhistory2.setpagetitle: called by gecko when the <title> element is encountered. nsiglobalhistory3.setgecko
flags: called by gecko to store rendering information about a page. currently, this is used to store whether there was a scrollbar, which allows more efficient la...
...changed. nsinavhistoryservice.setpagedetails: used to set all of the global bits associated with a url. it is designed for synchronizing or backup services. basic querying of the history system nsiglobalhistory2.isvisited: called by gecko when rendering links. when isvisited returns true, the link gets the "visited" style. otherwise, the link is colored as unvisited. nsiglobalhistory3.getgecko
flags: retrieves information previously set using setgecko
flags. it is not yet implemented in the places history system. nsibrowserhistory.lastpagevisited: contains the uri of the last page visited. this is used when the preference is set that causes the last page in new windows. nsibrowserhistory.count: the number of pages in history. this is used by the "clear history" button to determine if there ...
XPCOM glue
ork with any other versions of xpcom other than the one it was compiled against. internal linkage will be unavailable to extension authors in xulrunner 1.9 (firefox 3) because the nonfrozen symbols will not be exported from libxul. extension and application authors currently using internal linkage should read the guide on migrating from internal linkage to frozen linkage. ...
...rom libxul. extension and application authors currently using internal linkage should read the guide on migrating from internal linkage to frozen linkage. sample compiler/linker
flags code compiled using xpcom headers should always #include "xpcom-config.h" from the sdk, to ensure that xpcom #defines are correct. ...
...eaders should always #include "xpcom-config.h" from the sdk, to ensure that xpcom #defines are correct. ...
.../sdk/bin -wl,-rpath-link,/path/to/sdk/bin -lxpcomglue_s -lxpcom -lnspr4 write it exactly as stated, see notes. -l/path/to/sdk/lib -lxpcomglue notes never link against xpcomglue.lib and xpcomglue_s.lib at the same time. never link against xpcomglue.lib and xpcom.lib at the same time. for xulrunner 1.9, on linux you should use either the .pc files. for example: pkg-config --c
flags --libs libxul.pc these instructions are for mozilla 1.8 and above. when using a sdk from mozilla 1.7 or earlier, you must define mozilla_strict_api when using any form of the glue. linux and mac: make sure the gecko libraries are listed after your object (.o) files on the link line. linux and mac: write the linker options exactly as stated (just replacing the /path/to/sdk/), otherwise you get ...
nsIDNSService
ce(components.interfaces.nsidnsservice); note: starting in gecko 7.0, the "happy eyeballs" strategy is used to reduce lengthy timeouts when attempting backup connections during attempts to connect from clients that have broken ipv6 connectivity. this is done by disabling ipv6 on backup connections. method overview nsicancelable asyncresolve(in autf8string ahostname, in unsigned long a
flags, in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long a
flags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description myhostname autf8string read only. constants resolve flag constants variou...
...in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long a
flags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description myhostname autf8string read only. constants resolve flag constants various
flags that may be ored together to form the a
flags parameter passed to asyncresolve() and resolve(). constant value description resolve_bypass_cache (1 << 0) this flag suppresses the internal dns lookup cache. resolve_canonical_name (1 << 1) the canonical name of the specified host will be queried. resolve_priority_medium (1 << 2) the query is...
...tching is disabled by configuration. resolve_disable_ipv6 (1 << 5) if this flag is set, only ipv4 addresses will be returned by asyncresolve() and resolve(). methods asyncresolve() begins off an asynchronous host lookup. a specified nsidnslistener is invoked when the resolution process is completed. nsicancelable asyncresolve( in autf8string ahostname, in unsigned long a
flags, in nsidnslistener alistener, in nsieventtarget alistenertarget ); parameters ahostname the host name or ip-address-literal to resolve. a
flags a bitwise or of the resolve flag constants. alistener the listener to be notified when the result is available. alistenertarget optional parameter (may be null). if not null, this parameter specifies the nsieventtarget...
...erbird 1.5 / seamonkey 1.0) called to initialize the dns service. void init(); parameters none. resolve() called to synchronously resolve a host name. warning this method may block the calling thread for a long period of time. it is extremely unwise to call this function on the user interface thread of an application. nsidnsrecord resolve( in autf8string ahostname, in unsigned long a
flags ); parameters ahostname the host name or ip-address-literal to resolve. a
flags a bitwise or of the resolve flag constants. return value dns record corresponding to the given host name. exceptions thrown ns_error_unknown_host if host could not be resolved. shutdown() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) call...
nsIDOMNSHTMLDocument
dom/interfaces/html/nsidomnshtmldocument.idlscriptable this interface defines methods and properties supported by gecko on the document object that are not part of dom level 2. ...
... domstring commandid); boolean querycommandindeterm(in domstring commandid); boolean querycommandstate(in domstring commandid); boolean querycommandsupported(in domstring commandid); domstring querycommandtext(in domstring commandid); obsolete since gecko 14.0 domstring querycommandvalue(in domstring commandid); void releaseevents(in long event
flags); void routeevent(in nsidomevent evt); void write(); obsolete since gecko 2.0 void writeln(); obsolete since gecko 2.0 attributes attribute type description alinkcolor domstring same as body.alink bgcolor domstring same as body.bgcolor compatmode domstring returns "backcompat" if the document is in quirks...
... plugins nsidomhtmlcollection same as embeds for compatibility with netscape 4.x read only. vlinkcolor domstring same as body.vlink width long the width of the body element. read only. obsolete since gecko 6.0 methods captureevents() provided for compatibility with netscape 4.x, but does not actually do anything. void captureevents( in long event
flags ); parameters event
flags clear() used to reset a document to blank, but deprecated since gecko 1.0 and provided for compatibility with netscape 4.x; use open() and close() instead. void clear(); parameters none. execcommand() boolean execcommand( in domstring commandid, in boolean doshowui, in domstring value ); parameters commandid the name of the command to execute...
...uerycommandvalue() domstring querycommandvalue( in domstring commandid ); parameters commandid the name of the command to query. return value the value of the command. for the gethtml command, the current selection is returned as an html source fragment. releaseevents() provided for compatibility with netscape 4.x, but does not actually do anything. void releaseevents( in long event
flags ); parameters event
flags routeevent() provided for compatibility with netscape 4.x, but does not actually do anything. void routeevent( in nsidomevent evt ); parameters evt write() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) void write( [optional] in domstring text ); parameters text the string to write t...
nsIFileInputStream
it may be removed before the stream is closed if it is possible to delete it and still read from it. ...
...it may be removed before the stream is closed if it is possible to delete it and still read from it. ...
...e file happens there as well. note: using this flag results in the file not being opened during the call to init. this means that any errors that might happen when this flag is not set would happen during the first read. also, the file is not locked when init is called, so it might be deleted before we try to read from it. methods init() void init( in nsifile file, in long io
flags, in long perm, in long behavior
flags ); parameters file file to read from (must qi to nsilocalfile) io
flags the file status
flags define how the file is accessed. see pr_open documentation for more details. if set to -1 the file will be opened in default mode (pr_rdonly). perm file mode bits are described in the pr_open documentation. if set to -1 the default value 0 will be used. ...
...ong perm, in long behavior
flags ); parameters file file to read from (must qi to nsilocalfile) io
flags the file status
flags define how the file is accessed. see pr_open documentation for more details. if set to -1 the file will be opened in default mode (pr_rdonly). perm file mode bits are described in the pr_open documentation. if set to -1 the default value 0 will be used. behavior
flags flags specifying various behaviors of the class (see enumerations in the class). see also nsifileoutputstream ...
nsIFocusManager
e only! void focusplugin(in nsicontent aplugin); native code only! nsidomelement getfocusedelementforwindow(in nsidomwindow awindow, in prbool adeep, out nsidomwindow afocusedwindow); pruint32 getlastfocusmethod(in nsidomwindow window); void movecarettofocus(in nsidomwindow awindow); void elementisfocusable(in nsidomelement aelement, in unsigned long a
flags); nsidomelement movefocus(in nsidomwindow awindow, in nsidomelement astartelement, in unsigned long atype, in unsigned long a
flags); void setfocus(in nsidomelement aelement, in unsigned long a
flags); void windowhidden(in nsidomwindow awindow); native code only! void windowlowered(in nsidomwindow awindow); native code only! void windowraised(in nsidomwi...
...method that was used to focus the element in window. this will either be 0, flag_bymouse or flag_bykey. movecarettofocus() moves the selection caret within awindow to the current focus. void movecarettofocus( in nsidomwindow awindow ); parameters awindow elementisfocusable() check if given element is focusable. boolean elementisfocusable(in nsidomelement aelement, in unsigned long a
flags); parameters aelement a
flags return value true if aelement is focusable. movefocus() move the focus to another element. if astartelement is specified, then movement is done relative to astartelement. if astartelement is null, then movement is done relative to the currently focused element. if no element is focused, focus the first focusable element within the documen...
...lement to the new element. specifying astartelement and using movefocus_last is not currently implemented. if no element is found, and atype is either movefocus_root or movefocus_caret, then the focus is cleared. if atype is any other value, the focus is not changed. ...
...urrently implemented. if no element is found, and atype is either movefocus_root or movefocus_caret, then the focus is cleared. if atype is any other value, the focus is not changed. nsidomelement movefocus( in nsidomwindow awindow, in nsidomelement astartelement, in unsigned long atype, in unsigned long a
flags ); parameters awindow astartelement atype a
flags return value the element that was focused. setfocus() changes the focused element reference within the window containing aelement to aelement. void setfocus( in nsidomelement aelement, in unsigned long a
flags ); parameters aelement a
flags native code only!windowhidden called when a document in a window has been hidden or otherwise can no longer accept focus. void...
nsIMsgDBHdr
ted. in clear, if you want to do a persistent change to a message header, such as marking it as read, or replied to, or whatever, you must do it through its corresponding nsimsgfolder (msghdr.folder) or nsimsgdatabase (msghdr.folder.msgdatabase). it is also mandatory to set msghdr.folder.msgdatabase = null after performing this kind of operations to prevent leaking. don't even think about using or
flags and/or and
flags. method overview astring getproperty(in string propertyname); void setproperty(in string propertyname, in astring propertystr); void setstringproperty(in string propertyname, in string propertyvalue); string getstringproperty(in string propertyname); unsigned long getuint32property(in string propertyname); void setuint32prope...
...ring propertyname); unsigned long getuint32property(in string propertyname); void setuint32property(in string propertyname, in unsigned long propertyval); void markread(in boolean read); void markflagged(in boolean flagged); void markhasattachments(in boolean hasattachments); void setprioritystring(in string priority); unsigned long or
flags(in unsigned long
flags); unsigned long and
flags(in unsigned long
flags); void setreferences(in string references); acstring getstringreference(in long refnum); void setrecipientsarray(in string names, in string addresses,in unsigned long numaddresses); void setcclistarray(in string names, in string addresses,in unsigned long numaddresses); voi...
...donly: indicates whether or not this message belongs to a subthread that has been ignored in the ui. if you want to know whether the message is the root of an ignored subthread then you should check for the ignored flag. any children of the ignored message will be marked as read when added to the database. priority nsmsgpriorityvalue indicates the priority of this message.
flags unsigned long indicates the
flags of the message. see nsmsgmessage
flags for a list of what may or may not be set on this message. note that the elided flag should not be set on messages, as it is a flag strictly dealing with the database view. threadid nsmsgkey indicates the id of the thread to which this message belongs. this property does not change the state of any thread ...
...flagged); parameters flagged if true, mark as flagged. if false remove flag. markhasattachments() void markhasattachments(in boolean hasattachments); parameters hasattachments if true, mark as having attachments. if false mark as not having attachments. setprioritystring() void setprioritystring(in string priority); parameters priority string describing the priority. or
flags() unsigned long or
flags(in unsigned long
flags); parameters
flags flags to be added to the current message
flags. and
flags() unsigned long and
flags(in unsigned long
flags); parameters
flags flags to be retained on the current message
flags. all other
flags are cleared. setreferences() void setreferences(in string references); parameters references sets the list of refe...
nsIMsgDatabase
; nsisimpleenumerator enumerateofflineops(); void listallofflineopids(in nsmsgkeyarrayptr offlineopids); native code only! void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); native code only! void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); native code only! void setattributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long
flags); void createcollationkey(in astring sourcestring, out octetptr key, out unsigned long len); native code only! long comparecollationkeys(in octetptr key1, in unsigned long len1, in octetptr key2, in unsigned long len2); native code only! void getnewlist(out unsigned long count, array, size_is(count) out nsmsgkey newkeys); nsisimpleenumerator getcachedhits(in string asearchfolderuri); vo...
... dbfolderinfo nsidbfolderinfo readonly: firstnew nsmsgkey readonly: msgretentionsettings nsimsgretentionsettings msgdownloadsettings nsimsgdownloadsettings lowwaterarticlenum nsmsgkey readonly: highwaterarticlenum nsmsgkey readonly: nextpseudomsgkey nsmsgkey for undo-redo of move pop->imap. nextfakeofflinemsgkey nsmsgkey readonly: for saving "fake" offline msg hdrs. defaultview
flags nsmsgview
flagstypevalue readonly: defaultsorttype nsmsgviewsorttypevalue readonly: defaultsortorder nsmsgviewsortordervalue readonly: msghdrcachesize unsigned long folderstream nsioutputstream summaryvalid boolean methods open() opens a database folder. void open(in nsilocalfile afoldername, in boolean acreate, in boolean aleaveinvaliddb); parameters a...
...an mark, in nsidbchangelistener instigator); markmdnneeded() mdn (message disposition notification) support. void markmdnneeded(in nsmsgkey key, in boolean bneeded, in nsidbchangelistener instigator); ismdnneeded() markmdnneeded only used when mail server is a pop3 server, or when the imap server does not support user defined permanent
flags. boolean ismdnneeded(in nsmsgkey key); markmdnsent() void markmdnsent(in nsmsgkey key, in boolean bneeded, in nsidbchangelistener instigator); ismdnsent() boolean ismdnsent(in nsmsgkey key); markread() methods to get and set docsets for ids. void markread(in nsmsgkey key, in boolean bread, in nsidbchangelistener instigator);...
...oscript] void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); listallofflinemsgs() [noscript] void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); setattributesonpendinghdr() void setattributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long
flags); createcollationkey() [noscript] void createcollationkey(in astring sourcestring, out octetptr key, out unsigned long len); comparecollationkeys() [noscript] long comparecollationkeys(in octetptr key1, in unsigned long len1, in octetptr key2, ...
nsIRequest
eamonkey 2.0) for example nsichannel typically passes itself as the nsirequest argument to the nsistreamlistener on each onstartrequest, ondataavaliable, and onstoprequest invocation. method overview void cancel(in nsresult astatus); boolean ispending(); void resume(); void suspend(); attributes attribute type description load
flags nsload
flags the load
flags of this request. bits 0-15 are reserved. when added to a load group, this request's load
flags are merged with the load
flags of the load group. loadgroup nsiloadgroup the load group of this request. while pending, the request is a member of the load group. it is the responsibility of the request to implement this policy. name a...
... nsiloadgroup the load group of this request. while pending, the request is a member of the load group. it is the responsibility of the request to implement this policy. name autf8string the name of the request. often this is the uri of the request. read only. status nsresult the error status associated with the request. read only. constants various load
flags which may be or'd together. constant value description load_normal 0 no special load
flags. load_background 1 << 0 do not deliver status notifications to the nsiprogresseventsink, or keep this load from completing the nsiloadgroup it may belong to. the following
flags control the flow of data into the cache. constant value descr...
...ue description inhibit_caching 1 << 7 this flag prevents caching of any kind. it does not, however, prevent cached content from being used to satisfy this request. inhibit_persistent_caching 1 << 8 this flag prevents caching on disk (or other persistent media), which may be needed to preserve privacy. for https, this flag is set automatically. the following
flags control what happens when the cache contains data that could perhaps satisfy this request. they are listed in descending order of precedence. constant value description load_bypass_cache 1 << 9 force an end-to-end download of content data from the origin server. this flag is used for a shift-reload. load_from_cache 1 << 10 load from the cache, bypassi...
...n end-to-end download of content data from the origin server. this flag is used for a shift-reload. load_from_cache 1 << 10 load from the cache, bypassing protocol specific validation logic. this flag is used when browsing via history. it is not recommended for normal browsing as it may likely violate reasonable assumptions made by the server and confuse users. the following
flags control the frequency of cached content validation when neither load_bypass_cache or load_from_cache are set. by default, cached content is automatically validated if necessary before reuse. note: these
flags are intended for normal browsing, and they should therefore not apply to content that must be validated before each use. consider, for example, a http response with a "cache-control: no-cac...
nsIWebBrowserChrome
the implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. webbrowser nsiwebbrowser the currently loaded webbrowser. the browser chrome may be told to set the webbrowser object to a new object by setting this attribute. in this case the implementer is responsible for taki...
...view void destroybrowserwindow(); void exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy); attributes attribute type description chrome
flags unsigned long the chrome
flags for this browser chrome. the implementation should reflect the value of this attribute by hiding or showing its chrome appropriately. webbrowser nsiwebbrowser the currently loaded webbrowser. the browser chrome may be told to set the webbrowser object to a new object by setting this attribute. in this case the implementer is responsible for taking the new webbrowser object and doin...
...cessary initialization or setup as if it had created the webbrowser itself. this includes positioning setting up listeners etc. constants constant value description status_script 1 flag for setstatus() status_script_default 2 flag for setstatus() status_link 3 flag for setstatus() chrome_default 1 value for the chrome
flags attribute. chrome_window_borders 2 value for the chrome
flags attribute. chrome_window_close 4 value for the chrome
flags attribute. chrome_window_resize 8 value for the chrome
flags attribute. chrome_menubar 16 value for the chrome
flags attribute. chrome_toolbar 32 value for the chrome
flags attribute. chrome_locatio...
..._borders 2 value for the chrome
flags attribute. chrome_window_close 4 value for the chrome
flags attribute. chrome_window_resize 8 value for the chrome
flags attribute. chrome_menubar 16 value for the chrome
flags attribute. chrome_toolbar 32 value for the chrome
flags attribute. chrome_locationbar 64 value for the chrome
flags attribute. chrome_statusbar 128 value for the chrome
flags attribute. chrome_personal_toolbar 256 value for the chrome
flags attribute. chrome_scrollbars 512 value for the chrome
flags attribute. chrome_titlebar 1024 value for the chrome
flags attribute. chrome_extra 2048 value for the chrome
flags attribute. chrome_wi...
nsIWebProgress
ttributes attribute type description domwindow nsidomwindow the dom window associated with this nsiwebprogress instance. read only. exceptions thrown ns_error_failure indicates that there is no associated dom window. isloadingdocument prbool indicates whether or not a document is currently being loaded in the context of this nsiwebprogress instance. read only. constants the following
flags may be combined to form the anotifymask parameter for the addprogresslistener() method. they limit the set of events that are delivered to an nsiwebprogresslistener instance. these
flags indicate the state transistions to observe, corresponding to nsiwebprogresslistener.onstatechange(). constant value description notify_state_request 0x00000001 only receive the nsiwebprogresslistener.onstate...
... anotifymask parameter for the addprogresslistener() method. they limit the set of events that are delivered to an nsiwebprogresslistener instance. these
flags indicate the state transistions to observe, corresponding to nsiwebprogresslistener.onstatechange(). constant value description notify_state_request 0x00000001 only receive the nsiwebprogresslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_request. notify_state_document 0x00000002 only receive the nsiwebprogresslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_document. ...
...sslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_request. notify_state_document 0x00000002 only receive the nsiwebprogresslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_document. notify_state_network 0x00000004 only receive the nsiwebprogresslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_network. notify_state_window 0x00000008 only receive the nsiwebprogresslistener.onstatechange() event if the astate
flags parameter includes nsiwebprogresslistener::state_is_window. notify_state_all 0x0000000f receive all nsiwebprogresslistener.onstatechange() events. ...
... constant value description notify_progress 0x00000010 receive nsiwebprogresslistener.onprogresschange() events. notify_status 0x00000020 receive nsiwebprogresslistener.onstatuschange() events. ...
MailNews fakeserver
sts in mailnews/news, all files in mailnews/news/test/postings/auto-add are automatically added based on the newsgroups header. there are added in alphabetical order, which may help for purposes that rely on article key orders. the only generated header is lines. ...
...lnews/news, all files in mailnews/news/test/postings/auto-add are automatically added based on the newsgroups header. there are added in alphabetical order, which may help for purposes that rely on article key orders. the only generated header is lines. ...
... getarticle message id newsarticle object pretty self-explanatory newsarticle api name arguments returns notes [constructor] text (as a string) n/a initializes all fields headers (property...
...(string), integral key for group nothing adds the message to the specified group with the specified key getgroup group name group object group is a map key->article, with the additional properties:
flags, keys (array of keys), nextkey (next key to use for new articles) getgroupstats group name array of [size, min, max] the size is an estimate if nntp_real_length is not specified in the daemon
flags. getarticle message id newsarticle object pretty self-explanatory newsarticle api name arguments returns notes [constructor] text (as a string) n/a initializes all fields headers (property) map of header (lower-case) -> value body (property) text of body messageid (property) message id fulltext (property) full text as message without modification except added headers. ...
Add to iPhoto
probably have to declare this differently. a cfindex indicating the size of the array specified by the previous parameter. ...
... {'environment': ctypes.voidptr_t}, // cfdictionaryref {'argv': ctypes.voidptr_t}, // cfarrayref of args {'initialevent': ctypes.voidptr_t}]); // appleevent * most of these fields, we won't be using. we'll get a look at how we use this shortly. there are also a few constants used for the
flags field in the lsapplicationparameters structure: this.klsrolesnone = 1; this.klsrolesviewer = 2; this.klsroleseditor = 4; this.klsrolesall = 0xffffffff; implementing the extension now that the mac os x apis we'll be using have been declared, we can write the core of the extension itself. this is done in the iphoto object in the extension's code. hooking up to the context menu on startup, we ...
...it gets the filename of the file being download by slicing it off the end of the specified image url, then obtains the path to the temporary items folder and appends the im...
...it gets the filename of the file being download by slicing it off the end of the specified image url, then obtains the path to the temporary items folder and appends the image file's name to that path. then we call createunique() to ...
Regular expressions - JavaScript
eady part of your pattern you can add them using string.replace: function escaperegexp(string) { return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } the "g" after the regular expression is an option or flag that performs a global search, looking in the whole string and returning all matches. it is explained in detail below in advanced searching with
flags. why isn't this built into javascript? there is a proposal to add such a function to regexp, but it was rejected by tc39. using parentheses parentheses around any part of the regular expression pattern causes that part of the matched substring to be remembered. once remembered, the substring can be recalled for other use. see groups and ranges for more details. using regular expressions in ja...
...', index: 1, input: 'cdbbdbsbz'] index the 0-based index of the match in the input string. 1 input the original string. 'cdbbdbsbz' [0] the last matched characters. 'dbbd' myre lastindex the index at which to start the next match. (this property is set only if the regular expression uses the g option, described in advanced searching with
flags.) 5 source the text of the pattern. updated at the time that the regular expression is created, not executed. 'd(b+)d' as shown in the second form of this example, you can use a regular expression created with an object initializer without assigning it to a variable. if you do, however, every occurrence is a new regular expression. for this reason, if you use this form wi...
...lue of lastindex is ' + /d(b+)d/g.lastindex); // "the value of lastindex is 0" the occurrences of /d(b+)d/g in the two statements are different regular expression objects and hence have different values for their lastindex property. if you need to access the properties of a regular expression created with an object initializer, you should first assign it to a variable. advanced searching with
flags regular expressions have six optional
flags that allow for functionality like global and case insensitive searching. these
flags can be used separately or together in any order, and are included as part of the regular expression. regular expression
flags flag description corresponding property g global search. regexp.prototype.global i case-insensi...
...to match newline characters. regexp.prototype.dotall u "unicode"; treat a pattern as a sequence of unicode code points. regexp.prototype.unicode y perform a "sticky" search that matches starting at the current position in the target string. see sticky. regexp.prototype.sticky to include a flag with the regular expression, use this syntax: var re = /pattern/
flags; or var re = new regexp('pattern', '
flags'); note that the
flags are an integral part of a regular expression. they cannot be added or removed later. for example, re = /\w+\s/g creates a regular expression that looks for one or more characters followed by a space, and it looks for this combination throughout the string. var re = /\w+\s/g; var str = 'fee fi fo fum'; var myarray = str.match(...
Tamarin build documentation - Archive of obsolete content
e 3.81 or later. (gnu make 3.80 does not work. nor does any other brand of make.) with the right prerequisites, use these commands to build tamarin: $ hg clone http://hg.mozilla.org/tamarin-redux/ $ cd tamarin-redux $ mkdir objdir-release $ cd objdir-release $ python ../configure.py $ make ... $ shell/avmshell shell 1.0 build cyclone ... the avmplus executable is avmshell. ...
...commands to build tamarin: $ hg clone http://hg.mozilla.org/tamarin-redux/ $ cd tamarin-redux $ mkdir objdir-release $ cd objdir-release $ python ../configure.py $ make ... $ shell/avmshell shell 1.0 build cyclone ... the avmplus executable is avmshell. optional
flags: --enable-debugger - debugger build --enable-debug - debug build for verbose build of tamarin, you can pass cpp
flags to make. ...
... $ hg clone http://hg.mozilla.org/tamarin-redux/ $ cd tamarin-redux $ mkdir objdir-release $ cd objdir-release $ python ../configure.py $ make ... $ shell/avmshell shell 1.0 build cyclone ... the avmplus executable is avmshell. optional
flags: --enable-debugger - debugger build --enable-debug - debug build for verbose build of tamarin, you can pass cpp
flags to make. ...
confirm - Archive of obsolete content
it accepts any number of parameters up to 8. ...
...f this document for a safe way to implement a fallback. atext the string to be displayed in the confirmation dialog. this string is typically in the form of a prompt for the user (e.g., "are you sure you want to delete the selected file(s)?"). adialogtitle the string to be used as the dialog title. defaults to "confirm" (or the localized equivalent). abutton
flags a set of
flags defining the buttons that should appear in the dialog. the value is calculated by multiplying the corresponding button position constant with a button title constant for each button, then adding the results and any additional options (see other constants). button position constants button_pos_0: the first logical button button_pos_1: the second logi...
...n. button_pos_2_default: specifies button 2 as the default button. button_delay_enable: specifies that the buttons should only become clickable after a certain delay. note that this only applies to buttons 0 and 2, not button 1 (the "cancel" button). std_ok_cancel_buttons: use this instead of the constants above to have standard 'ok' and 'cancel' buttons. if you leave out abutton
flags, this is the default. std_yes_no_buttons: use this instead of the constants above to have standard 'yes' and 'no' buttons. warning: do not make any assumptions on the button placement - the underlying implementation can freely decide where each of the three buttons is placed. the following examples show the result of calling confirm() with three buttons 0='a', 1='b' and 2='...
Obsolete: XPCOM-based scripting for NPAPI plugins - Archive of obsolete content
db0778-2ee0-11d5-9cf8-0060b0fbd8ac)] interface nsitestplugin : nsisupports { void nativemethod(); }; example 2. scriptable instance class #include "nsitestplugin.h" #include "nsiclassinfo.h" // we must implement nsiclassinfo because it signals the // mozilla security manager to allow calls from javascript. ...
...vemethod(); }; example 2. scriptable instance class #include "nsitestplugin.h" #include "nsiclassinfo.h" // we must implement nsiclassinfo because it signals the // mozilla security manager to allow calls from javascript. ...
...nals the // mozilla security manager to allow calls from javascript. // helper class to implement all necessary nsiclassinfo method stubs // and to set
flags used by the security system class nsclassinfomixin : public nsiclassinfo { // these
flags are used by the dom and security systems to signal that // javascript callers are allowed to call this object's scritable methods. ns_imethod get
flags(pruint32 *a
flags) {*a
flags = nsiclassinfo::plugin_object | nsiclassinfo::dom_object; return ns_ok;} ns_imethod getimplementationlanguage(pruint32 *aimplementationlanguage) {*aimplementationlanguage = nsiprogramminglanguage::cplusplus; return ns_ok;} // the rest of the methods can safely return error codes... ns_imethod getinterfaces(pruint32 *count, nsiid * **array) {...
Building SpiderMonkey with UBSan
use the script to compile spidermonkey. this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and is more implementation-defined (slow on x86 / crash on arm) than undefined behavior float-cast...
...use the script to compile spidermonkey. this enables all the cheap undefined behavior checks other than: alignment, which hits known bugs in spidermonkey, and is more implementation-defined (slow on x86 / crash on arm) than undefined behavior float-cast-overflow, which hits know...
...when you hit a bug and want a stack trace, run under gdb with a breakpoint at the end of __ubsan::diag::~diag(). the stack trace should show a function such as __ubsan_handle_load_invalid_value or __ubsan_handle_type_mismatch being called by the buggy c++ code. (for automated testing outside of gdb, yo...
PR_Open
opens a file for reading, writing, or both. also used to create a file. syntax #include <prio.h> prfiledesc* pr_open( const char *name, printn
flags, printn mode); parameters the function has the following parameters: name the pathname of the file to be opened.
flags the file status
flags define how the file is accessed. it is a bitwise or of the following bit
flags. in most cases, only one of the first three
flags may be used. if the
flags parameter does not include any of the first three
flags (pr_rdonly, pr_wronly, or pr_rdwr), the open file can't be read or written, which is not useful. note: the constants pr_rdwr and friends are not in any interface (bug 433295). thus they cannot be used in javascript, you have to use the octal constants (see file i/o snippets). ...
... pr_sync 0x40 if set, each write will wait for both the file data and file status to be physically updated. pr_excl 0x80 with pr_create_file, if the file does not exist, the file is created. if the file already exists, no action and null is returned. mode when pr_create_file flag is set and the file is created, these
flags define the access permission bits of the newly created file. this feature is currently only applicable on unix platforms. it is ignored by any other platform but it may apply to other platforms in the future. possible values of the mode parameter are listed in the table below. name value description pr_irwxu 0700 read, write, execute/search by owner. ...
...s the function returns one of the following values: if the file is successfully opened, a pointer to a dynamically allocated prfiledesc for the newly opened file. the prfiledesc should be freed by calling pr_close. if the file was not opened successfully, a null pointer. description pr_open creates a file descriptor (prfiledesc) for the file with the pathname name and sets the file status
flags of the file descriptor according to the value of
flags. if a new file is created as a result of the pr_open call, its file mode bits are set according to the mode parameter. ...
PR_Poll
ve events. the value 0 indicates the function timed out. the value -1 indicates the function failed. the reason for the failure can be obtained by calling pr_geterror. description this function returns as soon as i/o is ready on one or more of the underlying socket objects. a count of the number of ready descriptors is returned unless a timeout occurs, in which case zero is returned. the in_
flags field of the prpolldesc data structure should be set to the i/o events (readable, writable, exception, or some combination) that the caller is interested in. on successful return, the out_
flags field of the prpolldesc data structure is set to indicate what kind of i/o is ready on the respective descriptor. pr_poll uses the out_
flags fields as scratch variables during the call. if pr_poll returns ...
...olldesc data structure should be set to the i/o events (readable, writable, exception, or some combination) that the caller is interested in. on successful return, the out_
flags field of the prpolldesc data structure is set to indicate what kind of i/o is ready on the respective descriptor. pr_poll uses the out_
flags fields as scratch variables during the call. if pr_poll returns 0 or -1, the out_
flags fields do not contain meaningful values and must not be used. the prpolldesc structure is defined as follows: struct prpolldesc { prfiledesc* fd; print16 in_
flags; print16 out_
flags; }; typedef struct prpolldesc prpolldesc; the structure has the following fields: fd a pointer to a prfiledesc object representing a socket or a pollable event. this field can be set to null to indicate...
... to indicate to pr_poll that this prfiledesc object should be ignored. on unix, the fd field can be set to a pointer to any prfiledesc object, including one representing a file or a pipe. cross-platform applications should only set the fd field to a pointer to a prfiledesc object representing a socket or a pollable event because on windows the select function can only be used with sockets. in_
flags a bitwise or of the following bit
flags: pr_poll_read: fd is readable. pr_poll_write: fd is writable. pr_poll_except: fd has an exception condition. out_
flags a bitwise or of the following bit
flags: pr_poll_read pr_poll_write pr_poll_except pr_poll_err: fd has an error. pr_poll_nval: fd is bad. note that the pr_poll_err and pr_poll_nval
flags are used only in out_
flags. t...
FC_GetInfo
al information about the pkcs #11 library. on return, the ck_info structure that pinfo points to has the following information: cryptokiversion: pkcs #11 interface version number implemented by the pkcs #11 library. the version is 2.20 (major=0x02, minor=0x14). manufacturerid: the pkcs #11 library manufacturer, "mozilla foundation", padded with spaces to 32 characters and not null-terminated.
flags: should be 0. librarydescription: description of the library, "nss internal crypto services", padded with spaces to 32 characters and not null-terminated. libraryversion: pkcs #11 library version number, for example, 3.11 (major=0x03, minor=0x0b). a user may call fc_getinfo without logging into the token (to assume the nss user role). return value fc_getinfo always returns ckr_ok. fc_geti...
...ctionlist); assert(crv == ckr_ok); ... ...
...= ckr_ok); ... ...
FC_WaitForSlotEvent
preserved. description this function is not supported by the nss cryptographic module. ...
...preserved. description this function is not supported by the nss cryptographic module. ...
...preserved. description this function is not supported by the nss cryptographic module. ...
NSS_Initialize
name nss_initialize - initialize nss. syntax secstatus nss_initialize(const char *configdir, const char *certprefix, const char *keyprefix, const char *secmodname, pruint32
flags); parameters nss_initialize has five parameters: configdir [in] the directory where the certificate, key, and module databases live. to-do: document the "sql:" prefix. certprefix [in] prefix added to the beginning of the certificate database, for example, "https-server1-". keyprefix [in] prefix added to the beginning of the key database, for example, "https-server1-". secmodname [in] name of the security module database, usually "secmod.db".
flags [in] bit
flags that specify how nss should be initialized. desc...
...nss_init_nocertdb - don't open the cert db and key db's, just initialize the volatile certdb. ...
...nss_init_nocertdb - don't open the cert db and key db's, just initialize the volatile certdb. nss_init_nomoddb - don't open the security module db, just initialize the pkcs #11 module. nss_init_forceopen - continue to force initializations even if the databases cannot be opened. ...
NSS tools : vfychain
u usage 0=ssl client, 1=ssl server, 2=ssl stepup, 3=ssl ca, 4=email signer, 5=email recipient, 6=object signer, 9=protectedobjectsigner, 10=ocsp responder, 11=any ca -v verbose mode. prints root cert subject(double the argument for whole root cert info) -w password database password -w pwfile password file revocation options for pkix api (invoked with -pp options) is a collection of the following
flags: [-g type [-h
flags] [-m type [-s
flags]] ...] ... where: -g test-type sets status checking test type. possible values are "leaf" or "chain" -g test type sets status checking test type. possible values are "leaf" or "chain". -h test
flags sets revocation
flags for the test type it follows. possible
flags: "testlocalinfofirst" and "requirefreshinfo". -m method type sets method type for the test ty...
...possible types are "donotuse", "forbidfetching", "ignoredefaultsrc", "requireinfo" and "failifnoinfo". ...
...possible types are "donotuse", "forbidfetching", "ignoredefaultsrc", "requireinfo" and "failifnoinfo". ...
gtstd.html
-v -d client_db -u c -n "joe client" certutil: certificate is valid building nss programs on unix, use the gnu utility gmake to run the makefile. on windows nt, use the nmake utility that comes with visual c++. ...
... -u c -n "joe client" certutil: certificate is valid building nss programs on unix, use the gnu utility gmake to run the makefile. on windows nt, use the nmake utility that comes with visual c++. ...
...ows nt, use the nmake utility that comes with visual c++. if you create your own makefiles, be sure to include the libraries in the same order that they are listed in the sample makefiles. ...
JSAPI User Guide
and js_destroycontext. for maximum ecmascript standard compliance, applications should also use js_setoptions to enable jsoption_varobjfix. to get the latest javascript language features, applications may use js_setversion. error reporting is also per-context and is enabled using js_seterrorreporter. the global object: to create this object, you first need a jsclass with the jsclass_global_
flags option. the example below defines a very basic jsclass (named global_class) with no methods or properties of its own. use js_newglobalobject to create a global object. use js_initstandardclasses to populate it with the standard javascript globals. this may seem like a lot of pieces for a simple application. it amounts to about 80 lines of code, as shown below. but the jsapi is designed to sca...
...s a fine-grained api, supporting many different combinations of the parts, and giving applications precise control over how spidermonkey behaves. here is the boilerplate code necessary for a minimal jsapi application. it contains everything described above. #include "jsapi.h" using namespace js; // the class of the global object. static jsclass globalclass = { "global", jsclass_global_
flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, nullptr, nullptr, nullptr, nullptr, js_globalobjecttracehook }; // the error reporter callback. void reporterror(jscontext *cx, const char *message, jserrorreport *report) { fprintf(stderr, "%s:%u:%s\n", report->f...
...function unicode data js_getstringbytes obsolete since javascript 1.8.5 js_getstringchars js_newstring js_newucstring js_newstringcopyn js_newucstringcopyn js_newstringcopyz js_newucstringcopyz js_internstring js_internucstring, js_internucstringn js_reporterrornumber js_reporterrornumberuc js_reporterror
flagsandnumber js_reporterror
flagsandnumberuc unicode property names js_defineproperty js_defineucproperty js_definepropertywithtinyid js_defineucpropertywithtinyid js_definefunction js_defineucfunction js_hasproperty js_hasucproperty js_lookupproperty js_lookupucproperty js_getproperty js_getucproperty js_...
JS_NewRegExpObject
create a new regexp object. syntax jsobject * js_newregexpobject(jscontext *cx, js::handleobject obj, const char *bytes, size_t length, unsigned
flags); jsobject * js_newucregexpobject(jscontext *cx, js::handleobject obj, const char16_t *chars, size_t length, unsigned
flags); jsobject * js_newregexpobjectnostatics(jscontext *cx, char *bytes, size_t length, unsigned
flags); jsobject * js_newucregexpobjectnostatics(jscontext *cx, char16_t *chars, size_t length, unsigned
flags); name type description cx jscontext * the context in which to create the new object. requires request. in a js_threadsafe build, the caller mu...
...ch to create the new object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj js::handleobject a pointer to a global object. bytes or chars const char * or const char16_t * a pointer to the string that contains a regular expression. length size_t the length of bytes or chars, in characters.
flags unsigned regular expression
flags. see below.
flags name description regexp constructor flag jsreg_fold fold uppercase to lowercase. i jsreg_glob global execution, creates array of matches. g jsreg_multiline treat ^ and $ as begin and end of line. m jsreg_sticky only match starting at lastindex. y desc...
...cription regexp constructor flag jsreg_fold fold uppercase to lowercase. i jsreg_glob global execution, creates array of matches. g jsreg_multiline treat ^ and $ as begin and end of line. m jsreg_sticky only match starting at lastindex. y description js_newregexpobject and js_newucregexpobject create a new regexp instance. the
flags from the built-in regexp constructor properties ignorecase, global, multiline, and sticky are or'd in with the provided
flags parameter. js_newregexpobjectnostatics and js_newucregexpobjectnostatics create a new regexp instance. they do not or in any regexp constructor properties. see also mxr id search for js_newregexpobject mxr id search for js_newucregexpobject mxr id search for js_ne...
Setting up the Gecko SDK
isting of the commands that appear in this listing, see the make manual. sample makefile for the gecko sdk module = mozshim # change this to point at your gecko sdk directory. gecko_sdk_path ?= $(home)/tmp/xr xpidl ?= $(gecko_sdk_path)/bin/xpidl cxx ?= c++ xpidlsrcs = \ interfacea.idl \ interfaceb.idl \ $(null) cppsrcs = \ sourcea.cpp \ sourceb.cpp \ $(null) cpp
flags += -fno-rtti \ -fno-exceptions \ -fshort-wchar \ -fpic \ $(null) # gcc only define which allows us to not have to #include mozilla-config # in every .cpp file. if your not using gcc remove this line and add # #include "mozilla-config.h" to each of your .cpp files. gecko_config_include = -include mozilla-config.h gecko_defines = -dmozilla_strict_api...
... = -i$(gecko_sdk_path) \ -i$(gecko_sdk_path)/idl \ -i$(gecko_sdk_path)/include \ -i$(gecko_sdk_path)/xpcom/include \ -i$(gecko_sdk_path)/nspr/include \ -i$(gecko_sdk_path)/string/include \ -i$(gecko_sdk_path)/embedstring/include gecko_ld
flags = -l$(gecko_sdk_path)/bin \ -l$(gecko_sdk_path)/lib \ -lxpcomglue_s \ -lnspr4 \ -lplds4 \ -lxul \ -shared \ $(null) %.h: %.idl $(xpidl) -m header $(gecko_includes) $< %.xpt: %.idl $(xpidl) -m typelib $(gecko_includes) $< %.o: %.cpp makefile $(cxx) -c $(cpp
flags) $(cxx
flags) $(gecko_config_include) $(gecko_defines) $(gecko_includes) $< $(mo...
...hared \ $(null) %.h: %.idl $(xpidl) -m header $(gecko_includes) $< %.xpt: %.idl $(xpidl) -m typelib $(gecko_includes) $< %.o: %.cpp makefile $(cxx) -c $(cpp
flags) $(cxx
flags) $(gecko_config_include) $(gecko_defines) $(gecko_includes) $< $(module).so: $(xpidlsrcs:%.idl=%.h) $(xpidlsrcs:%.idl=%.xpt) $(cppsrcs:%.cpp=%.o) $(cxx) -o $@ -wl,-soname=$(module).so $(cppsrcs:%.cpp=%.o) $(gecko_ld
flags) chmod +x $@ build: $(module).so clean: rm $(module).so « previousnext » copyright (c) 2003 by doug turner and ian oeschger. this material may be distributed only subject to the terms and conditions set forth in the open publication license, v1.02 or later. distribution of substantively modified versions of this document is prohibited without the explicit permission of the copyrig...
imgILoader
/image/loader;1 as a service: var imgiloader = components.classes["@mozilla.org/image/loader;1"] .getservice(components.interfaces.imgiloader); method overview imgirequest loadimage(in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsload
flags aload
flags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy); imgirequest loadimagewithchannel(in nsichannel achannel, in imgidecoderobserver aobserver, in nsisupports cx, out nsistreamlistener alistener); boolean supportimagewithmimetype(in string mimetype); constants constant value description load_cors_anonymous 1 << 16 load_cors_use_credentia...
...nts constant value description load_cors_anonymous 1 << 16 load_cors_use_credentials 1 << 17 methods loadimage() start the load and decode of an image. ...
...tant value description load_cors_anonymous 1 << 16 load_cors_use_credentials 1 << 17 methods loadimage() start the load and decode of an image. imgirequest loadimage( in nsiuri auri, in nsiuri ainitialdocumenturl, in nsiuri areferreruri, in nsiprincipal aloadingprincipal, in nsiloadgroup aloadgroup, in imgidecoderobserver aobserver, in nsisupports acx, in nsload
flags aload
flags, in nsisupports cachekey, in imgirequest arequest, in nsichannelpolicy channelpolicy ); parameters auri the uri to load. ainitialdocumenturl areferreruri the 'referring' uri. aloadingprincipal the principal of the loading document. aloadgroup loadgroup to put the image load into. aobserver the observer (may be null) acx some random data. aload
flags load
flags for the request. cachekey ...
nsIChannelEventSink
quest. note: prior to gecko 2.0, redirect handling was synchronous, using the onchannelredirect() method. starting in gecko 2.0, that method no longer exists, and instead the asynconchannelredirect() method is called; this uses a callback to handle redirects asynchronously. method overview void asynconchannelredirect(in nsichannel oldchannel, in nsichannel newchannel, in unsigned long
flags, in nsiasyncverifyredirectcallback callback); void onchannelredirect(in nsichannel oldchannel, in nsichannel newchannel, in unsigned long
flags); obsolete since gecko 2.0 constants constant value description redirect_temporary 1 << 0 this is a temporary redirect. new requests for this resource should continue to use the uri of the old channel. ...
...back can be done from within asynconchannelredirect() (effectively making the call synchronous) or at some point later (making the call asynchronous). if the return value indicates that an error occurred, in which case an exception is thrown, the redirect is vetoed and no callback must be done. void asynconchannelredirect( in nsichannel oldchannel, in nsichannel newchannel, in unsigned long
flags, in nsiasyncverifyredirectcallback callback ); parameters oldchannel the channel that's being redirected. newchannel the new channel. this channel is not opened yet.
flags flags indicating the type of redirect. a bitmask consisting of
flags from above. one of redirect_temporary and redirect_permanent will always be set. callback object to inform about the async...
...will be canceled, and no network requests will occur for the new channel. the redirect will be canceled. onchannelredirect() obsolete since gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) called when a redirect occurs. this may happen due to an http 3xx status code. void onchannelredirect( in nsichannel oldchannel, in nsichannel newchannel, in unsigned long
flags ); parameters oldchannel the channel that's being redirected. newchannel the new channel. this channel is not opened yet.
flags flags indicating the type of redirect. a bitmask consisting of
flags from above. one of redirect_temporary and redirect_permanent will always be set. see also nsichannel nsihttpchannel ...
nsIConsoleService
ror and dump(). logging a message with additional information to include other information an nsiconsolemessage object must be used. in this example nsiscripterror, which implements nsiconsolemessage, is used to include information about the source file and line number of the error. ...
...you must provide this. asourcename — the url for a file associated with an error. this will be a hyperlink in the error console, so you'd better use real url. you may pass null if it's not applicable. asourceline — the line #alinenumber from asourcename file. you are responsible for providing ...
...you may pass null if it's not applicable. asourceline — the line #alinenumber from asourcename file. you are responsible for providing this line. you may pass null if you are lazy; this will prevent the source line showing in the error console. alinenumber and acolumnnumber — specify the exact location of an error. acolumnnumber is used to draw the arrow pointing to the problem character. a
flags — one of
flags declared in nsiscripterror. at the time of writing, possible values are: nsiscripterror.errorflag = 0 nsiscripterror.warningflag = 1 nsiscripterror.exceptionflag = 2 and nsiscripterror.strictflag = 4. acategory — a string indicating what kind of code caused the error message. there are quite a few category strings and they do not currently seem to be listed...
nsIDownloadProgressListener
method...
...el that changed state. this parameter will not be null. astate the new state of the download. see nsidownloadmanager.constants for a list of possible values. adownload the download whose security level is changing. onstatechange() called when the state of a particular download changes. void onstatechange( in nsiwebprogress awebprogress, in nsirequest arequest, in unsigned long astate
flags, in nsresult astatus, in nsidownload adownload ); parameters awebprogress the nsiwebprogress instance used by the download manager to monitor downloads. arequest the nsichannel that changed state. this parameter will not be null. astate
flags flags indicating the download's new state. this value is a combination of one of the nsiwebprogresslistener.state_transition_
flags. astatus t...
...ibly on the screen. adownload the download whose status changed. example var dm = components.classes["@mozilla.org/download-manager;1"] .getservice(components.interfaces.nsidownloadmanager); dm.addlistener({ onsecuritychange : function(prog, req, state, dl) { }, onprogresschange : function(prog, req, prog, progmax, tprog, tprogmax, dl) { }, onstatechange : function(prog, req,
flags, status, dl) { }, ondownloadstatechange : function(state, dl) { } }); even if you do not want to use some of the listeners, you must include all of them. an exception will be thrown if one of them is missing. rather, only fill in the code for the ones you need, and leave the others blank as shown. see also nsidownloadmanager nsidownload nsiwebprogresslistener ...
nsIFileOutputStream
netwerk/base/public/nsifilestreams.idlscriptable this interface is an output stream that lets you stream to a file. inherits from: nsioutputstream last changed in gecko 1.7 method overview void init(in nsifile file, in long io
flags, in long perm, in long behavior
flags); constants behavior flag constants constant value description defer_open 1<<0 see the same constant in nsifileinputstream. the deferred open will be performed when one of the following is called: seek() tell() write() flush() defer_open is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well. ...
...le happens there as well. note: using this flag results in the file not being opened during the call to init(). this means that any errors that might happen when this flag is not set would happen during the first write, and if the file is to be created, it will not appear on the disk until the first write. methods init() void init( in nsifile file, in long io
flags, in long perm, in long behavior
flags ); parameters file file to write to (must qi to nsilocalfile) io
flags file open
flags listed are listed in the pr_open() documentation. use -1 to open the file in default mode (pr_wronly | pr_create_file | pr_truncate). perm file mode bits are described in the pr_open documentation. if set to -1 the default permi...
...; parameters file file to write to (must qi to nsilocalfile) io
flags file open
flags listed are listed in the pr_open() documentation. use -1 to open the file in default mode (pr_wronly | pr_create_file | pr_truncate). perm file mode bits are described in the pr_open documentation. if set to -1 the default permissions (0664) will be used. behavior
flags flags specifying various behaviors of the class; see behavior flag constants above. see also nsifileinputstream ...
nsIFileStreams
the nsifilestreams interface is an input stream that allows you to read from a file. netwerk/base/public/nsifilestreams.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview void init(in nsifile file, in long io
flags, in long perm, in long behavior
flags); constants constants value description delete_on_close 1<<1 if this is set, the file will be deleted by the time the stream is closed. it may be removed before the stream is closed if it is possible to delete it and still read from it. if open_on_read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again. close_on_eof 1<<2 if this is set, the file will close automatically when the ...
...close_on_eof 1<<2 if this is set, the file will close automatically when the end of the file is reached. reopen_on_rewind 1<<3 if this is set, the file will be reopened whenever seek(0) occurs. if the file is already open and the seek occurs, it will happen naturally. ...
...will close automatically when the end of the file is reached. reopen_on_rewind 1<<3 if this is set, the file will be reopened whenever seek(0) occurs. if the file is already open and the seek occurs, it will happen naturally. (the file will only be reopened if it is closed for some reason.) methods init() void init( in nsifile file, in long io
flags, in long perm, in long behavior
flags ); parameters file file to read from (must qi to nsilocalfile). io
flags file open
flags listed in prio.h (see pr_open documentation) or -1 to open the file in default mode (pr_rdonly). perm file mode bits listed in prio.h or -1 to use the default value (0). behavior
flags flags specifying various behaviors of the class (see enumerations in the class). see also nsifileoutputstream ...
nsILocalFile
read only. followlinks prbool dete...
... while ((n = fread(buf, sizeof(buf), 1, fp)) > 0) { // do something with n-byte block of data from file... } if (ferror(fp) != 0) rv = ns_error_unexpected; fclose(fp); return rv; } native code only! opennsprfiledesc returns the result of pr_open() on the file. the caller is responsible for calling pr_close() on the result. ...
... fp)) > 0) { // do something with n-byte block of data from file... } if (ferror(fp) != 0) rv = ns_error_unexpected; fclose(fp); return rv; } native code only! opennsprfiledesc returns the result of pr_open() on the file. the caller is responsible for calling pr_close() on the result. prfiledescstar opennsprfiledesc( in long
flags, in long mode ); parameters
flags the pr_open()
flags from nsprpub/pr/include/prio.h, plus optionally delete_on_close. delete_on_close may be implemented by removing the file (by path name) immediately after opening it, so beware of possible races; the file should be exclusively owned by this process. a bitwise combination of the following open
flags: pr_rdonly open for reading only. pr_wronly open for writing only. ...
nsIScriptError2
obsolete gecko 12.0 inherits from: nsiscripterror last changed in gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) in gecko 12.0 this interface was merged into the nsiscripterror interface. method overview void initwithwindowid(in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32
flags, in string category, in unsigned long long innerwindowid); attributes attribute type description innerwindowid unsigned long long the inner window id with which the error is associated. this is zero if the error was initialized by calling nsiscripterror.init() instead of initwithwindowid(). read only. outerwindowid unsigned long long the windo...
...siscripterror.init() instead of initwithwindowid(). read only. timestamp long long elapsed time, in milliseconds, from a platform-specific zero time to the time the message was created. read only. methods initwithwindowid() void init( in wstring message, in wstring sourcename, in wstring sourceline, in pruint32 linenumber, in pruint32 columnnumber, in pruint32
flags, in string category, in unsigned long long innerwindowid ); parameters message the text of the message to add to the log. sourcename the url of the file in which the error occurred. this will be a hyperlink in the javascript console, so you should use a real url. you may pass null if it's not applicable. sourceline the line number in the source file on which the error occurred. you ...
...ne the line number in the source file on which the error occurred. you are responsible for providing that line. you may pass null if you are lazy; that will prevent showing the source line in javascript console. linenumber the number of the line where the error occurred. columnnumber the column number where the error occurred. this is used to draw an arrow pointing to the problem character.
flags one of the script error flag constants. category a string indicating what kind of code caused the message. there are quite a few category strings and they don't seem to be listed in a single place. see categories for a partial list. innerwindowid the id of the inner window associated with the error. prior to gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), this was the outer windo...
nsITransport
interface). a transport can have an event sink associated with it. the event sink receives transport-specific events as the transfer is occurring. for a socket transport, these events can include status about the connection. see nsisockettransport for more info about socket transport specifics. method overview void close(in nsresult areason); nsiinputstream openinputstream(in unsigned long a
flags, in unsigned long asegmentsize, in unsigned long asegmentcount); nsioutputstream openoutputstream(in unsigned long a
flags, in unsigned long asegmentsize, in unsigned long asegmentcount); void seteventsink(in nsitransporteventsink asink, in nsieventtarget aeventtarget); constants open
flags. constant value description open_blocking 1<<0 open
flags. open_unbuffered 1<<1 generic n...
...codes (for example, see nsisockettransport). constant value description status_reading 0x804b0008 status_writing 0x804b0009 methods close() close the transport and any open streams. void close( in nsresult areason ); parameters areason the reason for closing the stream. openinputstream() open an input stream on this transport. nsiinputstream openinputstream( in unsigned long a
flags, in unsigned long asegmentsize, in unsigned long asegmentcount ); parameters a
flags optional transport specific
flags.
flags have the following meaning: open_blocking if specified, then the resulting stream will have blocking stream semantics. this means that if the stream has no data and is not closed, then reading from it will block the calling thread until at least one byte is available ...
...ze if open_unbuffered is not set, then this parameter specifies the size of each buffer segment (pass 0 to use default value). asegmentcount if open_unbuffered is not set, then this parameter specifies the maximum number of buffer segments (pass 0 to use default value). return value openoutputstream() open an output stream on this transport. nsioutputstream openoutputstream( in unsigned long a
flags, in unsigned long asegmentsize, in unsigned long asegmentcount ); parameters a
flags optional transport specific
flags.
flags have the following meaning: open_blocking if specified, then the resulting stream will have blocking stream semantics. this means that if the stream is full and is not closed, then writing to it will block the calling thread until all of the data can be written or unt...
NS_CStringContainerInit2
« xpcom api reference summary the ns_cstringcontainerinit2 function initializes a nscstringcontainer instance for use as a nsacstring. #include "nsstringapi.h" nsresult ns_cstringcontainerinit2( nscstringcontainer& acontainer, const char* adata = nsnull, pruint32 adatalength = pr_uint32_max, pruint32 a
flags = 0 ); parameters acontainer [in] the nscstringcontainer instance to initialize. ...
...r instance to initialize. adata [in] an array of characters used to initialize the string object. this parameter may be null. adatalength [in] an optional parameter that specifies the length of the array pointed to by adata. pass pr_uint32_max to indicate that adata's length may be determined by scanning the string for a terminating null. if adata is null, then this parameter is ignored. a
flags [in] a bit-field that modifies how the string object is initialized. if this value is zero, then the array referenced by adata (if any) will be copied. flag values are defined below. flag values the a
flags parameter is a bit-wise combination of the following values: ns_cstring_container_init_depend data passed into ns_cstringcontainerinit2 is not copied. instead, the string references the ...
... care of cleaning up the string object when it goes out of scope. when ns_cstringcontainerinit2 is told to copy adata, the copy it creates is null-terminated. this is significant as it allows the programmer to be certain that ns_cstringgetdata will return a null-terminated character array. the ns_cstringcontainerinit function is equivalent to calling ns_cstringcontainerinit with adata=nsnull and a
flags=0. history this function was finalized for mozilla 1.8. see bug 264274 for details. see also ns_cstringcontainerinit, ns_cstringcontainerfinish ...
Using COM from js-ctypes
/* start inherit from ispeventsource */ void* setinterest; void* getevents; void* getinfo; /* end inherit from ispeventsource */ /* start ispvoice */ void* setoutput; void* getoutputobjecttoken; void* getoutputstream; void* pause; void* resume; void* setvoice; void* getvoice; hresult (__stdcall *speak)(struct myispvoice*, lpcwstr pwcs, dword dw
flags, ulong* pulstreamnumber); void* speakstream; void* getstatus; void* skip; void* setpriority; void* getpriority; void* setalertboundary; void* getalertboundary; void* setrate; void* getrate; void* setvolume; void* getvolume; void* waituntildone; void* setsyncspeaktimeout; void* getsyncspeaktimeout; void* spe...
...s.voidptr_t }, { 'getoutputstream': ctypes.voidptr_t }, { 'pause': ctypes.voidptr_t }, { 'resume': ctypes.voidptr_t }, { 'setvoice': ctypes.voidptr_t }, { 'getvoice': ctypes.voidptr_t }, { 'speak': ctypes.functiontype(callback_abi, hresult, // return [ ispvoice.ptr, lpcwstr, // *pwcs dword, // dw
flags ulong // *pulstreamnumber ]).ptr }, { 'speakstream': ctypes.voidptr_t }, { 'getstatus': ctypes.voidptr_t }, { 'skip': ctypes.voidptr_t }, { 'setpriority': ctypes.voidptr_t }, { 'getpriority': ctypes.voidptr_t }, { 'setalertboundary': ctypes.voidptr_t }, { 'getalertboundary': ctypes.voidptr_t }, { 'setrate': ctypes.voidptr_t }, ...
...voiceptr = ispvoice.ptr(); primative_hr = cocreateinstance(clsid_spvoice.address(), null, clsctx_all, iid_ispvoice.address(), spvoiceptr.address()); checkhresult(primative_hr, "cocreateinstance"); spvoice = spvoiceptr.contents.lpvtbl.contents; let atext = 'hello firefox!'; let a
flags = spf_default; primative_hr = spvoice.speak(spvoiceptr, atext, a
flags, 0); checkhresult(primative_hr, "cocreateinstance"); } catch (ex) { console.error('ex occured:', ex); } finally { if (spvoice) { spvoice.release(spvoiceptr); } couninitialize(); } } main(); lib.close(); other examples shgetpropertystoreforwindow - thi...
DirectoryEntrySync - Web APIs
he getdirectory() method returns a directoryentrysync, which represents a file in the file system. the following creates a new directory called superseekrit in the root directory. var direntry = fs.root.getdirectory('superseekrit', {create: true}); method overview directoryreadersync createreader () raises (fileexception); fileentrysync getfile (in domstring path, in optional
flags options) raises (fileexception); directoryentrysync getdirectory (in domstring path, in optional
flags options) raises (fileexception); void removerecursively () raises (fileexception); methods createreader() creates a new directoryreadersync to read entries from this directory. directoryreadersync createreader ( ) raises (fileexception); returns directoryreadersy...
... codes: exception description not_found_err the directory does not exist. security_err the browser determined that it was not safe to look up the metadata. [ todo: explain why ] getfile() depending on how you've set the options parameter, the method either creates a file or looks up an existing file. void getfile ( in domstring path, in optional
flags options ) raises (fileexception); parameter path either an absolute path or a relative path from the directory to the file to be looked up or created. you cannot create a file whose immediate parent does not exist. create the parent directory first. options an object literal describing the behavior of the method. if the file does not exist, it is created. object literal condi...
...a. security_err the application does not have permission to access the element referred to by path. [ todo: explain why ] type_mismatch_err the path supplied exists, but it is not a directory. getdirectory() creates or looks up a directory. the method is similar to getfile() with directoryentrysync being passed. void getdirectory ( in domstring path, in optional
flags options ) raises (fileexception); parameter path either an absolute path or a relative path from the directory to the file to be looked up or created. you cannot create a file whose immediate parent does not exist. create the parent directory first. options an object literal describing the behavior of the method if the file does not exist. object literal condition result ...
FileSystemDirectoryEntry.getDirectory() - Web APIs
ntax filesystemdirectoryentry.getdirectory([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring representing an absolute path or a path relative to the directory on which the method is called, describing which directory entry to return. absolute paths may not be able to be used, for security reasons. options optional an object based on the filesystem
flags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists. these options are currently not useful in web contexts. successcallback optional a method to be called once the filesystemdirectoryentry has been created. the method receives a single parameter: the filesystemdirectoryentry object representing the directory...
...ory should be created but must not already exist, but the directory does in fact already exist. fileerror.security_err the request to access the directory was denied for security reasons. fileerror.type_mismatch_err the path specified is not a directory; it's probably a file, but might be an unsupported file descriptor such as a pipe; this depends on the user agent to some extent. filesystem
flags the options parameter is an object which is based on the filesystem
flags dictionary; it provides
flags which make it possible to adjust the behavior of the getdirectory() method. create optional if this property is true, and the requested file or directory doesn't exist, the user agent should create it. the default is false. the parent directory must already exist. exclusive optional if tr...
...e user agent should create it. the default is false. the parent directory must already exist. exclusive optional if true, and the create option is also true, the file must not exist prior to issuing the call. instead, it must be possible for it to be created newly at call time. the default is false. values and results the table below describes the result of each possible combination of these
flags depending on whether or not the target file or directory path already exists. option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called ...
FileSystemDirectoryEntry.getFile() - Web APIs
ned somewhere within the directory subtree rooted at the directory on which it's called. syntax filesystemdirectoryentry.getfile([path][, options][, successcallback][, errorcallback]); parameters path optional a usvstring specifying the path, relative to the directory on which the method is called, describing which file's entry to return. options optional an object based on the filesystem
flags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file already exists. these options are currently not useful in web contexts. successcallback optional a method to be called once the filesystemfileentry has been created. the method receives a single parameter: the filesystemfileentry object representing the file in question. ...
...that the file should be created but must not already exist, but the file does in fact already exist. fileerror.security_err the request to access the file was denied for security reasons. fileerror.type_mismatch_err the path specified is not a file; it's probably a directory, but might be an unsupported file descriptor such as a pipe; this depends on the user agent to some extent. filesystem
flags the options parameter is an object which is based on the filesystem
flags dictionary; it provides
flags which make it possible to adjust the behavior of the getfile() method. create optional if this property is true, and the requested file or directory doesn't exist, the user agent should create it. the default is false. the parent directory must already exist. exclusive optional if true, a...
...e user agent should create it. the default is false. the parent directory must already exist. exclusive optional if true, and the create option is also true, the file must not exist prior to issuing the call. instead, it must be possible for it to be created newly at call time. the default is false. values and results the table below describes the result of each possible combination of these
flags depending on whether or not the target file or directory path already exists. option values file/directory condition result create exclusive false n/a[1] path exists and matches the desired type (depending on whether the function called is getfile() or getdirectory() the successcallback is called with a filesystemfileentry if getfile() was called ...
Transcoding assets for Media Source Extensions - Web APIs
ain use the mp4info utility to list the atoms of an mp4. note: the fragmented version is slightly larger than the original, due to additional metadata spread throughout the file. this is usually a file size increase of 1 percent or less. ...
...r than the original, due to additional metadata spread throughout the file. this is usually a file size increase of 1 percent or less. ...
...s not already an mp4, ffmpeg can handle emitting a properly fragmented mp4 during the transcode process, with the -mov
flags frag_keyframe+empty_moov command line flag: $ ffmpeg -i trailer_1080p.mov -c:v copy -c:a copy -mov
flags frag_keyframe+empty_moov bunny_fragmented.mp4 if you already have an mp4, but it's not properly fragmented, you can again use ffmpeg: $ ffmpeg -i non_fragmented.mp4 -mov
flags frag_keyframe+empty_moov fragmented.mp4 in both cases, chrome may require an extra movie flag to be set: -mov
flags frag_keyframe+empty_moov+default_base_moof having a properly fragmented mp4 file is all you need to get started. if you wish to employ adaptive bitrate streaming, you'll have to create encodings at multiple resolutions. while mse is flexible enough to allow you to make your imp...
WebGL2RenderingContext.clientWaitSync() - Web APIs
may be gl.sync_flush_commands_bit. timeout a glint64 specifying a timeout (in nanoseconds) for which to wait for the sync object to become signaled. ...
...may be gl.sync_flush_commands_bit. timeout a glint64 specifying a timeout (in nanoseconds) for which to wait for the sync object to become signaled. ...
...may be gl.sync_flush_commands_bit. timeout a glint64 specifying a timeout (in nanoseconds) for which to wait for the sync object to become signaled. ...
WebGL2RenderingContext.fenceSync() - Web APIs
must be 0 (exists for extensions only). return value a webglsync object. examples gl must be a webgl2renderingcontext. ...
...must be 0 (exists for extensions only). return value a webglsync object. examples gl must be a webgl2renderingcontext. ...
...must be 0 (exists for extensions only). return value a webglsync object. examples gl must be a webgl2renderingcontext. webglsync objects are not available in webgl 1. ...
:is() (:matches(), :any()) - CSS: Cascading Style Sheets
ort 68notes disabled full support 68notes disabled notes combinators in the selector list argument may not match correctly (see bug 842157).disabled from version 68: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. no support 66 — 71notes alternate name disabled notes combinators in the selector list argument may not match correctly (see bug 842157).alternate name uses the non-standard name: :matches()disabled from version 66 until version 71 (exclusive): this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change pref...
... 66 — 71notes alternate name disabled notes combinators in the selector list argument may not match correctly (see bug 842157).alternate name uses the non-standard name: :matches()disabled from version 66 until version 71 (exclusive): this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. full support 12notes alternate name notes doesn't support combinators.alternate name uses the non-standard name: :-webkit-any()edge full support 79notes disabled full support 79notes disabled notes combinators in the selector list argument may not match correctl...
... 66 — 71notes alternate name disabled notes combinators in the selector list argument may not match correctly (see bug 842157).alternate name uses the non-standard name: :matches()disabled from version 66 until version 71 (exclusive): this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags. full support 18notes alternate name notes doesn't support combinators.alternate name uses the non-standard name: :-webkit-any()firefox android full support 4notes alternate name full support 4notes alternate name notes doesn't support combinators.notes see bug 9...
RegExp() constructor - JavaScript
roduction to regular expressions, read the regular expressions chapter in the javascript guide. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
...sions, read the regular expressions chapter in the javascript guide. the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. syntax literal, constructor, and factory notations are possible: /pattern/
flags new regexp(pattern[,
flags]) regexp(pattern[,
flags]) parameters pattern the text of the regular expression. as of es5, this can also be another regexp object or literal (for the two regexp constructor notations only). patterns may include special characters to match a wider range of values than would a literal string.
flags if specified,
flags is a string that contains the
flags to add. alternatively, if an ...
... pattern the text of the regular expression. as of es5, this can also be another regexp object or literal (for the two regexp constructor notations only). patterns may include special characters to match a wider range of values than would a literal string.
flags if specified,
flags is a string that contains the
flags to add. alternatively, if an object is supplied for the pattern, the
flags string will replace any of that object's
flags (and lastindex will be reset to 0) (as of es2015). if
flags is not specified and a regular expressions object is supplied, that object's
flags (and lastindex value) will be copied over.
flags may contain any combination of the following characters: g (global match) find all matches rather than stopping after the first match. i (ignore ca...
Downloading Files - Archive of obsolete content
persist = webbrowserpersist(); var targetfile = services.dirsvc.get("desk", ci.nsifile); targetfile.append("file.bin"); // obtain the privacy context of the browser window that the url // we are downloading comes from. if, and only if, the url is not // related to a window, null should be used instead. var privacy = privatebrowsingutils.privacycontextfromwindow(urlsourcewindow); persist.persist
flags = persist.persist_
flags_from_cache | persist.persist_
flags_replace_existing_files; persist.saveuri(uritosave, null, null, null, "", targetfile, privacy); if you don't need detailed progress information, you might be happier with nsidownloader. downloading binary files with a progress listener to download a binary file with custom progress listener: components.utils.impor...
...normally, nsiauthprompt expects a prompt to be displayed so the user can...
File I/O - Archive of obsolete content
channel.contenttype = "application/json"; netutil.asyncfetch(channel, function(inputstream, status) { ... }); writing to a file write a string this sample uses netutil.jsm and fileutils.jsm. components.utils.import("resource://gre/modules/netutil.jsm"); components.utils.import("resource://gre/modules/fileutils.jsm"); // file is nsifile, data is a string // you can also optionally pass a
flags parameter here. it defaults to // fileutils.mode_wronly | fileutils.mode_create | fileutils.mode_truncate; var ostream = fileutils.opensafefileoutputstream(file); var converter = components.classes["@mozilla.org/intl/scriptableunicodeconverter"]. createinstance(components.interfaces.nsiscriptableunicodeconverter); converter.charset = "utf-8"; var istream = converter.converttoinpu...
... ever be any non-ascii text in data you can // also call fostream.write(data, data.length) directly var converter = components.classes["@mozilla.org/intl/converter-output-stream;1"]. createinstance(components.interfaces.nsiconverteroutputstream); converter.init(fostream, "utf-8", 0, 0); converter.writestring(data); converter.close(); // this closes fostream note: the file status
flags used in the nsifileoutputstream.init() function are documented in pr_open. for more information refer directly to nsprpub/pr/include/prio.h writing a binary file for example, here we can write png data to a file. // pngbinary already exists var afile = components.classes["@mozilla.org/file/local;1"]. createinstance(components.interfaces.nsilocalfile); afile.initwithpath( "/tmp/myp...
Post data to window - Archive of obsolete content
this offers examples of sending post data to the server and displaying the server response. need more elaborate examples, examples of displaying the response in a new tab, in background tabs, and a link to using xmlhttprequest for post requests. preprocessing post data the apostdata argument of the (global) loaduri(), opendialog(), and (tab)browser.loaduriwith
flags() methods expects the post data in the form of an nsiinputstream (because they eventually call nsiwebnavigation.loaduri()) while post data can be created using nsimimeinputstream. most of the time, post data starts as a data string in the form of "name1=data1&name2=data2&...", so you must convert it before passing the data to one of the methods. here is an example: var datastring = "name1=data1&name2=data2"; // post method requ...
...ta(stringstream); // postdata is ready to be used as apostdata argument ... posting data to the current tab there is a convenience method in global scope (in firefox, chrome://browser/content/browser.js): loaduri(auri, areferrer, apostdata, aallowthirdpartyfixup); posting data to a new window window.opendialog('chrome://browser/content', '_blank', 'all,dialog=no', auri, a
flags, areferrer, apostdata); ...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
efname) text string getcharpref(prefname) setcharpref(prefname) using methods from xul elements xpcom gives you access to sophisticated functions in xul elements. for example, using the loaduri() method on the browser element introduced in chapter 3 can open a page specified using http_referer, as shown in listing 21; listing 22 shows how to open a page using the loaduriwith
flags() method, with data transmitted via the post method. listing 21: loading a page by setting a referrer var browser = document.getelementbyid('browser'); var ioservice = components.classes['@mozilla.org/network/io-service;1'] .getservice(components.interfaces.nsiioservice); var referrer = ioservice.newuri('http://www.gihyo.co.jp/', null, null); browser.loaduri('http://www.gihyo.co...
...ntent = encodeuricomponent('password=foobar'); var referrer = null; var postdata = components.classes['@mozilla.org/io/string-input-stream;1'] .createinstance(components.interfaces.nsistringinputstream); content = 'content-type: application/x-www-form-urlencoded\n'+ 'content-length: '+content.length+'\n\n'+ content; postdata.setdata(content, content.length); var
flags = components.interfaces.nsiwebnavigation.load_
flags_none; browser.loaduriwith
flags('http://piro.sakura.ne.jp/',
flags, referrer, null, postdata); « previousnext » ...
Using microformats - Archive of obsolete content
atch specified criteria. var nummicroformats = microformats.count(name, rootelement, options); parameters name the name of the microformat to count. rootelement required. the dom element at which to begin the search. if you want to search the entire document, specify content.document. options optional. if provided, this is a javascript object that contains zero or more of the following
flags: recurseexternalframes if true, child frames are included in the search. the default is true. showhidden if true, hidden microformats are added; otherwise they're left out. the default is false. debug specify true if debug mode is in use; otherwise, specify false. the default is false. return value an integer value indicating the number of microformats that match the specified crite...
...ed criteria. var microformatsarray = microformats.get(name, rootelement, options, targetarray); parameters name the name of the microformat to find. rootelement required. the dom element at which to begin the search. if you want to search the entire document, specify content.document. options optional. if provided, this is a javascript object that contains zero or more of the following
flags: recurseexternalframes if true, child frames that reference external content are included in the search. the default is true. showhidden if true, hidden microformats are added; otherwise they're left out. the default is false. debug specify true if debug mode is in use; otherwise, specify false. the default is false. targetarray optional. if provided, this is an array of microform...
Venkman Introduction - Archive of obsolete content
ys values for the current function. the scope object holds all arguments and local variables, and the this object holds the value of the this keyword. e enumerable property r read only property p permanent (cannot be deleted) a alias to another property a argument to a function v declared with var figure 8. property
flags properties of both scope and this objects are listed alphabetically, grouped by data type. figure 9 shows which icons represent which data types. properties which are of the type object are displayed with the name of their constructor function in curly braces as their value. you can locate the source code of the constructor by selecting "find constructor" from the property's context menu. you ...
...r as the value of the property. icon data type icon data type void (undefined) value null value boolean value string value integer value double value object value function value figure 9. type icons the column picker for this view (the box on the top right) can be used to display type and
flags columns. the type column contains a textual description of the type of the object.
flags lists one or more applicable
flags for this object.
flags are shown enumerated in figure 8. if an item visible in the local variables view is modified via the interactive session view the modification will be immediately reflected in the local variable view. at the time of this writing, the local variables ...
initInstall - Archive of obsolete content
initinstall initializes the installation of the specified software and version. method of install object syntax int initinstall ( string displayname, string package, installversion version, int
flags); int initinstall ( string displayname, string package, string version, int
flags); int initinstall ( string displayname, string package, string version); int initinstall ( string displayname, string package, installversion version); parameters the initinstall method has the following parameters: displayname a string that contains the name of the software being installed. the name of the software is displayed to the user. package the client version registry pathname for the software (for example: plugins/adobe/acroba...
...e machine, it is the location of information about the software inside the registry. this distinction is important when you add components with the addfile method. version an installversion object or a string representing the version of the package being installed. when version is a string it should be up to four integer values delimited by periods, such as "1.17.1999.1517".
flags an optional field; reserved for future use. pass 0 as the default value. returns an integer error code. for a list of possible values, see return codes. description the initinstall method initializes the installation of the specified software. you must call this method immediately after the constructor. it is an error to call any other install methods before calling initinstall. after ca...
Building Hierarchical Trees - Archive of obsolete content
ntainment attribute, it would be accepted as a container, and the user could open the row. when the user opens the row, the template will be re-examined for results using the photo as the starting point instead of the top level ref value. ...
...a two level tree with two columns. for an xml source, a container is a node in the xml document that has children. in this example, the two group elements are displayed at the first level. the individual people are displayed at the next level of the tree as the builder recurses. in this example, we only need to use one rule. ...
Features of a Window - Archive of obsolete content
resource is loaded into its browsing context.">window.open() function to open the second window. this function will return a reference to the newly opened window. you can use this reference to call functions of the other window. the open function takes three arguments. the first is the url of the file you wish to open. the second is an internal name of the window. the third is a list of display
flags. the flag 'chrome' is important to open the window as a chrome file. if you do not add the 'chrome' flag, the file will open up as the content in a browser window. for example: var mywin = window.open("chrome://findfile/content/findfile.xul", "findfile", "chrome"); specifying the width and height you should have noticed that whenever elements were added to a window, the window's width expande...
...heme or locale. note that you must specify both the width and the height. if you only specify one, the other will be set to 0. to have the window set its size automatically, leave both the width and height out. the width and height only specify the initial size of the window. the user may still resize the window to another size, assuming that the window is resizable. other window features the
flags below can be passed as part of the third argument to the window.open function. your operating system may not support all of them. you can also use any of the pre-existing
flags, which you should find in a javascript reference. you may disable a feature by setting it to 'no', for example 'dialog=no'. alwayslowered the window will always appear behind other windows. alwaysraised the window wi...
Trees and Templates - Archive of obsolete content
late with a tree uses very much the same syntax as with other elements. you need to add a datasources and a ref attribute to the tree element, which specify the datasource and root node to display. multiple rules can be used to indicate different content for different types of data. the following example uses the history datasource: <tree datasources="rdf:history" ref="nc:historybydate"
flags="dont-build-content"> as described in the previous section, the tree may use a tree builder for template generation instead of the normal content builder. this means that elements will not be created for every row in the tree, making it more efficient. the
flags attribute set to the value dont-build-content, as used in the example above, indicates that the tree builder should be used. if you lea...
...umn in the tree. the cells should have a label attribute to set the label for the cell. this would normally be set to an rdf property so that the label is pulled from the datasource. template-built tree example the following example demonstrates a template-built tree, in this case for the file system. ...
content - Archive of obsolete content
xul reference home [ examples | attributes | properties | methods | related ] Éste elemento debería pertenecer a query ("consulta"). la pregunta en una regla debería enlazar a sólo a un elemento del contenido. los contenidos deberían tener al atributo uri . Ésto se utiliza para vincular una variable a un nodo de contenido cuando se emparejan. cuando use un árbol con los atributos
flags ("banderas"), establezca dont-build-content, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. propiedades tag, uri ejemplos (no son necesarios) atributos inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextme...
...tent, ("no almacenar contenido"), use treeitem en su lugar. para más información, se encuentra disponible el tutorial xul. ...
iframe - Archive of obsolete content
type: one of the values belowset the background of an iframe as transparent.transparentthis results in the iframe's background being transparent. ...
...shell type: nsidocshell this read-only property contains the nsidocshell object for the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwith
flags and loaduriwith
flags. methods inherited methods addeventlistener(), appendchild(), blur, click, clonenode(), comparedocumentposition, dispatchevent(), docommand, focus, getattribute(), getattributenode(), getattributenodens(), getattributens(), getboundingclientrect(), getclientrects(), getelementsbyattribute, getelementsbyattributens, getelementsbyclassname(), getelementsbytagname(), gete...
Tamarin Tracing Build Documentation - Archive of obsolete content
d of make.) with the right prerequisites, use these commands to build tamarin tracing: $ hg clone http://hg.mozilla.org/tamarin-tracing $ cd tamarin-tracing $ mkdir objdir-debug $ cd objdir-debug $ python ../configure.py --enable-shell $ make ... $ shell/avmshell avmshell 1.0 build cyclone ... that's all. the avmplus executable is avmshell. ...
... prerequisites, use these commands to build tamarin tracing: $ hg clone http://hg.mozilla.org/tamarin-tracing $ cd tamarin-tracing $ mkdir objdir-debug $ cd objdir-debug $ python ../configure.py --enable-shell $ make ... $ shell/avmshell avmshell 1.0 build cyclone ... that's all. the avmplus executable is avmshell. for verbose build of tamarin, you can pass cpp
flags to make. ...
Configuring Build Options
cores to use when building. the option below is typically not needed. most modern systems have multiple cores or cpus, and they can be optionally used concurrently to make the build faster. the -j flag controls how many parallel builds will run concurrently. you will see (diminishing) returns up to a value approximately 1.5× to 2.0× the number of cores on your system. mk_add_options moz_make_
flags="-j4" if your machine is overheating, you might want to try a lower value, e.g. -j1. choose an application the --enable-application=application flag is used to select an application to build. firefox is the default. choose one of the following options to add to your mozconfig file: browser (firefox) ac_add_options --enable-application=browser note: this is the default mail...
...ect=browser ./mach build this will build only the browser. using multiple mozconfig files alternatively, you may want to create separate mozconfig files. as an example, the following steps can be used to build firefox and thunderbird. you should first create three mozconfig files. mozconfig-common: # add common options here, such as making an optimized release build mk_add_options moz_make_
flags="-j4" ac_add_options --enable-optimize --disable-debug mozconfig-firefox: # include the common mozconfig . ./mozconfig-common # build firefox mk_add_options moz_objdir=@topsrcdir@/obj-firefox ac_add_options --enable-application=browser mozconfig-thunderbird: # include the common mozconfig . ./mozconfig-common # build thunderbird mk_add_options moz_objdir=@topsrcdir@/obj-thunderbird ac_add...
Embedding Tips
embedders may wish to override some of the default service implementations with their own. for example, the default prompt service uses xul to render prompt dialogs and embedders may wish to render them in a way more appropriate for their application and platform.. how do i load a page? get thensiwebnavigation interface on your webbrowser and call the loaduri method with the appropriate uri and
flags. this interface also has methods for reloading, stopping a load and going back and forward in the history. how do i block a load? implement the nsiwebprogresslistener interface and register it with the appropriate web browser object via the nsiwebbrowser::addwebbrowserlistener() method. use the callbacks for after-the-fact cancellation. alternatively, implement a nsiuricontentlistener as descri...
...ng url and a string file path. in response it creates a persist object, creates a listener and starts the operation. as the operation progresses, methods on the listener such as onstatechange, onprogresschange etc. are called, allowing the embedder to know what is happening. when the operation is completed, the onstatechange will be notified by a combination of state_stop | state_is_network state
flags. you may also use the progress listener to query the request supplied in onstatechange for more information. for example, if you wanted to check the server response headers, you might check onstatechange for state_start | state_is_request
flags, and from the nsirequest argument qi fornsihttpchanne and call methods on that to determine response codes and other information from the server. it is ...
XPCOMUtils.jsm
ated with the generateqi helper. classinfo: xpcomutils.generateci( {classid: components.id("{xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx}"), contractid: "@example.com/xxx;1", classdescription: "unique text description", interfaces: [components.interfaces.nsiobserver, components.interfaces.nsimyinterface, "nsifoo", "nsibar"],
flags: ci.nsiclassinfo.singleton}), // ...component implementation... }; note: the ability to register the component in a category only on specific applications by adding the apps field to a category entry was added in gecko 2. notice that the queryinterface() method implemented by the component simply calls the generateqi() method provided by the xpcomutils code module. create an array of com...
...rateci() generates an nsiclassinfo implementation for a component. the returned object should be assigned to the classinfo property of a js object, the queryinterface() function generated by generateqi will return it automatically then. function generateci( classinfo ); parameters classinfo an object containing the optional properties interfaces, contractid, classdescription, classid,
flags. this parameter should not be the component itself because that would cause a memory leak. return value an nsiclassinfo implementation returning the values of the properties from the classinfo parameter in its various properties. exceptions thrown this method throws an exception with the message "in generateci, don't use a component for generating classinfo" if classinfo parameter is an xpco...
Localizing with Mozilla Translator
t your changes outside of mt, using your favorite repository tools. recipes introduction we aim to put here some recipes that may be useful at a certain moment for mt users, but that, due to its temporary nature, don't fit in the user manual. migrating contents when the directory structure changes overall, if you are a ''good'' mt user and you do things like: checking "keep original"
flags for strings not needing translation, instead of just leaving the translation empty struggling to get empty lists when running "untranslated strings" and "view fuzzy" if you are up to date in localization regularly running qa checks and trying to minimize them. you will always do better if you can export a partial glossary and reimport it as needed. see the following example. let's assume yo...
...cvs & mozilla-central), sometimes in a deeper point. for instance, '''toolkit/locales/chrome''' in mozilla-central matches '''locale/en-us''' and '''browser/locales/chrome''' matches '''locale/browser'''. so, what you have to do is export partial glossaries in each link point of the ''old'' product and import them in the corresponding link point of the ''new'' point. your keep original and fuzzy
flags will be honored for each string. there will be some exceptions. files hanging directly from the platform neutral platform can't be part of a partial glossary (because they are not components), and platform neutral itself can't be selected either, since it is not a component, but a platform. for these few files, you will have to export them individually and reimport them. if you are a ''not so g...
PR_ConnectContinue
syntax #include <prio.h> prstatus pr_connectcontinue( prfiledesc *fd, print16 out_
flags); parameters the function has the following parameters: fd a pointer to a prfiledesc object representing a socket. out_
flags the out_
flags field of the poll descriptor returned by pr_poll(). returns if the nonblocking connect has successfully completed, pr_connectcontinue returns pr_success. if pr_connectcontinue() returns pr_failure, call pr_geterror(): - pr_in_progress_error: the nonblocking connect is still in progress and has not completed yet. the caller should poll the file descriptor for the in_
flags pr_poll_write|pr_poll_except and retry pr_connectcontinue later when pr_poll() returns. - other errors: the nonblocking connect has failed with this error code. des...
...when pr_poll() returns, one calls pr_connectcontinue() on the socket to determine whether the nonblocking connect has completed or is still in progress. repeat the pr_poll(), pr_connectcontinue() sequence until the nonblocking connect has completed. ...
PR_GetConnectStatus
returns the function returns one of these values: if successful, pr_success. if unsuccessful, pr_failure. the reason for the failure can be retrieved via pr_geterror. ...
...r the failure can be retrieved via pr_geterror. if pr_geterror returns pr_in_progress_error, the nonblocking connection is still in progress and has not completed yet.other errors indicate that the connection has failed. description after pr_connect on a nonblocking socket fails with pr_in_progress_error, you may wait for the connection to complete by calling pr_poll on the socket with the in_
flags pr_poll_write | pr_poll_except. when pr_poll returns, call pr_getconnectstatus on the socket to determine whether the nonblocking connect has succeeded or failed. ...
PR_OpenSemaphore
mode unix style file mode to be used when creating the semaphore. ...
... mode unix style file mode to be used when creating the semaphore. ...
PR_ReadDir
values can include the following: pr_skip_none. do not skip any files. pr_skip_dot. skip the directory entry "." representing the current directory. pr_skip_dot_dot. skip the directory entry ".." representing the parent directory. pr_skip_both. skip both "." and ".." pr_skip_hidden. skip hidden files. ...
...e next entry in the directory. if the end of the directory is reached or an error occurs, null. the reason can be retrieved via pr_geterror. description pr_readdir returns a pointer to a directory entry structure: struct prdirentry { const char *name; }; typedef struct prdirentry prdirentry; the structure has the following field: name name of entry, relative to directory name. the
flags parameter is an enum of type prdir
flags: typedef enum prdir
flags { pr_skip_none = 0x0, pr_skip_dot = 0x1, pr_skip_dot_dot = 0x2, pr_skip_both = 0x3, pr_skip_hidden = 0x4 } prdir
flags; the memory associated with the returned prdirentry structure is managed by nspr. the caller must not free the prdirentry structure. moreover, the prdirentry structure returned by each pr_read...
PR_Recv
timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
... timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
PR_RecvFrom
addr a pointer to the prnetaddr object that will be filled in with the address of the sending peer on return. ...
... addr a pointer to the prnetaddr object that will be filled in with the address of the sending peer on return. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
PR_Send
timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
... timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
PR_SendTo
addr a pointer to the address of the destination. ...
... addr a pointer to the address of the destination. timeout a value of type printervaltime specifying the time limit for completion of the receive operation. ...
NSS Config Options
sa:secp256r1:secp384r1" turn off md5 config="disallow=md5" turn off md5 and sha1 only for ssl config="disallow=md5(ssl):sha1(ssl)" disallow values are parsed first, and then allow values, independent of the order in which they appear. future key words (not yet implemented): enable: turn on ciphersuites by default. disable: turn off ciphersuites by default without disallowing them by policy.
flags: turn on the following
flags: ssl-lock: turn off the ability for applications to change policy with the ssl_setcipherpolicy (or ssl_setpolicy). policy-lock: turn off the ability for applications to change policy with the call nss_setalgorithmpolicy. ssl-default-lock: turn off the ability for applications to change cipher suite states wit...
...-cbc null-cipher rc2 rc4 idea ssl key exchanges rsa rsa-export dhe-rsa dhe-dss dh-rsa dh-dss ecdhe-ecdsa ecdhe-rsa ecdh-ecdsa ecdh-rsa restrictions for asymmetric keys (integers) rsa-min dh-min dsa-min constraints on ssl protocols versions (integers) tls-version-min tls-version-max constraints on dtls protocols versions (integers) dtls-version-min dtls-version-max policy
flags for algorithms ssl ssl-key-exchange key-exchange cert-signature signature all none ...
NSS Sample Code Sample1
mmackey = pk11_pubunwrapsymkey(prvkey, mwrappedmackey, ...
...ction uses a mechanism rather than a key type // does this need to be "with
flags"?? menckey = pk11_pubunwrapsymkey(prvkey, mwrappedenckey, ckm_aes_cbc_pad, cka_encrypt, 0); if (!menckey) { rv = 1; goto done; } } if (!mmackey) { // unwrap the mac key from the "file" // this function uses a mechanism rather than a key type // does this need to be "with
flags"?? mmackey = pk11_pubunwrapsymkey(prvkey, mwrappedmackey, ckm_md5_hmac, cka_sign, 0); if (!mmackey) { rv = 1; goto done; } } done: if (prvkey) seckey_destroyprivatekey(prvkey); return rv; } int server::shutdown() { if (menckey) pk11_freesymkey(menckey); if (mmackey) pk11_freesymkey(mmackey); menckey = 0; mmackey = 0; return 0; } int server::compareke...
nss tech note3
al certificate extension is the "basic constraints" extension. it tells nss whether the cert is a ca cert, or not, and affects every other aspect of how the cert is interpreted by nss. the oid for this extension is { 2 5 29 19 }, encoded in hex as 0x55, 0x1d, 0x13. if the extension is present and has the value true, then this cert is taken to be a ca cert. otherwise it is not (except that trust
flags may override this, see discussion of trust
flags farther below). netscape has its own openly defined cert type extension, which can be used to explicitly set the cert type in any cert. the cert type extension has bits in it that correspond directly to the cert types named above. the oid for this extension is { 2 16 840 1 113730 1 1 } encoded in hex as 0x60, 0x86, 0x48, 0x01, 0x86, 0xf8, 0x42, ...
...s allows all ssl client authentication certs with email addresses to also be used as email certs (provded they have adequate key usage). a cert with the extended key usage extension and the netscape cert type extension that as cert type ssl_ca is also always given cert type email_ca. this allows all ssl intermediate cas to also be used as email intermediate cas. ...
NSS PKCS11 Functions
ample, if you would normally specify tokens=<0x4=[configdir='./mybackup' tokendescription='backup']> to softoken if you at init time, then you could specify "configdir='./mybackup' tokendescription='backup'" as your module spec here to open the database ./mybackup on the fly. the slot id will be calculated for you by secmod_openuserdb(). typical parameters here are configdir, tokendescription and
flags. a full list is below: configdir the location of the databases for this token. if configdir is not specified, and nocertdb and nokeydb is not specified, the load will fail. certprefix cert prefix for this token. keyprefix prefix for the key database for this token. (if not specified, certprefix will be used). tokendescription the label value for this token returned in the ck_token_info structure ...
...description is unique. slotdescription the slotdescription value for this token returned in the ck_slot_info structure with an internationalize string (utf8). this value will be truncated at 64 bytes (no null, partialutf8 characters dropped). this name will not change after thedatabase is closed. it should have some number to make this unique. minpwlen then minimum password length for this token.
flags a comma separated list of flag values, parsed case-insensitive. valid
flags are: readonly - databases should be opened read only. nocertdb - don't try to open a certificate database. nokeydb - don't try to open a key database. forceopen - don't fail to initialize the token if thedatabases could not be opened. passwordrequired - zero length passwords are not acceptable(valid only if there is a ke...
PKCS11 Implement
ay call c_gettokeninfo anytime it's looking for a new token to check whether the token is write protected, whether it can generate random numbers, and so on. the nss expects ck_token_info.label to contain the name of the token. if the ckf_write_protected flag is set, nss won't use the token to generate keys. the nss interprets the combination of the ckf_login_required and ckf_user_pin_initialized
flags as shown in table 1.1. nss's interpretation of the ckf_login_required and ckf_user_pin_initialized
flags cfk_login_required cfk_user_pin_initialized nss assumes that: false false this is a general access device. the nss will use it without prompting the user for a pin. true false the device is uninitialized. the nss attempts to initialize the device only if it needs to generate a...
...at that point the cfk_user_pin_initialized flag should change from false to true. false true this is a general access device that can have a pin set on it. because it's a general access device, nss never prompts for the pin, even though it's possible to set a pin with c_setpin. if the pin is set successfully, the cfk_login_required flag should change to true. the nss uses this combination of
flags for its internal token when the key database password is null. these are not standard pkcs #11 semantics; they are intended for nss's internal use only. true true the device has been initialized and requires authentication. the nss checks whether the user is logged on, and if not prompts the user for a pin. c_getmechanismlist the nss calls c_getmechanismlist fairly frequently to identif...
FC_OpenSession
not currently supported. phsession [out] pointer to a session handle. description fc_opensession opens a session between an application and the token in the slot with the id slotid. ...
...not currently supported. phsession [out] pointer to a session handle. description fc_opensession opens a session between an application and the token in the slot with the id slotid. ...
NSS_3.12.3_release_notes.html
g 466194: cert_decodetruststring should take a const char * input trusts string. ...
...able/enable hash algorithms in cert/crl signatures bug 483168: nss callback api for looking up a default ocsp responder url bug 483963: assertion failure in ocsp tests. bug 484425: need accessor function to retrieve symkey handle bug 484466: sec_error_invalid_args with nss_enable_pkix_verify=1 bug 485127: bltest crashes when attempting rc5_cbc or rc5_ecb bug 485140: wrong command line
flags used to build intel-aes.s with solaris gas for x86_64 bug 485370: crash bug 485713: files added by red hat recently have missing texts in license headers. bug 485729: remove lib/freebl/mapfile.solaris bug 485837: vc90.pdb files are output in source directory instead of objdir bug 486060: sec_asn1d_parse_leaf uses argument uninitialized by caller pbe_pk11algidtoparam documentation for...
Proxies in Necko
er or the protocol handler for the requested uri for a new channel with the nsiproxyinfo - if the channel supports nsiproxiedprotocolhandler. otherwise, the proxy info is discarded. nsiprotocolproxyservice the most important function on nsiprotocolproxyservice is resolve. it checks whether the passed-in uri should use a proxy, and returns an nsiproxyinfo if so. this works by examining the protocol
flags of the protocol handler for the given uri. if this protocol handler does not support proxies, resolve returns null. alternatively, if proxies are disabled, or this host is in the list of hosts for which no proxy should be used, null is also returned. if pac (proxy autoconfiguration) is enabled, it is asked for the proxy string for the given uri, which determines whether to use a proxy. note that ...
...ns null. alternatively, if proxies are disabled, or this host is in the list of hosts for which no proxy should be used, null is also returned. if pac (proxy autoconfiguration) is enabled, it is asked for the proxy string for the given uri, which determines whether to use a proxy. note that the proxy method is only used when the protocol handler supports http proxies, as indicated by its protocol
flags. finally, depending on the protocol, the proxy info will be created with the appropriate type, host and port. socks and nsisockettransportservice the aforementioned methods work very well for application-level proxies. however, socks is transparent to upper-level protocols, and can transport any other tcp- or udp-based protocol. therefore, nsisockettransportservice supports creating socket transp...
JSConstDoubleSpec
this article covers features introduced in spidermonkey 17 describes a double and integer value and assigns it a name. syntax template<typename t> struct jsconstscalarspec { const char *name; t val; /* uint8_t
flags; // obsolete from jsapi 35 uint8_t spare[3]; // obsolete from jsapi 35 */ }; typedef jsconstscalarspec<double> jsconstdoublespec; typedef jsconstscalarspec<int32_t> jsconstintegerspec; // added in spidermonkey 38 name type description val double or int32_t value for the double or integer. name const char * name to assign the double.
flags uint8_t property attributes for the double. obsolete since jsapi 35 currently these can be 0 or more of the following values or'd: j...
...ble values that are assigned as properties to an object using js_defineconstdoubles. jsconstintegerspecs is used to define a set of double values that are assigned as properties to an object using js_defineconstintegers. see also mxr id search for jsconstdoublespec mxr id search for jsconstintegerspec js_defineconstdoubles. js_defineconstintegers bug 1066020 - changed to template, and removed
flags and spare ...
JSFunctionSpec
defines a single function for an object. syntax struct jsfunctionspec { const char *name; jsnativewrapper call; uint16_t nargs; uint16_t
flags; const char *selfhostedname; }; typedef struct jsnativewrapper { jsnative op; const jsjitinfo *info; } jsnativewrapper; name type description name const char * the function's name. call jsnativewrapper the built-in js call wrapped by this function. if the function does not wrap a native js call, set this value to null. nargs uint16_t the value used for function.length. this no longer guarantees anything about the vp array.
flags uint16_t the bitwise or of any number of function
flags. selfhostednam...
...n object and calls js_definefunctions or js_initclass to create the functions and assign them to an object. jsfunctionspec can also be used to define an array element rather than a named property. array elements are actually individual properties. to define an array element, cast the element's index value to const char*, initialize the name field with it, and specify the jsprop_index attribute in
flags. to define an array of jspropertyspec, use js_fs, js_fn, js_sym_fn, js_fninfo, js_self_hosted_fn, js_self_hosted_sym_fn, js_sym_fnspec, js_fnspec, and js_fs_end. see also mxr id search for jsfunctionspec jspropertyspec jsnative js_fs js_fn js_sym_fn js_fninfo js_self_hosted_fn js_self_hosted_sym_fn js_sym_fnspec js_fnspec js_fs_end property attributes js_definefunctions js_initcla...
JSPropertySpec
defines a single property for an object. ...
... *selfhostedsetter; }; name type description name const char * name to assign the property. tinyid int8 obsolete since jsapi 31 unique id number for the property to aid in resolving getproperty and setproperty method calls. this value should be zero if you are not using tinyids (i.e. the getter/setter function is only used by one property).
flags uint8_t the bitwise or of any number of property attributes. getter jsnativewrapper or selfhostedwrapper getter method for the property. setter jsnativewrapper or selfhostedwrapper setter method for the property. if a property is read-only, its setter is never called. description jspropertyspec defines the attributes for a single js property to associate ...
JS_ClearRegExpStatics
on successful, js_clearregexpstatics returns true, otherwise returns false. ...
... syntax bool js_clearregexpstatics(jscontext *cx, handleobject obj); name type description cx jscontext * the context. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj js::handleobject a pointer to a global object. description js_clearregexpstatics clears the pending input string and
flags of the built-in regexp object. on successful, js_clearregexpstatics returns true, otherwise returns false. see also mxr id search for js_clearregexpstatics js_newregexpobject js_newucregexpobject js_setregexpinput regexp ...
JS_DefineElement
to define. value js::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double or jsval initial value to assign to the property. getter jsnative or jspropertyop getproperty method for retrieving the current property value. setter jsnative or jsstrictpropertyop setproperty method for specifying a new property value.
flags unsigned property attributes. obsolete since jsapi 32 description js_defineelement defines a numeric property for a specified object, obj. index is the index of the element being defined. value is one of js::value, jsobject, jsstring, int32_t, uint32_t, or double that defines the property's initial value. getter and setter identify the getproperty and setproperty methods for the pr...
...element being defined. value is one of js::value, jsobject, jsstring, int32_t, uint32_t, or double that defines the property's initial value. getter and setter identify the getproperty and setproperty methods for the property, respectively. if you pass null values for these entries, js_defineelement assigns the default getproperty and setproperty methods to this element. obsolete since jsapi 32
flags contains the property attributes to set for the new property. on success, js_defineelement returns true. otherwise it returns false. obsolete since jsapi 32. while you can assign a setproperty method to a property and set
flags to jsprop_readonly, the setter method will not be called on this property. see also mxr id search for js_defineelement js_defineconstdoubles js_definefunction js_d...
JS_DefineFunction
name const char * or const char16_t * name to assign to the function. id js::handle<jsid> a pointer to jsid for name to assign to the function. added in spidermonkey 17 call jsnative the native c/c++ function to be wrapped by the new function. nargs unsigned number of arguments that are passed to the function when it is called.
flags unsigned the logical or of zero or more property attributes. description js_definefunction exposes a c/c++ function to scripts by defining a new method on an existing javascript object. it creates the new function object as though by calling js_newfunction, then makes it a method of obj as though by calling js_defineproperty. js_defineucfunction is the unicode version of the function.
... scripts can use to call the new function. it also becomes the name property of the new function object and can be accessed using js_getfunctionid. call is a pointer to the c/c++ function that is to be exposed to javascript. nargs indicates the number of arguments the function expects to receive. this becomes the new function object's length property and can be accessed using js_getfunctionarity.
flags is the logical or of zero or more property attributes, which apply to the new property. on success, js_definefunction and js_defineucfunction return a pointer to the new function. on error or exception, they return null. see also mxr id search for js_definefunction mxr id search for js_defineucfunction mxr id search for js_definefunctionbyid js_callfunctionname js_callfunctionvalue js_comp...
JS_FS
macros for describing functions, for use with js_defineproperties and js_initclass. syntax #define js_fs(name,call,nargs,
flags) ... #define js_fn(name,call,nargs,
flags) ... #define js_sym_fn(symbol,call,nargs,
flags) ... // added in spidermonkey 38 #define js_fninfo(name,call,info,nargs,
flags) ... // added in spidermonkey 17 #define js_self_hosted_fn(name,selfhostedname,nargs,
flags) ... // added in spidermonkey 31 #define js_self_hosted_sym_fn(symbol, selfhostedname, nargs,
flags) ... // added in spidermonkey 38 #define js_sym_fnspec(symbol, call, info, nargs,
flags, selfhostedname) ... // added in spidermonkey 38 #define js_fnspec(name,call,info,nargs,
flags,selfhostedname) ... // added in spidermonkey 31 #define js_fs_end ... name type description name ...
.... // added in spidermonkey 38 #define js_sym_fnspec(symbol, call, info, nargs,
flags, selfhostedname) ... // added in spidermonkey 38 #define js_fnspec(name,call,info,nargs,
flags,selfhostedname) ... // added in spidermonkey 31 #define js_fs_end ... name type description name const char * the javascript name for the function. (or index, if jsprop_index is present in
flags) symbol a member name of js::symbolcode the javascript symbol for the function. call jsnative pointer to the c/c++ implementation of the function. info const jsjitinfo * pointer to the jit info. nargs uint16_t the number of arguments the function expects.
flags uint16 the bitwise or of any number of function
flags. ...
JS_InitStandardClasses
name type description cx jscontext * pointer to the executable script context for which to initialize js function and object classes. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj js::handle<jsobject*> the global object to initialize. this object must be of a jsclass that has the jsclass_global_
flags bits set. description js_initstandardclasses initializes the built-in javascript global properties. these include all the standard ecmascript global properties defined in ecma 262-3 §15.1: array, boolean, date, decodeuri, decodeuricomponent, encodeuri, encodeuricomponent, error, eval, evalerror, function, infinity, isnan, isfinite, math, nan, number, object, parseint, parsefloat, rang...
... these global objects, functions, constructors, and constants are created as properties of obj. as a side effect, js_initstandardclasses establishes obj as the global object for cx, if one is not already established. this means that scripts executed in cx will see the properties of obj as global variables. see js_setglobalobject for details. obj must be of a jsclass that has the jsclass_global_
flags flag. js_initstandardclasses returns js_true on success, and js_false if an error occurs. to initialize custom classes, use js_initclass. see also mxr id search for js_initstandardclasses ...
JS_LinkConstructorAndPrototype
syntax bool js_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive runtime information. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. ctor js::handle<jsobject*> pointer to the constructor object. ...
... the caller must be in a request on this jscontext. ctor js::handle<jsobject*> pointer to the constructor object. proto js::handle<jsobject*> pointer to the prototype object. description js_linkconstructorandprototype sets the prototype property of class constructor function, ctor, to prototype object, proto with jsprop_permanent | jsprop_readonly
flags, and sets the constructor property of proto to ctor with no flag. on successful, js_linkconstructorandprototype returns true. see also mxr id search for js_linkconstructorandprototype js_initclass bug 722729 ...
JS_NewObject
aller must be in a request on this jscontext. clasp const jsclass * pointer to the class to use for the new object. if this is null, an ordinary javascript object is created. the jsclass may be used to override low-level object behavior, including such details as the physical memory layout of the object and how property lookups are done. added in spidermonkey 1.8.1 clasp->
flags must not have the jsclass_global_
flags bits set (use js_newglobalobject instead). if clasp is non-null, the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it. the usual way to do this is to make jsclasses global or static. proto js::handle<jsobject*> pointer to the...
...associated with the context. next, we must find the given class's constructor in that global object. normally we simply use the class's name as the name of the property of the global object to fetch. however, although javascript code can freely redefine constructors, the ecmascript standard requires us in certain cases to use the original constructors' prototypes. if the global object's class's
flags include jsclass_global_
flags, then the global object always retains the original constructors for each standard class; we use these original constructors when they are available. finally, we must find a prototype. if the constructor has a prototype property, we use its value. otherwise, we use object.prototype, looking up the constructor for object as described above. see also mxr id sear...
JS_PSGS
this article covers features introduced in spidermonkey 17 macros for describing properties, for use with js_defineproperties and js_initclass. syntax #define js_psg(name, getter,
flags) ... #define js_psgs(name, getter, setter,
flags) ... #define js_self_hosted_get(name, gettername,
flags) ... // added in spidermonkey 31 #define js_self_hosted_getset(name, gettername, settername,
flags) ... // added in spidermonkey 31 #define js_ps_end ... name type description name const char * the javascript name for the property. (or index, if jsprop_index is present in
flags) getter jsnative pointer to the c/c++ implementation of the getter function. setter jsnative pointer to the c/c++ implementation of the setter function. ...
... gettername const char * the function's name in self-hosted javascript code for getter function. ...
Running Automated JavaScript Tests
ped when run in the browser, as it lacks some shell-specific testing functionality.) running jstests running jstests on a js shell the jstests shell harness is js/src/tests/jstests.py. basic usage is: jstests.py path_to_js_shell or using mach: ./mach jstests note that mach will generally find the js shell itself; the --shell argument can be used to specify the location manually. all other
flags will be passed along to the harness. developers will often want to use the -d option: jstests.py -d path_to_js_shell the -d option skips tests that are marked as randomly failing; random failures are usually just noise when being run for day-to-day developer testing. another common use case is to run just one test, or all the tests in just one directory: jstests.py path_to_js_shell test_path...
...y path_to_js_shell developers will usually want to run like this to skip the slow tests and cover the most important options: jit_test.py --no-slow path_to_js_shell you can select specific tests to run in the same way as the jstests shell harness. most of the options in the jstests harness are also available for this one, but a few have different names. use -h to see all the options. the --jit
flags option allows you to test the js executable with different
flags. the
flags are used to control which features are run, such as which jits are enabled and how quickly they will kick in. the valid options are named bundles like 'all', 'interp', 'none', etc. see the full list in the -h / --help output. one helpful option specific to jit-tests is -r filename (or --retest filename). the first time t...
Shell global objects
construct deeply nested wrapper chains that cannot exist in the wild. trackedopts(fun) returns an object describing the tracked optimizations of fun, if any. if fun is not a scripted function or has not been compiled by ion, null is returned. dumpscopechain(obj) prints the scope chain of an interpreted function or a module. crash([message]) crashes the process with a moz_crash. setarmhwcap
flags("flag1,flag2 flag3") on non-arm, no-op. on arm, set the hardware capabilities. the list of
flags is available by calling this function with help as the flag's name wasmloop(filename, imports) performs an afl-style persistent loop reading data from the given file and passing it to thewasmeval function together with the specified imports object. testing functions testing functions are availab...
...on failure at successive allocations until the function completes without seeing a failure. by default this tests that an exception is raised if execution fails, but this can be disabled by passing false as the optional second parameter. this is also disabled when --fuzzing-safe is specified. functions available only in debug build if --fuzzing-safe is not specified and parseregexp(pattern[,
flags[, match_only]) parses a regexp pattern and returns a tree, potentially throwing. disregexp(regexp[, match_only[, input]]) dumps regexp bytecode. ...
How to build an XPCOM component in JavaScript
the imported library contains functions for generating the module, factory, and the nsgetmodule and queryinterface fu...
... // define the function we want to expose in our interface hello: function() { return "hello world!"; }, }; xpcomutils does the work of creating the module and factory for you after this. finally, you create an array of your components to be created: var components = [helloworld]; and replace nsgetfactory/nsgetmo...
amIInstallTrigger
constant value description skin 1 locale 2 content 4 package 7 methods enabled() tests if installation is enabled. boolean enabled(); parameters none. retu...
... in pruint32 atype, in astring aurl, in astring askin ); parameters atype unused, retained for backwards compatibility. aurl the url of the add-on. askin unused, retained for backwards compatibility. return value true if the installation was successfully started. startsoftwareupdate starts installing a new add-on. boolean startsoftwareupdate( in astring aurl, in print32 a
flags optional ); parameters aurl the url of the add-on. a
flags optional unused, retained for backwards compatibility. return value true if the installation was successfully started. updateenabled tests if installation is enabled. boolean updateenabled(); parameters none. return value ...
nsIAboutModule
netwerk/protocol/about/nsiaboutmodule.idlscriptable this interface is implemented to add an 'about:' page. the contract id ends with a parameter that corresponds to the name of the about page. inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long geturi
flags(in nsiuri auri); nsichannel newchannel(in nsiuri auri); constants constant value description uri_safe_for_untrusted_content (1 << 0) a flag that indicates whether a uri is safe for untrusted content. if it is, web pages and so forth will be allowed to link to this about: uri. otherwise, only chrome will be able to link to it. allow_script (1 << 1) a flag that indicates whether scri...
...nly chrome will be able to link to it. allow_script (1 << 1) a flag that indicates whether script should be enabled for the given about: uri even if it's disabled in general. hide_from_aboutabout (1 << 2) a flag that indicates whether this about: uri doesn't want to be listed in about:about, especially if it's not useful without a query string. methods geturi
flags() a method to get the
flags that apply to a given about: uri. the uri passed in is guaranteed to be one of the uris that this module registered to deal with. unsigned long geturi
flags( in nsiuri auri ); parameters auri return value a combination of the
flags above corresponding to the appropriate
flags for this about uri. newchannel() constructs a new channel for the about protoco...
nsIAccessibleStates
more than 1 allowed. constant value description state_unavailable 0x00000001 the object is unavailable, that is disabled. ...
...formation is of high priority. state_protected 0x20000000 maps to gnome's role* atk_role_passwd_text, nothing for java? state_haspopup 0x40000000 new in msaa 2.0. state_required state_alert_low state_important state_alert_medium currently unused. state_invalid state_alert_high indicates a validation failure. state_checkable state_marqueed extended state constants extended state
flags (for now non-msaa, for java and gnome/atk support) constant value description ext_state_supports_autocompletion 0x00000001 for editable areas that have any kind of auto completion. ext_state_defunct 0x00000002 object no longer exists. ext_state_selectable_text 0x00000004 for text which is selectable, object must implement nsiaccessibletext. ext_state_editable 0x00000008 implements nsia...
nsIAsyncInputStream
eam becomes readable or closed (via the asyncwait() method). while this interface is almost exclusively used with non-blocking streams, it is not necessary that nsiinputstream.isnonblocking() return true. nor is it necessary that a non-blocking nsiinputstream implementation also implement nsiasyncinputstream. ...
...ream already has data to read. it may also be called when the stream is closed. if the stream is already readable or closed when asyncwait is called, then the nsiinputstreamcallback.oninputstreamready() event will be dispatched immediately. otherwise, the event will be dispatched when the stream becomes readable or closed. void asyncwait( in nsiinputstreamcallback acallback, in unsigned long a
flags, in unsigned long arequestedcount, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready. this parameter may be null to clear an existing callback. a
flags this parameter specifies optional
flags passed in to configure the behavior of this method. pass zero to specify no
flags. arequestedcount wait until at least this many bytes can be r...
nsIAsyncOutputStream
becomes writable or closed (via the asyncwait() method). while this interface is almost exclusively used with non-blocking streams, it is not necessary that nsioutputstream.isnonblocking() return true. nor is it necessary that a non-blocking nsioutputstream implementation also implement nsiasyncoutputstream. ...
...ady has room for more data. it may also be called when the stream is closed. if the stream is already writable or closed when asyncwait is called, then the nsioutputstreamcallback.onoutputstreamready() event will be dispatched immediately. otherwise, the event will be dispatched when the stream becomes writable or closed. void asyncwait( in nsioutputstreamcallback acallback, in unsigned long a
flags, in unsigned long arequestedcount, in nsieventtarget aeventtarget ); parameters acallback this object is notified when the stream becomes ready. this parameter may be null to clear an existing callback. a
flags this parameter specifies optional
flags passed in to configure the behavior of this method. pass zero to specify no
flags. arequestedcount wait until at least this many bytes can be w...
nsIAuthModule
terface is intended to be used as server and client authentication service. ...
...e buffer at aouttoken must be recycled with a call to nsimemory.free(). aouttokenlength if getnexttoken succeeds, then aouttokenlength contains the length of the buffer (number of bytes) pointed to by aouttoken. init() this method is called to initialize an auth module. the other methods cannot be called unless this method succeeds. void init( in string aservicename, in unsigned long aservice
flags, in wstring adomain, in wstring ausername, in wstring apassword ); parameters aservicename the service name, which may be null if not applicable (for example, for ntlm, this parameter should be null). aservice
flags a bitwise-or of the req_ constants (pass req_default for default behavior). adomain the authentication domain, which may be null if not applicable. ausername the user's login n...
nsICookieManager2
ookieexists() returns whether or not a matching cookie already exists. boolean cookieexists( in nsicookie2 acookie ); parameters acookie the cookie to look for. return value returns true if a cookie was found which matches the host, path, and name fields of acookie. countcookiesfromhost() returns the number of cookies that would be returned to a given host. this ignores the cookie
flags isdomain, issecure, and ishttponly. therefore, if the specified host is "weather.yahoo.com", host or domain cookies for "weather.yahoo.com" and "yahoo.com" would both be counted, while a cookie for "my.weather.yahoo.com" would not. unsigned long countcookiesfromhost( in autf8string ahost ); parameters ahost the host string to look for, such as "google.com". this should consist only of th...
...untfromhost ); parameters acookie the cookie to look for. acountfromhost the number of cookies found whose hosts are the same as, or subdomains of, the host field of acookie. return value true if a cookie was found which matches the host, path, and name fields of acookie. getcookiesfromhost() returns an enumerator of cookies that would be returned to a given host, ignoring the cookie
flags isdomain, issecure, and ishttponly. therefore, if the specified host is "weather.yahoo.com", host or domain cookies for "weather.yahoo.com" and "yahoo.com" would both be returned, while a cookie for "my.weather.yahoo.com" would not. nsisimpleenumerator getcookiesfromhost( in autf8string ahost ); parameters ahost the host string to look for, such as "google.com". this should consist only ...
nsIDispatchSupport
js/src/xpconnect/idl/nsidispatchsupport.idlnot scriptable please add a summary to this article. inherits from: nsisupports last changed in gecko 1.7 method overview void comvariant2jsval(in comvariantptr comvar, out jsval val); unsigned long gethosting
flags(in string acontext); boolean isclassmarkedsafeforscripting(in nscidref cid, out boolean classexists); boolean isclasssafetohost(in jscontextptr cx, in nscidref cid, in boolean capscheck, out boolean classexists); boolean isobjectsafeforscripting(in voidptr theobject, in nsiidref id); void jsval2comvariant(in jsval var, out comvariant comvar); methods comvariant2jsval() converts a com variant to a jsval. void comvariant2jsval( in comvariantptr comvar, out jsval val ); parameters comvar the com variant to ...
...olean classexists); boolean isobjectsafeforscripting(in voidptr theobject, in nsiidref id); void jsval2comvariant(in jsval var, out comvariant comvar); methods comvariant2jsval() converts a com variant to a jsval. void comvariant2jsval( in comvariantptr comvar, out jsval val ); parameters comvar the com variant to be converted. val the jsval to receive the converted value. gethosting
flags() return the activex security and hosting
flags. see nsiactivexsecuritypolicy for list of
flags. unsigned long gethosting
flags( in string acontext ); parameters acontext return value isclassmarkedsafeforscripting() test if the specified class is marked safe for scripting. boolean isclassmarkedsafeforscripting( in nscidref cid, out boolean classexists ); parameters cid the nsid repres...
nsIEventTarget
ptable a target for events. events may be sent to this target from any thread by calling the dispatch method. implement this interface in order to support receiving events from other threads. 1.0 66 introduced gecko 1.6 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void dispatch(in nsirunnable event, in unsigned long
flags); boolean isoncurrentthread(); void postevent(in pleventptr aevent); native code only! obsolete since gecko 1.9 constants dispatch
flags constant value description dispatch_normal 0 this flag specifies the default mode of event dispatch, whereby the event is simply queued for later processing. when t...
...rocessed. note: passing this flag to dispatch may have the side-effect of causing other events on the current thread to be processed while waiting for the given event to be processed. methods dispatch() dispatches an event to this event target. this function may be called from any thread, and it may be called re-entrantly. void dispatch( in nsirunnable event, in unsigned long
flags ); parameters event the event to dispatch.
flags the dispatch
flags modifying the event. exceptions thrown ns_error_unexpected indicates that the thread is shutting down and has finished processing events, so this event would never run and has not been dispatched. ns_error_invalid_arg indicates that event is null. isoncurrentthread() ch...
nsIINIParserWriter
the text of the ini file is generated, so you can add properties to the file in any order, regardless of section. when you're done and ready to write the ini file to disk, call the writefile() method. method overview void setstring(in autf8string asection, in autf8string akey, in autf8string avalue); void writefile([optional] in nsifile ainifile, [optional] in unsigned long a
flags); constants file writing constants these constants are specified when calling writefile(), in order to change its behavior. constant value description write_utf16 0x1 windows and the nsis installer code sometimes expect ini files to be in utf-16 encoding. on windows only, this flag to writefile() can be used to change the encoding from its default utf-8. ...
...y. void setstring( in autf8string asection, in autf8string akey, in autf8string avalue ); parameters asection the name of the section into which to place the property. akey the name of the property for which the value is to be set. avalue the value to assign to the property. writefile() write to the ini file. void writefile( in nsifile ainifile, optional in unsigned long a
flags optional ); parameters ainifile optional if specified, this nsifile based object is used as the output file instead of the one specified at initialization time (if any). a
flags optional
flags controlling the file write operation. see file writing constants for details on the permitted values. see also ini file nsiiniparser nsiiniparserfactory ...
nsILoadGroup
of "active" requests (that is requests without the load_background bit set). read only. defaultloadrequest nsirequest accesses the default load request for the group. each time a number of requests are added to a group, the defaultloadrequest may be set to indicate that all of the requests are related to a base request. the load group inherits its load
flags from the default load request. if the default load request is null, then the group's load
flags are not changed. groupobserver nsirequestobserver the group observer is notified when requests are added to and removed from this load group. the groupobserver is weak referenced. notificationcallbacks nsiinterfacerequestor notification callbacks ...
...observer is weak referenced. notificationcallbacks nsiinterfacerequestor notification callbacks for the load group. requests nsisimpleenumerator returns the requests contained directly in this group. enumerator element type: nsirequest. read only. methods addrequest() adds a new request to the group. this will cause the default load
flags to be applied to the request. if this is a foreground request then the groupobserver's onstartrequest will be called. if the request is the default load request or if the default load request is null, then the load group will inherit its load
flags from the request. void addrequest( in nsirequest arequest, in nsisupports acontext ); parameters arequest the request to be added ...
nsIMsgSearchValue
older; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
...(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
nsIPrompt
d alertcheck(in wstring dialogtitle, in wstring text, in wstring checkmsg, inout boolean checkvalue); boolean confirm(in wstring dialogtitle, in wstring text); boolean confirmcheck(in wstring dialogtitle, in wstring text, in wstring checkmsg, inout boolean checkvalue); print32 confirmex(in wstring dialogtitle, in wstring text, in unsigned long button
flags, in wstring button0title, in wstring button1title, in wstring button2title, in wstring checkmsg, inout boolean checkvalue); boolean prompt(in wstring dialogtitle, in wstring text, inout wstring value, in wstring checkmsg, inout boolean checkvalue); boolean promptpassword(in wstring dialogtitle, in wstring text, inout wstring password, in wstring checkmsg, inout boo...
...boolean checkvalue); boolean promptusernameandpassword(in wstring dialogtitle, in wstring text, inout wstring username, inout wstring password, in wstring checkmsg, inout boolean checkvalue); boolean select(in wstring dialogtitle, in wstring text, in pruint32 count, [array, size_is(count)] in wstring selectlist, out long outselection); constants the button
flags defined in nsiprompt are the same as those defined in nsipromptservice.constants. example usage is also documented: using the button
flags see also nsipromptservice ...
nsIProxyInfo
o this attribute specifies the proxy to failover to when this proxy fails. failovertimeout unsigned long this attribute specifies the failover timeout in seconds for this proxy. if a nsiproxyinfo is reported as failed via nsiprotocolproxyservice.getfailoverforproxy(), then the failed proxy will not be used again for this many seconds. read only.
flags unsigned long this attribute specifies
flags that modify the proxy type. the value of this attribute is the bit-wise combination of the proxy
flags defined below. any undefined bits are reserved for future use. read only. host autf8string this attribute specifies the hostname of the proxy server. read only. note: prior to gecko 1.8 host was availa...
... for https) "socks" - socks v5 proxy "socks4" - socks v4 proxy "direct" - no proxy "unknown" - unknown proxy (see nsiprotocolproxyservice.resolve()) a future version of this interface may define additional types. read only. note: prior to gecko 1.8 type was available by the type method. constants the following "proxy
flags" may be bit-wise combined to construct the
flags attribute defined on this interface. all unspecified bits are reserved for future use. constant value description transparent_proxy_resolves_host 1 << 0 this flag is set if the proxy is to perform name resolution itself. if this is the case, the hostname is used in some fashion, and we shouldn'...
nsISHistoryListener
ce via the nsishistory.addshistorylistener() method. method overview boolean onhistorygoback(in nsiuri abackuri); boolean onhistorygoforward(in nsiuri aforwarduri); boolean onhistorygotoindex(in long aindex, in nsiuri agotouri); void onhistorynewentry(in nsiuri anewuri); boolean onhistorypurge(in long anumentries); boolean onhistoryreload(in nsiuri areloaduri, in unsigned long areload
flags); methods onhistorygoback() called when navigating to a previous session history entry, for example due to an nsiwebnavigation.goback() call. boolean onhistorygoback( in nsiuri abackuri ); parameters abackuri the uri of the session history entry being navigated to. return value true to allow the go back operation to proceed or false to cancel it. onhistorygoforward() called when navigatin...
... onhistorypurge( in long anumentries ); parameters anumentries the number of entries to be removed from session history. return value true to allow the purge operation to proceed or false to cancel it. onhistoryreload() called when the current document is reloaded, for example due to an nsiwebnavigation.reload() call. boolean onhistoryreload( in nsiuri areloaduri, in unsigned long areload
flags ); parameters areloaduri the uri of the document to be reloaded. areload
flags flags that indicate how the document is to be refreshed. see the nsiwebnavigation interface's load constants. return value true to allow the reload operation to proceed or false to cancel it. ...
nsISelectionController
orward, in boolean extend); void pagemove(in boolean forward, in boolean extend); void repaintselection(in short type); void scrollhorizontal(in boolean left); void scrollline(in boolean forward); void scrollpage(in boolean forward); void scrollselectionintoview(in short type, in short region, in short
flags); void selectall(); void setcaretenabled(in boolean enabled); void setcaretreadonly(in boolean readonly); void setcaretvisibilityduringselection(in boolean visibility); void setcaretwidth(in short pixels); obsolete since gecko 1.8 void setdisplayselection(in short toggle); void wordexte...
... forward scroll forward or backwards in selection. scrollselectionintoview() scrolls a region of the selection, so that it is visible in the scrolled view. note: if issynchronous is true, calling this method may flush the pending reflow. this is dangerous for some objects. see bug 418470, comment 12 for details. void scrollselectionintoview( in short type, in short region, in short
flags ); parameters type the selection to scroll into view. (selectiontype) region the region inside the selection to scroll into view. (selectionregion)
flags one of the scroll_* constants. exceptions thrown missing exception missing description selectall() will select the whole page. void selectall(); parameters none. setcaretenabled() set...
nsISelectionPrivate
endplaceholdertransaction will give rise to reflow/refreshing view/scroll, and call times of nstextframe::getpointfromoffset whose return value is to be cached. see bug 352...
...nge range, in consttextrangestyleref textrangestyle ); parameters range textrangestyle startbatchchanges() will stop user interface updates while multiple selection methods are called. call endbatchchanges() to resume user interface updates. void startbatchchanges(); parameters none. tostringwithformat() wstring tostringwithformat( in string formattype, in unsigned long
flags, in print32 wrapcolumn ); parameters formattype
flags wrapcolumn return value ...
nsISocketTransport
see connection flag constants for more details. host autf8string get the host for the underlying socket connection. read only. port long get the port for the underlying socket connection. read only. securitycallbacks ...
... status_resolved 0x804b000b transport has resolved the host. status_connecting_to 0x804b0007 status_connected_to 0x804b0004 status_sending_to 0x804b0005 status_waiting_for 0x804b000a status_receiving_from 0x804b0006 connection
flags values for the connection
flags attribute constant value description bypass_cache 0 when making a new connection bypass_cache will force the necko dns cache entry to be refreshed with a new call to nspr if it is set before opening the new stream. anonymous_connect 1 when this flag is set, the socket will not apply ...
nsISupports proxies
nstance, if you need to not only use an object remotely, but also have it created remotely, use the second api. the iid that you are requesting must be in the typelib. these means that you should have had to create and idl for it and have generated a typelib. if you haven't, or you've never heard of these things, see http://www.mozilla.org/scriptable/ . the proxytype parameter can be either two
flags: proxy_sync or proxy_async. these two
flags can also be ored with proxy_always. proxy_always will ensure that a proxy object is always created no matter what thread you currently are on. if this flag is not specified, the proxy object manager will compare the eventq which you pass to the eventq which is on the current thread. if they match, it will return the real non-proxied object. most of the...
...may have). a point here to bring up is how do we supply the event queue to getproxyobject? well there are two possibilities. first, you may know which event queue that you are interested in. in this case, just simply use it. in most cases, you will want the main ui thread (aka the primordial thread). if this is the case, you can simply pass nsnull as the event queue. you may also use the defined
flags which are defined in xpcom/threads/nsieventqueueservice.h#44. there is also logic that will determine if the caller is on the destination thread. if this is true, i will not call via proxy, but rather invoke the method directly which is an optimization. this detection will only be used if you are using a proxy created with the proxy_sync flag. example usage nsresult rv = ns_ok; nscomptr<nsipr...
nsIThreadManager
nd extensions create and manage threads, each of which is represented by an nsithread. xpcom/threads/nsithreadmanager.idlscriptable please add a summary to this article. last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nsithread getthreadfromprthread(in prthread prthread); native code only! nsithread newthread(in unsigned long creation
flags); attributes attribute type description currentthread nsithread the currently executing thread. if the calling thread does not already have a nsithread associated with it, one is created and associate with the current prthread. read only. ismainthread boolean this attribute is true if the calling thread is the main thread of the application pro...
...ding nsithread. nsithread getthreadfromprthread( in prthread prthread ); parameters prthread the prthread for which to retrieve the corresponding nsithread. return value the nsithread matching the specified prthread, or null if there is no matching nsithread. newthread() create a new thread. internally, this is a global user prthread. nsithread newthread( in unsigned long creation
flags ); parameters creation
flags reserved for future use. pass 0. return value the newly created nsithread. see also the thread manager nsithread nsithreadpool nsithreadinternal nsithreadobserver nsithreadeventfilter prthread ...
nsIWindowCreator
terface used by gecko to create new browser windows. the application, either mozilla or an embedding app, must provide an implementation of the window watcher component and notify the windowwatcher during application initialization. inherits from: nsisupports last changed in gecko 0.9.6 method overview nsiwebbrowserchrome createchromewindow(in nsiwebbrowserchrome parent, in pruint32 chrome
flags); methods createchromewindow() create a new window. gecko will/may call this method, if made available to it, to create new windows. nsiwebbrowserchrome createchromewindow( in nsiwebbrowserchrome parent, in pruint32 chrome
flags ); parameters parent the nsiwebbrowserchrome of the parent window, if any. null if no parent exists. the newly created window should be made a child/dependent win...
...thod, if made available to it, to create new windows. nsiwebbrowserchrome createchromewindow( in nsiwebbrowserchrome parent, in pruint32 chrome
flags ); parameters parent the nsiwebbrowserchrome of the parent window, if any. null if no parent exists. the newly created window should be made a child/dependent window of the parent, if any (and if the concept applies to the underlying os). chrome
flags chrome features from nsiwebbrowserchrome. return value an nsiwebbrowserchrome for the new window. see also nsiwindowwatcher for more details. ...
nsIXMLHttpRequest
-on developers. the interface definition: //github.com/realityripple/uxp/blob/master/dom/xhr/nsixmlhttprequest.idl elevated privileges as mentioned in the "non-standard properties" the property of channel was read-only. when using the xpcom interface, as seen below in example 2, we can get access to this. the most obvious benefit is that we can set nsirequest - constants in the xhr.channel.load
flags. for instance, as done in example 2, the flag of load_anonymous is added, this strips all user data (cookies, tokens, etc). using event handlers from native code (not sure if it's up-to-date) from native code, the way to set up onload and onerror handlers is a bit different. here is a comment from johnny stenback <jst@netscape.com>: the mozilla implementation of nsixmlhttprequest implements t...
...you only want this if your url is to a zip file or some file you want to download and make a nsiarraybufferinputstream out of it or something xhr.send(null); } xhr('https://www.grava...
nsIZipWriter
exceptions thrown ns_error_not_initialized if no zip fil...
...such entry. hasentry() determines whether or not a specific entry exists in the zip file. boolean hasentry( in autf8string azipentry ); parameters azipentry the path of the file entry to check for. return value true if there is an entry with the given path in the zip file, otherwise returns false. open() opens the specified zip file. void open( in nsifile afile, in print32 aio
flags ); parameters afile the zip file to open. aio
flags the open
flags for the zip file, from prio.h. exceptions thrown ns_error_already_initialized a zip file is already open. ns_error_invalid_arg the afile parameter is null. ns_error_file_not_found the specified file was not found and the
flags didn't permit creating it. or the directory for the file does not exist. ns_error_file_...
nsIMsgSearchValue
older; [scriptable, uuid(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
...(783758a0-cdb5-11dc-95ff-0800200c9a66)] interface nsimsgsearchvalue : nsisupports { // type of object attribute nsmsgsearchattribvalue attrib; // accessing these will throw an exception if the above // attribute does not match the type! ...
XPCOM reference
d/thunderbird3the nsiabcard interface is used to represent and manipulate cards in the address book. in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsicookie2 mozilla 1 8 branchnsimsgsearchvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl nsmsgmessage
flagsthe nsmsgmessage
flags interface describes possible
flags for messages. equivalent
flags are also defined in nsmsgmessage
flags.h. nsmsgnavigationtypethe nsmsgnavigationtype interface contains constants used for message navigation in thunderbird. for example to move forward a message, you would call:nsmsgsearchopvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsmsgsearchcore.idl ns...
...arch/ public/ nsmsgsearchcore.idl nsmsgviewcommandcheckstatethe nsmsgviewcommandcheckstate interface contains constants used for command status in thunderbird. it is (as far as i can tell) not currently used anywhere in thunderbird.nsmsgviewcommandtypethe nsmsgviewcommandtype interface contains constants used for commands in thunderbird. for example to mark a message read, you would call:nsmsgview
flagstypethe nsmsgview
flagstype interface contains constants used for view
flags in thunderbird. this interface isn't ever implemented. it is only used to store constants. for example, the 'unread only' view would use the flag:nsmsgviewsortorderthe nsmsgviewsortorder interface contains constants used for sort direction in thunderbird. this interface isn't ever implemented. it is only used to store cons...
Address book sync client design
tory of the users profile information. // // the client keeps a sync mapping table which holds the following: // // serverrecordid - unique id for a record provided by the // uab server. // localrecordid - local unique id, for mobile devices this // is assigned by the mobile device. // crc - crc of the record last time we synced. //
flags - operation to apply to this record. add // if it's new, mod if it's been modified, // ret if it was already sent to the server // but an error occured, etc. // // step 1: // when the user begins a sync, run through the local database and update the // sync mapping table. if the crc has changed, mark the entry modified, ...
... to the server. mark any modified or new record with the ret (retry) // flag. // // step 3: // get the response back from the server. since the communication was successful, // clear the ret (retry) flag on all records. then apply the server changes back // to the local database (updating the crc's in the process). save the changes to // the local database, clear the sync mapping table
flags and save the new sync // mapping table. // public interfaces there is a very simple interface to the address book sync component. this interface is defined in mozilla/mailnews/addrbook/public/nsiabsyncdriver.idl #include "nsrootidl.idl" #include "nsiabsynclistener.idl" [scriptable, uuid(91fdfee1-efbc-11d3-8f97-000073757374)] interface nsiabsyncdriver : nsiabsyncliste...
DB Views (message lists)
iew and inherit from nsmsgdbview. these are the main view classes: nsmsgthreadeddbview - (implementation) nsmsgsearchdbview - (implementation) nsmsgquicksearchdbview - (implementation) nsmsgxfvirtualfolderdbview - (implementation) nsmsggroupview - (implementation) usually, a view object has parallel arrays, which map directly to lines in the message list: m_keys message header key m_
flags 32 bits, combination of message header
flags and view-only
flags (e.g., collapsed) m_level the indentation level when in threaded mode. m_folders cross-folder views only (nsmsgsearchdbview and its descendant, nsmsgxfvirtualfolderdbview) most of the time, the thread pane is driven by an nsmsgthreadeddbview object (even when we're in a flat sort). if the user does a quick search or picks a v...
...ed with an nsmsgsearchdbview, and cross-folder saved searches use nsmsgxfvirtualfolderdbview, which inherits from nsmsgsearchdbview. nsmsggroupview is used when grouping is turned on. one unique thing about nsmsggroupview is that instead of using the message database's nsmsgthread objects like the other view classes, it uses an nsmsggroupthread object, which also implements nsimsgthread. view
flags and types the view
flags (external reference) are not exclusive. the view types (external reference) are. these are the values filed in nsidbfolderinfo to remember the view settings for the folder. view interaction with nsitreeview the nsitreeview methods in nsmsgdbview.cpp control the appearance of the thread pane. properties these nsmsgdbview methods set properties, nsitreeview.getrow...
Demo Addon
rs of an account (in this case the first one) and marks the inbox folder with a *. furthermore, it shows some messages in the inbox and lists a random attachment. we start with listing all folders and marking the inbox: let server = accounts[0].incomingserver; let folder = server.rootfolder; // ... let inbox; let print = function (indent, folder) { let isinbox = folder.getflag(ci.nsmsgfolder
flags.inbox); if (isinbox) inbox = folder; str += indent + folder.prettiestname + (isinbox ? " *" : "") + "\n"; if (folder.hassubfolders) for each (let folder in fixiterator(folder.subfolders, ci.nsimsgfolder)) print(indent + " ", folder); }; print(" ", folder); as in the previous example, we get the incomingserver of the account in question. beginning with t...
... str += indent + folder.prettiestname + (isinbox ? " *" : "") + "\n"; if (folder.hassubfolders) for each (let folder in fixiterator(folder.subfolders, ci.nsimsgfolder)) print(indent + " ", folder); }; print(" ", folder); as in the previous example, we get the incomingserver of the account in question. beginning with the rootfolder, with folder.getflag(ci.nsmsgfolder
flags.inbox) we check whether the folder is the inbox. then we store the folder name in a string to display it later on the screen and mark it with an * if it is the inbox. afterwards, we check every folder for subfolders. we then go into each subfolder and start over. to list some messages of the folder we use: for each (let msghdr in fixiterator(inbox.msgdatabase.enumeratemessages(), ci.nsimsgdbhdr...
WebIDL bindings
. this takes a property name and returns whatever type the named getter is declared to return. it also has a boolean out param for whether a property with that name should exist at all. a nameisenumerable method. this takes a property name and returns a boolean that indicates whether the property is enumerable. a getsupportednames method. this takes an unsigned integer which corresponds to the
flags passed to the iterate proxy trap and returns a list of property names. for implementations of this method, the important
flags is jsiter_hidden. if that flag is set, the call needs to return all supported property names. if it's not set, the call needs to return only the enumerable ones. the nameisenumerable and getsupportednames methods need to agree on which names are and are not enumerable. ...
... and getsupportednames methods need to agree on which names are supported. so for example, given this idl: interface interfacewithnamedgetter { getter long(domstring arg); }; the corresponding c++ would be: class interfacewithnamedgetter { public: int32_t namedgetter(const nsastring& aname, bool& afound); bool nameisenumerable(const nsastring& aname); void getsupportednames(unsigned a
flags, nstarray<nsstring>& anames); }; indexed getters if the interface has a indexed getter, the binding will expect the following methods on the c++ implementation: a indexedgetter method. this takes an integer index value and returns whatever type the indexed getter is declared to return. it also has a boolean out param for whether a property with that index should exist at all. the implement...
Using Objective-C from js-ctypes
} ]); /** * we have to simulate what the llvm compiler does when it encounters a block * literal expression (see `block-abi-apple.txt` above). * the "block literal" is the struct type for each block instance. ...
...opy_dispose: 1 << 25, block_has_ctor: 1 << 26, block_is_global: 1 << 28, block_has_stret: 1 << 29, block_has_signature: 1 << 30 }; // based on work from here: https://github.com/trueinteractions/tint2/blob/f6ce18b16ada165b98b07869314dad1d7bee0252/modules/bridge/core.js#l370-l394 var bl = block_literal_1(); // set the class of the instance bl.isa = _nsconcreteglobalblock; // global
flags bl.
flags = block_const.block_has_stret; bl.reserved = 0; bl.invoke = afunctypeptr; // create descriptor var desc = block_descriptor_1(); desc.reserved = 0; desc.size = block_literal_1.size; // set descriptor into block literal bl.descriptor = desc.address(); return bl; } an example of this function in use can be seen here: _ff-addon-snippet-objc_monitorevents - shows how to monito...
Using js-ctypes
in 64bit versions of os x, therefore core foundation must be used. the below will do the same as standardalert from above, it will use the core foundation function of cfusernotificationdisplaynotice. ...
...usernotificationnotealertlevel = 1; var kcfusernotificationcautionalertlevel = 2; var kcfusernotificationplainalertlevel = 3; // declare functions /* https://developer.apple.com/library/mac/documentation/corefoundation/reference/cfusernotificationref/index.html#//apple_ref/c/func/cfusernotificationdisplaynotice * sint32 cfusernotificationdisplaynotice ( * cftimeinterval timeout, * cfoption
flags flags, * cfurlref iconurl, * cfurlref soundurl, * cfurlref localizationurl, * cfstringref alertheader, * cfstringref alertmessage, * cfstringref defaultbuttontitle * ); */ var cfusernotificationdisplaynotice = libcf.declare("cfusernotificationdisplaynotice", ctypes.default_abi, sint32, // return cftimeinterval, // timeout cfoption
flags, //
flags cfurlref, // iconurl...
Web Console remoting - Firefox Developer Tools
alhost/~mihai/mozilla/test.js", "linetext": "", "linenumber": 6, "columnnumber": 0, "category": "content javascript", "timestamp": 1347294508210, "error": false, "warning": false, "exception": true, "strict": false, "private": false, } } the packet is similar to nsiscripterror - for simplicity. we only removed several unneeded properties and changed how
flags work. the private flag tells if the error comes from a private window/tab (added in firefox 24). starting with firefox 24 the errormessage and linetext properties can be long string actor grips if the string is very long. console api messages the window.console api calls send internal messages throughout gecko which allow us to do whatever we want for each call. the web console actor sends th...
...ringactor usage in several places. firefox 20: bug 792062 - removed locationchanged packet and updated the tabnavigated packet for tab actors. firefox 23: bug 783499 - removed the webconsoleobjectactor. now the web console uses the javascript debugger api and the objectactor. firefox 23: added the bindobjectactor and frameactor options to the evaluatejs request packet. firefox 24: new private
flags for the console actor notifications, bug 874061. also added the lastprivatecontextexited notification for the global console actor. firefox 24: new isxhr flag for the networkevent notification, bug 859046. firefox 24: removed the message property from the pageerror packet notification, bug 877773. the linetext and errormessage properties can be long string actors now. firefox 25: added the url...
AuthenticatorAssertionResponse.authenticatorData - Web APIs
the authenticatordata property of the authenticatorassertionresponse interface returns an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence, user verification
flags, and any extensions processed by the authenticator. ...
...data = authenticatorassertionresponse.authenticatordata; value an arraybuffer that has a arraybuffer.bytelength of at least 37 bytes, containing the following fields: rpidhash (32 bytes) - a sha256 hash of the relying party id that was seen by the browser. the server will ensure that this hash matches a hash of its own origin in order to prevent phishing or other man-in-the-middle attacks.
flags (1 bytes) - a bitfield that indicates various attributes that were asserted by the authenticator. the bits are as follows, where "bit 0" is the least significant bit and all bits not specifically mentioned below are "reserved for future use": bit 0, user presence (up) - if set, authenticator validated that the user was present through some test of user presence (tup), such as touching a but...
CanvasRenderingContext2D.drawWindow() - Web APIs
ndered, ignoring viewport clipping and scrolling. this api cannot be used by web content. it is synchronous, and as such can't be compatible with fission. if you're using it from an extension, you should switch to tabs.capturetab. if you're writing chrome code, you probably want windowglobalparent.drawsnapshot from the parent process. syntax void ctx.drawwindow(window, x, y, w, h, bgcolor [,
flags]); parameters window the window to render. x the x-axis coordinate of the window. y the y-axis coordinate of the window. w the width of the window. h the height of the window. bgcolor a domstring that specifies the color the canvas is filled with before the window is rendered into it. this color may be transparent/translucent. it is given as a css color string (for example, rgb() ...
...or, the drawing will be transparent wherever the window is transparent. top-level browsed documents are usually not transparent because the user's background-color preference is applied, but iframes are transparent if the page doesn't set a background. if an opaque color is used for the background color, rendering will be faster because we won't have to compute the window's transparency.
flags optional used to better control the drawwindow call.
flags can be ored together. constant value description drawwindow_draw_caret 0x01 show the caret if appropriate when drawing. drawwindow_do_not_flush 0x02 do not flush pending layout notifications that could otherwise be batched up. drawwindow_draw_view 0x04 draw ...
HTMLIFrameElement.allowPaymentRequest - Web APIs
dfirefox for androidopera for androidsafari on iossamsung internetallowpaymentrequest experimentalchrome full support 60disabled full support 60disabled disabled from version 60: this feature is behind the #web-payments preference (needs to be set to enabled). ...
...? webview android no support nochrome android full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be set to enabled). ...
PaymentAddress.toJSON() - Web APIs
webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internettojson()chrome full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.edge full support 15firefox full support 62notes disabled full support 62notes disabled notes available only in nightly builds. requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso loc...
... yeswebview android no support nochrome android full support 61disabled full support 61disabled disabled from version 61: this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 62notes disabled full support 62notes disabled notes available only in nightly builds. requires the comma-delineated list in dom.payments.request.supportedregions to contain one or more of the supported 2-character iso locales, currently us and ca.disabled from version 62: this ...
WebGL best practices - Web APIs
iscard the data, instead of leaving the driver to waste time storing the data for later use. depth/stencil and/or multisampled attachments in particular are great candidates for invalidateframebuffer. ...
...achments in particular are great candidates for invalidateframebuffer. ...
:where() - CSS: Cascading Style Sheets
fox for androidopera for androidsafari on iossamsung internet:where()chrome full support 72disabled full support 72disabled disabled from version 72: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
...id no support nochrome android full support 72disabled full support 72disabled disabled from version 72: this feature is behind the #enable-experimental-web-platform-features preference (needs to be set to enabled). ...
font-size-adjust - CSS: Cascading Style Sheets
chrome for androidfirefox for androidopera for androidsafari on iossamsung internetfont-size-adjustchrome full support 43disabled full support 43disabled disabled from version 43: this feature is behind the enable experimental web platform features preference. ...
... nowebview android no support nochrome android full support 43disabled full support 43disabled disabled from version 43: this feature is behind the enable experimental web platform features preference. ...
JavaScript modules - JavaScript
experimental-modules runtime flag.available in workerschrome full support 80 full support 80 full support 67disabled disabled from version 67: this feature is behind the experimental web platform features preference. ...
... full support 80chrome android full support 80 full support 80 full support 67disabled disabled from version 67: this feature is behind the experimental web platform features preference. ...
RegExp - JavaScript
used in a loop, the regular expression won't be recompiled on each iteration. the constructor of the regular expression object—for example, new regexp('ab+c')—results in runtime compilation of the regular expression. use the constructor function when you know the regular expression pattern will be changing, or you don't know the pattern and obtain it from another source, such as user input.
flags in constructor starting with ecmascript 6, new regexp(/ab+c/, 'i') no longer throws a typeerror ("can't supply
flags when constructing one regexp from another") when the first argument is a regexp and the second
flags argument is present. a new regexp from the arguments is created instead. when using the constructor function, the normal string escape rules (preceding special characters with \ w...
...perl is the programming language from which javascript modeled its regular expressions.). see also deprecated regexp properties. constructor regexp() creates a new regexp object. static properties get regexp[@@species] the constructor function that is used to create derived objects. regexp.lastindex the index at which to start the next match. instance properties regexp.prototype.
flags a string that contains the
flags of the regexp object. regexp.prototype.dotall whether . matches newlines or not. regexp.prototype.global whether to test the regular expression against all possible matches in a string, or only against the first. regexp.prototype.ignorecase whether to ignore case while attempting a match in a string. regexp.prototype.multiline whether or not to search in ...
String.prototype.match() - JavaScript
index: 22, // input: 'for more information, see chapter 3.4.5.1' ] // 'see chapter 3.4.5.1' is the whole match. // 'chapter 3.4.5.1' was captured by '(chapter \d+(\.\d)*)'. // '.1' was the last value captured by '(\.\d)'. // the 'index' property (22) is the zero-based index of the whole match. // the 'input' property is the original string that was parsed. using global and ignore case
flags with match() the following example demonstrates the use of the global and ignore case
flags with match(). all letters a through e and a through e are returned, each its own element in the array. const str = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; const regexp = /[a-e]/gi; const matches_array = str.match(regexp); console.log(matches_array); // ['a', 'b', 'c', 'd', 'e', 'a', 'b',...
...ags with match(). all letters a through e and a through e are returned, each its own element in the array. const str = 'abcdefghijklmnopqrstuvwxyzabcdefghijklmnopqrstuvwxyz'; const regexp = /[a-e]/gi; const matches_array = str.match(regexp); console.log(matches_array); // ['a', 'b', 'c', 'd', 'e', 'a', 'b', 'c', 'd', 'e'] note: see also string.prototype.matchall() and advanced searching with
flags. using named capturing groups in browsers which support named capturing groups, the following code captures "fox" or "cat" into a group named "animal": const paragraph = 'the quick brown fox jumps over the lazy dog. it barked.'; const capturingregex = /(?<animal>fox|cat) jumps over/; const found = paragraph.match(capturingregex); console.log(found.groups); // {animal: "fox"} using match() ...
The "codecs" parameter in common media types - Web media technologies
ject types page. for example, opus audio in an mp4 file is mp4a.ad. for further details, see mpeg-4 audio. mp4v.oo[.v] (mpeg-4 video) here, oo is again the oti describing the contents more precisely, while v is the one-digit video oti. ...
...-4 audio. mp4v.oo[.v] (mpeg-4 video) here, oo is again the oti describing the contents more precisely, while v is the one-digit video oti. avc1.oo[.ppccll] (avc video) oo is the oti describing the contents, while ppccll is six hexadecimal digits specifying the profile number (pp), constraint set
flags (cc), and level (ll). see avc profiles for the possible values of pp. the constraint set
flags byte is comprised of one-bit boolean
flags, with the most significant bit being referred to as flag 0 (or constraint_set0_flag, in some resources), and each successive bit being numbered one higher. currently, only
flags 0 through 2 are used; the other five bits must be zero. the meanings of the
flags vary depending on the profile being used. the level is a fixed-point number, so a value of 14 ...
util/match-pattern - Archive of obsolete content
pattern"); var pattern = new matchpattern(/.*example.*/); the regular expression is subject to restrictions based on those applied to the html5 pattern attribute. in particular: the pattern must match the entire value, not just any subset. for example, the pattern /moz.*/ will not match the url http://mozilla.org. the expression is compiled with the global, ignorecase, and multiline
flags disabled. the matchpattern constructor will throw an exception if you try to set any of these
flags. example pattern example matching urls example non-matching urls /.*moz.*/ http://foo.mozilla.org/ http://mozilla.org https://mozilla.org http://foo.com/mozilla http://hemozoon.org mozscheme://foo.org http://foo.org /https:\/\/www\.moz.
JS XPCOM - Archive of obsolete content
return 0; }, classdescription: "about mystuff page", classid: components.id("xxxxxxxx-xxxx-xxxx-xxxx-xxxxxxxxxxxx"), contractid: "@mozilla.org/network/protocol/about;1?what=mystuff", queryinterface: xpc...
StringView - Archive of obsolete content
needs you to create two new algorithms: the clikeregexp() constructor – a constructor of c-like regular expression objects – and stringview.prototype.replace() – the new method, able to act on stringview instances. well, just include stringview.js to your scope and work on them in another script: /* a constructor of c-like regular expression objects... */ function clikeregexp (sregexp, s
flags) { /** * [...] * * constructor code here! **/ } /* a "replace" method for stringview... */ stringview.prototype.replace = function (oclikeregexp, swith) { /** * [...] * * method code here! **/ }; if you want to create a stringview inside a bigger empty buffer, like in the following c line /* mybuffer: 12 character followed by 1012 nulls... */ char...
Custom about: URLs - Archive of obsolete content
class aboutpage { static get classid() { return components.id(`{${aboutpage_id}}`); } static get classdescription() { return aboutpage_description; } static get contractid() { return `@mozilla.org/network/protocol/about;1?what=${aboutpage_word}`; } static get queryinterface() { return xpcomutils.generateqi([ci.nsiaboutmodule]); } constructor() { object.freeze(this); } geturi
flags(auri) { return ci.nsiaboutmodule.allow_script; } newchannel(auri, asecurity_or_aloadinfo) { let channel; if (services.vc.compare(services.appinfo.version, '47.*') > 0) { const uri = services.io.newuri(aboutpage_uri, null, null); // greater than or equal to firefox48 so asecurity_or_aloadinfo is aloadinfo channel = services.io.newchannelfromuriwithloadinfo(...
Enhanced Extension Installation - Archive of obsolete content
ile and app-global install locations, we no longer need installed-extensions.txt for registration of pre-configured items such as the default theme. the firefox build system will just create the {guid} folder for the default theme and place its install manifest inside, and on the first startup of the application it will be automatically registered. we drop support for the -lock-item/-unlock-item
flags, as well as the -list-global-items flag. messages that appear in the extensions ui in response to user-actions such as install, uninstall, enable and disable are now driven by the extensions datasource itself and are supplied by the em:displaydescription property, rather than being supplied by the front end and several different redundant xbl bindings/style rules. it is no longer possible to pe...
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
at the css work involved in a toolbar that works on the aforementioned systems. if you want your toolbar to look right on all systems, you should consider having different icon sets for each. you should also consider using a graphic designer for this work, as it takes a lot of attention to detail to make good icons. you can have a different skin directory for each operating system using manifest
flags in the chrome.manifest file: skin xulschoolhello classic/1.0 skin/unix/ skin xulschoolhello classic/1.0 skin/win/ os=winnt skin xulschoolhello classic/1.0 skin/mac/ os=darwin the osversion flag can be used in case we wanted to have different icons for mac os x lion and above, and others for older systems. in this example we won't bother. there is a separate skin directory for each syste...
Intercepting Page Loads - Archive of obsolete content
quest being processed, and you can run arequest.cancel(ns_binding_aborted) to cancel it. awebprogress.domwindow gives you access to the window where the content was going to be loaded. sometimes you do not care about redirects, and only want to detect the final page being loaded, the one holding the actual content. in this case, your best bet is to use onstatechange, and filter to when the state
flags indicate a document has begun being loaded: if ((astate
flags & components.interfaces.nsiwebprogresslistener.state_start) && (astate
flags & components.interfaces.nsiwebprogresslistener.state_is_document)) note the use of the binary mask & operator. to detect if this is a frame being loaded or not, you can do this: if (awebprogress.domwindow != awebprogress.domwindow.top) { // thi...
Local Storage - Archive of obsolete content
} return localdir; }, profd is a special identifier for the profile directory that exists so that you don't need to figure out its location. in general this is the only directory flag you'll need, but sometimes you'll need access to other system directories, and you don't want to have to worry about which operating system or system language your extension is running on. a full list of these
flags can be found in the firefox source. having that function in place, we do something like the following: let myfile = xulschool.getlocaldirectory(); myfile.append("somefile.txt"); // do stuff with the file. files are handled with the nsifile interface. an nsifile doesn't necessarily represent an existing file, as in the previous examples. you first specify the file using nsifile and then use ns...
The Essentials of an Extension - Archive of obsolete content
1.0 skin/unix/ skin xulschoolhello classic/1.0 skin/mac/ os=darwin skin xulschoolhello classic/1.0 skin/win/ os=winnt locale xulschoolhello en-us locale/ this way we can have separate skins for windows, mac os x, and linux (plus other unix-like systems), each defined in a separate directory. since most other systems are unix-based, the "unix" skin is the default, with no
flags. the chrome as mentioned earlier, the chrome is composed of 3 sections: content, locale and skin. the content is the most important section, holding user interface (xul) and script (js) files. the skin section has the files that define most of the look and feel of the ui (using css and images, just like web pages). finally, the locale section holds all text used in the extension, in dtd and pro...
Setting up an extension development environment - Archive of obsolete content
nux, mac os x, windows instructions.) you'll see the list of available user profiles one which is default (stable) and other (unstable) profile(s) created automatically when you run other versions of firefox earlier. choose default and uncheck "don't ask at startup" checkbox. click "start firefox". now when you start any version of firefox you may choose any profile you like. development command
flags as of gecko 2 (firefox 4), javascript files are cached ("fastload"). the -purgecaches command-line flag disables this behavior. alternatively, you can set the moz_purge_caches environment variable. see this bug for more information. development preferences there is a set of development preferences that, when enabled, allows you to view more information about application activity, thus making d...
Updating addons broken by private browsing changes - Archive of obsolete content
. there is a new download-manager-remove-download-guid notification, which passes an nsisupportscstring subject for the guid or null. nsihttpauthmanager: setauthidentity and getauthidentity now take an optional boolean parameter to indicate whether the identity is classified as private. nsistricttransportsecurityservice: processstsheader, removestsstate, isstshost, and isstsuri now take a
flags parameter that understands nsisocketprovider.no_permanent_storage or nothing. nsiprivatebrowsingservice: this service is deprecated, and as of firefox 20 it is now an empty interface. if your code depends on this interface, it will break. the global private browsing service is actively being removed, and may not even exist as of firefox 21. nsirecentbadcertsservice: this is no longer a global...
Using Dependent Libraries In Extension Components - Archive of obsolete content
for mac os x. dependant libraries on the mac must be loaded with a special system function nsaddimage() with the flag nsaddimage_option_match_filename_by_installname. the following are the necessary modifications you will need in order to write a stub loader for an os x extension. you will also need to make sure you are properly linking the xpcom glue libraries. see xpcom glue for the proper
flags on how to link to the glue libraries. /* * os x stubloader * original stubloader code by benjamin smedberg <benjamin@smedbergs.us> copyright (c) 2005 * adapted for os x by walter johnson <zinkyu@gmail.com>, sept. 2008 */ //include the stuff from mozilla glue that we need #include "nsilocalfile.h" #include "nsstringapi.h" #include "nscomptr.h" //include things from the mach-o libraries th...
MMgc - Archive of obsolete content
:free the alloc and free methods are garbage-collected analogs for malloc and free. memory allocated with alloc doesn't need to be explicitly freed, although it can be freed with free if it is known that there are no other references to it. alloc is often used to allocate arrays and other objects of variable size that contain gc pointers or are otherwise desirable to have in managed memory. these
flags may be passed to alloc to control the allocation type. /** *
flags to be passed as second argument to alloc */ enum alloc
flags { kzero=1, kcontainspointers=2, kfinalize=4, krcobject=8 }; kzero zeros out the memory. otherwise, the memory contains undefined values. kcontainspointers indicates to the gc that the memory will contain pointers to other gc objects, and thus needs to be scanned ...
Structure of an installable bundle - Archive of obsolete content
course, an extension need not (and normally won't) have all of these directories. themes are limited for security reasons, and can normally only provide a chrome.manifest which registers the theme and a jar file. platform-specific files gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) removed support for platform-specific subdirectories, described below. instead, you need to use manifest
flags, such as the os and abi
flags, in your chrome manifest to specify components that should be loaded for specific platforms. for example: binary-component components/windows/mycomponent.dll abi=winnt_x86-msvc binary-component components/mac/mycomponent.dylib abi=darwin_x86-gcc3 binary-component components/mac/mycomponent64.dylib abi=darwin_x86_64-gcc3 binary-component components/linux/mycomponent...
Dehydra Function Reference - Archive of obsolete content
is only included once and subsequent include calls are ignored. this is accomplished by recording every included file into the _includedarray in the current namespace. include example include("map.js") // includes map.js into toplevel var map = {} include("map.js", map) // includes map.js into the map object require({version:, strict:, werror:, gczeal:}) require is used to set runtime execution
flags. it also returns the current values of these
flags. require supports optional named arguments via javascript object where each parameter is a property. if a property is not specified then it will not be passed to the runtime. version integer: this sets js version similar to version() in js 1.7. strict boolean: controls js strict mode werror boolean: turns js warnings into errors gczeal int: this...
Installing Dehydra - Archive of obsolete content
--js-headers=$home/obj-js/dist/include \ --js-libs=$home/obj-js make # run dehydra and treehydra tests make check usage dehydra checking can be performed directly within the mozilla build. to enable static checking of a mozilla build, see building with static checking. ...
Dehydra Object Reference - Archive of obsolete content
o become familiar with the dehydra objects is to print out the objects: dehydra example code an online tool for pretty-printing dehydra data understanding properties dehydra only sets properties that are applicable. for example, class types and typedefs are declared and will have a .loc property. intrinsic types such as "int" are not declared and will not have a .loc. dehydra only sets boolean
flags when they are true. for example, a pointer type will have .ispointer == true, but a class type will not have an .ispointer property. common properties property type description .loc location object source location of a type or declaration. .attributes array of objects attributes of the type or declaration. each member of the array has the following properties: { name: string, valu...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
tion like the name of the target frame (for <a target="something">, e.g.). nsdocshell::internalload() handles targeting to the correct docshell (if the load has a target window associated with it), scrolling to anchors (if the load is an anchor within the current page), and session history issues. it calls douriload(). douriload() creates a channel, massages it to have the right post data, load
flags, cache key, referrer, etc. it then passes the channel to dochannelload, which does some more flag massaging and then calls into the uriloader. nsuriloader::openuri gets a channel to open, a boolean indicating whether this load is the result of a link click, and an nsisupports "window context" (the docshell triggering the load, actually, but in drag and heavy makeup). it immediately hands off to...
Documentation for BiDi Mozilla - Archive of obsolete content
di to set the flag mbidienabled. in a bidi-enabled document, the following things happen: during a reflow, nsbidipresutils::resolve is called. this method uses the uba to determine the directional properties of the text and reorder frames if necessary. if necessary, text frames are split so that every frame has the same directionality. framemanager::setframeproperty is used to set the following
flags and pointers (for terminology see the specification of the uba): embeddinglevel: the embedding level of the frame textclass: the text class of the frame. baselevel: the base level (direction) of the paragraph.nextbidi: when a frame has been split, this points to the next frame (in logical order). it is an nscontinuingtextframe. "reordering" of frames is accomplished by setting the appropriate fr...
Downloading Nightly or Trunk Builds - Archive of obsolete content
underbird "branch nightly" as one's main e-mail client. note that nightly builds may not be created for every platform for every night. if one has questions about the way a particular nightly was built, the best way to get that information is to download the executable, launch it, and then go to the "about:buildconfig" page, by typing this into the location bar. this should provide all the build
flags and configuration settings used for building this executable. nightly builds can be downloaded from https://archive.mozilla.org/pub/firefox/nightly/. if you need to download builds often, most builds can be downloaded semi-automatically and saved with a convenient name using mozdownload. ...
Layout FAQ - Archive of obsolete content
me on more recent linux versions sysprof can also be used. also lists some profiles. how do you find out if there are any reflows that are pending and wait to show the view until afterwards, but if none are pending, show the view immediately? what is the best way to determine whether there are any pending changes? on the reflow branch you could check the dirty and dirty_children framestate
flags. that won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown. what are the lowercase items called "line"? block(body)(1)@035ff490 {120,120,8820,600} [state=00000010] sc=035ff264(i=2,b=0)< line 035ffc18: count=1 state=inline,clean,prevmarginclean,not impacted,not wrapped,before:nobr,after:linebr[0x5100] {0,0,330,300} < ...
Message Summary Database - Archive of obsolete content
ld do it at the mdb level (unlikely, because implementing the mdb interface on top of a different db would be very hard), the nsimsgdatabase level (probably the easiest), or we could invent a whole new database interface and change all the code that uses the nsimsgdatabase interface. message headers the message header object implements the nsimsgdbhdr interface. this includes a set of per-message
flags, the more commonly used headers (e.g., subject, sender, from, to, cc, date, etc), and a few other attributes, e.g., keywords. there are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsimsghdr.idl.msg threads we store thread information persistently in the database and expose these object through the [nsimsgthread interface. s...
Safely loading URIs - Archive of obsolete content
t allow the caller to check whether it's safe to load a particular uri. these methods are exposed on the nsiscriptsecuritymanager interface and are called checkloaduri, checkloaduriwithprincipal, and checkloaduristr. all three methods take three arguments: the first argument identifies the source of the uri, the second argument is the uri that one plans to load, and the third argument is a set of
flags that can be used to impose additional restrictions on the uris that may be loaded. it's important to make sure that the first argument to these methods identifies the source of the uri. so if you're implementing a context menu and you add a "view image" option, the source of the image uri would be the page the image is in, not the chrome document the context menu code is in. differences between ...
Static Analysis for Windows Code under Linux - Archive of obsolete content
s --disable-installer ac_add_options --disable-accessibility ac_add_options --disable-vista-sdk-requirements ac_add_options --disable-updater #change this to where your libidl-config file locate. host_libidl_config=/usr/bin/libidl-config #config your moztools position glib_prefix=$home/moztools libidl_prefix=$home/moztools #disable xpcom stdcall calling convention because of gcc 4.3.0 bug cpp
flags="-dmoz_disable_xpcom_stdcall" #specify the cxx and static analysis #point cxx to the cross compile g++ with plugin support cxx=$home/mingw-install/bin/i686-mingw32-g++ ac_add_options --with-static-checking=$home/dehydra/dehydra-gcc/gcc_dehydra.so then, you can start building your mozilla. the static check will be done when compiling is going on. troubles you can post any question about stat...
Running Tamarin acceptance tests - Archive of obsolete content
er to use threading on windows you must install windows python and invoke runtests using that python executable in cygwin. the locations of avm, asc, builtinabc and shellabc must also be defined using windows paths (replace backslashes [\] with forward slashes [/]): export avm=c:/location/of/avmshell.exe export asc=c:/location/of/asc.jar ... c:/python26/python.exe ./runtests.py --threads=3 other
flags of interest (for a list of all
flags, run runtests.py with -h/--help) --nohtml : will suppress the creation of an html output file --rebuildtests : will only rebuild test .abc's, will not attempt to run them. can also be using in conjunction with --threads -f --forcerebuild force rebuild all test files -q --quiet : will print a period (.) for each test run regardless of results, then print the t...
Running Tamarin performance tests - Archive of obsolete content
"--index index.py" will load index.py and run all of the tests in that index and report results normalized to the index values. a subset of the tests in the index can be run by passing what tests you want to run after specifying the index file. "--saveindex indexname.py" will run the...
When To Use ifdefs - Archive of obsolete content
ifdefs are generally always acceptable. the only time when they might be a problem is in cross-platform extension code and locales: since this code is downloaded on multiple platforms, platform-specific ifdefs are generally out of the question. for an example of platform-specfic ifdefs, see nscrt.h. feature ifdefs the mozilla code has many features that can be enabled or disabled by configure
flags. for instance, it is possible to disable most of the xul rendering engine by specifying --disable-xul when configuring the build. when adding ifdefs that implement these configure
flags, care must be taken to obey the build dependencies. for instance, xpcom, the spidermonkey javascript engine, and the networking engine do not know anything about xul and should not have any ifdefs based on --disab...
Unix stub installer - Archive of obsolete content
don't want the installer to download then grab a nightly "full" installer, say from <ftp://ftp.mozilla.org/pub/mozilla/ni...gnu-sea.tar.gz>. then untar and gunzip this to /tmp. copy the xpi directory into the src2 directory you are debugging from. run the installer from the src2 directory by either using the mozilla-installer shell script or the mozilla-installer-bin binary with the appropriate
flags. if you need to use gdb to debug the installer run it by typing "gdb mozilla-installer-bin" on the shell prompt. how we get setup to debug the xpinstall engine from the unix stub installer? build your entire mozilla tree (which should build the installer in the src2 directory as well). go to mozilla/xpinstall/packager/unix. on the shell prompt type "perl deliver.pl". now you will find an ...
addDirectory - Archive of obsolete content
lled under this directory on the user's computer. you create this object by passing a string representing the directory to the getfolder method. subdir the name of a directory to append to localdirspec, using '/' as the path separator regardless of the platform.if subdir is missing, null, or "", the filenames are appended directly to the folder name specified by localdirspec.
flags an optional field; reserved for future use. pass 0 as the default value. returns an integer error code. for a list of possible values, see return codes. in some situations, adddirectory may return other errors. description the adddirectory method puts the files in the specified directory in a temporary location. to move the files and all other subcomponents to their final location, call ...
addFile - Archive of obsolete content
sing a string representing the directory to the getfolder method. relativelocalpath a pathname relative to the localdirspec parameter. the file is installed in this location on the user's machine. you must always use forward slashes (/) in this pathname, regardless of the convention of the underlying operating system. if this parameter is blank or null, xpisourcepath is used.
flags an optional field; reserved for future use. pass 0 as the default value. returns an integer error code. for a list of possible values, see return codes. description the addfile method puts the file in a temporary location. to move this and all other files to their final location, call the performinstall method after you've successfully added all files. note: if you are installing binary...
Attribute (XUL) - Archive of obsolete content
es decimalplaces default defaultbutton defaultset description dir disableautocomplete disableautoselect disableclose disabled disablehistory disablekeynavigation disablesecurity dlgtype dragging editable editortype element empty emptytext deprecated since gecko 2 enablecolumndrag enablehistory equalsize eventnode events expr firstdayofweek firstpage first-tab fixed
flags flex focused forcecomplete grippyhidden grippytooltiptext group handlectrltab height helpuri hidden hidechrome hidecolumnpicker hideheader hideseconds hidespinbuttons highlightnonmatches homepage href icon id ignoreblurwhilesearching ignorecase ignoreincolumnpicker ignorekeys image inactivetitlebarcolor increment index inputtooltiptext insertafter insertbefore in...
Getting File Information - Archive of obsolete content
()) throw "file cannot be modified"; if you aren't sure whether a file can be modified, for example, you may wish to check using nsifile.iswritable() first. otherwise, an attempt to write to the file will generate an error. the four methods above are usually sufficient for most purposes. however, you can also use the permissions (nsifile.attributes) attribute to get the unix-style permission
flags for a file. this attribute is also necessary if you need to modify the permissions. file.permissions = 0640; it is common to use an octal number (a number in base 8 beginning with 0) for permissions as it can make the value easier to read. in this case, the first digit is the permissions for the owner of the file, the second digit is the permissions for the group of the file and the third digi...
Reading from Files - Archive of obsolete content
ts() to check if the file exists before opening it. in fact, it is a good idea to enclose file reading and writing operations within a try-catch block to capture any errors that might occur during the process. see file errors for a list of errors that might occur. the newinputstream method takes two arguments in this example. the first argument is the file to read from, and the second is a set of
flags which control the reading. in this case, the 'text' flag is used which indicates that you expect this file to be text file. this method actually takes a number of additional arguments, however they are optional so they do not need to be specified if they aren't needed. these extra arguments will be discussed later. you can also specify to read from a binary file by using the flag 'binary' instead...
loadURI - Archive of obsolete content
« xul reference home note: this is the xul method on <browser> / <tabbrowser>, not the global function in chrome://browser/content/browser.js. please check which one you're documenting! (this one has no post data parameter, see loaduriwith
flags for a version that does) loaduri( uri, referrer, charset ) return type: no return value load a url into the document, with the given referrer and character set. the first argument should be a string, not a nsiuri object. to get a string from an nsiuri, use nsiuri.spec or nsiuri.asciispec ...
Methods - Archive of obsolete content
tvalueat getrowcount getsearchat getselecteditem getsession getsessionbyname getsessionresultat getsessionstatusat getsessionvalueat getstring goback gobackgroup godown goforward goforwardgroup gohome goto gotoindex goup hidepopup increase increasepage insertitem insertitemat invertselection loadgroup loadonetab loadtabs loaduri loaduriwith
flags makeeditable movebyoffset moveto movetoalertposition onsearchcomplete ontextentered ontextreverted openpopup openpopupatscreen opensubdialog openwindow preferenceforelement reload reloadalltabs reloadtab reloadwith
flags removeallitems removeallnotifications removealltabsbut removecurrentnotification removecurrenttab removeitemat removeitemfromselectio...
contentView - Archive of obsolete content
this interface lets you retrieve the dom element corresponding to a given a row index and vice versa. for trees that are not built with a content builder, the functions of nsitreecontentview will not be available, since there are no dom nodes to retrieve. ...
Sorting Results - Archive of obsolete content
e including the rdf: prefix in the sort attribute. for instance: <treecol id="name" label="name" sort="rdf:http://purl.org/dc/elements/1.1/title" flex="1"/> note that all of this discussion about sorting only applies to tree builders. for other elements or content trees, sorting is done by placing the attributes on the root element. content sorting for content builders (templates that do not use
flags="dont-build-content"), sorting is done by placing the sort and sortdirection attributes on the root node of the template. the sortactive attribute is not needed. in this example, the list of people is sorted ascending by name. <listbox datasources="people2.xml" ref="*" querytype="xml" sort="?name" sortdirection="ascending"> <template> <query expr="*/*"/> <action> <listite...
Template Logging - Archive of obsolete content
errors may be detected. the first debugging method involves logging all new results that apply to the template due to the data changing as well as logging results that are changed or removed. in addition, each result generated when the template is first created and initialized is logged. this logging of result changes is not done by default; it must be enabled with a flag. <vbox datasources="..."
flags="logging"/> the
flags attribute on the root element of the template should include the logging flag. if other
flags are used as well, separate them with spaces. enabling logging will output details to the error console for each result. the error console can be found on the firefox tools menu. this logging of results can be very useful for debugging, but remember to remove this flag when you have...
Using Recursive Templates - Archive of obsolete content
on on a template occurs automatically. in fact, it has occured with all of the examples so far. however, in most cases, there either aren't any children or the next iteration of the query doesn't return any results, so no output is generated. sometimes, you will not want a template generate recursive content. you can do this by adding a flag. <vbox datasources="people.xml" ref="*" querytype="xml"
flags="dont-recurse"> here, the
flags attribute is set to dont-recurse. this disables the recursion and only generates one level of results. « previousnext » ...
Content Panels - Archive of obsolete content
browsers there is a second type of content panel, using the browser tag. you would use this when you want to create a frame that displays content like a browser. actually, the iframe can do this too, but the browser has a variety of additional features. for example, the browser maintains a page history for use with back and forward buttons. the browser can also load pages with referers and other
flags. essentially, the browser tag should be used when you want to create a browser-like interface, but the iframe may be used when you just need a simple panel. a similar element, tabbrowser, provides the functionality of browser but also provides a tab bar for switching between multiple pages. this is the widget used by the mozilla browser for its tabbed browsing interface. the tabbrowser element is...
Creating a Window - Archive of obsolete content
script. no new syntax is necessary as you can use the window.open() function as one can do for html documents. however, one additional flag, called 'chrome' is necessary to indicate to the browser that this is a chrome document to open. this will open the window without the toolbars and menus and so forth that a normal browser window has. the syntax is described below: window.open(url,windowname,
flags); where the
flags contains the flag "chrome" as in this example window.open("chrome://navigator/content/navigator.xul", "bmarks", "chrome,width=600,height=300"); if you are using firefox, try below: window.open("chrome://browser/content/places/places.xul", "bmarks", "chrome,width=600,height=300"); you can test lines of javascript like these in the error console. choose tools – error con...
Manifest Files - Archive of obsolete content
or the user specific chrome directory. this latter chrome directory is normally the one used since the application directory might not have sufficient permissions to write into it. note: starting in gecko 2.0, only the file named chrome.manifest is read automatically; if you need to read multiple manifest files, use the manifest command in that file to import additional manifests. use manifest
flags to configure the scenarios in which the secondary manifest is imported. if you just want to try testing privileged xul code in the firefox browser, you can do this easily by just using a manifest with only one line in it: create a new directory somewhere. for example, on a windows machine, you might use c:\testfiles create a new ascii1 file called test.manifest in the chrome directory. it doe...
XUL Questions and Answers - Archive of obsolete content
hat has been put up to safeguard against cross-site-scripting attacks. a scheme is in development to allow servers to open up their site for cross-site access, but that's not yet done. hidechrome="true" doesn’t work on a mac? unfortunately, no simple solution to this was posted. a workaround is to open the content in a new window using "window.open" and send titlebar=”no” as one of the
flags in the 3rd argument. is it possible to have checkbox support for multi column lists? the current issue is a person exploring if it is possible to have checkbox support for multi column lists. the following is the code they wrote: <?xml version="1.0"?> <?xml-stylesheet href="chrome://global/skin/" type="text/css"?> <window id="test-window" title="check list test" xmlns:html="http://www.w3.o...
XUL element attributes - Archive of obsolete content
ys for a horizontally oriented element, this will make all of its children have the width of the widest child. for a vertically oriented element, this will make its children all have the height of the tallest child. never all of the children are displayed at the size required by the content or as specified by the width and height attributes or the css width and height properties.
flags type: space-separated list of the values below a set of
flags used for miscellaneous purposes. two
flags are defined, which may be the value of this attribute. dont-test-empty: for template generated content, the builder will not check that a container is empty. dont-build-content: this flag may be used on a tree to indicate that content elements should not be generated. this results in a...
XUL accessibility tool - Archive of obsolete content
a11y tool compatible with a user-specified xul app. (aaronandy) link report sections to relevant part of xul a11y guidelines. (aaronandy) enable tabs, context menu, and other browser extras in report window. (aaronandy) xul runner version that can run from the command line, check a text file, and output the results somewhere. known bugs: test for lowercase i or l as accesskey (sometimes?)
flags upppercase i and l too. possible false positives in some of the other tests processing is slower than we would like. ideas for further work on xul a11y some general ideas for using the tool and guidelines to further the accessibility cause within the mozilla project. add usability, i18n, security and other considerations to xul a11y guidelines -- make them more general sprinkle the a11y ...
action - Archive of obsolete content
datasource, determined from the query. if the same variable appears multiple times, it will have the same value in each place. for more information, see actions. ...
arrowscrollbox - Archive of obsolete content
er"/> <button label="lavender"/> <button label="gold"/> <button label="turquoise"/> <button label="peach"/> <button label="maroon"/> <button label="black"/> </arrowscrollbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width clicktoscroll type: boolean cl...
assign - Archive of obsolete content
be used within the expression. var type: string for the xul assign attribute, this is the variable to assign the value to; otherwise it's a reference to a template variable such as "?name". ...
bbox - Archive of obsolete content
perties | methods | related ] a horizontal box that is baseline aligned. it is equivalent to using an hbox element with an align attribute set to baseline. ...
bindings - Archive of obsolete content
firefox 3/mozilla 1.9 and later; instead binding elements may be placed directly inside the rule element. more information is available in the template guide. ...
box - Archive of obsolete content
o"/> <box orient="vertical"> <label value="one"/> <label value="two"/> </box> <box orient="horizontal"> <label value="three"/> <label value="four"/> </box> </box> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
column - Archive of obsolete content
define width and flexibility for the grid column and not place elements directly inside the column. more information is available in the xul tutorial. example see grid for an example. ...
columns - Archive of obsolete content
ght of the grid and are placed in their corresponding positions between the columns. more information about columns is available in the xul tutorial. example see grid for an example. ...
conditions - Archive of obsolete content
he rule matched. this element is used with firefox 2/mozilla 1.8 and earlier instead of the query element. more information is available in the xul tutorial. ...
deck - Archive of obsolete content
<button label="this is also the third page"/> </box> </deck> attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
editor - Archive of obsolete content
s read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document. webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document. most of its methods are callable directly on the element itself, such as goback and goforward. it also contains the load constants used by reloadwith
flags and loaduriwith
flags. methods geteditor( window ) return type: nsieditor returns the editing interface for the editor which contains numerous methods for manipulating the document. pass the editor's contentwindow as the argument. gethtmleditor( window ) return type: nsihtmleditor returns the html editing interface for the editor which contains methods for manipulating an html document.
grid - Archive of obsolete content
/> <menuitem label="sales" selected="true"/> <menuitem label="support"/> </menupopup> </menulist> </row> </rows> </grid> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
grippy - Archive of obsolete content
element that may be used inside a splitter which can be used to collapse a sibling element of the splitter. more information is available in the xul tutorial. ...
groupbox - Archive of obsolete content
ples <groupbox> <caption label="settings"/> <radiogroup> <radio label="black and white"/> <radio label="colour"/> </radiogroup> <checkbox label="enabled"/> </groupbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype ...
listcol - Archive of obsolete content
<listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
listcols - Archive of obsolete content
<listitem> <listcell label="buck"/> <listcell label="rogers"/> </listitem> <listitem> <listcell label="john"/> <listcell label="painter"/> </listitem> </listbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
listhead - Archive of obsolete content
ttribute out entirely. visible controls have a disabled property which, except for menus and menuitems, is normally preferred to use of the attribute, as it may need to update additional state. ...
listheader - Archive of obsolete content
ear on the element. if this is left out, no text appears. for an editable menuitem element the value of this attribute is copied to the menulist.value property upon user selection of the menuitem. ...
notificationbox - Archive of obsolete content
ons, notificationshidden methods appendnotification, getnotificationwithvalue, removeallnotifications, removecurrentnotification, removenotification, removetransientnotifications, attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties currentnotification ...
observes - Archive of obsolete content
alue * to observe all attribute of the broadcasters. the id, ref, and persist attributes are not observed. element type: id the id of the broadcaster element that the observer is observing. ...
page - Archive of obsolete content
xamples | attributes | properties | methods | related ] similar to a window, except it should be used for xul files that are to be loaded into an iframe. ...
popupset - Archive of obsolete content
id="clipmenu"> <menuitem label="cut"/> <menuitem label="copy"/> <menuitem label="paste"/> </menupopup> </popupset> <label value="right click for popup" context="clipmenu"/> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
preferences - Archive of obsolete content
root prefs branch. attribute nsiprefbranch defaultbranch; the root branch of the tree with default values. attribute nsiprefbranch2 rootbranchinternal; the root prefs branch (nsiprefbranch2). ...
tabpanel - Archive of obsolete content
l in a tabpanels element. this element is optional and you may just use any other container in place of it. more information is available in the xul tutorial. ...
tabpanels - Archive of obsolete content
ties selectedindex, selectedpanel examples (example needed) attributes selectedindex type: integer gets and sets the index of the currently selected panel. the first item is at index 0. ...
template - Archive of obsolete content
e: string may optionally be set to the variable to use as the member variable. if not specified, the variable specified in the uri attribute in the action body of the template's first rule is used. ...
textnode - Archive of obsolete content
es nothing outside of a template. attributes value examples (example needed) attributes value type: uri the text value to display. this value should be an rdf property (predicate). ...
titlebar - Archive of obsolete content
); margin: 8px 12px 16px;"/> </window> it can be opened from the error console like this: open("file:///users/markus/sites/hudwindow.xul", "", "chrome=1, titlebar=0") attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width note: the allowevents attribute did ...
toolbaritem - Archive of obsolete content
<toolbarbutton id="myext-button1" class="toolbarbutton-1" label="label1" /> <toolbarbutton id="myext-button2" class="toolbarbutton-1" label="labe2l" /> </toolbaritem> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
toolbarpalette - Archive of obsolete content
class="toolbarbutton-class" label="&mylabel;" tooltiptext="&mytiptext;" oncommand="somefunction()"/> </toolbarpalette> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties inherited properties...
toolbarseparator - Archive of obsolete content
erties accessibletype examples <toolbox> <toolbar> <toolbarbutton label="button 1"/> <toolbarseparator /> <toolbarbutton label="button 2"/> </toolbar> </toolbox> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessibletype ...
toolbarset - Archive of obsolete content
tributes | properties | methods | related ] firefox only this element is used as a container for custom toolbars, which are added in the custom toolbar dialog. ...
toolbox - Archive of obsolete content
el="stop"/> <toolbarbutton label="reload"/> </toolbar> </toolbox> <textbox multiline="true" value="we have two toolbars inside of one toolbox above." width="20"/> </window> attributes inherited from xul element align, allowevents, allownegativeassertions, class, coalesceduplicatearcs, collapsed, container, containment, context, contextmenu, datasources, dir, empty, equalsize,
flags, flex, height, hidden, id, insertafter, insertbefore, left, maxheight, maxwidth, menu, minheight, minwidth, mousethrough, observes, ordinal, orient, pack, persist, popup, position, preference-editable, querytype, ref, removeelement, sortdirection, sortresource, sortresource2, statustext, style, template, tooltip, tooltiptext, top, uri, wait-cursor, width properties accessible ...
treechildren - Archive of obsolete content
ground obsolete since gecko 2.0 type: boolean if true, the background of the tree's rows will alternate between two colors. you can use the :-moz-tree-row css style to do this instead. ...
treecols - Archive of obsolete content
utes pickertooltiptext properties accessibletype examples (example needed) attributes pickertooltiptext type: string the text for the tooltip on the column picker. ...
treerow - Archive of obsolete content
ded) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
treeseparator - Archive of obsolete content
ded) attributes properties type: space-separated list of property names sets the properties of the element, which can be used to style the element. for more information, see styling a tree. ...
triple - Archive of obsolete content
e type: uri the predicate or property to match. this must be a uri of the property. subject type: string the subject of the element. it can be a variable reference or an rdf resource uri. ...
where - Archive of obsolete content
e value contains the value of subject must contain the value as a substring subject type: string the variable or string to compare. value type: string the value to compare. ...
nsIContentPolicy - Archive of obsolete content
to content policy implementations, and should not be used outside gecko core code. reject_request -1 returned from shouldload() or shouldprocess() if the load or process request is rejected based on details of the request. reject_type -2 returned from shouldload() or shouldprocess() if the load/process is rejected based solely on its type (of the above
flags). note: this rejection only applies to the current request on this server, not to future requests of the same type. reject_server -3 returned from shouldload() or shouldprocess() if the load/process is rejected based on the server it is hosted on or requested from (acontentlocation or arequestorigin), e.g., if you block an image because it is served from goa...
Extentsions FAQ - Archive of obsolete content
n extension for thunderbird that preview upcomeing events and number of new messages? in our company i write this extension that connects to our groupware server (http). what server should souch extension work gainst? did you mean exchange? how to attach information using the stringproperties of an imap message with out changing the properties? string properties are implemented as imap user
flags. however not all servers support user
flags, in which case you get reduced functionality as follows: all
flags are stored in your local cache and are lost if your cache gets invalidated, and only "known" properties are copied when messages are copied. the list of "known" properties is: junkscore junkscoreorigin label priority keywords. keywords - in the gui they are called tags. they replace th...
2006-11-10 - Archive of obsolete content
other important notes are contained in the link above firefox and thunderbird 1.5.0.8 were released firefox and thunderbird 1.5.0.8 were released on november 7, 2006 blocker nomination and code freeze for 1.5.0.9/2.0.0.1 blocker nomination is due on november 10. ...
2006-09-29 - Archive of obsolete content
coord apadding, prbool ashrinkwrap) = 0; details can be located at refactoring some of nshtmlreflowstate. discussion on how to determine whether there is pending layout changes or reflows when using a popup. it was concluded that a frame model change is utilized within a popup, not a layout change. on the reflow branch, check the dirty and dirty_children framestate
flags. that won't help with pending style changes, but it'll work to detect cases when the popup or something in it needs to be reflown. details can be located at frame reflow issues related to the ongoing implementation of mathml-in-html into mozilla, which include: exposing the mathml implementation to tag soup. css matching rules. details can be located at mathml-in-html5 meetings no meetings fo...
NPEvent - Archive of obsolete content
usevent 0, 1 (true, false) losefocusevent adjustcursorevent 0, 1 (true, false) for information about these events, see the mac os developer documentation. message longint. additional information about the event. type of information depends on the event type. undefined for null, mouseup, and mousedown events. when longint. ticks since start-up. where point. cursor location. modifiers integer.
flags. xevent npevent on unix/x11 npevent is defined as an xevent data structure, which is a union of a number of different x11 event structures. type the type member is an int representing an event type, and indicating which structure is relevant. the event type may be any of the ollowing: graphicsexpose focusin focusout enternotify leavenotify motionnotify buttonpress buttonrelease keypres...
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
ertydescriptors() (firefox 50) async functions async function (firefox 52) async function expression (firefox 52) asyncfunction (firefox 52) await (firefox 52) trailing commas in function parameter lists (firefox 52) ecmascript 2018 spread in object literals and rest parameters (firefox 55) for await...of (firefox 57) global_objects/sharedarraybuffer (firefox 57, with
flags) global_objects/promise/finally (firefox 58) global_objects/regexp/dotall (not yet implemented; in other browsers) regexp lookbehind assertions (not yet implemented; in other browsers) regexp unicode property escapes (not yet implemented; in other browsers) regexp named capture groups (not yet implemented; in other browsers) ecmascript 2019 array.flat() (firefox 62) array.flatmap() (fi...
Building Mozilla XForms - Archive of obsolete content
e this instead (see bug 601570 for details): ac_add_options --enable-extensions="default,xforms,schema-validation" a complete .mozconfig file for a release build might look like that: . $topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ #mk_add_options autoconf=autoconf2.13 # possibly needed #mk_add_options moz_make_
flags=-jn # (optional) replace n with the number of parallel build processes (e.g. 2 on a dual core processor) ac_add_options --enable-extensions="default,xforms" ac_add_options --disable-debug ac_add_options --enable-optimize ac_add_options --disable-tests for a debug build, you could use this configuration: . $topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser mk_add_options ...
Vendor Prefix - MDN Web Docs Glossary: Definitions of Web-related terms
evelopers have been using them on production web sites, despite their experimental nature. this has made it more difficult for browser vendors to ensure compatibility and to work on new features; it's also been harmful to smaller browsers who wind up forced to add other browsers' prefixes in order to load popular web sites. lately, the trend is to add experimental features behind user-controlled
flags or preferences, and to create smaller specifications which can reach a stable state much more quickly. css prefixes the major browsers use the following prefixes: -webkit- (chrome, safari, newer versions of opera, almost all ios browsers including firefox for ios; basically, any webkit based browser) -moz- (firefox) -o- (old pre-webkit versions of opera) -ms- (internet explorer and micro...
Strategies for carrying out testing - Learn web development
orking on a low end device will make it more likely that the experience will be good on higher-end devices. note: some server-side development environments provide useful mechanisms for rolling out site changes to only a subset of users, providing a useful mechanism for getting a feature tested by a subset of users without the need for a separate development server. an example is django waffle
flags. summary after reading this article you should now have a good idea of what you can do to identify your target audience/target browser list, and then effectively carry out cross-browser testing on that list. next we'll turn our attention to the actual code issues your testing might uncover, starting with html and css. previous overview: cross browser testing next in this module i...
Mozilla accessibility architecture
ecific code via generic xpcom interfaces that return information about objects we want to expose. all focusable nodes, tables and text have accessibility interfaces. we call these objects "accessible nodes". each of these accessible nodes supports at minimum the generic cross-platform accessibility interface nsiaccessible (which provides a text name, enumerated role identifier and a set of state
flags) and sometimes additional interfaces. for example, tables support nsiaccessibletable, text supports nsiaccessibletext and edit boxes support nsieditabletext., although this code has been moved into the atk specific directories because it is not currently used in windows. we will not rule out the possibility of supporting some of the rich atk interfaces on windows. the toolkit-specific classes the...
Adding a new event
internalfooevent* asfooevent() moz_override this method should just return this. this method is used for retrieving sub class pointer avoiding to use static_cast. virtual widgetevent* duplicate() const moz_override this method should create a new instance with copying its members except widget. for copying the members, this should use assignfooeventdata() with true for acopytargets. and also, m
flags should be just copied since assignfooeventdata() doesn't copy m
flags. this method is basically used for duplicating an internal event class instance of a dom event when the dom event is stored by content. void assignfooeventdata(const internalfooevent* aevent, bool acopytargets) this method should copy members from aevent. first, this method should call its super class's this method. then, copy...
What to do and what not to do in Bugzilla
the application suite and move the bug to one of the core products, if the bug also exists in the application suite. if you don't know where a bug belongs, don't touch it! for example, don't move bugs into the js engine component unless you really know they are js engine bugs, and don't leave bugs in the js engine component if you know that the malfunction being described is a dom problem. bug
flags mozilla drivers use
flags to identify bugs blocking a release. you may only use the blocking? flag to nominate bugs for blocking status. the use of the blocking- flag and the blocking+ flag is prohibited. continued abuse will result in revocation of your bugzilla privileges. mass changes mass changes (changes to more than one bug simultaneously) are discouraged. don't do it! ...
Creating Sandboxed HTTP Connections
iptableinputstream.read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // request was successfull this.mcallbackfunc(this.mdata); } else { // request failed this.mcallbackfunc(null); } gchannel = null; }, // nsichanneleventsink onchannelredirect: function (aoldchannel, anewchannel, a
flags) { // if redirecting, store the new channel gchannel = anewchannel; }, // nsiinterfacerequestor getinterface: function (aiid) { try { return this.queryinterface(aiid); } catch (e) { throw components.results.ns_nointerface; } }, // nsiprogresseventsink (not implementing will cause annoying exceptions) onprogress : function (arequest, acontext, aprogres...
Debugging Table Reflow
reflow the most efficient tool to claim that html-table code is the victim and not the source of layout bugs is a frame reflow debug log. look there especially how the maxelementsize (mes) and desired size are propagated. block reflow another way to debug the reflow process is implemented inside nsblockframe.cpp. ...
Building Firefox with Debug Symbols
gle configure option to enable building with symbols on all platforms. this is enabled by default so unless you have explcitly disabled it your build you should include symbols. ac_add_options --enable-debug-symbols this can optionally take an argument for the type of symbols that need to be produced (like "-g3"). by default it uses "-g" on linux and macos. this value takes precedence over the
flags set in moz_debug_
flags note that this will override the values provided for c
flags and cxx
flags. breakpad symbol files after the build is complete, run the following command to generate an archive of breakpad symbol files: mach buildsymbols the tinderbox uses an additional uploadsymbols target to upload symbols to a socorro server. see https://dxr.mozilla.org/mozilla/source/toolkit/crashrep...
Makefile - variables
list of python scripts to check exit status for make check xpc_shell_tests no_xpcshell_manifest_check inhibit validating manifest files when running xpcshell tests. compiler variable description gnu_cc defined if the gnu gcc compiler is available. module_optimize_
flags additional
flags for enabling or overriding compiler optimizations(-o2). solaris_sunpro_cc sun studio compiler export variables description autocfg_js_exports exports a list of exported headers and source files for external use. has_extra_exports pr...
Makefiles - Best practices and suggestions
ing. dependency builds - a second invocation of make within a sandbox should always be a nop. hardcoded values - avoid them like the plague. use variable assignments, autogen paths and dynamic file gathering. platform specific - avoid this logic whenever possible. code as little platform specific logic within a makefile as possible, a conditional and compiler
flags at most should be needed. for ex use defines within sources to shift platform logic into your source code. if a unit test is platform specific write your makefile so it can be used on all platforms but only do work on the specific hardware or class of hardware. for classes of hardware (unix/windows) place your makefile in a subdirectory, unix/makefile.in ...
Simple SeaMonkey build
comm-central python client.py checkout # set up a basic .mozconfig file echo 'ac_add_options --enable-application=suite' > .mozconfig # let's build seamonkey... echo 'mk_add_options moz_objdir=/path/to/comm-central/obj-sm-release' >> .mozconfig # specify amount of parallel building. if the below is left out, a best guess will be taken automatically. echo 'mk_add_options moz_make_
flags="-j4"' >> .mozconfig # ...quickly. # build! # note: this requires autoconf 2.13 (at least initially). # on windows, be sure to use mozmake instead of make, otherwise parallel building will break. make -f client.mk for a debug build, you need different configuration options in your .mozconfig file. this requires more disk space, about 3 gb, and twice as much available ram...
Simple Sunbird build
client.py checkout # setup a basic .mozconfig file echo 'ac_add_options --enable-application=calendar' > .mozconfig # let's build sunbird... echo 'mk_add_options moz_objdir=@topsrcdir@/objdir-sb-release' >> .mozconfig # ...in this directory... # use this only if not on windows! parallel compilation on windows is # unreliable now due to bug 524149. echo 'mk_add_options moz_make_
flags="-j4"' >> .mozconfig # ...quickly. # build make -f client.mk for a debug build, you need different configuration options in your .mozconfig file. this requires more disk space, about 2.5 gb. mk_add_options moz_objdir=@topsrcdir@/objdir-sb-debug ac_add_options --enable-application=calendar ac_add_options --enable-debug ac_add_options --disable-optimize running sunbird t...
pymake
/pymake/make.py save your .profile edit and close the shell, then restart the shell. try typing just pymake into the shell and press enter. this should come back with "no makefile found." if it does, your pymake alias is connected and you are ready to type in pymake -f client.mk to start the build. unlike gmake on windows, pymake is capable of doing parallel builds, so you can set a moz_make_
flags=-jn in your .mozconfig without risk of deadlocks. note: on windows, if using an absolute path moz_objdir in your .mozconfig, it must be a windows-style (i.e. c:/foo/bar) rather than an msys-style (i.e. /c/foo/bar) path. ...
Creating Custom Events That Can Pass Data
ng easier. your modification of this file is basically just two macro calls. try to make sure of two things: keep your stuff at the back. you know never know what depends on that enum you modified keep your stuff organized. same reason as above. you need to make the following two modifications: around line 1000: ns_define_classinfo_data({truncated name}, nsdomgenericsh, dom_default_scriptable_
flags) around line 2900: dom_classinfo_map_begin({truncated name}, nsidom{truncatedname}) dom_classinfo_map_entry(nsidom{truncated name}) dom_classinfo_event_map_entries dom_classinfo_map_end remember, {truncated name} is the same as above. mozilla/content/events/src/nseventdispatcher.cpp note: in the mozilla 1.8.x branch this code is actually in mozilla/content/events/src/nseventlistenermanage...
Eclipse CDT
e you straight to the source file and line where the problem occurred. for this to work reliably though, you still need to build using slow -j1 -w builds, so that make outputs non-interleaved "entering"/"leaving" lines. it also used to be necessary to add the following two lines to your mozconfig to make the compiler output errors all on a single line, but that may not be needed anymore: export c
flags="-fmessage-length=0" export cpp
flags="-fmessage-length=0" debugging to create a debug configuration, open the project properties window, and select "run/debug settings" on the left. click "new", then select "c/c++ application". in the window that opens enter the path to your firefox binary (something like {your-obj-dir}/dist/nightlydebug.app/contents/macos/firefox) and select "disable auto bui...
Interface Compatibility
t. js-ctypes is the recommended way for extensions to call into os or third-party native code. you should strongly consider migrating existing code to use js-ctypes instead of binary components. if necessary, it is possible for an extension to support multiple versions by shipping multiple shared libraries (dlls) in the same extension package, and selecting the correct version using versioning
flags in its chrome.manifest file. jsapi, nspr, nss, and other libraries which are currently shipped as separate shared libraries may be integrated into libxul, and extension authors should avoid linking against them. ...
Reviewer Checklist
should be guarded by a version check. preffability if the feature being worked on is covered by prefs, make sure they are hooked up. if working on a new feature, consider adding prefs to control the behavior. consider adding prefs to disable the feature entirely in case bugs are found later in the release cycle. [fennec: "prefs" can be gecko prefs, sharedpreferences values, or build-time
flags. which one you choose depends on how the feature is implemented: a pure java service can't easily check gecko prefs, for example.] strings there should be no string changes in patches that will be uplifted (including string removals). rev entity names for string changes. when making ui changes, be aware of the fact that strings will be different lengths in different locales. documentatio...
mach
nsole/test # run mochitests in devtools/client/webconsole/test enable tab completion to enable tab completion in bash, run the following command. you can add the command to your .profile so it will run automatically when you start the shell: source /path/to/mozilla-central/python/mach/bash-completion.sh this will enable tab completion of mach command names, and in the future it may complete
flags and other arguments too. note: mach tab completion will not work when running mach in a source directory older than firefox 24. for zsh, you can call the built-in bashcompinit function before sourcing: autoload bashcompinit bashcompinit source /path/to/mozilla-central/python/mach/bash-completion.sh frequently asked questions why should i not use mach? a real faq for a change! mach is not ...
Security best practices for Firefox front-end engineers
developing front-end code for firefox. existing security controls sanitizing all strings that enter the dom through apis such as innerhtml when running system-privileged chrome code, we sanitize all html fragments that are created for chrome-privileged documents. this policy includes all dom apis that take a string and parse it into a dom tree. we use our built-in sanitizer with the following
flags: sanitizerallowstyle sanitizerallowcomments sanitizerdropforms sanitizerlogremovals the sanitizer removes all scripts (script tags, event handlers) and form elements (form, input, keygen, option, optgroup, select, button, datalist). the canonical truth for the list of whitelisted elements is the source code. the last flag ensures that developers will identify and avoid the problems early on in...
Getting from Content to Layout
r takes these notifications and does the following: dispatches "restyle events" which trigger the reprocessing of relevant css selectors and any restyling that needs to occur. adds and removes frames to make the frame tree a proper representation of the new content tree. restyling the restyletracker maintains a list of restyles to process. elements that need to be restyled are marked with
flags (e.g element_has_pending_restyle) and are stored in the mpendingrestyles hashtable. a list of restyle roots (places in the content tree where all descendants need to be restyled but nothing on the parent chain does) are also stored. the restyles accumulated in the restyletracker are dispensed with from various method on the presshell that involve reflow and flushing notifications. frame constr...
HTTP Cache
ers. keeps its internal state like notloaded, loading, empty, writing, ready, revalidating. keeps the number of consumers keeping a reference to it. refers a cachefile object that holds actual data and meta data and, when told to, persists it to the disk. the openers fifo is an array of cacheentry::callback objects. cacheentry::callback keeps a strong reference to the opener plus the opening
flags. nsicachestorage.asyncopenuri forwards to cacheentry::asyncopen and triggers the following pseudo-code: cachestorage::asyncopenuri - the api entry point: globally atomic: look a given cacheentry in cachestorageservice hash tables up if not found: create a new one, add it to the proper hash table and set its state to notloaded consumer reference ++ call to cacheentry::asynco...
IME handling guide
of composition is committed) in the future, we should fix this limitation. if we make editorbase not touch undo stack until composition is committed, some of the cases must be fixed. notifications to ime xp part of gecko uses nsiwidget::notifyime() for notifying widget of something useful to handle ime. note that some of them are notified only when nsiwidget::getimeupdatepreference() returns
flags which request the notifications. notify_ime_of_text_change, notify_ime_of_selection_change, notify_ime_of_position_change and notify_ime_of_composition_event_handled are always sent by following order: notify_ime_of_text_change notify_ime_of_selection_change notify_ime_of_position_change notify_ime_of_composition_event_handled if sending one of above notifications causes higher priority ...
AddonManager
enabled; however, you can't turn off the profile scope. starting in firefox 8, you can also set the value of the preference extensions.autodisabledscopes to prevent firefox from automatically installing add-ons from the specified scopes. addontype viewtypes constant description view_type_list the type should be displayed in a regular list view in the ui. addontype
flags constant description type_ui_hide_empty the type should be hidden from the ui if no add-ons of that type are currently installed. startup change types these constants represent the lists of types of changes that can occur to add-ons during startup; they're used with the getstartupchanges(), addstartupchange(), and removestartupchange() methods. constant ...
CustomizableUI.jsm
ng on newer browsers, xul overlay does not contain description of the button that you are creating with createwidget() method. otherwise, conflicting static xul overlay button and dynamic customizableui buttons might cause the created button to be unstable or create a double button. to avoid that, update your chrome manifest file with links to two different versions of xul overlay, using manifest
flags. note: unlike button described with xul overlay, widget-button created via createwidget() method cannot have references to other overlay elements transferred directly as parameters. for example, if there is a need to create a button with dynamically assignable tooltip, the node for static tooltip should be deleted as soon as the widget will be created, and node-reference to popup tooltip element...
Application Translation with Mercurial
earches etc. like in this example "firefox 29: aboutprivatebrowsing.dtd" fill any important and additional information into the description field. click the 'add attachment' button. select the exported patch file with the file picker. the checkbox for 'patch' should get automatically checked. add a meaningful name for the attachment, e.g. aboutprivatebrowsing.dtd, patch, v1 go to the review '
flags' category and set the one for review to ?, meaning that you request review for the patch. in the text field next to it, add the mail address of the person leading the translation of the locale. this information can be found on the page of the localization team. submit the bug report. now you have to wait for the review of that person. this can happen on the same day, on the next weekend or lat...
Release phase
sion merge between release channels, although it is recommended. there is a specific process to follow in bugzilla for requesting these reviews: file a bug requesting the review. attach your files to the bug. once attached, open the attachment details. in the attachment details, select the ? from the dropdown menu next to the review flag or the appropriate approval
flags (see image). this will display a text box to assign the review to someone. enter :pike as the requestee. we will perform a technical review of your work and provide you with feedback. we're happy to work with you to make sure that your work is fully functional. for more detailed information about reviews for new localizations and sign-offs for maintenance releases, visit the technical review a...
Localization sign-off reviews
nt the best of your work. so before you request your sign-off review, be sure that it is as ready as it can be. there is a specific process to follow in bugzilla for requesting these reviews: file a bug requesting the review. attach your files to the bug. once attached, open the attachment details. in the attachment details, select the ? from the dropdown menu next to the appropriate approval
flags (see image). this will display a text box to assign the review to someone. enter :pike as the requestee. once you have made the formal request in bugzilla and you have pushed your work into your l10n repo, refer to the dashboards to follow your review's progress. sign-off dashboards to the right, you'll see the current sign-offs page for a german localization. sign-offs are approved using the ...
Gecko Profiler FAQ
or. you do want to think about various characteristics of an allocator which may have an impact on performance. for example, see julian’s great investigation on the impact of cache line sharing across multiple cores on jemalloc’s multi-core performance in https://bugzilla.mozilla.org/show_bug.cgi?id=1291355#c26. what's the best way to measure the cost of new compiler
flags (that affect all or most functions)? [ehsan] this is similar to the previous question to some extent, but the specific answer really depends on what kind of compiler flag we’re talking about and what performance impact we’re interested to study. but the short answer is picking up real browser workloads, and finding ways to split out the overall cost contributed by the thing that ...
Profiling with Xperf
and off; removing a column will allow data to be aggregated without considering that column's contributions. disabling all but one core will make the numbers add up to 100%. this can be done by running 'msconfig' and going to advance options from the "boot" tab. building firefox to get good data from a firefox build, it is important to build with the following options in your mozconfig: export c
flags="-oy-" export cxx
flags="-oy-" this disables frame-pointer optimization which lets xperf do a much better job unwinding the stack. traces can be captured fine without this option (for example, from nightlies), but the stack information will not be useful. ac_add_options --enable-debug-symbols this gives us symbols. for more information microsoft's documentation for xperf is pretty good; there is ...
Profiling with the Firefox Profiler
b you want symbols for. (and "symn" if you have an "n" job you want symbols for, i.e. a build job with the "nightly configuration.) profiling firefox mobile firefox 61 for android supports gecko profiler again; see remote profiling on android for details. the following information is old version of firefox for android. for local builds of fennec, you should build with optimization and strip_
flags="--strip-debug" but not with --enable-profiling. nightly builds are already built with the appropriate
flags. you'll need to have adb and arm-eabi-addr2line (which is part of the android ndk) in your bash path, so use locate arm-eabi-addr2line (on linux) or mdfind name:arm-eabi-addr2line (on os x) and stick an export to its location in ~/.bash_profile. the extension will invoke bash to use adb a...
AsyncTestUtils extended framework
ait_for_message_injection(); create one or more new sets of messages and add them to the provided folders. like make_folders_with_sets, the messages are spread across the folders. folders create a folder let folderhandle = make_empty_folder(aoptionalfoldername); you do not have to specify a folder name - if you don't care, we'll make one up for you. if you need to get fancy about having
flags set on the folder, we support that, but please check the method documentation. get / create the junk folder let junkfolder = get_junk_folder(); create a virtual folder (a folder whose contents are the result of a saved search) let virtualfolder = make_virtual_folder([afoldertosearch1, afoldertosearch2, ...], {subject: "", body: "", from: "", to: "", cc...
Nonblocking IO In NSPR
ata available for reading on that socket. i.e., <tt>pr_recv()</tt> would block (a blocking socket) or fail with <tt>pr_would_block_error</tt> (a nonblocking socket). the tcp connection on that socket has been closed (end of stream). these two cases can be distinguished by <tt>pr_poll()</tt>. if <tt>pr_poll()</tt> reports that the socket is readable (i.e., <tt>pr_poll_read</tt> is set in <tt>out_
flags</tt>), and <tt>pr_available()</tt> returns 0, this means that the socket connection is closed. current status implemented across all supported platforms. original document information author: wan-teh chang last updated date: october 30, 1997 ...
I/O Functions
able event has two states: set and unset. events are not queued, so there is no notion of an event count. a pollable event is either set or unset. pr_newpollableevent pr_destroypollableevent pr_setpollableevent pr_waitforpollableevent one can call pr_poll with the pr_poll_read flag on a pollable event. whe the pollable event is set, pr_poll returns the the pr_poll_read flag set in the out_
flags. manipulating layers file descriptors may be layered. for example, ssl is a layer on top of a reliable bytestream layer such as tcp. each type of layer has a unique identity, which is allocated by the runtime. the layer implementor should associate the identity with all layers of that type. it is then possible to scan the chain of layers and find a layer that one recognizes and therefore predi...
PR_AttachSharedMemory
attaches a memory segment previously opened with pr_opensharedmemory and maps it into the process memory space. syntax #include <prshm.h> nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn
flags ); /* define values for pr_attachsharedmemory(...,
flags) */ #define pr_shm_readonly 0x01 parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
flags options for mapping the shared memory. pr_shm_readonly causes the memory to be attached read-only. returns address where shared memory is mapped, or null if an error occurs. retrieve the reason for the failure by calling pr_geterror and pr_getoserror. ...
PR GetAddrInfoByName
looks up a host by name. equivalent to getaddrinfo(host, null, ...) of rfc 3493. syntax #include <prnetdb.h> praddrinfo *pr getaddrinfobyname( const char *hostname, pruint16 af, printn
flags); parameters the function has the following parameters: hostname the character string defining the host name of interest. af the address family. may be pr_af_unspec or pr_af_inet.
flags may be either pr_ai_addrconfig or pr_ai_addrconfig | pr_ai_nocanonname. include pr_ai_nocanonname to suppress the determination of the canonical name corresponding to hostname returns the function returns one of the following values: if successful, a pointer to the opaque praddrinfo structure containing the results of the host lookup. use pr_enumerateaddrinfo to inspect the prnetaddr values stored ...
PR_OpenSharedMemory
opens an existing shared memory segment or, if one with the specified name doesn't exist, creates a new one. syntax #include <prshm.h> nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn
flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if already exists */ parameters the function has the following parameters: name the name of the shared memory segment. size the size of the shared memory segment.
flags options for creating the shared memory. mode same as passed to pr_open. returns pointer to opaque structure prsharedmemory, or null if an error occurs. retri...
Certificate functions
cert_decodebasicconstraintvalue mxr 3.2 and later cert_decodecertfrompackage mxr 3.4 and later cert_decodecertificatepoliciesextension mxr 3.2 and later cert_decodecertpackage mxr 3.2 and later cert_decodecrldistributionpoints mxr 3.10 and later cert_decodedercrl mxr 3.2 and later cert_decodedercrlwith
flags mxr 3.6 and later cert_decodegeneralname mxr 3.4 and later cert_decodenameconstraintsextension mxr 3.10 and later cert_decodeocspresponse mxr 3.6 and later cert_decodeoidsequence mxr 3.2 and later cert_decodeprivkeyusageperiodextension mxr 3.10 and later cert_decodetruststring mxr 3.4 and later ...
4.3.1 Release Notes
t). sslsocket.ssl_renegotiate_requires_xtn - not yet implemented explicitly set the key usage for the generated private key in pkcs #11, each keypair can be marked with the operations it will be used to perform. some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care. nss/jss provides a way to specify a set of
flags and a corresponding mask for these
flags. see generateeckeypairwithop
flags see generatersakeypairwithop
flags see generatedsakeypairwithop
flags distribution information jss is checked into mozilla/security/jss/. the cvs tag for the jss 4.3.1 release is jss_4_3_1_rtm. source tarballs are available from ftp://ftp.mozilla.org/pub/mozilla.or...-4.3.1.tar.bz2 binary releases are no longer avail...
NSS_3.12.2_release_notes.html
ers bug 449725: signver is still using static libraries. bug 450427: add comodo ecc certification authority certificate to nss bug 450536: remove obsolete xp_mac code bug 451024: certutil.exe crashes with segmentation fault inside pr_cleanup bug 451927: security/coreconf/winnt6.0.mk has invalid defines bug 452751: slot leak in pk11_findslotsbynames bug 452865: remove obsolete linker
flags needed when libnss3 was linked with libsoftokn3 bug 454961: fix the implementation and use of pr_fgets in signtool bug 455348: change hyphens to underscores in debug_$(shell whoami). bug 455424: nssilckt.h defines the enumeration constant 'lock' bug 456036: stubs for deprecated functions in lib/certdb/stanpcertdb.c should set the pr_not_implemented_error error. bug 456854: cert_decodece...
NSS 3.12.4 release notes
it fails to import a crl bug 488350: nspr-free freebl interface need to do post tests only in fips mode. bug 488396: dbm needs to be fips certifiable. ...
NSS 3.12.5 release_notes
by dest with a secitem_freeitem(dest, pr_false) or port_free(dest->data) call. environment variables nss_fips will start nss in fips mode. nss_ssl_enable_renegotiation nss_ssl_require_safe_negotiation see ssl3 & tls renegotiation vulnerability. bugs fixed the following bugs have been fixed in nss 3.12.5. ...
NSS 3.14.2 release notes
rt for running nss test suites on android devices.this is currently limited to running tests from a linux host machine using an ssh connection. only the sshdroid app has been tested. bug 373108 - fixed a bug where, under certain circumstances, when applications supplied invalid/out-of-bounds parameters for aes encryption, a double free may occur. bug 813857 - modification of certificate trust
flags from multiple threads is now a thread-safe operation. bug 618418 - c_decrypt/c_decryptfinal now correctly validate the pkcs #7 padding when present. bug 807890 - added support for microsoft trust list signing eku. bug 822433 - fixed a crash in dtls_freehandshakemessages. bug 823336 - reject invalid ldap aia uris sooner. bugs fixed in nss 3.14.2 https://bugzilla.mozilla.org/buglist.cgi...
NSS 3.16.1 release notes
ity added the "ecc" flag for modutil to select the module used for elliptic curve cryptography (ecc) operations. new functions in pk11pub.h pk11_exportderprivatekeyinfo and pk11_exportprivkeyinfo - exports a private key in a der-encoded asn.1 privatekeyinfo type or a seckeyprivatekeyinfo structure. only rsa private keys are supported now. in secmod.h secmod_internaltopubmech
flags - converts from nss-internal to public representation of mechanism
flags. new types in sslt.h ssl_padding_xtn - the value of this enum constant changed from the experimental value 35655 to the iana-assigned value 21. . new macros in secmod.h public_mech_ecc_flag - a public mechanism flag for elliptic curve cryptography (ecc) operations. in utilmodt.h secmod...
NSS 3.16.2 release notes
critical-flag:filename]... the certutil command has three new certificate usage specifiers: l: certificateusagesslca a: certificateusageanyca y: certificateusageverifyca the pp command has a new command-line option -u, which means "use utf-8". the default is to show a non-ascii character as ".". on linux, nss is built with the -ffunction-sections -fdata-sections compiler
flags and the --gc-sections linker flag to allow unused functions to be discarded. bugs fixed in nss 3.16.2 this bugzilla query returns all the bugs fixed in nss 3.16.2: https://bugzilla.mozilla.org/buglist.cgi?resolution=fixed&classification=components&query_format=advanced&product=nss&target_milestone=3.16.2 ...
NSS 3.28.5 release notes
b7:00 cn=microsec e-szigno root sha-256 fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 fingerprint: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust
flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust
flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version number of the updated root ca list has been ...
NSS 3.30.2 release notes
b7:00 cn=microsec e-szigno root sha-256 fingerprint: 32:7a:3d:76:1a:ba:de:a0:34:eb:99:84:06:27:5c:b1:a4:77:6e:fd:ae:2f:df:6d:01:68:ea:1c:4f:55:67:d0 the following ca certificates were added: cn = d-trust root ca 3 2013 sha-256 fingerprint: a1:a8:6d:04:12:1e:b8:7f:02:7c:66:f5:33:03:c2:8e:57:39:f9:43:fc:84:b3:8a:d6:af:00:90:35:dd:94:57 trust
flags: email cn = tubitak kamu sm ssl kok sertifikasi - surum 1 sha-256 fingerprint: 46:ed:c3:68:90:46:d5:3a:45:3f:b3:10:4a:b8:0d:ca:ec:65:8b:26:60:ea:16:29:dd:7e:86:79:90:64:87:16 trust
flags: websites technically constrained to: gov.tr, k12.tr, pol.tr, mil.tr, tsk.tr, kep.tr, bel.tr, edu.tr, org.tr the version number of the updated root ca list has been ...
NSS 3.39 release notes
check an nss policy configuration for problems. a pkcs#11 uri can be used as an identifier for a pkcs#11 token. new functions in cert.h cert_getcertkeytype - query the key type associated with the given certificate. utilpars.h nssutil_addnssflagtomodulespec - a helper function for modifying the pkcs#11 module configuration. it can be used to add a single flag to the
flags= section inside the spec's nss= section. notable changes in nss 3.39 the tls 1.3 implementation uses the final version number from rfc 8446. previous versions of nss accepted an rsa pkcs#1 v1.5 signature where the digestinfo structure was missing the null parameter. starting with version 3.39, nss requires the encoding to contain the null parameter. the tstclnt and selfserv test uti...
NSS API Guidelines
are defined to take an nssarena *arenaopt argument. this means if an arena is specified (non-null), it is used, otherwise (null) the routine uses the heap. you can think of the heap as a default arena you can't destroy. error handling nss 3.0 introduces the concept of an error stack. when something goes wrong, the call stack unwinds, with routines returning an error indication. each level which
flags a problem, adds its own error number to the stack. at the bottom of the stack is the fundamental error, for example: file not found, and on top is an error precisely relating to what you are doing. note: error stacks are vertical, and never horizontal. if multiple things go wrong simultaneously, and you want to report them all, use another mechanism. errors, though not integers, are done as e...
FC_GetSessionInfo
may call fc_getsessioninfo without logging into the token (to assume the nss user role). if the nss cryptographic module is in the error state, fc_getsessioninfo returns ckr_device_error. otherwise, it fills in the ck_session_info structure with the following information: state: the state of the session, i.e., no role is assumed, the user role is assumed, or the crypto officer role is assumed
flags: bit
flags that define the type of session ckf_rw_session (0x00000002): true if the session is read/write; false if the session is read-only. ckf_serial_session (0x00000004): this flag is provided for backward compatibility and is always set to true. return value examples see also fc_closesession, nsc_opensession ...
FC_GetTokenInfo
added with spaces to 32 bytes and not null-terminated. manufacturerid: id of the device manufacturer, "mozilla foundation", padded with spaces to 32 characters and not null-terminated. model: model of the device, "nss 3", padded with spaces to 16 characters and not null-terminated. serialnumber: the device's serial number as a string, "0000000000000000", 16 characters and not null-terminated.
flags: bit
flags indicating capabilities and status of the device. ckf_rng (0x00000001): this device has a random number generator ckf_write_protected (0x00000002): this device is read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0...
NSS environment variables
complete. variable type description introduced in version build_opt boolean (1 to enable) do an optimized (not debug) build. default is to do a debug build. before 3.0 moz_debug_symbols boolean (1 to enable) needed on windows to build with versions of msvc (such as vc8 and vc9) that do not understand /pdb:none 3.11 moz_debug_
flags string when moz_debug_symbols is set, you may use moz_debug_
flags to specify alternative compiler
flags to produce symbolic debugging information in a particular format. 3.12.8 nsdistmode string on operating systems other than windows, this controls whether copies, absolute symlinks, or relative symlinks of the output files should be published to mozilla/dist. the pos...
Utility functions
mxr 3.4 and later secmod_hasremovableslots mxr 3.9.3 and later secmod_ismodulepresent mxr 3.2 and later secmod_loadmodule mxr 3.4 and later secmod_loadusermodule mxr 3.4 and later secmod_lookupslot mxr 3.2 and later secmod_pubcipher
flagstointernal mxr 3.4 and later secmod_pubmech
flagstointernal mxr 3.4 and later secmod_unloadusermodule mxr 3.4 and later secmod_updatemodule mxr 3.4 and later secmod_updateslotlist mxr 3.9.3 and later secmod_waitforanytokenevent mxr 3.9.3 and later ...
Renaming With Pork
odebases. these notes are based on tools pork refactoring toolchain [required]. see installing pork. filterdiff from patchutils renaming a class 1. make two copies of the source(analysis and test). this isn't strictly required, but will save time. 2. the first copy will be an analysis copy. convince gcc to create annotated .ii files while compiling the analysis copy. typically, make cxx
flags="-wp,-k,-w0 -save-temps" will work. note the -k,-w0 options are passed down to the mcpp preprocessor such that it can annotate files with more precise position information. in order for this to work mcpp has to be integrated into your compiler as described in the pork installation instructions 3. in the analysis copy make a list of files to process. use absolute paths. find `pwd` -name \*.ii > ...
Exact Stack Rooting
ed to store things that are not gcpointers, so the gc cannot automatically handle this slot. this means it must be manually traced by the object's owner: this is both fragile and more expensive than using an extra reserved slot, or even just putting a new property on the object. class fooclass = { "fooprototype", /* name */ jsclass_has_private | jsclass_has_reserved_slots(1), /*
flags */ js_propertystub, /* addproperty */ js_propertystub, /* delproperty */ ... etc ... }; rootedobject obj(cx, newobject(cx, &fooclass, nullptr(), nullptr(), &obj)); rootedvalue v(cx, object_to_value(othergcthing)); jsobject::setreservedslot(obj, 0, v); storing a gcpointer on the cheap todo: tracing and heapptr storing a gcpointer on the cstack gcpointers stored on ...
JIT Optimization Outcomes
ultiprotopaths objects used in this operation had differing prototypes. nonwritableproperty the property being assigned to is not writable for some types of objects which are used in this operation. protoindexedprops the object being accessed has indexed properties that are exotic (for example, defined as a property on a prototype object and left as a hole in the underlying object). arraybad
flags the array being accessed may have
flags that the optimization strategy cannot handle. for example, if the array has sparse indexes, or has indexes that overflow the array's length, the optimization strategy may fail. arraydoubleconversion the type-system indicates that some arrays at this site should be converted to packed arrays of doubles while others should not. the optimization strategy fa...
JSExtendedClass
h the base fields and the extended fields. ensure that the additional reserved fields at the end of the jsextendedclass are null. jsclass and jsextendedclass structs should usually be global, and in this case the compiler automatically initializes these fields to null. (this is a feature of the c and c++ languages.) otherwise, use memset. set the jsclass_is_extended flag in myextendedclass.base.
flags. pass &myextendedclass.base to functions like js_initclass or js_newobject that require a jsclass *. see also bug 571789 ...
JSExtendedClass.wrappedObject
d in spidermonkey 1.8 callback for objects that wrap other objects. syntax typedef jsobject * (*jsobjectop)(jscontext *cx, jsobject *obj); name type description cx jscontext * the context in which the object is being unwrapped. obj jsobject * the object to unwrap. description if a class has the jsclass_is_extended bit set in its jsclass.
flags and has a non-null jsextendedclass.wrappedobject, then objects of that class may be wrappers. in a few cases the javascript engine will pretend the wrapper isn't there, instead operating on the object it wraps. in these cases the engine calls the jsextendedclass.wrappedobject callback to get the wrapped object. most classes do not implement wrappedobject. the specific cases where this happens ar...
JSNewEnumerateOp
it's the target of a for-in loop or js_enumerate. all other property inspection, including object.keys(obj), goes through [[ownkeys]]. the callback's job is to populate properties with all property keys that the for-in loop should visit. before jsapi 37, jsnewenumerateop was the type of jsclass.enumerate. to use a jsnewenumerateop in a jsclass, set the jsclass_new_enumerate bit in the jsclass.
flags field and set the jsclass.enumerate field to your jsnewenumerateop, casting it to jsenumerateop. (spidermonkey, noting the jsclass_new_enumerate flag, will cast that function pointer back to type jsnewenumerateop before calling it.) the behavior depends on the value of enum_op: jsenumerate_init a new, opaque iterator state should be allocated and stored in *statep. (you can use private_to_...
JSObjectOps.getRequiredSlot
for jssetrequiredslotop. description get and set a required slot, one that should already have been allocated. these operations are infallible, so required slots must be pre-allocated, or implementations must suppress out-of-memory errors. the native ops (js_objectops, see js/src/jsobj.cpp) access slots reserved by including a call to the jsclass_has_reserved_slots(n) macro in the jsclass.
flags initializer. note: the slot parameter is a zero-based index into obj slots, unlike the index parameter to the js_getreservedslot and js_setreservedslot api entry points, which is a zero-based index into the jsclass_reserved_slots(clasp) reserved slots that come after the initial well-known slots: proto, parent, class, and optionally, the private data slot. ...
JSReserveSlotsOp
excepting a few internal classes such as function, call, and block). jsclass hooks jsclass offers the following hook: the jsclass.reserveslots callback is called each time a new object is created. the optional jsclass.reserveslots hook allows a class to make computed per-instance object slots reservations, in addition to or instead of using jsclass_has_reserved_slots(n) in the jsclass.
flags initializer to reserve a constant-per-class number of slots. implementations of this hook should return the number of slots to reserve, not including any reserved by using jsclass_has_reserved_slots(n) in jsclass.
flags. see also jsclass ...
JS_DefineConstDoubles
ore properties for a specified object, obj, where each property consists of a double value. js_defineconstintegers creates one or more properties for a specified object, obj, where each property consists of a int32_t value. the attributes for each property is set to jsprop_readonly | jsprop_permanent. obsolete from jsapi 35 each property is automatically assigned attributes as specified in the
flags field of the jsconstdoublespec/jsconstintegerspec structure pointed to by cds/cis. if
flags is set to 0, the attributes for the property are automatically set to jsprop_permanent | jsprop_readonly. cds and cis are pointers to the first element of an array of jsconstdoublespec/jsconstintegerspec structures. each array element defines a single property name and property value to create. the name f...
JS_DefineFunctions
ction specifications. each element of the array defines an individual function. behavior propertydefinitionbehavior see below. added in spidermonkey 38 enum propertydefinitionbehavior { defineallproperties, onlydefinelateproperties, dontdefinelateproperties }; name description defineallproperties define all properties regardless of their
flags. onlydefinelateproperties define only properties which have a jsprop_define_late flag. dontdefinelateproperties define only properties which have no jsprop_define_late flag. description js_definefunctions creates zero or more functions and makes them properties (methods) of a specified object, obj, as if by calling js_definefunction repeatedly. fs is a pointer to ...
JS_DefineObject
this jscontext. obj js::handleobject object to which this new object belongs as a property. name const char * name of the property being defined in obj to hold the new object. clasp const jsclass * class to use for the new object. proto js::handleobject prototype object to use for the new object, or null. obsolete since jsapi 38
flags unsigned property attributes for the new property being defined. description js_defineobject creates a new object of the class clasp and assigns it to a new property of an existing object, obj. name is the property name to assign to obj to hold the new object, and
flags contains the property attributes to set for the newly created property. the new object's parent is obj. js_defin...
JS_DefineProperties
ec *ps); name type description cx jscontext * the context in which to define the properties. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. obj jsobject * the object on which to define new properties. ps const jspropertyspec * pointer to the first element of an array containing names, ids,
flags, and getproperty and setproperty method for the properties to create. the last array element must contain 0-valued members. in spidermonkey versions prior to spidermonkey 24, the last argument to js_definepropeties was not const. description js_defineproperties creates properties on a specified object, obj. ps is a pointer to the first element of an array of jspropertyspec structures. ea...
JS_GetOptions
is obsolete. although it may still work in some browsers, its use is discouraged since it could be removed at any time. try to avoid using it. get the currently enabled jscontext options. syntax uint32 js_getoptions(jscontext *cx); name type description cx jscontext * the context from which to read options. description js_getoptions retrieves the option
flags of a given js context cx. this function returns a uint32 value that is the logical or of zero or more of the jsoption
flags described in js_setoptions. see also mxr id search for js_getoptions js_setoptions js_toggleoptions bug 880330 ...
JS_GetReservedSlot
uint32_t index); void js_setreservedslot(jsobject *obj, uint32_t index, jsval v); name type description obj jsobject * an object that has reserved slots. index uint32_t index of the reserved slot to access. v js::value (in js_setreservedslot) the value to store. description if a jsclass has jsclass_has_reserved_slots(n) in its
flags, with n > 0, or has a non-null jsclass.reserveslots callback, then objects of that class have n reserved slots in which the application may store data. these fields are not directly exposed to scripts. reserved slots may contain any js::value, and the garbage collector will hold the value alive as long as the object itself is alive. reserved slots may also contain private values to store pointe...
JS_InitClass
c/c++. if you need a native function but you don't need to support instances or inheritance, js_initclass might be overkill. js_definefunction is simpler. a jsapi class consists of a jsclass structure, a constructor, a prototype object, and properties and functions. the jsclass is an internal data structure that is not exposed outside the javascript engine. it specifies the name of the class, its
flags, and its property access functions. these include native c functions for instance finalization, adding and deleting properties, getting and setting property values, and enumerating, converting, and resolving properties. the jsapi provides reasonable default behavior for all of these; ordinarily you don't want to overload any of them. after a successful call to js_initclass, javascript code can se...
JS_MapGCRoots
the gc's roots table using map(rp, name, data). the root is pointed at by rp; if the root is unnamed, name is null; data is supplied from the third parameter to js_mapgcroots. the map function should return js_map_gcroot_remove to cause the currently enumerated root to be removed. to stop enumeration, return js_map_gcroot_stop. to continue mapping, return js_map_gcroot_next. these constants are
flags; you can or them together. this function acquires and releases rt's gc lock around the mapping of the roots table, so the map function should run to completion in as few cycles as possible. the map function cannot call js_gc, js_maybegc, js_beginrequest, or any js api entry point that acquires locks, without double-tripping or deadlocking on the gc lock. js_mapgcroots returns the count of roots...
JS_NewCompartmentAndGlobalObject
(jscontext *cx, jsclass *clasp, jsprincipals *principals); name type description cx jscontext * the context in which to create the new global object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. clasp jsclass * the class to use for the new global object. clasp->
flags must have the jsclass_global_
flags bits set. the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it. the usual way to do this is to make jsclasses global or static. principals jsprincipals * the security information to associate with this compartment. description j...
JS_NewGlobalObject
n, const js::compartmentoptions &options = js::compartmentoptions()); name type description cx jscontext * the context in which to create the new global object. requires request. in a js_threadsafe build, the caller must be in a request on this jscontext. clasp jsclass * the class to use for the new global object. clasp->
flags must have the jsclass_global_
flags bits set. the caller must ensure that the jsclass remains alive throughout the lifetime of the new object, including the garbage collection cycle that finally frees it. the usual way to do this is to make jsclasses global or static. principals jsprincipals * the security information to associate with this compartment. hookoption js...
JS_SetGlobalObject
lobal object of the context cx to obj. if obj is null, the context is set to have no global object. each context's global object is in the garbage collector's root set. this means that global objects are automatically protected from garbage collection, as are any values reachable from their properties. for full ecmascript standard compliance, obj should be of a jsclass that has the jsclass_global_
flags flag. applications typically set a context's global object using js_initstandardclasses instead. see the sample code at jsapi user guide. see also js_getglobalobject bug 899245 ...
JS_SetOptions
t could be removed at any time. try to avoid using it. enables and disables options on a jscontext, replacing all previously set options. syntax uint32 js_setoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to set options. options uint32 the new set of options. this is the logical or of zero or more
flags described below. description js_setoptions sets the option
flags of a given js context cx. this function returns a uint32 value containing the previous values of the
flags. to turn individual options on or off, use js_setoptions with js_getoptions: // turn on warnings for dubious practices js_setoptions(cx, js_getoptions(cx) | jsoption_extra_warnings); // turn off those extra warnings js_s...
JS_SetRegExpInput
s jscontext. obj js::handleobject a pointer to a global object. input js::handlestring a pointer to the input string. multiline bool true if input is multiline. description js_setregexpinput sets the pending input string of the built-in regexp object to the specified input string. the jsreg_multiline is set to multiline parameter, and other
flags are all reset. on successful, js_setregexpinput returns true, otherwise returns false. see also mxr id search for js_setregexpinput js_newregexpobject js_newucregexpobject jsreg_multiline js_clearregexpstatics regexp ...
JS_THREADSAFE
allback does not need to call js_beginrequest()). in particular, jsnative callbacks provide a request. this means that any potentially long-running operation in a native must be bracketed with calls to js_suspendrequest() and js_resumerequest(). jsbool socket_recv(jscontext *cx, unsigned int argc, jsval *vp) { ... rc = js_suspendrequest(cx); read_size = recv(socket, buf, size,
flags); js_resumerequest(cx, rc); ... } garbage collection requests help make garbage collection safe when multiple threads are using the jsapi. for each thread that is in a request: almost any call into the jsapi may trigger garbage collection; but garbage collection does not happen at any other time (such as, for example, at the moment before the return value of js_newobject is assigne...
JS_ToggleOptions
its use is discouraged since it could be removed at any time. try to avoid using it. toggle specified options on a jscontext. syntax uint32 js_toggleoptions(jscontext *cx, uint32 options); name type description cx jscontext * a context on which to modify options. options uint32 the set of options to toggle. this is the logical or of zero or more
flags described at js_setoptions. description js_toggleoptions toggles context-wide options. it is equivalent to js_setoptions(cx, js_getoptions(cx) ^ options). see also mxr id search for js_toggleoptions js_setoptions js_getoptions bug 880330 ...
JSDBGAPI
palarray js_isnativeframe js_getframeobject js_getframescopechain js_getframecallobject js_getframethis js_getframefunction js_getframefunctionobject js_isconstructorframe js_isdebuggerframe js_getframereturnvalue js_setframereturnvalue js_getframecalleeobject js_getscriptfilename js_getscriptbaselinenumber js_getscriptlineextent js_getscriptversion js_gettopscriptfilename
flags js_getscriptfilename
flags js_
flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilename_protected evaluating debug code js_evaluateinstackframe examining object properties typedef jspropertydesc jspd_enumerate jspd_readonly jspd_permanent jspd_alias jspd_argument jspd_variable jspd_exception jspd_error typedef jspropertydescarray js_propertyiterator...
Profiling SpiderMonkey
instructions 1.) get yourself an optimized libxul build of firefox, with debugger info. for the mac, you'll want to read up on profiling javascript with shark. here's a sample mozconfig: mk_add_options moz_objdir=@topsrcdir@/ff-opt-libxul mk_add_options moz_make_
flags=-j3 ac_add_options --enable-optimize ac_add_options --enable-libxul ac_add_options --enable-shark ac_add_options --enable-debugger-info-modules ac_add_options --enable-application=browser 2.) you'll want to run shark on both the browser and [xpcshell], since the host environments differ. here are some instrumented tests to work from: media:profiling-ammo.zip 3.) once you have some changes you'd like to try, you can just rebuild the js/src directory, since it produces its own shared library, even in libxul and static build...
SpiderMonkey 1.8.8
on some other platforms (sparc, mips), the jit is provided but not supported. on all other platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 1.8.8 the following features in earlier versions of spidermonkey have been dropped. the jsresolve_classname and jsresolve_with resolve
flags (passed to jsclass.resolve when jsclass.
flags contains jsclass_new_resolve) have been removed. spidermonkey 1.8.8 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things. applications will need significant changes, but most of those ch...
SpiderMonkey 17
s. on some other platforms (sparc, mips), the jit is provided but not supported. on all other platforms the jit is simply disabled; javascript code runs in an interpreter, as in previous versions. it's the same language, just not as fast. migrating to spidermonkey 17 the following features in earlier versions of spidermonkey have been dropped. the jsresolve_classname and jsresolve_with resolve
flags (passed to jsclass.resolve when jsclass.
flags contains jsclass_new_resolve) have been removed. spidermonkey 17 is not binary-compatible with previous releases, nor is it source-code compatible. many jsapi types, functions, and callback signatures have changed, though most of them still have the same names and do the same things. applications will need significant changes, but most of those chang...
Secure Development Guidelines
on coding mistakes and how they affect a product how to avoid making them how to mitigate them everything is oriented toward c/c++ introduction: gaining control specifics about the underlying architecture, using x86 as an example 6 basic registers (eax, ebx, ecx, edx, edi, esi) 2 stack-related registers (esp, ebp) mark top and bottom of current stack frame status register (e
flags) contains various state information instruction pointer (eip) points to register being executed; can’t be modified directly introduction: gaining control (2) eip is modified using call or jump instructions attacks usually rely on obtaining control over the eip otherwise the attacker can try to control memory pointed to by an existing function pointer a vulnerabili...
Embedded Dialog API
izewindowcreator (lxr link accurate at revision 1.20 of that file; search for the method name in later revisions). gecko uses nsiwindowcreator to create all new windows for which no explicit override (the advanced api) has been given, and for browser windows in general. the precise appearance and contents of the new window are defined by the application, though the app should conform to the chrome
flags parameter of nsiwindowcreator::createchromewindow. this flag requests the presence or absence of particular features in the window surrounding the browser; features such as a toolbar or menubar. the nsiwebbrowserchrome::chrome_openas_chrome flag deserves special mention. a content window (the chrome flag is 0) is a browser window. the application should respond with whatever kind of window it nor...
Accessing the Windows Registry Using XPCOM
lasses_root root_key_current_user — corresponds to hkey_current_user root_key_local_machine — corresponds to hkey_local_machine the second parameter for open() and create() is the path to the key. as noted in the example above, you will need to escape backslashes within the string. the third parameter for open() and create() is the access mode. it is specified as a bitwise combination of
flags defined on the interface. you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enumerating keys, and receiving notifications access_write — for setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchi...
XPCOM Glue without mozalloc
be compatible with xulrunner applications prior to 2.0. the solution is to link against xpcomglue_s_nomozalloc instead (xpcomglue_s_nomozalloc.lib on windows, libxpcomglue_s_nomozalloc.a on linux and mac). this library is new in xulrunner 2.0, and it's identical to xpcomglue_s, except that it's compiled without mozalloc. simply change all references to "xpcomglue_s" in your compiler and linker
flags to "xpcomglue_s_nomozalloc". resulting xpcom components will no longer have a dependency on mozalloc, and will thus be compatible with xulrunner applications prior to 2.0 as well. comment: you might also need to build your component with the moz_no_mozalloc flag (-dmoz_no_mozalloc) ...
Components.isSuccessCode
le demonstrates copying data from a buffered nsiinputstream to an nsioutputstream, checking for whether the copy succeeded using components.issuccesscode(). note: nsiasyncstreamcopier.init() has changed in gecko 1.9.2, omit last 2 boolean parameters if you're using gecko 1.9.1 and earlier. ...
Folders
the nsimsgfolder interface. there are currently three folder classes - nslocalmailfolder, nsimapmailfolder, and nsnewsfolder. they all inherit from nsmsgdbfolder, which implements a lot of the core functionality. ...
nsACString_internal
ar data members no public members. methods constructors void nsacstring_internal(const nscsubstringtuple&) - source this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring. ...
nsAString_internal
data members no public members. methods constructors void nsastring_internal(const nssubstringtuple&) - source this is public to support automatic conversion of tuple to string base type, which helps avoid converting to nstastring. ...
imgIRequest
stdecode(); void unlockimage(); attributes attribute type description corsmode long the cors mode that this image was loaded with. read only. decoderobserver imgidecoderobserver read only. image imgicontainer the image container. read only. imageprincipal nsiprincipal the principal gotten from the channel the image was loaded from. read only. imagestatus unsigned long status
flags of the status_* variety. read only. mimetype string read only. uri nsiuri the uri the image load was started with. note that this might not be the actual uri for the image (for example if http redirects happened during the load). read only. constants constant value description status_none 0x0 nothing to report. status_size_available 0x1 we received enough image data from the netwo...
nsIAppShellService
long ainitialwidth, in long ainitialheight, in nsiappshell aappshell ); parameters aparent the parent window. can be null. aurl the contents of the new window. ashowwindow obsolete since gecko 1.8 the window remains invisible if pr_false. aloaddefaultpage obsolete since gecko 1.8 controls whether the window should try to load a default content page on its own. achromemask chrome
flags affecting the kind of os border given to the window. (see nsibrowserwindow for bit/flag definitions). ainitialwidth width, in pixels, of the window. width of window at creation. can be overridden by the "width" tag in the xul. set to ns_sizetocontent to force the window to wrap to its contents. ainitialheight height, in pixels, of the window. height of window at creation. can be overridden by...
nsIAppStartup
boolean true if the startup process was interrupted by an interactive prompt. this can be used, for example, when doing performance testing of the startup process to discount numbers for tests that were interrupted by a user prompt. nativeappsupport nsinativeappsupport getter for "native application support." read only. obsolete since gecko 1.9.1 constants the following
flags may be passed as the amode parameter to the quit() method. one and only one of the "quit"
flags must be specified. the erestart flag may be bit-wise combined with one of the "quit"
flags to cause the application to restart after it quits. constant value description econsiderquit 0x01 attempt to quit if all windows are closed. eattemptquit 0x02 try to ...
nsIApplicationCacheService
note: this method should propagate the entry to other application caches with the same opportunistic namespace; however, this is not currently implemented. void cacheopportunistically( in nsiapplicationcache cache, in acstring key ); parameters cache the cache in which the entry is currently cached. key the cache entry's key.
nsIAuthInformation
ntication does not support schemes, this will be the empty string. otherwise, this will be a string such as "basic" or "digest". this string will always be in lowercase. read only. domain astring the initial value should be used to prefill the dialog or be shown in some other way to the user. on return, this parameter should contain the domain entered by the user. this attribute is only used if
flags include #need_domain.
flags unsigned long
flags describing this dialog. a bitwise or of the constants. it is possible that neither #auth_host nor #auth_proxy are set. auth prompts should ignore
flags they do not understand; especially, they should not throw an exception because of an unsupported flag. read only. password astring the initial value should be used to prefill the dialog or be sh...
nsIAuthPrompt2
requires authentication. acallback acontext level one of the level constants. authinfo authentication information object. the implementation should fill in this object with the information entered by the user before returning. return value promptauth() requests a username and a password. implementations will commonly show a dialog with a username and password field, depending on
flags also a domain field. note: exceptions thrown from this function will be treated like a return value of false. boolean promptauth( in nsichannel achannel, in pruint32 level, in nsiauthinformation authinfo ); parameters achannel the channel that requires authentication. level one of the level constants. authinfo authentication information object. the implementation should fill in ...
nsICachingChannel
cache key retrieved from a particular instance of nsicachingchannel could be set on another instance of nsicachingchannel provided the underlying implementations are compatible and provided the new channel instance was created with the same uri. the implementation of nsicachingchannel would be expected to use the cache entry identified by the cache token. depending on the value of nsirequest.load
flags(), the cache entry may be validated, overwritten, or simply read. the cache key may be null indicating that the uri of the channel is sufficient to locate the same cache entry. setting a null cache key is likewise valid. cachetoken nsisupports uniquely identifies the data in the cache. holding a reference to this token prevents the cached data from being removed. a cache token retrieved from a...
nsIChannel
its reference to the channel. securityinfo nsisupports transport-level security information (if any, else null) corresponding to the channel, normally presented through the interfaces nsitransportsecurityinfo and nsisslstatusprovider read only. uri nsiuri the uri corresponding to the channel. its value is immutable. read only. constants channel specific load
flags: bits 23-31 are reserved for future use by this interface or one of its derivatives (for an example see nsicachingchannel). constant value description load_document_uri 16 set (for example by the docshell) to indicate whether or not the channel corresponds to a document uri. load_retargeted_document_uri 17 if the end consumer for this load has been r...
nsIFile
boolean issymlink(); boolean iswritable(); void launch(); prlibrarystar load(); void moveto(in nsifile newparentdir, in astring newname); void movetonative(in nsifile newparentdir, in acstring newname); native code only! ...
nsIFrameLoader
cess. see nsidomwindowutils.sendkeyevent() for details; this method is its equivalent for cross-process event handling. void sendcrossprocesskeyevent( in astring atype, in long akeycode, in long acharcode, in long amodifiers, [optional] in boolean apreventdefault ); parameters atype the event type. akeycode the key code. acharcode the character code. amodifiers the modifier
flags. apreventdefault whether or not to prevent default actions from being performed. sendcrossprocessmouseevent() creates and sends a mouseevent to the content viewport's process. see nsidomwindowutils.sendmouseevent() for details; this method is its equivalent for cross-process event handling. void sendcrossprocessmouseevent( in astring atype, in float ax, in float ay, in long abutton,...
nsIMsgThread
ndex); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); attributes attribute type description threadkey nsmsgkey unsigned long key designating this thread.
flags unsigned long
flags attached to the thread. subject acstring subject of the thread newestmsgdate unsigned long numchildren unsigned long readonly: number of messages in the thread. numunreadchildren unsigned long readonly: number of unread messages in the thread. methods addchild() add a message to the thread. void a...
nsIProtocolHandler
nnel newchannel(in nsiuri auri); nsiuri newuri(in autf8string aspec, in string aorigincharset, in nsiuri abaseuri); attributes attribute type description defaultport long the default port is the port the protocol uses by default. if the protocol doesn't need a port (for example, the "about" protocol), this attribute is -1. read only. protocol
flags unsigned long protocol-specific
flags. read only. note: starting with firefox 3, one of uri_loadable_by_anyone, uri_dangerous_to_load, uri_is_ui_resource, or uri_is_local_file must be set on every protocol handler. current versions of firefox assume that the uri has uri_loadable_by_anyone set, but this will not work starting with the mozilla 2 platform. scheme acstring ...
nsITreeContentView
in the tree. returns -1 if the item was not found. getitematindex() retrieve the content item associated with the specified index. nsidomelement getitematindex( in long index ); parameters index the row index for which to get the item return value the nsidomelement item. remarks the nsitreecontentview interface only applies to trees with dom element children, and does not apply to trees with
flags="dontbuildcontent". see also nsitreeview tree ...
nsIWebProgressListener2
talprogress); boolean onrefreshattempted(in nsiwebprogress awebprogress, in nsiuri arefreshuri, in long amillis, in boolean asameuri); methods onprogresschange64() notification that the progress has changed for one of the requests associated with awebprogress. progress totals are reset to zero when all requests in awebprogress complete (corresponding to onstatechange being called with astate
flags including the state_stop and state_is_window
flags). this function is identical to nsiwebprogresslistener.onprogresschange(), except that this function supports 64-bit values. note: if any progress value is unknown, then its value is replaced with -1. void onprogresschange64( in nsiwebprogress awebprogress, in nsirequest arequest, in long long acurselfprogress, in long long amaxselfprogre...
nsIWindowWatcher
this was fixed in bug 509124. registernotification() clients of this service can register themselves to be notified when a window is opened or closed (added to or removed from this service). this method adds an nsiobserver to the list of objects to be notified. void registernotification( ...
nsIXULTemplateQueryProcessor
tored in the datasource. this method must only be called with results that were created by this query processor. print32 compareresults( in nsixultemplateresult aleft, in nsixultemplateresult aright, in nsiatom avar, in unsigned long asorthints ); parameters aleft the left result to compare. aright the right result to compare. avar variable to compare. asorthints the sort hints are the
flags in nsixulsortservice. return value -1 if aleft < aright 0 if aleft == aright 1 if aleft > aright compilequery() compile a query from a node. the result of this function will later be passed to generateresults() for result generation. if null is returned, the query will be ignored. the template builder will call this method once for each query within the template, before any results can be gene...
Styling the Folder Pane
true afolder.getnumunread(false) > 0 indicates that the folder (but not subfolders) has unread messages. isserver-true afolder.isserver indicates that the folder is a root folder (one that represents a server). servertype-server afolder.server.type returns the type of the server. for example, imap servers are "imap". specialfolder-foldertype afolder.
flags & nsmsgfolder
flags.<name> returns the folder type if it is a special folder (or "none" if it is a regular folder). for example, if the inbox flag is set, this will be "inbox". biffstate-biffstate afolder.biffstate == nsimsgfolder.nsmsgbiffstate_<name> indicates whether or not the folder has new messages. issecure-{true, false} afolder.server.issecure indicates whe...
AudioTrackList.onchange - Web APIs
onchange is an event handler which is called when the change event occurs, indicating that one or more of the audiotracks in the audiotracklist have been enabled or disabled. the event is passed into the event handler in the form of an event object; the event doesn't provide any additional information. to determine the new state of media's tracks, you'll have to look at their audiotrack.enabled
flags. note: you can also add a handler for the change event using addeventlistener(). syntax audiotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever tracks are enabled or disabled on the media element. example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the st...
AuthenticatorAssertionResponse - Web APIs
d only the client data for the authentication, such as origin and challenge. the clientdatajson property is inherited from the authenticatorresponse. authenticatorassertionresponse.authenticatordata secure contextread only an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence and user verification
flags, and any extensions processed by the authenticator. authenticatorassertionresponse.signature secure contextread only an assertion signature over authenticatorassertionresponse.authenticatordata and authenticatorresponse.clientdatajson. the assertion signature is created with the private key of keypair that was created during the navigator.credentials.create() call and verified using the public...
Document.cookie - Web APIs
scope of the cookie is limited to a path attribute passed down by the server. if the server omits the path attribute the "directory" of the request uri is used. it also signals that the domain attribute must not be present, which prevents the cookie from being sent to other domains. for chrome the path attribute must always be the origin. the dash is considered part of the prefix. these
flags are only settable with the secure attribute. note: as you can see from the code above, document.cookie is an accessor property with native setter and getter functions, and consequently is not a data property with a value: what you write is not the same as what you read, everything is always mediated by the javascript interpreter. examples example #1: simple usage document.cookie = "name=oe...
File and Directory Entries API - Web APIs
implemented by other interfaces which represent files or directories. filesystemfileentry represents a single file in a file system. filesystemdirectoryentry represents a single directory in a file system. filesystemdirectoryreader created by calling filesystemdirectoryentry.createreader(), this interface provides the functionality which lets you read the contents of a directory. filesystem
flags defines a set of values which are used when specifying option
flags when calling certain methods in the file and directory entries api. fileerror represents an error which is generated by asynchronous file system calls. there are also two global functions (which are not part of the specification at this time and are implemented only by google chrome). they're available on the window object...
PaymentResponse.complete() - Web APIs
nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android ...
PaymentResponse.details - Web APIs
nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android ...
PaymentResponse.payerEmail - Web APIs
nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android ...
PaymentResponse.shippingAddress - Web APIs
nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android ...
PaymentResponse.shippingOption - Web APIs
nochrome android full support 56 full support 56 no support 53 — 56disabled disabled from version 53 until version 56 (exclusive): this feature is behind the #web-payments preference (needs to be set to enabled). to change preferences in chrome, visit chrome://
flags.firefox android full support 56notes disabled full support 56notes disabled notes available only in nightly builds.disabled from version 56: this feature is behind the dom.payments.request.enabled preference (needs to be set to true). to change preferences in firefox, visit about:config.opera android ...
Using Service Workers - Web APIs
n over web apps. setting up to play with service workers many service workers features are now enabled by default in newer versions of supporting browsers. if however you find that demo code is not working in your installed versions, you might need to enable a pref: firefox nightly: go to about:config and set dom.serviceworkers.enabled to true; restart browser. chrome canary: go to chrome://
flags and turn on experimental-web-platform-features; restart browser (note that some features are now enabled by default in chrome.) opera: go to opera://
flags and enable support for serviceworker; restart browser. microsoft edge: go to about:
flags and tick enable service workers; restart browser. you’ll also need to serve your code via https — service workers are restricted to running across ...
Storage API - Web APIs
torage" feature. data persistence and clearing if the site or app has the "persistent-storage" feature permission, it can use the storagemanager.persist() method to request that its box be made persistent. it's also possible for the user agent to decide to make the site's storage unit persistent due to usage characteristics or other metrics. the "persistent-storage" feature's permission-related
flags, algorithms, and types are all set to the standard defaults for a permission, except that the permission state must be the same across the entire origin, and that if the permission state isn't "granted" (meaning that for whatever reason, access to the persistent storage feature was denied), the origin's site storage unit's box mode is always "best-effort". note: see using the permissions api fo...
VideoTrackList.onchange - Web APIs
he videotracklist property onchange is an event handler which is called when the change event occurs, indicating that a videotrack in the videotracklist has been made active. the event is passed into the event handler in the form of an event object; the event doesn't provide any additional information. to determine the new state of media's tracks, you'll have to look at their videotrack.selected
flags. note: you can also add a handler for the change event using addeventlistener(). syntax videotracklist.onchange = eventhandler; value set onchange to a function that should be called whenever a track is made active. example this snippet establishes a handler for the change event that looks at each of the tracks in the list, calling a function to update the state of a user interface contr...
WebGL2RenderingContext.getSyncParameter() - Web APIs
glenum specifying which information to return. possible values: gl.object_type: returns a glenum indicating the type of the sync object (always gl.sync_fence). gl.sync_status: returns a glenum indicating the status of the sync object (gl.signaled or gl.unsignaled). gl.sync_condition: returns a glenum indicating the sync objects' condition (always gl.sync_gpu_commands_complete). gl.sync_
flags: returns a glenum indicating the
flags with which the sync object was created (always 0 as no
flags are supported). return value depends on the pname parameter, either a glenum or a glbitfield. examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.getsyncparameter(sync, gl.sync_status); specifications specification status comment webgl 2.0the d...
WebGL2RenderingContext.waitSync() - Web APIs
the webgl2renderingcontext.waitsync() method of the webgl 2 api returns immediately, but waits on the gl server until the given webglsync object is signaled. the method is a no-op in the absence of the possibility of synchronizing between multiple gl contexts. syntax void gl.waitsync(sync,
flags, timeout); parameters sync a webglsync object on which to wait on.
flags a glbitfield specifying a bitwise combination of
flags controlling the flushing behavior. must be 0 (exists for extensions only). timeout a glint64 specifying a timeout the server should wait before continuing. must be gl.timeout_ignored. return value none. examples var sync = gl.fencesync(gl.sync_gpu_commands_complete, 0); gl.waitsync(sync, 0, gl.timeout_ignored); specifications specificati...
WebGL constants - Web APIs
42 uniform_block_active_uniform_indices 0x8a43 uniform_block_referenced_by_vertex_shader 0x8a44 uniform_block_referenced_by_fragment_shader 0x8a46 sync objects constant name value description object_type 0x9112 sync_condition 0x9113 sync_status 0x9114 sync_
flags 0x9115 sync_fence 0x9116 sync_gpu_commands_complete 0x9117 unsignaled 0x9118 signaled 0x9119 already_signaled 0x911a timeout_expired 0x911b condition_satisfied 0x911c wait_failed 0x911d sync_flush_commands_bit 0x00000001 miscellane...
Using WebGL extensions - Web APIs
s well as the vendor extension name. for instance: var ext = ( gl.getextension('oes_vertex_array_object') || gl.getextension('moz_oes_vertex_array_object') || gl.getextension('webkit_oes_vertex_array_object') ); note that, vendor prefix have been discouraged more and more and thus most browser implement experimental extensions behind a feature flag rather than vendor prefix. the feature
flags are: webgl.enable-draft-extensions in firefox chrome://
flags/#enable-webgl-draft-extensions in chromium based browsers (chrome, opera). naming conventions webgl extensions are prefixed with "angle", "oes", "ext" or "webgl". these prefixes reflect origin and intent: angle_: extensions that are written by the angle library authors. oes_ and khr_: extensions that mirror functionality from...
Window.openDialog() - Web APIs
the window name (optional). see window.open() description for detailed information. features see window.open() for details. arg1, arg2, ... the arguments to be passed to the new window (optional). example var win = opendialog("http://example.tld/zzz.xul", "dlg", "", "pizza", 6.98); notes new features all - initially activates (or deactivates ("all=no")) all chrome (except the behavior
flags chrome, dialog and modal). these can be overridden (so "menubar=no,all" turns on all chrome except the menubar.) this feature is explicitly ignored by window.open(). window.opendialog() finds it useful because of its different default assumptions. default behavior the chrome and dialog features are always assumed on, unless explicitly turned off ("chrome=no"). opendialog() treats the absence of...
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
eeded\n"); } else { dump("\tfailed: " + error.name + "\n"); } let secinfo = channel.securityinfo; // print general connection security state dump("security information:\n"); if (secinfo instanceof ci.nsitransportsecurityinfo) { secinfo.queryinterface(ci.nsitransportsecurityinfo); dump("\tsecurity state of connection: "); // check security state
flags if ((secinfo.securitystate & ci.nsiwebprogresslistener.state_is_secure) == ci.nsiwebprogresslistener.state_is_secure) { dump("secure connection\n"); } else if ((secinfo.securitystate & ci.nsiwebprogresslistener.state_is_insecure) == ci.nsiwebprogresslistener.state_is_insecure) { dump("insecure connection\n"); } else if ((secinfo.secur...
XMLHttpRequest() - Web APIs
d firefox syntax firefox 16 added a non-standard parameter to the constructor that can enable anonymous mode (see bug 692677). setting the mozanon flag to true effectively resembles the anonxmlhttprequest() constructor described in older versions of the xmlhttprequest specification. const request = new xmlhttprequest(paramsdictionary); parameters (non-standard) objparameters there are two
flags you can set: mozanon boolean: setting this flag to true will cause the browser not to expose the origin and user credentials when fetching resources. most important, this means that cookies will not be sent unless explicitly added using setrequestheader. mozsystem boolean: setting this flag to true allows making cross-site connections without requiring the server to opt-in using cors. r...
XRView.eye - Web APIs
sage notes the primary purpose of this property is to allow the correct area of any pre-rendered stereo content to be presented to the correct eye. for dynamically-rendered 3d content, you can usually ignore this and simply render each of the viewer's views, one after another. examples this code, from the viewer pose's renderer, iterates over the pose's views and renders them. however, we have
flags which, if true, indicate that a particular eye has been injured during gameplay. when rendering that eye, if the flag is true, that view is skipped instead of being rendered. gllayer = xrsession.renderstate.baselayer; gl.bindframebuffer(gl.framebuffer, gllayer.framebuffer); gl.clearcolor(0,0, 0, 1.0); gl.cleardepth(1.0); gl.clear(gl.color_buffer_bit, gl.depth_buffer_bit); for (let view of xrpos...
XSLTProcessor - Web APIs
ters() removes all set parameters from the xsltprocessor. the xsltprocessor will then use the defaults specified in the xslt stylesheet. void xsltprocessor.reset() removes all parameters and stylesheets from the xsltprocessor. properties non-web-exposed properties the following properties are [chromeonly] and not exposed to web content: [chromeonly] attribute unsigned long xsltprocessor.
flags flags that tweak the behavior of the processor. not reset by calling xsltprocessor.reset(). default value: 0 possible values are: name value effect (none) 0 none disable_all_loads 1 disable loading external documents (via e.g. <xsl:import> and document()) examples basic example advanced example additional e...
Web APIs
menttraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fileexception filelist filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader filesystementry filesystementrysync filesystemfileentry filesystem
flags filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactuator geolocation geolocationcoordinates geolocationposition geolocationpositionerror geometryutils gestureevent globaleventhandlers gyroscope h htmlanchorelement htmlareaelement htmlaudioele...
ARIA annotations - Accessibility
e bit of text. aria annotation roles and objects are currently exposed in: firefox from version 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://
flags to enable this.) unfortunately, you won’t be able to use any of these yet, as screenreader support is currently not there. for the moment, you can see the annotations data being exposed with tools like firefox accessibility inspector. the annotations should just work once screenreader support is added. associating annotated elements with their details there are a number of different ways in...
regexp:match() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:match() performs regular expression matching on a string, returning the submatches found as a result. syntax regexp:match(targetstring, regexpstring[,
flagsstring]) parameters targetstring the string to perform regular expression matching upon. regexpstring the javascript style regular expression to evaluate.
flagsstringoptional an optional string containing character
flags. the character
flags are: g global match the submatches from every match in the string are returned. if this flag isn't specified, only the submatches from the first match are returned. i case insensitive match if this flag is specified, the match is performed in a case insensitive fashion. returns ...
regexp:replace() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:replace() replaces the portions of a string that match a given regular expression with the contents of another string. syntax regexp:replace(originalstring, regexpstring,
flagsstring, replacestring) parameters originalstring the string perform a search-and-replace operation upon. regexpstring the javascript style regular expression to evaluate.
flagsstring the string containing character
flags. replacestring the string with which the matched substrings are to be replaced. the character
flags are: g - global replace if this flag is specified, all occurrences of the regular expression within the originalstring are replaced. otherwise only the first occurrence is replaced. i...
regexp:test() - EXSLT
xslt/xpath reference: xslt elements, exslt functions, xpath functions, xpath axes regexp:test() tests to see whether a string matches a specified regular expression. syntax regexp:test(teststring, regexpstring[,
flagsstring]) parameters teststring the string to test.. regexpstring the javascript style regular expression to evaluate.
flagsstringoptional an optional string containing character
flags. the character
flags are: g global match has no effect for this function; it's allowed for consistency with other regexp functions. i case insensitive match if this flag is specified, the match is performed in a case insensitive fashion. returns true if the specified regexp matches the test string. specifications exslt - regexp:test ...
Constraint validation - Developer guides
patternmismatch constraint violation min range, number a valid number the value must be greater than or equal to the value. rangeunderflow constraint violation date, month, week a valid date datetime, datetime-local, time a valid date and time max range, number a valid number the value...
CSP: sandbox - HTTP
s the page to disable the ability to lock the screen orientation. allow-pointer-lock allows the page to use the pointer lock api. allow-popups allows popups (like from window.open, target="_blank", showmodaldialog). if this keyword is not used, that functionality will silently fail. allow-popups-to-escape-sandbox allows a sandboxed document to open new windows without forcing the sandboxing
flags upon them. this will allow, for example, a third-party advertisement to be safely sandboxed without forcing the same restrictions upon a landing page. allow-presentation allows embedders to have control over whether an iframe can start a presentation session. allow-same-origin allows the content to be treated as being from its normal origin. if this keyword is not used, the embedded content i...
Memory Management - JavaScript
is released. in order to release the memory of an object, it needs to be made explicitly unreachable. as of 2019, it is not possible to explicitly or programmatically trigger garbage collection in javascript. node.js node.js offers additional options and tools for configuring and debugging memory issues that may not be available for javascript executed within a browser environment. ...
Deprecated and obsolete features - JavaScript
e deprecated in string and regular expression literals. the escape and unescape functions are deprecated. use encodeuri, encodeuricomponent, decodeuri or decodeuricomponent to encode and decode escape sequences for special characters. string methods html wrapper methods like string.prototype.fontsize and string.prototype.big. string.prototype.quote is removed from firefox 37. non standard
flags parameter in string.prototype.search, string.prototype.match, and string.prototype.replace are deprecated. string.prototype.substr probably won't be removed anytime soon, but it's defined in annex b of the ecma-262 standard, whose introduction states: "… programmers should not use or assume the existence of these features and behaviours when writing new ecmascript code. …" obsolete feature...
Object.defineProperty() - JavaScript
lue !== value) d.value = value; return d; } // ... and ... object.defineproperty(obj, 'key', withvalue('static')); // if freeze is available, prevents adding or // removing the object prototype properties // (value, get, set, enumerable, writable, configurable) (object.freeze || object)(object.prototype); examples if you want to see how to use the object.defineproperty method with a binary-
flags-like syntax, see additional examples. creating a property when the property specified doesn't exist in the object, object.defineproperty() creates a new property as described. fields may be omitted from the descriptor, and default values for those fields are inputted. var o = {}; // creates a new object // example of an object property added // with defineproperty with a data property descrip...
RegExp.prototype[@@replace]() - JavaScript
same way as string.prototype.replace(), except the different this and the different arguments order. var re = /-/g; var str = '2016-01-01'; var newstr = re[symbol.replace](str, '.'); console.log(newstr); // 2016.01.01 using @@replace in subclasses subclasses of regexp can override the [@@replace]() method to modify the default behavior. class myregexp extends regexp { constructor(pattern,
flags, count) { super(pattern,
flags); this.count = count; } [symbol.replace](str, replacement) { // perform @@replace |count| times. var result = str; for (var i = 0; i < this.count; i++) { result = regexp.prototype[symbol.replace].call(this, result, replacement); } return result; } } var re = new myregexp('\\d', '', 3); var str = '01234567'; var newstr = str.r...
RegExp.prototype.compile() - JavaScript
the deprecated compile() method is used to (re-)compile a regular expression during execution of a script. it is basically the same as the regexp constructor. syntax regexobj.compile(pattern,
flags) parameters pattern the text of the regular expression.
flags if specified,
flags can have any combination of the following values: g global match i ignore case m multiline; treat beginning and end characters (^ and $) as working over multiple lines (i.e., match the beginning or end of each line (delimited by \n or \r), not only the very beginning or end of the whole input string) y sticky; matches only from the index indicated by the lastindex property of this regular expression in the target string (and does not attempt to match from any later indexes). descri...
RegExp.prototype.dotAll - JavaScript
ne terminator ("newline") characters in a string, which it would not match otherwise: u+000a line feed (lf) ("\n") u+000d carriage return (cr) ("\r") u+2028 line separator u+2029 paragraph separator this effectively means the dot will match any character on the unicode basic multilingual plane (bmp). to allow it to match astral characters, the "u" (unicode) flag should be used. using both
flags in conjunction allows the dot to match any unicode character, without exceptions. you cannot change this property directly. examples using dotall var str1 = 'bar\nexample foo example'; var regex1 = new regexp('bar.example','s'); console.log(regex1.dotall); // output: true console.log(str1.replace(regex1,'')); // output: foo example var str2 = 'bar\nexample foo example'; var regex2 = new ...
RegExp.prototype.exec() - JavaScript
/foo/g or /foo/y). they store a lastindex from the previous match. using this internally, exec() can be used to iterate over multiple matches in a string of text (with capture groups), as opposed to getting just the matching strings with string.prototype.match(). a newer function has been proposed to simplify matching multiple parts of a string (with capture groups): string.prototype.matchall(). ...
RegExp.prototype.source - JavaScript
the source for this interactive example is stored in a github repository. if you'd like to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. ...
String.prototype.replace() - JavaScript
.replace(/xmas/i, 'christmas'); console.log(newstr); // twas the night before christmas... this logs 'twas the night before christmas...'. note: see this guide for more explanations about regular expressions. using global and ignore with replace() global replace can only be done with a regular expression. in the following example, the regular expression includes the global and ignore case
flags which permits replace() to replace each occurrence of 'apples' in the string with 'oranges'. let re = /apples/gi; let str = 'apples are round, and apples are juicy.'; let newstr = str.replace(re, 'oranges'); console.log(newstr); // oranges are round, and oranges are juicy. this logs 'oranges are round, and oranges are juicy'. switching words in a string the following script switches the wor...
d - SVG: Scalable Vector Graphics
oice of a clockwise arc (1) or anticlockwise arc (0) the current point gets its x and y coordinates shifted by dx and dy for the next command. all subsequent sets of parameters are considered implicit relative arc curve (a) commands. ...
Paths - SVG: Scalable Vector Graphics
he solution, (x, y), is the center of the ellipse(s). the solution will be imaginary if the ellipse's radii are too small. this second computation is for the non-rotated ellipse with start→end (110, 215)→(162.55, 162.45). the solution has a small imaginary component because the ellipse was just barely expanded. the four different paths mentioned above are determined by the next two parameter
flags. as mentioned earlier, there are still two possible ellipses for the path to travel around and two different possible paths on both ellipses, giving four possible paths. the first parameter is the large-arc-flag. it simply determines if the arc should be greater than or less than 180 degrees; in the end, this flag determines which direction the arc will travel around a given circle. the second pa...
Same-origin policy - Web security
e public suffix list to determine if a domain is a public suffix. internet explorer uses its own internal method to determine if a domain is a public suffix. the browser will make a cookie available to the given domain including any sub-domains, no matter which protocol (http/https) or port is used. when you set a cookie, you can limit its availability using the domain, path, secure, and httponly
flags. when you read a cookie, you cannot see from where it was set. even if you use only secure https connections, any cookie you see may have been set using an insecure connection. ...
Compiling a New C/C++ Module to WebAssembly - WebAssembly
splay its output in the browser (hello.html) running your example now all that remains is for you to load the resulting hello.html in a browser that supports webassembly. it is enabled by default in firefox 52+ and chrome 57+/latest opera (you can also run wasm code in firefox 47+ by enabling the javascript.options.wasm flag in about:config, or chrome (51+) and opera (38+) by going to chrome://
flags and enabling the experimental webassembly flag.) note: if you try to open generated html file (hello.html) directly from your local hard drive (e.g. file://your_path/hello.html), you will end up with an error message along the lines of both async and sync fetching of the wasm failed. you need to run your html file through an http server (http://) — see how do you set up a local testing server...