Search completed in 1.33 seconds.
PR_NewThreadPrivateIndex
syntax #include <prthread.h> prstatus pr_newthrea
dprivateindex( pruintn *newindex, prthrea
dprivatedtor destructor); parameters pr_newthrea
dprivateindex has the following parameters: newindex on output, an index that is valid for all threads in the process.
... you use this index with pr_setthrea
dprivate and pr_getthrea
dprivate.
... destructor specifies a destructor function prthrea
dprivatedtor for the private data associated with the index.
...And 4 more matches
SVGAnimatedPreserveAspectRatio - Web APIs
svg animated preserveaspectratio interface the svganimate
dpreserveaspectratio interface is used for attributes of type svgpreserveaspectratio which can be animated.
... interface overview also implement none methods none properties readonly float baseval readonly float animval normative document svg 1.1 (2nd edition) properties svganimate
dpreserveaspectratio.baseval read only is a svgpreserveaspectratio that represents the base value of the given attribute before applying any animations.
... svganimate
dpreserveaspectratio.animval read only is a svgpreserveaspectratio that represents the current animated value of the given attribute.
...And 2 more matches
JS_LinkConstructorAndPrototype
syntax bool js_linkconstructoran
dprototype(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.
... description js_linkconstructoran
dprototype 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_linkconstructoran
dprototype returns true.
... see also mxr id search for js_linkconstructoran
dprototype js_initclass bug 722729 ...
DPR - HTTP
the
dpr header is a client hints headers which represents the client device pixel ratio (
dpr), which is the the number of physical device pixels corresponding to every css pixel.
...server has to opt in to receive
dpr header from the client by sending accept-ch and accept-ch-lifetime response headers.
... syntax
dpr: <number> examples server first needs to opt in to receive
dpr header by sending the response headers accept-ch containing
dpr and accept-ch-lifetime.
... accept-ch:
dpr accept-ch-lifetime: 86400 then on subsequent requests the client might send
dpr header back:
dpr: 1.0 ...
nsIFeedProcessor
toolkit/components/feeds/public/nsifee
dprocessor.idlscriptable this interface parses rss or atom feeds, triggering callbacks based on their contents during and after the processing.
...to create an instance, use: var fee
dprocessor = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifee
dprocessor); method overview void parseasync(in nsirequestobserver requestobserver, in nsiuri uri); void parsefromstream(in nsiinputstream stream, in nsiuri uri); void parsefromstring(in astring str, in nsiuri uri); attributes attribute type description listener nsifeedresultlistener the feed result listener that will respond to feed events.
...you must not call any of the other parsing methods on the nsifee
dprocessor interface during an asynchronous parse.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
the webgl_compressed_texture_astc.getsupporte
dprofiles() method returns an array of strings containing the names of the astc profiles supported by the implementation.
... syntax sequence<domstring> ext.getsupporte
dprofiles(); return value an array of domstring elements indicating which astc profiles are supported by the implementation.
... examples var ext = gl.getextension('webgl_compressed_texture_astc'); ext.getsupporte
dprofiles(); // ["ldr"] specifications specification status comment webgl_compressed_texture_astcthe definition of 'webgl_compressed_texture_astc' in that specification.
NPEmbedPrint - Archive of obsolete content
syntax typedef struct _npembe
dprint { npwindow window; void* platformprint; /* platform-specific */ } npembe
dprint; fields the data structure has the following fields: window the npwindow the plug-in should use for printing.
...the npembe
dprint structure is used when the mode field of npprint is set to np_embed.
PRThreadPrivateDTOR
the destructor function passed to pr_newthrea
dprivateindex that is associated with the resulting thread private index.
... syntax #include <prthread.h> typedef void (pr_callback *prthrea
dprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthrea
dprivate, the value of the data is null.
PR_GetThreadPrivate
syntax #include <prthread.h> void* pr_getthrea
dprivate(pruintn index); parameter pr_getthrea
dprivate has the following parameters: index the index into the per-thread private data table.
... description pr_getthrea
dprivate may be called at any time during a thread's execution.
PR_SetThreadPriority
syntax #include <prthread.h> void pr_setthrea
dpriority( prthread *thread, prthrea
dpriority priority); parameters pr_setthrea
dpriority has the following parameters: thread a valid identifier for the thread whose priority you want to set.
...it is preferable for a thread to specify itself in the thread parameter when it calls pr_setthrea
dpriority.
PR_SetThreadPrivate
syntax #include <prthread.h> prstatus pr_setthrea
dprivate(pruintn index, void *priv); parameters pr_setthrea
dprivate has the following parameters: index an index into the per-thread private data table.
... the only way to eliminate thread private data at an index prior to the thread's termination is to call pr_setthrea
dprivate with a null argument.
PRThreadPriority
syntax #include <prthread.h> typedef enum prthrea
dpriority { pr_priority_first = 0, pr_priority_low = 0, pr_priority_normal = 1, pr_priority_high = 2, pr_priority_urgent = 3, pr_priority_last = 3 } prthrea
dpriority; enumerators pr_priority_first placeholder.
PR_GetThreadPriority
syntax #include <prthread.h> prthrea
dpriority pr_getthrea
dpriority(prthread *thread); parameter pr_getthrea
dpriority has the following parameter: thread a valid identifier for the thread whose priority you want to know.
nsIDownloadProgressListener
/toolkit/components/downloads/nsidownloa
dprogresslistener.idlscriptable this interface gives applications and extensions a way to monitor the status of downloads being processed by the download manager.
nsIContentPolicy - Archive of obsolete content
warning: do not block the caller in your implementations of shouldload() or shoul
dprocess() (for example, by launching a dialog to prompt the user for something).") note: in reality, much of this interface is defined in the nsicontentpolicybase interface, but for now is documented here until someone has time to split things up.
... method overview short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra, in nsiprincipal arequestprincipal); short shoul
dprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra, in nsiprincipal arequestprincipal); constants content types constant value description type_other 1 indicates content whose type is unknown, or is not interesting outside a limited use case.
... shoul
dprocess() will get this for, for example <meta> refresh elements and http refresh headers.
...And 10 more matches
Proxy Auto-Configuration (PAC) file - HTTP
the javascript function contained in the pac file defines the function: function fin
dproxyforurl(url, host) { // ...
... } syntax function fin
dproxyforurl(url, host) parameters url the url being accessed.
... examples: function alert_eval(str) { alert(str + ' is ' + eval(str)) } function fin
dproxyforurl(url, host) { alert_eval('isinnet(host, "63.245.213.24", "255.255.255.255")') // "pac-alert: isinnet(host, "63.245.213.24", "255.255.255.255") is true" } dnsresolve() dnsresolve(host) parameters host hostname to resolve.
...And 7 more matches
nsIProcessScriptLoader
methods void loa
dprocessscript(in astring aurl, in boolean aallowdelayedload) void removedelaye
dprocessscript(in astring aurl); jsval getdelaye
dprocessscripts(); loa
dprocessscript() load a script in the child process.
... process scripts are loaded as soon as loa
dprocessscript() is called.
... if aallowdelayedload is true, then the script will also be loaded into any new child processes created after the loa
dprocessscript() call.
...And 6 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
getldapattributes("ldap2.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid=" + env_user,"uid,cn,mail,labeleduri"); // close the try, and call the catch() } catch(e) { displayerror("locke
dpref", e); } thunderbird.cfg (version 2 with ad) using thunderbird 9.0.1 and try to use a active directory (windows server 2008) as ldap-source did not work with version 1.
...aultpref("mail.account.account1.identities", "id1" ); defaultpref("mail.account.account1.server", "server1" ); defaultpref("mail.accountmanager.accounts", "account1" ); defaultpref("mail.accountmanager.defaultaccount", "account1" ); defaultpref("mail.smtp.defaultserver", "smtp1" ); defaultpref("mail.smtpservers", "smtp1" ); // close the try, and call the catch() } catch(e) { displayerror("locke
dpref", e); } test autoconfig debug to check that our autoconfig works fine, we just set to env variable to check the read of thunderbird.cfg file: $ export nspr_log_modules=mcd:5 $ export nspr_log_file=/tmp/thunderbird-log.txt when thunderbird has started, you should read: $ cat /tmp/thunderbird-log.txt -1209403040[808a788]: general.config.filename = thunderbird.cfg -1209403040[808a788]: e...
... // getldapattributes("ldap2.int-evry.fr","ou=people,dc=int-evry,dc=fr","uid=" + env_user,"uid,cn,mail,labeleduri"); // close the try, and call the catch() } catch(e) {displayerror("locke
dpref", e);} if ldap call are uncommented in the preference file above, then i get a popup with: netscape.cfg/autoconfig failed.
...And 3 more matches
NSS functions
k11_destroytokenobject mxr 3.2 and later pk11_digestbegin mxr 3.2 and later pk11_digestkey mxr 3.2 and later pk11_digestop mxr 3.2 and later pk11_digestfinal mxr 3.2 and later pk11_doesmechanism mxr 3.2 and later pk11_exportencrypte
dprivatekeyinfo mxr 3.2 and later pk11_exportencrypte
dprivkeyinfo mxr 3.9 and later pk11_exportprivatekeyinfo mxr 3.2 and later pk11_finalize mxr 3.2 and later pk11_findbestkeamatch mxr 3.2 and later pk11_findcertandkeybyrecipientlist mxr 3.2 and late...
...ickname mxr 3.2 and later pk11_findcertinslot mxr 3.2 and later pk11_findgenericobjects mxr 3.9.2 and later pk11_findfixedkey mxr 3.2 and later pk11_findkeybyanycert mxr 3.2 and later pk11_findkeybydercert mxr 3.2 and later pk11_fin
dprivatekeyfromcert mxr 3.2 and later pk11_findslotbyname mxr 3.2 and later pk11_findslotsbynames mxr 3.9 and later pk11_fortezzahaskea mxr 3.2 and later pk11_fortezzamapsig mxr 3.2 and later pk11_freeslot mxr 3.2 and later pk11_freesl...
... 3.4 and later pk11_importcert mxr 3.5 and later pk11_importcertforkeytoslot mxr 3.2 and later pk11_importcrl mxr 3.6 and later pk11_importdercert mxr 3.6 and later pk11_importderprivatekeyinfoandreturnkey mxr 3.4 and later pk11_importencrypte
dprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfoandreturnkey mxr 3.4 and later pk11_importpublickey mxr 3.4 and later pk11_importsymkeywithflags mxr 3.4 and later pk11_initpin mxr 3.2 and later ...
...And 3 more matches
nsIDownloadManager
oad-manager;1"] .getservice(components.interfaces.nsidownloadmanager); method overview nsidownload adddownload(in short adownloadtype, in nsiuri asource, in nsiuri atarget, in astring adisplayname, in nsimimeinfo amimeinfo, in prtime astarttime, in nsilocalfile atempfile, in nsicancelable acancelable, in boolean aisprivate); void addlistener(in nsidownloa
dprogresslistener alistener); void canceldownload(in unsigned long aid); void cleanup(); void endbatchupdate(); obsolete since gecko 1.9.1 void flush(); obsolete since gecko 1.8 nsidownload getdownload(in unsigned long aid); void onclose(); obsolete since gecko 1.9.1 void open(in nsidomwindow aparent, in nsidownload adownload); obsolete...
... gecko 1.9.1 void openprogressdialogfor(in nsidownload adownload, in nsidomwindow aparent, in boolean acanceldownloadonclose); obsolete since gecko 1.9.1 void pausedownload(in unsigned long aid); void removedownload(in unsigned long aid); void removedownloadsbytimeframe(in long long abegintime, in long long aendtime); void removelistener(in nsidownloa
dprogresslistener alistener); void resumedownload(in unsigned long aid); void retrydownload(in unsigned long aid); void savestate(); obsolete since gecko 1.8 void startbatchupdate(); obsolete since gecko 1.9.1 attributes attribute type description activedownloadcount long the number of files currently being downloaded.
... listener nsidownloa
dprogresslistener the download manager's progress listener.
...And 3 more matches
Add to Home screen - Progressive web apps (PWAs)
first of all, we declare a deferre
dprompt variable (which we'll explain later on), get a reference to our install button, and set it to display: none initially: let deferre
dprompt; const addbtn = document.queryselector('.add-button'); addbtn.style.display = 'none'; we hide the button initially because the pwa will not be available for install until it follows the a2hs criteria.
... deferre
dprompt = e; // update ui to notify the user they can add to home screen addbtn.style.display = 'block'; addbtn.addeventlistener('click', (e) => { // hide our user interface that shows our a2hs button addbtn.style.display = 'none'; // show the prompt deferre
dprompt.prompt(); // wait for the user to respond to the prompt deferre
dprompt.userchoice.then((choiceresult) => { if (choiceresult.outcome ==...
...= 'accepted') { console.log('user accepted the a2hs prompt'); } else { console.log('user dismissed the a2hs prompt'); } deferre
dprompt = null; }); }); }); so here we: call event.preventdefault() to stop chrome 67 and earlier from calling the install prompt automatically (this behavior changed in chrome 68).
...And 3 more matches
NPPrint - Archive of obsolete content
syntax typedef struct _npprint { uint16 mode; /* np_full or np_embed */ union { npfullprint fullprint; /* if mode is np_full */ npembe
dprint embe
dprint; /* if mode is np_embed */ } print; } npprint; fields the data structure has the following fields: mode determines whether plug-in prints in full-page or embedded mode.
... np_embed: pointer to npembe
dprint structure.
...the embe
dprint field of the union is valid.
...And 2 more matches
Examples
components.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefine
dpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefine
dpromise() { try { //var myvariscommented = 'hi'; // i commented this out s oit is undefined, this will cause rejected ...
...now replace the `alert(myvariscommented)` with `throw new error('i feel like rejecting this promise')` like this: components.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefine
dpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefine
dpromise() { try { var myvariscommented = 'hi'; alert(myvariscommented); throw new error('i feel like rejecting th...
... this copy/paste code here will complete succesfully: components.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefine
dpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefine
dpromise() { try { var myvariscommented = 'hi'; alert(myvariscommented); // throw new error('i feel like rejecting...
...And 2 more matches
Feed content access API
nsifee
dprocessor parses rss and atom feeds.
... nsifee
dprogresslistener implemented by the program that wants to parse an rss or atom feed to receive messages during the parsing process.
...use an xmlhttprequest to load the feed, then pass its string to an nsifee
dprocessor to parse the feed.
...And 2 more matches
nsIWebProgress
last changed in gecko 1.8.0 inherits from: nsisupports method overview void ad
dprogresslistener(in nsiwebprogresslistener alistener, in unsigned long anotifymask); void removeprogresslistener(in nsiwebprogresslistener alistener); attributes attribute type description domwindow nsidomwindow the dom window associated with this nsiwebprogress instance.
... constants the following flags may be combined to form the anotifymask parameter for the ad
dprogresslistener() method.
... methods ad
dprogresslistener() registers a listener to receive web progress events.
...And 2 more matches
Index - Archive of obsolete content
868 fin
dpreviousaccesskey no summary!
... 1176 ad
dprogresslistener xul methods, xul reference no summary!
... 3626 npembe
dprint npapi, plugins substructure of npprint that contains platform-specific information used during embedded mode printing.
... 3692 npprintcallbackstruct npapi, plugins contains information required by the platformprint field of the npembe
dprint structure during embedded mode printing on unix systems.
Client hints - MDN Web Docs Glossary: Definitions of Web-related terms
client hints enable automated delivery of optimized assets like the automatic negotiation of image
dpr resolution.
... accept-ch:
dpr, width, viewport-width, downlink and / or <meta http-equiv="accept-ch" content="
dpr, width, viewport-width, downlink"> when a client receives the accept-ch header, if supported, it appends client hint headers that match the advertised field-values.
... for example, based on accept-ch example above, the client could append
dpr, width, viewport-width, and downlink headers to all subsequent requests.
... example varying response: vary: accept,
dpr, width, viewport-width, downlink see also client hints headers vary http header ...
Process scripts
you can load a process script by accessing a parent process message manager and calling its loa
dprocessscript() function.
... the following code uses the global parent process message manager, which will load the script into the the chrome process and any child processes: // chrome code let ppmm = cc["@mozilla.org/parentprocessmessagemanager;1"] .getservice(ci.nsiprocessscriptloader); ppmm.loa
dprocessscript("chrome://whatever/process-script.js", true); ppmm.addmessagelistener("hello", function(msg) { ...
... in just about every respect, using process scripts is like using frame scripts: you can pass the allowdelayedload to loa
dprocessscript().
... if you do, you must call removedelaye
dprocessscript() when your extension is disabled or removed the message-passing apis are the same: sendasyncmessage() is available in both directions, while sendsyncmessage() is available from content to chrome only process scripts are system-privileged, and have access to the components object.
Threads
threading types and constants prthread prthreadtype prthreadscope prthreadstate prthrea
dpriority prthrea
dprivatedtor threading functions most of the functions described here accept a pointer to the thread as an argument.
...after a thread has been created, you can get and set its priority with these functions: pr_getthrea
dpriority pr_setthrea
dpriority controlling per-thread private data you can use these functions to associate private data with each of the threads in a process: pr_newthrea
dprivateindex allocates a unique index.
... pr_setthrea
dprivate associates private thread data with an index.
... pr_getthrea
dprivate retrieves data associated with an index.
Cryptography functions
k11_destroytokenobject mxr 3.2 and later pk11_digestbegin mxr 3.2 and later pk11_digestkey mxr 3.2 and later pk11_digestop mxr 3.2 and later pk11_digestfinal mxr 3.2 and later pk11_doesmechanism mxr 3.2 and later pk11_exportencrypte
dprivatekeyinfo mxr 3.2 and later pk11_exportencrypte
dprivkeyinfo mxr 3.9 and later pk11_exportprivatekeyinfo mxr 3.2 and later pk11_finalize mxr 3.2 and later pk11_findbestkeamatch mxr 3.2 and later pk11_findcertandkeybyrecipientlist mxr 3.2 and late...
...ickname mxr 3.2 and later pk11_findcertinslot mxr 3.2 and later pk11_findgenericobjects mxr 3.9.2 and later pk11_findfixedkey mxr 3.2 and later pk11_findkeybyanycert mxr 3.2 and later pk11_findkeybydercert mxr 3.2 and later pk11_fin
dprivatekeyfromcert mxr 3.2 and later pk11_findslotbyname mxr 3.2 and later pk11_findslotsbynames mxr 3.9 and later pk11_fortezzahaskea mxr 3.2 and later pk11_fortezzamapsig mxr 3.2 and later pk11_freeslot mxr 3.2 and later pk11_freesl...
... 3.4 and later pk11_importcert mxr 3.5 and later pk11_importcertforkeytoslot mxr 3.2 and later pk11_importcrl mxr 3.6 and later pk11_importdercert mxr 3.6 and later pk11_importderprivatekeyinfoandreturnkey mxr 3.4 and later pk11_importencrypte
dprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfo mxr 3.2 and later pk11_importprivatekeyinfoandreturnkey mxr 3.4 and later pk11_importpublickey mxr 3.4 and later pk11_importsymkeywithflags mxr 3.4 and later pk11_initpin mxr 3.2 and later ...
...see bug 215186 pk11_listfixedkeysinslot mxr 3.4 and later pk11_listprivkeysinslot mxr 3.4 and later pk11_listpublickeysinslot mxr 3.4 and later pk11_loa
dprivkey mxr 3.4 and later pk11_logoutall mxr 3.4 and later pk11_makekeapubkey mxr 3.2 and later pk11_mappbemechanismtocryptomechanism mxr 3.2 and later pk11_mapsignkeytype mxr 3.11 and later pk11_mechanismtoalgtag mxr 3.4 and later pk...
Hacking Tips
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, info->script_->lineno_, info->script_->sourcestart_, info->script_->sourceend_
dprintf 1 at 0x7fb4f6a104eb: file /home/nicolas/mozilla/contrib-push/js/src/jit/ionbuilder.cpp, line 159.
... (gdb) cond 1 inliningdepth == 0 (gdb)
dprintf js::jit::bailoutiontobaseline, "bailout from %s:%d:%d-%d\n", iter.script()->scriptsource()->filename_.mtuple.mfirsta, iter.script()->lineno_, iter.script()->sourcestart_, iter.script()->sourceend_
dprintf 2 at 0x7fb4f6fe43dc: js::jit::bailoutiontobaseline.
... (2 locations) (gdb)
dprintf ion.cpp:3196, "invalidate %s:%d:%d-%d\n", co->script_->scriptsource()->filename_.mtuple.mfirsta, co->script_->lineno_, co->script_->sourcestart_, co->script_->sourceend_
dprintf 3 at 0x7fb4f6a0b62a: file /home/nicolas/mozilla/contrib-push/js/src/jit/ion.cpp, line 3196.
Index
567 nsidownloa
dprogresslistener interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference to use simply implement this interface in your code, then call nsidownloadmanager.addlistener() to start listening.
...ces:scriptable, xpcom, xpcom api reference, xpcom interface reference interwiki lin 607 nsifeedgenerator interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference interwiki link 608 nsifeedperson interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference interwiki link 609 nsifee
dprocessor interfaces, interfaces:scriptable, xpcom, xpcom interface reference implemented by: @mozilla.org/feed-processor;1.
... to create an instance, use: 610 nsifee
dprogresslistener interfaces, interfaces:scriptable, xpcom, xpcom api reference, xpcom interface reference called after each entry or item is processed.
... 744 nsimessagewakeupservice interfaces, xpcom interface reference the parentprocessmessagemanager is used for this, so messages send from chil
dprocessmessagemanagers will be heard.
nsIProtocolProxyService
if the protocol handler for the given uri supports nsiproxie
dprotocolhandler, then the nsiproxyinfo instance returned from resolve may be passed to the nsiproxie
dprotocolhandler.newproxiedchannel() method to create a nsichannel to the given uri that uses the specified proxy.
... however, if the nsiproxyinfo type is "http", then it means that the given uri should be loaded using the http protocol handler, which also supports nsiproxie
dprotocolhandler.
...see nsiproxie
dprotocolhandler.newproxiedchannel().
... see also nsiproxyinfo nsiprotocolproxyfilter nsiproxie
dprotocolhandler nsicancelable ...
nsIXPCScriptable
5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void precreate(in nsisupports nativeobj, in jscontextptr cx, in jsobjectptr globalobj, out jsobjectptr parentobj); void create(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); void postcreate(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj); prbool ad
dproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool delproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool getproperty(in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp); prbool setproperty(in nsi...
... constants constant value description want_precreate 1 << 0 want_create 1 << 1 want_postcreate 1 << 2 want_ad
dproperty 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 method called.
... want_convert 1 << 10 want_finalize 1 << 11 want_checkaccess 1 << 12 want_call 1 << 13 want_construct 1 << 14 want_hasinstance 1 << 15 want_trace 1 << 16 use_jsstub_for_ad
dproperty 1 << 17 use_jsstub_for_delproperty 1 << 18 use_jsstub_for_setproperty 1 << 19 dont_enum_static_props 1 << 20 dont_enum_query_interface 1 << 21 dont_ask_instance_for_scriptable 1 << 22 classinfo_interfaces_only 1 << 23 allow_prop_mods_during_resolve 1 << 24 allow_prop_mods_to_prototype 1 << 25 dont_share_prototype 1 << 26 dont_reflect_interface_names 1 << 27 want_equality 1 << 28 want_outer_object 1 << 29 want_inner_object 1 << 30 reserv...
..., out jsobjectptr parentobj ); parameters nativeobj cx globalobj parentobj create() void create( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj ); parameters wrapper cx obj postcreate() void postcreate( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj ); parameters wrapper cx obj ad
dproperty() prbool ad
dproperty( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp ); parameters wrapper cx obj id vp return value delproperty() prbool delproperty( in nsixpconnectwrappednative wrapper, in jscontextptr cx, in jsobjectptr obj, in jsval id, in jsvalptr vp ); parameters wrapper ...
Optional chaining (?.) - JavaScript
without optional chaining, looking up a deeply-nested subproperty requires validating the references in between, such as: let neste
dprop = obj.first && obj.first.second; the value of obj.first is confirmed to be non-null (and non-undefined) before then accessing the value of obj.first.second.
... with the optional chaining operator (?.), however, you don't have to explicitly test and short-circuit based on the state of obj.first before trying to access obj.first.second: let neste
dprop = obj.first?.second; by using the ?.
... this is equivalent to the following, except that the temporary variable is in fact not created: let temp = obj.first; let neste
dprop = ((temp === null || temp === undefined) ?
...do something with the data } catch (err) { onerror?.(err.message); // no exception if onerror is undefined } } optional chaining with expressions you can also use the optional chaining operator when accessing properties with an expression using the bracket notation of the property accessor: let neste
dprop = obj?.['prop' + 'name']; optional chaining not valid on the left-hand side of an assignment let object = {}; object?.property = 1; // uncaught syntaxerror: invalid left-hand side in assignment array item access with optional chaining let arrayitem = arr?.[42]; examples basic example this example looks for the value of the name property for the member bar in a map when there is no such ...
Search Extension Tutorial (Draft) - Archive of obsolete content
var save
dprefs = {} // change the default value of the preference *name* to *value*.
... save
dprefs[name] = [defaultprefs.getcharpref(name), value]; // change the default defaultprefs.setcharpref(name, value); // clear the user value if this is the first run, or the // new default is the same as the user value.
... for (let [name, [origvalue, value]] in iterator(save
dprefs)) { if (defaultprefs.getcharpref(name) == value) defaultprefs.setcharpref(name, origvalue); } } function install() {} function uninstall() {} changing the default search engine this change comes in two parts: 1) installing a new search engine (and removing it when your extension is disabled), and 2) setting it as a default (and restoring the previous default when your...
findbar - Archive of obsolete content
attributes browserid, findnextaccesskey, fin
dpreviousaccesskey, highlightaccesskey, matchcaseaccesskey properties browser, findmode methods close, onfindagaincommand, open, startfind, togglehighlight example <browser type="content-primary" flex="1" id="content" src="about:blank"/> <findbar id="findtoolbar" browserid="content"/> attributes browserid type: string the id of the browser element to which the ...
... fin
dpreviousaccesskey type: string the access key for the "find previous" toolbar button in the findbar.
... onfindagaincommand( fin
dprevious ) return type: no return value call this method to handle your application's "find next" and "find previous" commands.
List of commands - Archive of obsolete content
n to the clipboard cmd_cut - cut a selection into the clipboard cmd_paste - paste a selection from the clipboard cmd_selectall cmd_selectnone cmd_copylink cmd_copyimagelocation cmd_copyimagecontents cmd_scrolltop cmd_scrollbottom cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_scrollleft cmd_scrollright cmd_selectcharprevious cmd_selectcharnext cmd_wor
dprevious cmd_wordnext cmd_selectwor
dprevious cmd_selectwordnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_selectlineprevious cmd_selectlinenext cmd_selectpageprevious cmd_selectpagenext cmd_selectmovetop cmd_selectmovebottom editor commands (legal when the focus is anywhere where you can type text): cmd_paste - paste a selection from the clipboard cmd_pas...
...d cmd_deletewordforward cmd_deletetobeginningofline cmd_deletetoendofline cmd_scrolltop cmd_scrollbottom cmd_movetop cmd_movebottom cmd_selecttop cmd_selectbottom cmd_linenext cmd_lineprevious cmd_selectlinenext cmd_selectlineprevious cmd_charprevious cmd_charnext cmd_selectcharprevious cmd_selectcharnext cmd_beginline cmd_endline cmd_selectbeginline cmd_selectendline cmd_wor
dprevious cmd_wordnext cmd_selectwor
dprevious cmd_selectwordnext cmd_scrollpageup cmd_scrollpagedown cmd_scrolllineup cmd_scrolllinedown cmd_movepageup cmd_movepagedown cmd_selectpageup cmd_selectpagedown other commands the following list other commands (prefixed by cmd_ or browser:) which have not been categorized here yet (though they are in the alphabetical list below): http://lxr...
...mozilla.org/seamonkey/sou...kmarks-temp.js http://lxr.mozilla.org/seamonkey/sou.../bookmarks.xml http://lxr.mozilla.org/seamonkey/sou...rksoverlay.xul http://lxr.mozilla.org/seamonkey/sou...okmarkstree.js list of commands (listed alphabetically) browser:addbookmark browser:addbookmarkas browser:addgroupmarkas browser:back browser:editpage browser:find browser:findagain browser:fin
dprev browser:forward browser:home browser:managebookmark browser:open browser:openfile browser:print browser:printpreview browser:savepage browser:searchinternet browser:sendpage browser:uploadfile cmd_bm_copy cmd_bm_cut cmd_bm_delete cmd_bm_expandfolder cmd_bm_export cmd_bm_find cmd_bm_import cmd_bm_managefolder cmd_bm_movebookmark cmd_bm_newbookmark cmd_bm_newfolder cmd_bm_n...
NPAnyCallbackStruct - Archive of obsolete content
the npanycallbackstruct structure contains information required by the platformprint field of the npembe
dprint structure during embedded mode printing.
... during printing in embedded mode, the platformprint field of the npembe
dprint structure points to an npanycallbackstruct.
...see also npp_print() npembe
dprint npsetwindowcallbackstruct npprintcallbackstruct ...
NPP_Print - Archive of obsolete content
for an embedded plug-in, set the printinfo field to npembe
dprint.
... ms windows on ms windows printinfo->print.embe
dprint.platformprint is the device context (dc) handle.
... see also npprint, npfullprint, npembe
dprint ...
NPPrintCallbackStruct - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary contains information required by the platformprint field of the npembe
dprint structure during embedded mode printing on unix systems.
...this information is required by the platformprint field of the npembe
dprint structure during embedded mode printing.
... see also npp_print, npembe
dprint, npsetwindowcallbackstruct, npanycallbackstruct ...
PAC - MDN Web Docs Glossary: Definitions of Web-related terms
a proxy auto-configuration file (pac file) is a file which contains a function, fin
dproxyforurl(), which is used by the browser to determine whether requests (including http, https, and ftp) should go directly to the destination or if they need to be forwarded through a web proxy server.
... function fin
dproxyforurl(url, host) { /* ...
... */ } ret = fin
dproxyforurl(url, host) see proxy auto-configuration (pac) file for details about how these are used and how to create new ones.
mach
here is a minimal mach command module: from __future__ import print_function, unicode_literals from mach.decorators import ( commandargument, comman
dprovider, command, ) @comman
dprovider class machcommands(object): @command('doit', description='run it!') @commandargument('--debug', '-d', action='store_true', help='do it in debug mode.') def doit(self, debug=false): print('i did it!') from mach.decorators we import some python decorators which are used to define what python code corresponds to mach commands.
... the decorators are: @comman
dprovider this is a class decorator that tells mach that this class contains methods that implement mach commands.
... an instance of the @comman
dprovider class is instantiated by the mach driver if a command in it is called for execution.
Message manager overview
its most important functions and attributes are: childcount : contains the number of children (child processes, plus the in-content child) getchildat() : get the child at the given index loa
dprocessscript() : load a process script into every content process broadcastasyncmessage() : send a message to all process scripts addmessagelistener() : start listening to a specific message from process scripts removemessagelistener() : stop listening to a specific message interfaces nsiprocessscriptloader nsimessagelistenermanager nsimessagebroadcaste...
... its most important functions are: loa
dprocessscript() : load a process script into the content process broadcastasyncmessage() : send a message to process scripts addmessagelistener() : start listening to a specific message from process scripts removemessagelistener() : stop listening to a specific message interfaces nsiprocesschecker nsiprocessscriptloader nsimessagelistenermanager nsi...
...arent process sendsyncmessage() : send synchronous messages to the parent process interfaces nsimessagelistenermanager nsimessagesender nsisyncmessagesender nsicontentprocessmessagemanager how to access code running in a child process can access the cpmm with code like this: // child process script let cpmm = cc["@mozilla.org/chil
dprocessmessagemanager;1"] .getservice(ci.nsisyncmessagesender); you can also access it as the cpmm property of services.jsm, if you are in the child process.
InstallListener
method overview void onnewinstall(in addoninstall install) void ondownloadstarted(in addoninstall install) void ondownloa
dprogress(in addoninstall install) void ondownloadended(in addoninstall install) void ondownloadcancelled(in addoninstall install) void ondownloadfailed(in addoninstall install) void oninstallstarted(in addoninstall install) void oninstallended(in addoninstall install, in addon addon) void oninstallcancelled(in addoninstall install) void oninstallfailed(in addoninstall install) v...
... void ondownloadstarted( in addoninstall install ) parameters install the addoninstall representing the install ondownloa
dprogress() called as data is received during a download.
... void ondownloa
dprogress( in addoninstall install ) parameters install the addoninstall representing the install ondownloadended() called when downloading completes successfully for an add-on install.
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number fin
dprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolean canundo(); void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchang...
... lastfind object an object describing the result of the last find operation performed using the find(), findnext(), or fin
dprevious() method.
... fin
dprevious() finds the previous occurrence of the search operation started by the last call to find().
JS::IdentifyStandardInstance
syntax jsprotokey js::identifystandardinstance(jsobject *obj); jsprotokey js::identifystandar
dprototype(jsobject *obj); jsprotokey js::identifystandardinstanceorprototype(jsobject *obj); jsprotokey js::identifystandardconstructor(jsobject *obj); // added in spidermonkey 38 name type description obj jsobject * pointer to the instance/prototype/constructor object to determine.
... js::identifystandar
dprototype determines if the given object is a prototype for a standard class.
... see also mxr id search for js::identifystandardinstance mxr id search for js::identifystandar
dprototype mxr id search for js::identifystandardinstanceorprototype mxr id search for js::identifystandardconstructor jsprotokey bug 975277 bug 976148 - added identifystandardconstructor ...
JSClass
syntax struct jsclass { const char *name; uint32_t flags; /* optional since spidermonkey 37 */ jspropertyop ad
dproperty; jsdeletepropertyop delproperty; jspropertyop getproperty; jsstrictpropertyop setproperty; jsenumerateop enumerate; jsresolveop resolve; jsconvertop convert; /* obsolete since spidermonkey 44 */ /* optional since spidermonkey 25 */ jsfinalizeop finalize; /* optional */ jsclassinternal reserved0; /* obsolete since spidermonkey 13 *...
... ad
dproperty jspropertyop a hook called just after adding a new property.
...when a script creates a new property, this is called after ad
dproperty.
JSPrincipals
use js_hol
dprincipals and js_dropprincipals.
...use the js_hol
dprincipals to increment refcount, and use js_dropprincipals to decrement refcount.
... see also mxr id search for jsprincipals js_newglobalobject js_hol
dprincipals js_dropprincipals bug 715417 - removed getprincipalarray and globalprivilegesenabled bug 728250 - added dump method, removed codebase, destroy, and subsume properties bug 884676 - changed refcount type to mozilla::atomic ...
JSPropertyOp
they are also the types of the jsclass.ad
dproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
... jsclass hooks jsclass offers following hooks: jspropertyop jsclass.ad
dproperty is called just after a new property is added to an object.
...hence when a script assigns to a nonexisting property, first the object's class's ad
dproperty hook is called, then the setproperty hook.
JS_SetProperty
ordinarily this function leaves v unchanged, but it is possible for a jsclass.ad
dproperty hook or a non-default setter to assign to v.
...after the new property is added, the jsclass.ad
dproperty hook is called with the arguments (cx, obj, id, &v).
...if the hook succeeds and the property has a stored value, then the value left in v by the ad
dproperty hook becomes the stored value of the property.
inIDOMUtils
le, in unsigned long aselectorindex); unsigned long long getspecificity(in nsidomcssstylerule arule, in unsigned long aselectorindex); nsidomfontfacelist getusedfontfaces(in nsidomrange arange); bool haspseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); boolean isignorablewhitespace(in nsidomcharacterdata adatanode); bool isinherite
dproperty(in astring apropertyname); void parsestylesheet(in nsidomcssstylesheet asheet, in domstring ainput); void removepseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); astring rgbtocolorname(in octet ar, in octet ag, in octet ab); bool selectormatcheselement(in nsidomelement aelement, in nsidomcssstylerule arule, in unsigned long aselector...
... isinherite
dproperty() determines if the specified string names a css property that is inherited by default.
... boolean isinherite
dproperty( in astring apropertyname ); parameters apropertyname the name of the css property.
nsIContentPrefService
void addobserver(in astring aname, in nsicontentprefobserver aobserver); nsivariant getpref(in nsivariant agroup, in astring aname, [optional] in nsicontentprefcallback acallback); nsipropertybag2 getprefs(in nsivariant agroup); nsipropertybag2 getprefsbyname(in astring aname); boolean haspref(in nsivariant agroup, in astring aname); void removegroupe
dprefs(); void removeobserver(in astring aname, in nsicontentprefobserver aobserver); void removepref(in nsivariant agroup, in astring aname); void removeprefsbyname(in astring aname); void setpref(in nsivariant agroup, in astring aname, in nsivariant avalue); attributes attribute type description dbconnection mozistorageconnectio...
...or if aname is null or an empty string removegroupe
dprefs() remove all grouped prefs.
...void removegroupe
dprefs(); removeobserver() removes an observer that's presently monitoring a preference for changes.
nsIContentSecurityPolicy
hell docshell); void refinepolicy(in astring policystring, in nsiuri selfuri); void scanrequestdata(in nsihttpchannel achannel); void sendreports(in astring blockeduri, in astring violateddirective); short shouldload(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra); short shoul
dprocess(in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra); attributes attribute type description allowseval boolean whether this policy allows eval and eval-like functions such as settimeout("code string", time).
...short shouldload( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetypeguess, in nsisupports aextra ); parameters acontenttype acontentlocation arequestorigin acontext amimetypeguess aextra return value shoul
dprocess() delegate method called by the service when sub-elements of the protected document are being processed.
...short shoul
dprocess( in unsigned long acontenttype, in nsiuri acontentlocation, in nsiuri arequestorigin, in nsisupports acontext, in acstring amimetype, in nsisupports aextra ); parameters acontenttype acontentlocation arequestorigin acontext amimetype aextra return value ...
nsIExternalProtocolService
method overview boolean externalprotocolhandlerexists(in string aprotocolscheme); astring getapplicationdescription(in autf8string ascheme); nsihandlerinfo getprotocolhandlerinfo(in acstring aprotocolscheme); nsihandlerinfo getprotocolhandlerinfofromos(in acstring aprotocolscheme, out boolean afound); boolean isexpose
dprotocol(in string aprotocolscheme); void loaduri(in nsiuri auri, [optional] in nsiinterfacerequestor awindowcontext); void loadurl(in nsiuri aurl); void setprotocolhandlerdefaults(in nsihandlerinfo ahandlerinfo, in boolean aoshandlerexists); methods externalprotocolhandlerexists() check whether a handler for a specific protocol exists.
...isexpose
dprotocol() check whether a handler for a specific protocol is "exposed" as a visible feature of the current application.
...boolean isexpose
dprotocol( in string aprotocolscheme ); parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on.
nsIPluginHost
void fin
dproxyforurl(in string aurl, out string aresult); native code only!
... native code only!fin
dproxyforurl fetches a url.
... void fin
dproxyforurl( in string aurl, out string aresult ); parameters aurl aresult native code only!getplugin nsiplugin getplugin( in string amimetype ); parameters amimetype return value getplugincount() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void getplugincount( out unsigned long aplugincount ); parameters...
nsIProtocolHandler
if the protocol supports transparent proxying, the handler should implement the nsiproxie
dprotocolhandler interface.
... if the protocol only supports http proxying, it doesn't need to support nsiproxie
dprotocolhandler, but should instead set the allows_proxy_http flag.
... see also nsiproxie
dprotocolhandler adding a new protocol to mozilla writing a firefox protocol handler custom about: urls - similar to adding new protocol but adding onto the existing about: protocol ...
Index - Web APIs
3705 svganimate
dpreserveaspectratio api, reference, référence(2), svg, svg dom the svganimate
dpreserveaspectratio interface is used for attributes of type svgpreserveaspectratio which can be animated.
... 3791 svgimageelement.preserveaspectratio api, image, needsexample, property, reference, svg, svg dom, svgimageelement, preserveaspectratio the preserveaspectratio read-only property of the svgimageelement interface returns an svganimate
dpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
... 4556 webgl_compressed_texture_astc.getsupporte
dprofiles() api, method, reference, webgl, webgl extension, webgl extensions the webgl_compressed_texture_astc.getsupporte
dprofiles() method returns an array of strings containing the names of the astc profiles supported by the implementation.
for await...of - JavaScript
function* generatorwithrejecte
dpromises() { try { yield 0; yield 1; yield promise.resolve(2); yield promise.reject(3); yield 4; throw 5; } finally { console.log('called finally') } } (async function() { try { for await (let num of generatorwithrejecte
dpromises()) { console.log(num); } } catch (e) { console.log('catched', e) } })(); // 0 // 1 // 2 // catched 3 // compare ...
...with for-of loop: try { for (let numorpromise of generatorwithrejecte
dpromises()) { console.log(numorpromise); } } catch (e) { console.log('catched', e) } // 0 // 1 // promise { 2 } // promise { <rejected> 3 } // 4 // catched 5 // called finally to make finally blocks of a sync generator to be always called use appropriate form of the loop, for await...of for the async generator and for...of for the sync one and await yielded promises explicitly inside the loop.
... (async function() { try { for (let numorpromise of generatorwithrejecte
dpromises()) { console.log(await numorpromise); } } catch (e) { console.log('catched', e) } })() // 0 // 1 // 2 // catched 3 // called finally specifications specification ecmascript (ecma-262)the definition of 'ecmascript language: the for-in, for-of, and for-await-of statements' in that specification.
Downloading Files - Archive of obsolete content
, pwd) { pwd.value = hardcodedpassword; return true; }, promptusernameandpassword: function(dialogtitle, text, passwordrealm, savepassword, user, pwd) { user.value = hardcodedusername; pwd.value = hardcodedpassword; return true; } }; persist.saveuri(urltosave, null, null, null, "", nsfileinstance, privacy); the above is going to give you errors about missing nsidownloa
dprogresslistener methods, so you should implement that as well.
...el.responsestatus != 200) { return ""; } var bstream = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(stream); var size = 0; var file_data = ""; while(size = bstream.available()) { file_data += bstream.readbytes(size); } return file_data; } see also nsidownloa
dprogresslistener saving an arbitrary url to a local file customizing the download progress bar appearance ...
Progress Listeners - Archive of obsolete content
}, // for definitions of the remaining functions see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } attach the progress listener to a <browser> or a <tabbrowser> element using ad
dprogresslistener, for example for firefox put the following code in a load listener of a main window: gbrowser.ad
dprogresslistener(mylistener); when used with a browser, the second argument is a mask which determines the type of events that will be received.
... var myextension = { oldurl: null, init: function() { gbrowser.ad
dprogresslistener(this); }, uninit: function() { gbrowser.removeprogresslistener(this); }, processnewurl: function(auri) { if (auri.spec == this.oldurl) return; // now we know the url is new...
Listening to events in Firefox extensions - Archive of obsolete content
both browser and tabbrowser elements support the following: var progresslistener = { // add nsiwebprogressimplementation here } b.ad
dprogresslistener(progresslistener); where b is the browser or tabbrowser you want to listen to events for.
... the internal listeners are used to send out progress events to listeners registered with ad
dprogresslistener() (which receives events from the browser that is currently visible) and addtabsprogresslistener() (which receives events from all browsers).
Intercepting Page Loads - Archive of obsolete content
ener("tabopen", this, false); gbrowser.tabcontainer.removeeventlistener("tabclose", this, false); }, handleevent : function(aevent) { let tab = aevent.target; let webprogress = gbrowser.getbrowserfortab(tab).webprogress; this._toggleprogresslistener(webprogress, ("tabopen" == aevent.type)); }, _toggleprogresslistener : function(awebprogress, aisadd) { if (aisadd) { awebprogress.ad
dprogresslistener(this, awebprogress.notify_all); } else { awebprogress.removeprogresslistener(this); } } this shouldn't be too hard to follow.
...you can create an xpcom component that extends nsiwebprogresslistener and use the ad
dprogresslistener method in the service to include it.
Updating addons broken by private browsing changes - Archive of obsolete content
nsicontentprefservice: getpref, setpref, haspref, hascache
dpref, removepref, removegroupe
dprefs, removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext argument to indicate the privacy status of the pref in question.
...ad
dprivacyawarelistener should be used instead, or no notifications will be received for private downloads.
Abc Assembler Tests - Archive of obsolete content
* * ***** end license block ***** */ function main() { getlocal0 pushscope fin
dproperty start pushstring "instructions that start with the letter l" callpropvoid start 1 newfunction .function_id(runtest) getlocal0 call 0 fin
dproperty end callpropvoid end 0 returnvoid } function runtest() { // test null <= null == true fin
dproperty compare_stricteq pushstring "null lessequals null" // testname pushtrue // expected pushnull ...
... pushnull lessequals // actual callpropvoid compare_stricteq 3 // use .try / .catch to catch typeerror // convert_o null .try { pushnull convert_o pop fin
dproperty fail pushstring "convert_o null" pushstring "exception should have been thrown: typeerror: error #1009: cannot access a property or method of a null object reference." getlocal1 callpropvoid fail 3 jump finished_convert_o_null } .catch { getlocal0 pushscope setlocal2 // save typeerror fin
dproperty compare_typeerror pushstring "convert_o null" // test name pushstring "typeerror: error #1009" // expected getlocal2 // actual callpropvoid compare_typeerror 3 } ...
progressmeter.mode - Archive of obsolete content
« xul reference home mode type: one of the values below a determine
dprogressmeter is used in cases where you know how long an operation will take.
... an undetermine
dprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
XUL Questions and Answers - Archive of obsolete content
what is an example of ad
dprogresslistener?
... an example of this is this: // associate the progress listener for a "browser" to a listener object browserobject.ad
dprogresslistener( listobj, components.interfaces.nsiwebprogress.notify_state_window ); // remember to define the object, something like this: listobj = new object(); listobj.wpl = components.interfaces.nsiwebprogresslistener; listobj.queryinterface = function(aiid) { if (aiid.equals(listobj.wpl) || aiid.equals(components.interfaces.nsisupportsweakreference) || aiid.equals(components.interfaces.nsisupports)) return this; throw components.results.ns_nointerface; } listobj.onstatechange = function(aprogress, arequest, aflag, astatus) { if (aflag & listobj.wpl.state_start) { // this fires when the load event is initiated } else { if (a...
browser - Archive of obsolete content
droppedlinkhandler, homepage, showcaret, src, type properties accessibletype, cangoback, cangoforward, contentdocument, contentprincipal, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, messagemanager, preferences, securityui, sessionhistory, webbrowserfind, webnavigation, webprogress methods ad
dprogresslistener, goback, goforward, gohome, gotoindex, loaduri, loaduriwithflags, reload, reloadwithflags, removeprogresslistener, stop, swapdocshells examples <!-- shows mozilla homepage inside a groupbox --> <groupbox flex="1"> <caption label="mozilla homepage"/> <browser type="content" src="http://www.mozilla.org" flex="1"/> </groupbox> attributes autocompleteenabled type: bo...
...haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ad
dprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
progressmeter - Archive of obsolete content
mode type: one of the values below a determine
dprogressmeter is used in cases where you know how long an operation will take.
... an undetermine
dprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
promptBox - Archive of obsolete content
method overview nsidomelement appen
dprompt(args, onclosecallback); void removeprompt(nsidomelement aprompt); nodelist listprompts(nsidomelement aprompt); methods appen
dprompt() creates a new prompt, adding it to the tab.
... nsidomelement appen
dprompt( args, onclosecallback ); parameters args arguments for the prompt.
tabbrowser - Archive of obsolete content
bookmarkgroup, onnewtab, tabmodalpromptshowing properties browsers, cangoback, cangoforward, contentdocument, contenttitle, contentvieweredit, contentviewerfile, contentwindow, currenturi, docshell, documentcharsetinfo, homepage, markupdocumentviewer, securityui, selectedbrowser, selectedtab, sessionhistory, tabcontainer, tabs, visibletabs, webbrowserfind, webnavigation, webprogress methods ad
dprogresslistener, addtab, addtabsprogresslistener,appendgroup, getbrowseratindex, getbrowserindexfordocument, getbrowserfordocument, getbrowserfortab, geticon, getnotificationbox, gettabforbrowser, gettabmodalpromptbox, goback, gobackgroup, goforward, goforwardgroup, gohome, gotoindex, loadgroup, loadonetab, loadtabs, loaduri, loaduriwithflags, movetabto, pintab, reload, reloadalltabs, reloadtab, re...
..., haschildnodes(), insertbefore(), isdefaultnamespace(), isequalnode, issamenode, issupported(), lookupnamespaceuri, lookupprefix, normalize(), queryselector(), queryselectorall(), removeattribute(), removeattributenode(), removeattributens(), removechild(), removeeventlistener(), replacechild(), setattribute(), setattributenode(), setattributenodens(), setattributens(), setuserdata ad
dprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
2006-09-29 - Archive of obsolete content
discussions discussion on how the firefox 1.5.0.7 dom generates xhtml inline elements using wor
dpress.
... it was determined that the generated elements from wor
dpress do not follow the wc3 guidelines in appendix c of xhtml 1.0.
NPFullPrint - Archive of obsolete content
if you want an embedded plug-in to simply render its area of the page, set pluginprinted to false and return immediately; the browser calls npp_print again with the npembe
dprint substructure of npprint.
... see also npp_print, npprint, npembe
dprint ...
NPAPI plugin reference - Archive of obsolete content
npembe
dprint substructure of npprint that contains platform-specific information used during embedded mode printing.
... npprintcallbackstruct contains information required by the platformprint field of the npembe
dprint structure during embedded mode printing on unix systems.
Threats - Archive of obsolete content
this kind of malware is widespread on wor
dpress websites.
... for more detailed look on this you can refer to this detailed post on wor
dpress malware redirect.
How much does it cost to do something on the Web? - Learn web development
“packaged” hosting when you want to publish a website, you could do everything by yourself: set up a database (if needed), content management system, or cms (like wor
dpress, dotclear, spip, etc.), upload pre-made or your own templates.
... you could use your hosting provider's environment, for roughly ten to fifteen dollars per month, or subscribe directly to a dedicated hosting service with pre-packaged cmss (e.g., wor
dpress, tumblr, blogger).
CustomizableUI.jsm
array getwidgetsinarea(aareaid); string getareatype(aareaid); domelement getcustomizetargetforarea(aareaid, awindow); void reset(); void undoreset(); void removeextratoolbar(); object getplacementofwidget(awidgetid); bool iswidgetremovable(awidgetnodeorwidgetid); bool canwidgetmovetoarea(awidgetid); void getlocalize
dproperty(awidget, aprop, aformatargs, adef); void hidepanelfornode(anode); bool isspecialwidget(awidgetid); void addpanelcloselisteners(apanel); void removepanelcloselisteners(apanel); void onwidgetdrag(awidgetid, aarea); void notifystartcustomizing(awindow); void notifyendcustomizing(awindow); void dispatchtoolboxevent(aevent, ...
... getlocalize
dproperty() get a localized property off a (widget) object.
Webapps.jsm
calid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _senddownloa
dprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _openandreadpackage: function(azipfile, aoldapp, anewapp, aislocalfileinstall,) _openpackage: function(azipfile, aapp, aislocalfileinstall) _opensignedpackage: function(ainstallorigin, amanifesturl, azipfile, acertdb) ...
...lid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerbrowserelementparentforapp: function(amsg, amn) receiveappmessage: function(appid, message) _clearprivatedata: function(appid, browseronly, msg) _sen
dprogressevent: function() updatestatechanged: function appobs_update(aupdate, astate) applicationcacheavailable: function appobs_cacheavail(aapplicationcache) ...
Proxies in Necko
this means that callers can just create an nsichannel, not needing to worry about whether the channel will use a proxy or not the basic interfaces for proxies are: nsiproxyinfo, nsiprotocolproxyservice, and nsiproxie
dprotocolhandler nsiproxyinfo is a simple helper which stores information about the type of the proxy, its host and its port.
...depending on the type of the proxy info, it either asks the http protocol handler or the protocol handler for the requested uri for a new channel with the nsiproxyinfo - if the channel supports nsiproxie
dprotocolhandler.
Index
146 jspropertydescriptor jsapi reference, reference, référence(2), spidermonkey a descriptor is an object that can have the following key values 147 jspropertyop jsapi reference, spidermonkey they are also the types of the jsclass.ad
dproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
... 385 js_linkconstructoran
dprototype jsapi reference, reference, référence(2), spidermonkey js_linkconstructoran
dprototype 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.
JIT Optimization Outcomes
protoindexe
dprops 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).
... unknownsim
dproperty the property being accessed on the object is not one of the optimizable property names.
JS_SetElement
js_setelement ordinarily leaves *vp unchanged, but a jsclass.ad
dproperty hook or non-default setter may modify it.
... obsolete since jsapi 29 on success, js_setelement returns true and the value left in *vp is left unchanged unless an ad
dproperty hook or setter modified it.
JS_SetNativeStackQuota
spidermonkey allows for a distinction between system code (such as gcs, which may incidentally be triggered by script but are not strictly performed on behalf of such script), trusted script (as determined by js_settruste
dprincipals), and untrusted script.
... see also mxr id search for js_setnativestackquota js_settruste
dprincipals bug 516832 bug 732665 bug 723021 ...
JSAPI reference
nce jsapi 13 js_sealobject obsolete since javascript 1.8.5 js_getparent obsolete since jsapi 39 js_setparent obsolete since jsapi 39 standard objects enum jsprotokey added in spidermonkey 24 js_getclassobject js_getclassprototype js::protokeytoid added in spidermonkey 38 js_idtoprotokey added in spidermonkey 31 js::identifystandardinstance added in spidermonkey 31 js::identifystandar
dprototype added in spidermonkey 31 js::identifystandardinstanceorprototype added in spidermonkey 31 js::identifystandardconstructor added in spidermonkey 38 date js_newdateobject added in spidermonkey 1.8.5 js_newdateobjectmsec added in spidermonkey 1.8.5 js_objectisdate added in spidermonkey 1.8.5 js_cleardatecaches added in spidermonkey 17 js_now intl api js_setdefaultlocale added ...
... struct jsclass jsclass.flags jsclass.call jsclass.construct struct jsfunctionspec struct jspropertyspec js_initclass js_linkconstructoran
dprototype added in spidermonkey 17 js::propertyspecnameissymbol added in spidermonkey 38 js::propertyspecnameequalsid added in spidermonkey 38 js::propertyspecnametopermanentid added in spidermonkey 38 js_getreservedslot js_setreservedslot struct jsextendedclass obsolete since javascript 1.8.5 struct jsobjectops obsolete since javascript 1.8.5 struct jsxmlobjectops obsolete since javascri...
Mozilla internal string guide
// modify the url and pass to addpage(const char16_t* url) void addmodifiedpage(const nsastring& url, prbool ad
dprefix) { if (ad
dprefix) { // must create a temporary buffer - string is multi-fragmented constexpr auto httpprefix = u"http://"_ns; addpage(promiseflatstring(httpprefix + modifiedurl)); } else { // might create a temporary buffer, does a runtime check addpage(promiseflatstring(url).get()); } } printf and a utf-16 string for debugging, it's usef...
... setcapacity() is appropriate to use before a sequence of multiple operations from the following list (without operations that are not on the list between the setcapacity() call and operations from the list): append() appendascii() appendliteral() appen
dprintf() appendint() appendfloat() lossyappendutf16toascii() appendasciitoutf16() do not call setcapacity() if the subsequent operations on the string do not meet the criteria above.
nsIMsgIncomingServer
constructe
dprettyname astring helper function to construct the pretty name in a server type specific way - for example, mail for foo@test.com, news on news.mozilla.org.
... loginatstartup boolean logonfallback boolean maxmessagesize long offlinesupportlevel long password acstring passwor
dpromptrequired boolean if the password for the server is available either via authentication in the current session or from password manager stored entries, return false.
nsIURIFixupInfo
keywor
dprovidername astring the keyword search provider name expected to provide a keyword search; empty string if no keyword search is performed.
... fixupchange
dprotocol boolean if we changed the protocol; instead of using one raw from the input.
XPCOM Interface Reference
idevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiteratornsidirectoryservicensidirectoryserviceprovidernsidirectoryserviceprovider2nsidiskcachestreaminternalnsidispatchsupportnsidocshellnsidocumentloadernsidownloadnsidownloadhistorynsidownloadmanagernsidownloadmanageruinsidownloadobservernsidownloa
dprogresslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsidroppedlinkhandlernsidroppedlinkitemnsidynamiccontainernsieditornsieditorboxobjectnsieditordocshellnsieditorimesupportnsieditorloggingnsieditormailsupportnsieditorobservernsieditorspellchecknsieffectivetldservicensienumeratornsienvironmentnsierrorservicensieventlistenerinfonsieventlistenerservicensieventsourcensieventtarge...
...tnsiexceptionnsiextensionmanagernsiexternalhelperappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactorynsifavicondatacallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifee
dprocessornsifee
dprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsifilepickernsifileprotocolhandlernsifilespecnsifilestreamsnsifileurlnsifileutilitiesnsifileviewnsifocusmanagernsiformhistory2nsiframeloadernsiframeloaderownernsiframemessagelistenernsiframemessagemanagernsiframescriptloadernsigsettingscollectionnsigsettingsservicensigeolocationprovidernsigeolocationupdatensiglobalhistorynsiglobalhistory2nsiglobalhistory3nsihtmleditornsihttpheaderlistenerns...
XPCOM Interface Reference by grouping
criptableunicodeconverter nsiscripterror nsiscripterror2 stylesheet nsistylesheetservice url nsiuri nsiurl util nsidomserializer nsidomxpathevaluator nsidomxpathexception nsidomxpathexpression nsidomxpathresult xslt nsixsltexception nsixsltprocessor download nsidownload nsidownloadmanager nsidownloa
dprogresslistener element internal nsiworker nsiworkerglobalscope nsiworkermessageevent nsiworkermessageport nsiworkerscope tree nsitreeboxobject nsitreecolumn nsitreecolumns nsitreecontentview nsitreeselection nsitreeview xform nsixformsmodelelement nsixformsnsinstanceelement nsixformsnsmodelelement xmlhttprequest...
...pack nsijetpack nsijetpackservice offlinestorage nsiapplicationcache nsiapplicationcachechannel nsiapplicationcachecontainer nsiapplicationcachenamespace nsiapplicationcacheservice places nsiannotationobserver rss feed nsifeed nsifeedcontainer nsifeedelementbase nsifeedentry nsifeedgenerator nsifeedperson nsifee
dprocessor nsifee
dprogresslistener nsifeedresult nsifeedresultlistener nsifeedtextconstruct script mozijssubscriptloader storage mozistoragevacuumparticipant util nsieffectivetldservice worker nsiabstractworker data nsiarray nsicategorymanager nsicollection nsidictionary nsimutablearray nsisimpleenumerator...
Structures - Plugins
npembe
dprint substructure of npprint that contains platform-specific information used during embedded mode printing.
... npprintcallbackstruct contains information required by the platformprint field of the npembe
dprint during embedded mode printing.
FileReader.readAsDataURL() - Web APIs
der.result; }, false); if (file) { reader.readasdataurl(file); } } live result example reading multiple files html <input id="browse" type="file" onchange="previewfiles()" multiple> <div id="preview"></div> javascript function previewfiles() { var preview = document.queryselector('#preview'); var files = document.queryselector('input[type=file]').files; function readan
dpreview(file) { // make sure `file.name` matches our extensions criteria if ( /\.(jpe?g|png|gif)$/i.test(file.name) ) { var reader = new filereader(); reader.addeventlistener("load", function () { var image = new image(); image.height = 100; image.title = file.name; image.src = this.result; preview.appendchild( image ); }, false); ...
... reader.readasdataurl(file); } } if (files) { [].foreach.call(files, readan
dpreview); } } note: the filereader() constructor was not supported by internet explorer for versions before 10.
SVGImageElement.preserveAspectRatio - Web APIs
the preserveaspectratio read-only property of the svgimageelement interface returns an svganimate
dpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
... syntax var svganimate
dpreerveaspectratio = svgimageelement.preserveaspectratio; value an svganimate
dpreserveaspectratio.
Rendering and the WebXR frame animation callback - Web APIs
this pseudocode outlines that process: for each view in the pose's views list: get the webxr gl layer's viewport set the webgl viewport to match for each object in the scene bin
dprogram() bindvertices() bindmatrices() binduniforms() bindbuffers() bindtextures() drawmyobject() put simply, this form of renderer is using view-first order.
... the resulting pseudocode looks like this: for each object in the scene bin
dprogram() binduniforms() bindbuffers() bindtextures() for each view in the pose's views list get the xrwebgllayer's viewport set the webgl viewport to match bindvertices() bindmatrices() drawmyobject() by changing things up in this way, we only bind programs, uniforms, buffers, textures, and potentially other things once per frame instead of twice for each object found ...
HTML attribute: accept - HTML: Hypertext Markup Language
for instance, there are a number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wor
dprocessingml.document"> whereas if you're accepting a media file, you may want to be include any format of that media type: <input type="file" id="soundfile" accept="audio/*"> <input type="file" id="videofile" accept="video/*"> <input type="file" id="imagefile" accept="image/*"> the accept attribute doesn't validate the types of the selected files; it simply provides hints for browsers to guide u...
...(many mobile devices also let the user take a picture with the camera when this is used.) accept=".doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wor
dprocessingml.document" — accept anything that smells like an ms word document.
<input type="file"> - HTML: Hypertext Markup Language
for instance, there are a number of ways microsoft word files can be identified, so a site that accepts word files might use an <input> like this: <input type="file" id="docpicker" accept=".doc,.docx,application/msword,application/vnd.openxmlformats-officedocument.wor
dprocessingml.document"> capture the capture attribute value is a string that specifies which camera to use for capture of image or video data, if the accept attribute indicates that the input should be of one of those types.
...(many mobile devices also let the user take a picture with the camera when this is used.) accept=".doc,.docx,.xml,application/msword,application/vnd.openxmlformats-officedocument.wor
dprocessingml.document" — accept anything that smells like an ms word document.
HTTP headers - HTTP
content-
dpr a number that indicates the ratio between physical pixels over css pixels of the selected image response.
...
dpr a number that indicates the client’s current device pixel ratio (
dpr), which is the ratio of physical pixels over css pixels (section 5.2 of [cssval]) of the layout viewport (section 9.1.1 of [css2]) on the device.
Proxy servers and tunneling - HTTP
the javascript function contained in the pac file defines the function: the auto-config file should be saved to a file with a .pac filename extension: proxy.pac and the mime type set to: application/x-ns-proxy-autoconfig the file consists of a function called fin
dproxyforurl.
... the example below will work in an environment where the internal dns server is set up so that it can only resolve internal host names, and the goal is to use a proxy only for hosts that aren't resolvable: function fin
dproxyforurl(url, host) { if (isresolvable(host)) return "direct"; else return "proxy proxy.mydomain.com:8080"; } see proxy auto-configuration (pac) for more examples.
Promise.all() - JavaScript
<state>: "fulfilled", <value>: array[4] } // promise { <state>: "rejected", <reason>: 555 } asynchronicity or synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronicity, if the iterable passed is empty) of promise.all: // we are passing as argument an array of promises that are already resolved, // to trigger promise.all as soon as possible var resolve
dpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.all(resolve
dpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function() { console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // pro...
...mise { <state>: "fulfilled", <value>: array[2] } the same thing happens if promise.all rejects: var mixe
dpromisesarray = [promise.resolve(33), promise.reject(44)]; var p = promise.all(mixe
dpromisesarray); console.log(p); settimeout(function() { console.log('the stack is now empty'); console.log(p); }); // logs // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "rejected", <reason>: 44 } but, promise.all resolves synchronously if and only if the iterable passed is empty: var p = promise.all([]); // will be immediately resolved var p2 = promise.all([1337, "hi"]); // non-promise values will be ignored, but the evaluation will be done asynchronously console.log(p); console.log(p2) settimeout(function() { console.log('the stack is now empty'); ...
Promise.race() - JavaScript
examples asynchronicity of promise.race this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are already resolved, // to trigger promise.race as soon as possible var resolve
dpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolve
dpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function(){ console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // pro...
...'); console.log(foreverpendingpromise); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "pending" } if the iterable contains one or more non-promise value and/or an already settled promise, then promise.race will resolve to the first of these values found in the array: var foreverpendingpromise = promise.race([]); var alreadyfulfille
dprom = promise.resolve(100); var arr = [foreverpendingpromise, alreadyfulfille
dprom, "non-promise value"]; var arr2 = [foreverpendingpromise, "non-promise value", promise.resolve(100)]; var p = promise.race(arr); var p2 = promise.race(arr2); console.log(p); console.log(p2); settimeout(function(){ console.log('the stack is now empty'); console.log(p); console.log(p2); }); // logs, in o...
StringView - Archive of obsolete content
aaaaaab1gmkjaaacadeaaaaaaaaayahgaaaaaaagaaaaawaaaaaaaaaaaaaa6ahgaaaaaaahaaaaaqaaaaaaaaaaaaaa8ahgaaaaaaahaaaaagaaaaaaaaaaaaaa+ahgaaaaaaahaaaaawaaaaaaaaaaaaaasipsceilbrufiabihcb0behdaaaasipecmmaaaaaaaaaaaaaaaaaap81agugap8lbaugaa8fqad/jqifiaboaaaaaong/////yx6bcaaaaeaaadp0p////8l8gqgaggcaaaa6cd///8x7umj0v5iiejig+twufrjx8cqbuaasmfbiavaaejhxwafqadot/////rmka8fqac4fwlgafvilrajyabig/gosinldwjdw7gaaaaasixa
dprdvxajyad/4a8fgaaaaac4ealgafvilrajyabiwfgdsinlsincsmhqp0gb0ejr+hucxco6aaaaaeif0nt0xuijxr8qcwaa/+iph4aaaaaagd1zbcaaahurvuij5eh+////xcyfrgqgaahzww8fqabigz0yaiaaahqeuaaaaabihcb0ffw/8azgaeij5f/qxel7////dx8a6xp///8phwbvsinlv6qfqado0v7//7gaaaaaxcnmlg8fhaaaaaaakefxqyn/qvzjifzbvumj1ufuti0lqaegafvijs2oasaau0wp5thbsmh9a0id7ajovf7//0if7xqedx+eaaaaaabmiepmifzeif9b/xtcsipdaug563xqsipecftdqvxbxufeqv/dzmyudx+eaaa...
How to convert an overlay extension to restartless - Archive of obsolete content
for example: components.utils.import("resource://gre/modules/services.jsm"); components.utils.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.definelazygetter(this, "strings", function() { return loa
dpropertiesfile("chrome://myaddon/locale/mystrings.properties"); }); function loa
dpropertiesfile(path) { /* hack: the string bundle cache is cleared on addon shutdown, however it doesn't appear to do so reliably.
Index of archived content - Archive of obsolete content
rces for plugin creation logging multi-process plugins monitoring plugins multi-process plugin architecture npapi plugin developer guide npapi plugin reference browser-side plug-in api npapi plug-in side api npanycallbackstruct npbyterange npclass npembe
dprint npevent npfullprint npidentifier npn newstream npnvariable npn_createobject npn_destroystream npn_enumerate npn_evaluate npn_forceredraw npn_getauthenticationinfo npn_getintidentifier npn_getproperty npn_getstringidentifier ...
Embedding FAQ - Archive of obsolete content
se.swt.widgets.shell; import org.mozilla.xpcom.nsidomdocument; public class test { public static void main(string args[]) { display display = new display(); shell shell = new shell(display); final mozillabrowser browser = new mozillabrowser(shell,wt.border); browser.seturl("http://www.google.com"); browser.ad
dprogresslistener(new progresslistener() { public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = browser.getdocument(); system.out.println(doc); } }); while...
String Rosetta Stone - Archive of obsolete content
string size_type find(const basic_string& s, size_type pos = 0) const size_type find(const chart* s, size_type pos, size_type n) const size_type find(const chart* s, size_type pos = 0) const size_type find(chart c, size_type pos = 0) const qstring int qstring::indexof ( const qstring & str, int from = 0, qt::casesensitivity cs = qt::casesensitive ) const format a printf style string nsstring appen
dprintf() std::string n/a qstring qstring & qstring::sprintf ( const char * cformat, ...
Supporting private browsing mode - Archive of obsolete content
var pbs = components.classes["@mozilla.org/privatebrowsing;1"] .getservice(components.interfaces.nsiprivatebrowsingservice); var ol
dprivatemode = pbs.privatebrowsingmode; pbs.privatebrowsingenabled = true; /* this is all private */ pbs.privatebrowsingenabled = ol
dprivatemode; in this example, we save the current state of the private browsing mode setting in the ol
dprivatemode variable, then turn on private browsing by setting its value to true.
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane ad
dprogresslistener addsession addtab addtabsprogresslistener advance advanceselectedtab appendcustomtoolbar appendgroup appenditem appendnotification blur cancel canceldialog centerwindowonscreen checkadjacentelement clearresults clearselection click close collapsetoolbar contains decrease decreasepage docommand ensureelementisvisible ensureindexisvisible ensureselectedelementisvisible expandtoolbar extra1 extra2 focus getbrowseratindex getbrowserfordocument getbrowserfortab getbrowserindexfordocument getbutton getdefaultsession geteditor getelementsbyattribute getelementsbyattributens getformattedstring gethtmleditor getindexoffir...
SAX - Archive of obsolete content
"', qname='" + qname + "'"); }, characters: function(value) { print("characters: " + value); }, processinginstruction: function(target, data) { print("processinginstruction: target='" + target + "', data='" + data + "'"); }, ignorablewhitespace: function(whitespace) { // don't care }, startprefixmapping: function(prefix, uri) { // don't care }, en
dprefixmapping: function(prefix) { // don't care }, // nsisupports queryinterface: function(iid) { if(!iid.equals(components.interfaces.nsisupports) && !iid.equals(components.interfaces.nsisaxcontenthandler)) throw components.results.ns_error_no_interface; return this; } }; start parsing the xml reader component can parse xml from a string, an nsiinputstream, or a...
Vulnerabilities - Archive of obsolete content
the web security vulnerabilities are prioritized depending on exploitability, detectability and impact on software which can be any cms such as wor
dpress, joomla, magento, wocommerce and more.
Index - MDN Web Docs Glossary: Definitions of Web-related terms
307 pac codingscripting, glossary a proxy auto-configuration file (pac file) is a file which contains a function, fin
dproxyforurl(), which is used by the browser to determine whether requests (including http, https, and ftp) should go directly to the destination or if they need to be forwarded through a web proxy server.
Reviewer Checklist
[fennec: "prefs" can be gecko prefs, share
dpreferences values, or build-time flags.
Performance
better: // addon.js function onunload() { services.mm.removedelayedframescript("resources://my-addon/framescript.js"); services.ppmm.removedelaye
dprocessscript("resources://my-addon/processcript.js"); services.mm.broadcastasyncmessage("my-addon:unload"); services.ppmm.broadcastasyncmessage("my-addon:unload"); } in the frame/process scripts: remove all kinds of listeners remove observer notifications remove custom categories and services nuke sandboxes unload jsms restore content dom states where necessary, e.g.
Message manager overview
// child process script let chil
dprocessmessagemanager = cc["@mozilla.org/chil
dprocessmessagemanager;1"] .getservice(ci.nsisyncmessagesender); parent process message manager the parent process message manager lives in the implements nsimessagelistenermanager nsimessagebroadcaster child process message manager implements nsimessagelistenermanager nsimessagesender loading scripts per...
Profiling with the Firefox Profiler
for example:in the results above we can see that we're spending ~287 milliseconds in startup::xre_initchil
dprocess, 194 ms of which are spent in pvsync::msg_notify and all child functions that it calls.
turbostat
invocation turbostat must be invoked as the super-user: sudo turbostat if you get an error saying "turbostat: no /dev/cpu/0/msr", you need to run the following command: sudo mo
dprobe msr the output is as follows: core cpu avg_mhz %busy bzy_mhz tsc_mhz smi cpu%c1 cpu%c3 cpu%c6 cpu%c7 coretmp pkgtmp pkg%pc2 pkg%pc3 pkg%pc6 pkg%pc7 pkgwatt corwatt gfxwatt - - 799 21.63 3694 3398 0 12.02 3.16 1.71 61.48 49 49 0.00 0.00 0.00 0.00 22.68 15.13 1.13 0 0 821 22.44 3657 ...
PR_AttachThread
syntax #include <pprthread.h> prthread* pr_attachthread( prthreadtype type, prthrea
dpriority priority, prthreadstack *stack); parameters pr_attachthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
PR_CreateThread
syntax #include <prthread.h> prthread* pr_createthread( prthreadtype type, void (*start)(void *arg), void *arg, prthrea
dpriority priority, prthreadscope scope, prthreadstate state, pruint32 stacksize); parameters pr_createthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
PR_Init
syntax #include <prinit.h> void pr_init( prthreadtype type, prthrea
dpriority priority, pruintn maxptds); parameters pr_init has the following parameters: type this parameter is ignored.
PR_Initialize
the thread may adjust its own priority by using pr_setthrea
dpriority.
nss tech note5
pk11_originunwrap, cka_wrap, &keyitem, null); if generating the key - see section generate a symmetric key prepare the to-be-wrapped key seckeyprivatekey *tobewrappe
dprivkey <big>prepare the parameter for crypto context.
PKCS 12 functions
function name/documentation source code nss versions sec_pkcs12addcertandkey mxr 3.2 and later sec_pkcs12addpasswordintegrity mxr 3.2 and later sec_pkcs12createexportcontext mxr 3.2 and later sec_pkcs12createpasswor
dprivsafe mxr 3.2 and later sec_pkcs12createunencryptedsafe mxr 3.2 and later sec_pkcs12decoderfinish mxr 3.2 and later sec_pkcs12decodergetcerts mxr 3.4 and later sec_pkcs12decoderimportbags mxr 3.2 and later sec_pkcs12decoderiterateinit mxr 3.10 and...
NSS reference
sec_pkcs12createexportcontext sec_pkcs12createpasswor
dprivsafe sec_pkcs12createunencryptedsafe sec_pkcs12addcertandkey sec_pkcs12addpasswordintegrity sec_pkcs12enablecipher sec_pkcs12encode sec_pkcs12destroyexportcontext sec_pkcs12decoderstart sec_pkcs12decoderimportbags sec_pkcs12decoderupdate sec_pkcs12decoderfinish sec_pkcs12decodervalidatebags sec_pkcs12decoderverify sec_pkcs12decodergetcerts sec_pkcs12decodersettargettokencas sec_pk...
Utility functions
em_compareitem mxr 3.2 and later secitem_copyitem mxr 3.2 and later secitem_dupitem mxr 3.2 and later secitem_freeitem mxr 3.2 and later secitem_itemsareequal mxr 3.8 and later secitem_zfreeitem mxr 3.2 and later seckey_copyencrypte
dprivatekeyinfo mxr 3.2 and later seckey_copyprivatekeyinfo mxr 3.2 and later seckey_creatersaprivatekey mxr 3.2 and later seckey_destroyencrypte
dprivatekeyinfo mxr 3.2 and later seckey_destroyprivatekeyinfo mxr 3.2 and later seckey_destroypublickey mxr ...
Bytecode Descriptions
format: jof_atom, jof_prop, jof_propinit, jof_ic initlocke
dprop operands: (uint32_t nameindex) stack: obj, val ⇒ obj like jsop::initprop, but define a non-enumerable, non-writable, non-configurable property.
Exact Stack Rooting
class fooclass = { "fooprototype", /* name */ jsclass_has_private | jsclass_has_reserved_slots(1), /* flags */ js_propertystub, /* ad
dproperty */ js_propertystub, /* delproperty */ ...
JSAPI User Guide
*/ my_ad
dproperty, my_delproperty, my_getproperty, my_setproperty, my_enumerate, my_resolve, my_convert, my_finalize }; jsobject *obj; /* * define an object named in the global scope that can be enumerated by * for/in loops.
JS_DefineProperty
it differs from js_setproperty in that: it does not behave like ordinary property assignment in the javascript language; it allows the application to specify additional details (getter, setter, and attrs) governing the new property's behavior; it never calls a setter; it can call the jsclass.ad
dproperty callback when js_setproperty would not, because it can replace an existing property.
JS_DefinePropertyWithTinyId
the tiny-id-aware callbacks are: property getters and setters; and jsclass.ad
dproperty, .delproperty, .getproperty, and .setproperty.
JS_PropertyStub
it can be used in jsclass.ad
dproperty, and jsclass.getproperty.
Shell global objects
ad
dpromisereactions(promise, onresolve, onreject) calls the js::ad
dpromisereactions jsapi function with the given arguments.
XPConnect wrappers
note that a previous version of the current page recommended using __expose
dprops__ to expose objects from chrome to content.
nsIDownload
see also nsidownloadmanager nsidownloa
dprogresslistener nsixpinstallmanagerui ...
nsIMessageWakeupService
the parentprocessmessagemanager is used for this, so messages send from chil
dprocessmessagemanagers will be heard.
nsISocketTransportService
for more details on communicating information about proxies like socks (which are transparent to upper protocols), see nsiproxie
dprotocolhandler , nsiprotocolproxyservice or proxies in necko.
nsITelemetry
canrecor
dprereleasedata readonly boolean a flag indicating whether telemetry is recording pre-release data.
nsIToolkitProfileService
selecte
dprofile nsitoolkitprofile the profile that is marked as "default=1" in the profiles.ini file.
nsIWebProgressListener
see related documentation onprogresschange: function(awebprogress, arequest, curself, maxself, curtot, maxtot) {}, onstatuschange: function(awebprogress, arequest, astatus, amessage) {}, onsecuritychange: function(awebprogress, arequest, astate) {} } let filter = cc["@mozilla.org/appshell/component/browser-status-filter;1"] .createinstance(ci.nsiwebprogress); filter.ad
dprogresslistener(mylistener, ci.nsiwebprogress.notify_all); let webprogress = docshell.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebprogress); webprogress.ad
dprogresslistener(filter, ci.nsiwebprogress.notify_all); xulbrowserwindow.onstatechange (etc.) reporterlistener.onlocationchange ...
Address Book examples
use the nsiabcollection.readonly attribute to determine the read-only status of an address book adding contacts create a card and set its properties using the nsiabcard interface (see the interface documentation for property names supported by the application): let card = components.classes["@mozilla.org/addressbook/car
dproperty;1"] .createinstance(components.interfaces.nsiabcard); card.setproperty("firstname", "john"); card.setproperty("lastname", "smith"); card.primaryemail = "john@invalid.com"; now add the card to an address book via its nsiabdirectory interface: let newcard = addressbook.addcard(card); the addcard function returns a new nsiabcard object that may have had nsiabdirect...
Filelink Providers
the xhtml page should have a function in the global scope called onloa
dprovider.
Gecko Plugin API Reference - Plugins
romidentifier npn_intfromidentifier npobject npn_createobject npn_retainobject npn_releaseobject npn_invoke npn_invokedefault npn_evaluate npn_getproperty npn_setproperty npn_removeproperty npn_hasproperty npn_hasmethod npn_setexception npclass structures npanycallbackstruct npbyterange npembe
dprint npevent npfullprint npp np_port npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npwindow constants error codes result codes plug-in version constants version feature constants external resources external projects and articles for plugin creation original document information copyright information: netscape communicatio...
Responsive Design Mode - Firefox Developer Tools
dpr (pixel ratio) - beginning with firefox 68, the
dpr is no longer editable; create a custom device in order to change the
dpr throttling - a drop-down list where you can select the connection throttling to apply, for example 2g, 3g, or lte enable/disable touch simulation - toggles whether or not responsive design mode simulates touch events.
Document Object Model (DOM) - Web APIs
thsegcurvetoquadraticsmoothrel svgpathseglist svgpoint svgpointlist svgpreserveaspectratio svgrect svgstringlist svgtransform svgtransformlist animated type svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpathdata svganimatedpoints svganimate
dpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist smil-related interfaces elementtimecontrol timeevent other svg interfaces getsvgdocument shadowanimation svgcolorprofilerule svgcssrule svgdocument svgexception svgexternalresourcesrequired svgfittoviewbox svglangspace svglocatable svgrenderingintent svgstylable svgtests svgt...
EXT_shader_texture_lod - Web APIs
glsl built-in functions the following new functions can be used in glsl shader code, if this extension is enabled: vec4 texture2dlodext(sampler2d sampler, vec2 coord, float lod) vec4 texture2
dprojlodext(sampler2d sampler, vec3 coord, float lod) vec4 texture2
dprojlodext(sampler2d sampler, vec4 coord, float lod) vec4 texturecubelodext(samplercube sampler, vec3 coord, float lod) vec4 texture2dgradext(sampler2d sampler, vec2 p, vec2 dpdx, vec2 dpdy) vec4 texture2
dprojgradext(sampler2d sampler, vec3 p, vec2 dpdx, vec2 dpdy) vec4 texture2
dprojgradext(sampler2d sampler, vec4 p, vec2 dpdx, vec2 ...
Key Values - Web APIs
gdk_key_webcam (0x1008ff8f) qt::key_webcam (0x010000fa) "launchwor
dprocessor" [5] the word processor key.
MediaStreamTrack.applyConstraints() - Web APIs
syntax const applie
dpromise = track.applyconstraints([constraints]) parameters constraints optional a mediatrackconstraints object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints.
RTCRtpSender.replaceTrack() - Web APIs
syntax trackreplace
dpromise = sender.replacetrack(newtrack); parameters newtrack optional a mediastreamtrack specifying the track with which to replace the rtcrtpsender's current source track.
SVGFEImageElement - Web APIs
svgfeimageelement.preserveaspectratio read only an svganimate
dpreserveaspectratio corresponding to the preserveaspectratio attribute of the given element.
SVGFitToViewBox - Web APIs
interface overview also implement none methods none properties svganimate
dpreserveaspectratio preserveaspectratio svganimatedrect viewbox normative document svg 1.1 (2nd edition) properties name type description preserveaspectratio svganimate
dpreserv...
SVGImageElement - Web APIs
svgimageelement.preserveaspectratio read only an svganimate
dpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
SVGMarkerElement - Web APIs
properties this interface also inherits properties from its parent interface, svgelement, and implements properties from svgexternalresourcesrequired, svganimate
dpreserveaspectratio, and svgstylable.
SourceBuffer.appendBufferAsync() - Web APIs
syntax appen
dpromise = sourcebuffer.appendbufferasync(source); parameters source a buffersource (that is, either an arraybufferview or arraybuffer) which contains the media segment data you want to add to the sourcebuffer.
Worklet.addModule() - Web APIs
syntax ad
dpromise = worklet.addmodule(moduleurl); ad
dpromise = worklet.addmodule(moduleurl, options); parameters moduleurl a string containing the url of a javascript file with the module to add.
XRSystem: isSessionSupported() - Web APIs
syntax var issupporte
dpromise = xr.issessionsupported(xrsessionmode) parameters xrsessionmode a domstring specifying the webxr session mode for which support is to be checked.
Web APIs
saoaepparams rsapssparams s svgaelement svgaltglyphdefelement svgaltglyphelement svgaltglyphitemelement svgangle svganimatecolorelement svganimateelement svganimatemotionelement svganimatetransformelement svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpoints svganimate
dpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist svganimationelement svgcircleelement svgclippathelement svgcolorprofileelement svgcomponenttransferfunctionelement svgcursorelement svgdefselement svgdescelement svgelement svgellipseelement svgevent svgexternalresourcesrequired svgfeblendelement svgfecolormatrixelement svgfecomponenttransferelement svgfecompositeelem...
Event reference
uploa
dprogress progressevent mozilla specific upload is in progress (see progress).
Common MIME types - HTTP
chive application/x-bzip .bz2 bzip2 archive application/x-bzip2 .csh c-shell script application/x-csh .css cascading style sheets (css) text/css .csv comma-separated values (csv) text/csv .doc microsoft word application/msword .docx microsoft word (openxml) application/vnd.openxmlformats-officedocument.wor
dprocessingml.document .eot ms embedded opentype fonts application/vnd.ms-fontobject .epub electronic publication (epub) application/epub+zip .gz gzip compressed archive application/gzip .gif graphics interchange format (gif) image/gif .htm .html hypertext markup language (html) text/html .ico icon format im...
Cross-Origin Resource Sharing (CORS) - HTTP
set by the user agent (for example, connection, user-agent, or the other headers defined in the fetch spec as a “forbidden header name”), the only headers which are allowed to be manually set are those which the fetch spec defines as a “cors-safelisted request-header”, which are: accept accept-language content-language content-type (but note the additional requirements below)
dpr downlink save-data viewport-width width the only allowed values for the content-type header are: application/x-www-form-urlencoded multipart/form-data text/plain no event listeners are registered on any xmlhttprequestupload object used in the request; these are accessed using the xmlhttprequest.upload property.
Using HTTP cookies - HTTP
cookie-related regulations legislation or regulations that cover the use of cookies include: the general data privacy regulation (g
dpr) in the european union the eprivacy directive in the eu the california consumer privacy act these regulations have global reach, because they apply to any site on the world wide web that is accessed by users from these jurisdictions (the eu and california, with the caveat that california's law applies only to entities with gross revenue over 25 million usd, among other things.) these regulat...
Accept-CH-Lifetime - HTTP
syntax accept-ch-lifetime: <age> examples accept-ch: viewport-width,
dpr accept-ch-lifetime: 86400 ...
Accept-CH - HTTP
syntax accept-ch: <list of client hints> examples accept-ch:
dpr, viewport-width accept-ch: width accept-ch-lifetime: 86400 vary:
dpr, viewport-width, width note: remember to vary the response based on the accepted client hints.
HTTP Index - HTTP
113
dpr client hints, http, http header the
dpr header is a client hints headers which represents the client device pixel ratio (
dpr), which is the the number of physical device pixels corresponding to every css pixel.
Enumerability and ownership of properties - JavaScript
ction(obj) { return this._getpropertynames(obj, false, true, this._enumerable); }, getprototypenonenumerables: function(obj) { return this._getpropertynames(obj, false, true, this._notenumerable); }, getprototypeenumerablesandnonenumerables: function(obj) { return this._getpropertynames(obj, false, true, this._enumerableandnotenumerable); }, getownan
dprototypeenumerables: function(obj) { return this._getpropertynames(obj, true, true, this._enumerable); // or could use unfiltered for..in }, getownan
dprototypenonenumerables: function(obj) { return this._getpropertynames(obj, true, true, this._notenumerable); }, getownan
dprototypeenumerablesandnonenumerables: function(obj) { return this._getpropertyna...
Promise.prototype.then() - JavaScript
// using a resolved promise, the 'then' block will be triggered instantly, // but its handlers will be triggered asynchronously as demonstrated by the console.logs const resolve
dprom = promise.resolve(33); let thenprom = resolve
dprom.then(value => { console.log("this gets called after the end of the main stack.
Referer header: privacy and security concerns - Web security
you should enlist the help of a web security expert to write these requirements, and consider both user needs and welfare, as well as other issues like policy and regulation enforced by legislation such as the eu general data protection regulation (g
dpr).