Search completed in 1.33 seconds.
186 results for "DPR":
Your results are loading. Please wait...
PR_NewThreadPrivateIndex
syntax #include <prthread.h> prstatus pr_newthreadprivateindex( pruintn *newindex, prthreadprivatedtor destructor); parameters pr_newthreadprivateindex has the following parameters: newindex on output, an index that is valid for all threads in the process.
... you use this index with pr_setthreadprivate and pr_getthreadprivate.
... destructor specifies a destructor function prthreadprivatedtor for the private data associated with the index.
...And 4 more matches
SVGAnimatedPreserveAspectRatio - Web APIs
svg animated preserveaspectratio interface the svganimatedpreserveaspectratio 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 svganimatedpreserveaspectratio.baseval read only is a svgpreserveaspectratio that represents the base value of the given attribute before applying any animations.
... svganimatedpreserveaspectratio.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_linkconstructorandprototype(jscontext *cx, js::handle<jsobject*> ctor, js::handle<jsobject*> proto); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... description js_linkconstructorandprototype sets the prototype property of class constructor function, ctor, to prototype object, proto with jsprop_permanent | jsprop_readonly flags, and sets the constructor property of proto to ctor with no flag.
... on successful, js_linkconstructorandprototype returns true.
... see also mxr id search for js_linkconstructorandprototype js_initclass bug 722729 ...
DPR - HTTP
WebHTTPHeadersDPR
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/nsifeedprocessor.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 feedprocessor = components.classes["@mozilla.org/feed-processor;1"] .createinstance(components.interfaces.nsifeedprocessor); 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 nsifeedprocessor interface during an asynchronous parse.
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
the webgl_compressed_texture_astc.getsupportedprofiles() method returns an array of strings containing the names of the astc profiles supported by the implementation.
... syntax sequence<domstring> ext.getsupportedprofiles(); 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.getsupportedprofiles(); // ["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 _npembedprint { npwindow window; void* platformprint; /* platform-specific */ } npembedprint; fields the data structure has the following fields: window the npwindow the plug-in should use for printing.
...the npembedprint structure is used when the mode field of npprint is set to np_embed.
PRThreadPrivateDTOR
the destructor function passed to pr_newthreadprivateindex that is associated with the resulting thread private index.
... syntax #include <prthread.h> typedef void (pr_callback *prthreadprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthreadprivate, the value of the data is null.
PR_GetThreadPrivate
syntax #include <prthread.h> void* pr_getthreadprivate(pruintn index); parameter pr_getthreadprivate has the following parameters: index the index into the per-thread private data table.
... description pr_getthreadprivate may be called at any time during a thread's execution.
PR_SetThreadPriority
syntax #include <prthread.h> void pr_setthreadpriority( prthread *thread, prthreadpriority priority); parameters pr_setthreadpriority 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_setthreadpriority.
PR_SetThreadPrivate
syntax #include <prthread.h> prstatus pr_setthreadprivate(pruintn index, void *priv); parameters pr_setthreadprivate 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_setthreadprivate with a null argument.
findpreviousaccesskey - Archive of obsolete content
« xul reference home findpreviousaccesskey type: string the access key for the "find previous" toolbar button in the findbar.
addProgressListener - Archive of obsolete content
« xul reference home addprogresslistener( listener ) return type: no return value add a progress listener to the browser which will monitor loaded documents.
PRThreadPriority
syntax #include <prthread.h> typedef enum prthreadpriority { pr_priority_first = 0, pr_priority_low = 0, pr_priority_normal = 1, pr_priority_high = 2, pr_priority_urgent = 3, pr_priority_last = 3 } prthreadpriority; enumerators pr_priority_first placeholder.
PR_GetThreadPriority
syntax #include <prthread.h> prthreadpriority pr_getthreadpriority(prthread *thread); parameter pr_getthreadpriority has the following parameter: thread a valid identifier for the thread whose priority you want to know.
nsIDownloadProgressListener
/toolkit/components/downloads/nsidownloadprogresslistener.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 shouldprocess() (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 shouldprocess(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.
... shouldprocess() 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 findproxyforurl(url, host) { // ...
... } syntax function findproxyforurl(url, host) parameters url the url being accessed.
... examples: function alert_eval(str) { alert(str + ' is ' + eval(str)) } function findproxyforurl(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 loadprocessscript(in astring aurl, in boolean aallowdelayedload) void removedelayedprocessscript(in astring aurl); jsval getdelayedprocessscripts(); loadprocessscript() load a script in the child process.
... process scripts are loaded as soon as loadprocessscript() is called.
... if aallowdelayedload is true, then the script will also be loaded into any new child processes created after the loadprocessscript() 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("lockedpref", 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("lockedpref", 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("lockedpref", 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_exportencryptedprivatekeyinfo mxr 3.2 and later pk11_exportencryptedprivkeyinfo 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_findprivatekeyfromcert 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_importencryptedprivatekeyinfo 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 nsidownloadprogresslistener 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 nsidownloadprogresslistener 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 nsidownloadprogresslistener the download manager's progress listener.
...And 3 more matches
Add to Home screen - Progressive web apps (PWAs)
first of all, we declare a deferredprompt variable (which we'll explain later on), get a reference to our install button, and set it to display: none initially: let deferredprompt; 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.
... deferredprompt = 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 deferredprompt.prompt(); // wait for the user to respond to the prompt deferredprompt.userchoice.then((choiceresult) => { if (choiceresult.outcome ==...
...= 'accepted') { console.log('user accepted the a2hs prompt'); } else { console.log('user dismissed the a2hs prompt'); } deferredprompt = 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 */ npembedprint embedprint; /* 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 npembedprint structure.
...the embedprint field of the union is valid.
...And 2 more matches
Examples
components.utils.import("resource://gre/modules/promise.jsm"); var mypromise = myuserdefinedpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { 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 = myuserdefinedpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { 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 = myuserdefinedpromise(); mypromise.then( function(asuccessreason) { alert('mypromise was succesful and reason was = "' + asuccessreason + '"'); }, function(arejectreason) { alert('mypromise failed for reason = "' + uneval(arejectreason) + '"'); } ); function myuserdefinedpromise() { try { var myvariscommented = 'hi'; alert(myvariscommented); // throw new error('i feel like rejecting...
...And 2 more matches
Feed content access API
nsifeedprocessor parses rss and atom feeds.
... nsifeedprogresslistener 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 nsifeedprocessor to parse the feed.
...And 2 more matches
nsIWebProgress
last changed in gecko 1.8.0 inherits from: nsisupports method overview void addprogresslistener(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 addprogresslistener() method.
... methods addprogresslistener() registers a listener to receive web progress events.
...And 2 more matches
Index - Archive of obsolete content
868 findpreviousaccesskey no summary!
... 1176 addprogresslistener xul methods, xul reference no summary!
... 3626 npembedprint 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 npembedprint 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 loadprocessscript() 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.loadprocessscript("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 loadprocessscript().
... if you do, you must call removedelayedprocessscript() 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 prthreadpriority prthreadprivatedtor 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_getthreadpriority pr_setthreadpriority controlling per-thread private data you can use these functions to associate private data with each of the threads in a process: pr_newthreadprivateindex allocates a unique index.
... pr_setthreadprivate associates private thread data with an index.
... pr_getthreadprivate 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_exportencryptedprivatekeyinfo mxr 3.2 and later pk11_exportencryptedprivkeyinfo 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_findprivatekeyfromcert 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_importencryptedprivatekeyinfo 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_loadprivkey 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
MozillaTechXPCOMIndex
567 nsidownloadprogresslistener 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 nsifeedprocessor interfaces, interfaces:scriptable, xpcom, xpcom interface reference implemented by: @mozilla.org/feed-processor;1.
... to create an instance, use: 610 nsifeedprogresslistener 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 childprocessmessagemanagers will be heard.
nsIProtocolProxyService
if the protocol handler for the given uri supports nsiproxiedprotocolhandler, then the nsiproxyinfo instance returned from resolve may be passed to the nsiproxiedprotocolhandler.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 nsiproxiedprotocolhandler.
...see nsiproxiedprotocolhandler.newproxiedchannel().
... see also nsiproxyinfo nsiprotocolproxyfilter nsiproxiedprotocolhandler 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 addproperty(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_addproperty 1 << 3 want_delproperty 1 << 4 want_getproperty 1 << 5 want_setproperty 1 << 6 want_enumerate 1 << 7 want_newenumerate 1 << 8 indicates that the object wants to have its newenumerate 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_addproperty 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 addproperty() prbool addproperty( 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 nestedprop = 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 nestedprop = 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 nestedprop = ((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 nestedprop = 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 savedprefs = {} // change the default value of the preference *name* to *value*.
... savedprefs[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(savedprefs)) { 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, findpreviousaccesskey, 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 ...
... findpreviousaccesskey type: string the access key for the "find previous" toolbar button in the findbar.
... onfindagaincommand( findprevious ) 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_wordprevious cmd_wordnext cmd_selectwordprevious 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_wordprevious cmd_wordnext cmd_selectwordprevious 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:findprev 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 npembedprint structure during embedded mode printing.
... during printing in embedded mode, the platformprint field of the npembedprint structure points to an npanycallbackstruct.
...see also npp_print() npembedprint npsetwindowcallbackstruct npprintcallbackstruct ...
NPP_Print - Archive of obsolete content
for an embedded plug-in, set the printinfo field to npembedprint.
... ms windows on ms windows printinfo->print.embedprint.platformprint is the device context (dc) handle.
... see also npprint, npfullprint, npembedprint ...
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 npembedprint structure during embedded mode printing on unix systems.
...this information is required by the platformprint field of the npembedprint structure during embedded mode printing.
... see also npp_print, npembedprint, 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, findproxyforurl(), 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 findproxyforurl(url, host) { /* ...
... */ } ret = findproxyforurl(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, commandprovider, command, ) @commandprovider 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: @commandprovider this is a class decorator that tells mach that this class contains methods that implement mach commands.
... an instance of the @commandprovider 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 loadprocessscript() : 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: loadprocessscript() : 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/childprocessmessagemanager;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 ondownloadprogress(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 ondownloadprogress() called as data is received during a download.
... void ondownloadprogress( 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 findprevious(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 findprevious() method.
... findprevious() 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::identifystandardprototype(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::identifystandardprototype 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::identifystandardprototype 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 addproperty; 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 *...
... addproperty jspropertyop a hook called just after adding a new property.
...when a script creates a new property, this is called after addproperty.
JSPrincipals
use js_holdprincipals and js_dropprincipals.
...use the js_holdprincipals to increment refcount, and use js_dropprincipals to decrement refcount.
... see also mxr id search for jsprincipals js_newglobalobject js_holdprincipals 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.addproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
... jsclass hooks jsclass offers following hooks: jspropertyop jsclass.addproperty 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 addproperty hook is called, then the setproperty hook.
JS_SetProperty
ordinarily this function leaves v unchanged, but it is possible for a jsclass.addproperty hook or a non-default setter to assign to v.
...after the new property is added, the jsclass.addproperty 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 addproperty 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 isinheritedproperty(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...
... isinheritedproperty() determines if the specified string names a css property that is inherited by default.
... boolean isinheritedproperty( 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 removegroupedprefs(); void removeobserver(in astring aname, in nsicontentprefobserver aobserver); void removepref(in nsivariant agroup, in astring aname); void removeprefsbyname(in astring aname); void setpref(in nsivariant agroup, in astring aname, in nsivariant avalue); attributes attribute type description dbconnection mozistorageconnectio...
...or if aname is null or an empty string removegroupedprefs() remove all grouped prefs.
...void removegroupedprefs(); 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 shouldprocess(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 shouldprocess() delegate method called by the service when sub-elements of the protected document are being processed.
...short shouldprocess( 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 isexposedprotocol(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.
...isexposedprotocol() check whether a handler for a specific protocol is "exposed" as a visible feature of the current application.
...boolean isexposedprotocol( in string aprotocolscheme ); parameters aprotocolscheme the scheme from a url: http, ftp, mailto, and so on.
nsIPluginHost
void findproxyforurl(in string aurl, out string aresult); native code only!
... native code only!findproxyforurl fetches a url.
... void findproxyforurl( 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 nsiproxiedprotocolhandler interface.
... if the protocol only supports http proxying, it doesn't need to support nsiproxiedprotocolhandler, but should instead set the allows_proxy_http flag.
... see also nsiproxiedprotocolhandler 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
WebAPIIndex
3705 svganimatedpreserveaspectratio api, reference, référence(2), svg, svg dom the svganimatedpreserveaspectratio 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 svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
... 4556 webgl_compressed_texture_astc.getsupportedprofiles() api, method, reference, webgl, webgl extension, webgl extensions the webgl_compressed_texture_astc.getsupportedprofiles() method returns an array of strings containing the names of the astc profiles supported by the implementation.
for await...of - JavaScript
function* generatorwithrejectedpromises() { 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 generatorwithrejectedpromises()) { console.log(num); } } catch (e) { console.log('catched', e) } })(); // 0 // 1 // 2 // catched 3 // compare ...
...with for-of loop: try { for (let numorpromise of generatorwithrejectedpromises()) { 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 generatorwithrejectedpromises()) { 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 nsidownloadprogresslistener 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 nsidownloadprogresslistener 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 addprogresslistener, for example for firefox put the following code in a load listener of a main window: gbrowser.addprogresslistener(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.addprogresslistener(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.addprogresslistener(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 addprogresslistener() (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.addprogresslistener(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 addprogresslistener method in the service to include it.
Updating addons broken by private browsing changes - Archive of obsolete content
nsicontentprefservice: getpref, setpref, haspref, hascachedpref, removepref, removegroupedprefs, removeprefsbyname, getprefs, and getprefsbyname all take a required nsiloadcontext argument to indicate the privacy status of the pref in question.
...addprivacyawarelistener should be used instead, or no notifications will be received for private downloads.
Editor Embedding Guide - Archive of obsolete content
cmd_selectwordprevious scrolls relative to the current selection end point.
... cmd_wordprevious scrolls relative to the current selection end point.
Monitoring downloads - Archive of obsolete content
this is part of the nsidownloadprogresslistener interface.
... see also storage, nsidownloadmanager, nsidownload, nsidownloadprogresslistener ...
Abc Assembler Tests - Archive of obsolete content
* * ***** end license block ***** */ function main() { getlocal0 pushscope findproperty start pushstring "instructions that start with the letter l" callpropvoid start 1 newfunction .function_id(runtest) getlocal0 call 0 findproperty end callpropvoid end 0 returnvoid } function runtest() { // test null <= null == true findproperty 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 findproperty 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 findproperty 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 determinedprogressmeter is used in cases where you know how long an operation will take.
... an undeterminedprogressmeter can be used when you don't and will typically be drawn as a spinning barber pole.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
121 findpreviousaccesskey no summary!
... 445 addprogresslistener xul methods, xul reference no summary!
XUL Questions and Answers - Archive of obsolete content
what is an example of addprogresslistener?
... an example of this is this: // associate the progress listener for a "browser" to a listener object browserobject.addprogresslistener( 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 addprogresslistener, 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 addprogresslistener( 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 determinedprogressmeter is used in cases where you know how long an operation will take.
... an undeterminedprogressmeter 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 appendprompt(args, onclosecallback); void removeprompt(nsidomelement aprompt); nodelist listprompts(nsidomelement aprompt); methods appendprompt() creates a new prompt, adding it to the tab.
... nsidomelement appendprompt( 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 addprogresslistener, 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 addprogresslistener( 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 wordpress.
... it was determined that the generated elements from wordpress 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 npembedprint substructure of npprint.
... see also npp_print, npprint, npembedprint ...
NPAPI plugin reference - Archive of obsolete content
npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing.
... npprintcallbackstruct contains information required by the platformprint field of the npembedprint structure during embedded mode printing on unix systems.
Threats - Archive of obsolete content
this kind of malware is widespread on wordpress websites.
... for more detailed look on this you can refer to this detailed post on wordpress 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 wordpress, 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., wordpress, 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 getlocalizedproperty(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, ...
... getlocalizedproperty() 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,) _senddownloadprogressevent: 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) _sendprogressevent: 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 nsiproxiedprotocolhandler 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 nsiproxiedprotocolhandler.
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.addproperty, getproperty, and setproperty callbacks, which are called during object property accesses.
... 385 js_linkconstructorandprototype jsapi reference, reference, référence(2), spidermonkey js_linkconstructorandprototype sets the prototype property of class constructor function, ctor, to prototype object, proto with jsprop_permanent | jsprop_readonly flags, and sets the constructor property of proto to ctor with no flag.
JIT Optimization Outcomes
protoindexedprops the object being accessed has indexed properties that are exotic (for example, defined as a property on a prototype object and left as a hole in the underlying object).
... unknownsimdproperty 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.addproperty 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 addproperty 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_settrustedprincipals), and untrusted script.
... see also mxr id search for js_setnativestackquota js_settrustedprincipals 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::identifystandardprototype 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_linkconstructorandprototype 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 addprefix) { if (addprefix) { // 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() appendprintf() appendint() appendfloat() lossyappendutf16toascii() appendasciitoutf16() do not call setcapacity() if the subsequent operations on the string do not meet the criteria above.
nsIMsgIncomingServer
constructedprettyname 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 passwordpromptrequired 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
keywordprovidername astring the keyword search provider name expected to provide a keyword search; empty string if no keyword search is performed.
... fixupchangedprotocol boolean if we changed the protocol; instead of using one raw from the input.
XPCOM Interface Reference
idevicemotionlistenernsidialogcreatornsidialogparamblocknsidictionarynsidirindexnsidirindexlistenernsidirindexparsernsidirectoryenumeratornsidirectoryiteratornsidirectoryservicensidirectoryserviceprovidernsidirectoryserviceprovider2nsidiskcachestreaminternalnsidispatchsupportnsidocshellnsidocumentloadernsidownloadnsidownloadhistorynsidownloadmanagernsidownloadmanageruinsidownloadobservernsidownloadprogresslistenernsidownloadernsidragdrophandlernsidragservicensidragsessionnsidroppedlinkhandlernsidroppedlinkitemnsidynamiccontainernsieditornsieditorboxobjectnsieditordocshellnsieditorimesupportnsieditorloggingnsieditormailsupportnsieditorobservernsieditorspellchecknsieffectivetldservicensienumeratornsienvironmentnsierrorservicensieventlistenerinfonsieventlistenerservicensieventsourcensieventtarge...
...tnsiexceptionnsiextensionmanagernsiexternalhelperappservicensiexternalprotocolservicensiexternalurlhandlerservicensiftpchannelnsiftpeventsinknsifactorynsifavicondatacallbacknsifaviconservicensifeednsifeedcontainernsifeedelementbasensifeedentrynsifeedgeneratornsifeedpersonnsifeedprocessornsifeedprogresslistenernsifeedresultnsifeedresultlistenernsifeedtextconstructnsifilensifileinputstreamnsifileoutputstreamnsifilepickernsifileprotocolhandlernsifilespecnsifilestreamsnsifileurlnsifileutilitiesnsifileviewnsifocusmanagernsiformhistory2nsiframeloadernsiframeloaderownernsiframemessagelistenernsiframemessagemanagernsiframescriptloadernsigsettingscollectionnsigsettingsservicensigeolocationprovidernsigeolocationupdatensiglobalhistorynsiglobalhistory2nsiglobalhistory3nsihtmleditornsihttpheaderlistenerns...
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 nsidownloadprogresslistener 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 nsifeedprocessor nsifeedprogresslistener nsifeedresult nsifeedresultlistener nsifeedtextconstruct script mozijssubscriptloader storage mozistoragevacuumparticipant util nsieffectivetldservice worker nsiabstractworker data nsiarray nsicategorymanager nsicollection nsidictionary nsimutablearray nsisimpleenumerator...
Structures - Plugins
npembedprint substructure of npprint that contains platform-specific information used during embedded mode printing.
... npprintcallbackstruct contains information required by the platformprint field of the npembedprint 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 readandpreview(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, readandpreview); } } 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 svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
... syntax var svganimatedpreerveaspectratio = svgimageelement.preserveaspectratio; value an svganimatedpreserveaspectratio.
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 bindprogram() 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 bindprogram() 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.wordprocessingml.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.wordprocessingml.document" — accept anything that smells like an ms word document.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
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.wordprocessingml.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.wordprocessingml.document" — accept anything that smells like an ms word document.
HTTP headers - HTTP
WebHTTPHeaders
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 findproxyforurl.
... 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 findproxyforurl(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 resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.all(resolvedpromisesarray); // 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 mixedpromisesarray = [promise.resolve(33), promise.reject(44)]; var p = promise.all(mixedpromisesarray); 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 resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // 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 alreadyfulfilledprom = promise.resolve(100); var arr = [foreverpendingpromise, alreadyfulfilledprom, "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/gosinldwjdw7gaaaaasixadprdvxajyad/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 loadpropertiesfile("chrome://myaddon/locale/mystrings.properties"); }); function loadpropertiesfile(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 npembedprint npevent npfullprint npidentifier npn newstream npnvariable npn_createobject npn_destroystream npn_enumerate npn_evaluate npn_forceredraw npn_getauthenticationinfo npn_getintidentifier npn_getproperty npn_getstringidentifier ...
Download Manager improvements in Firefox 3 - Archive of obsolete content
nsidownloadprogresslistener applications and extensions implement this interface to be made aware of changes in the status of downloads.
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.addprogresslistener(new progresslistener() { public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = browser.getdocument(); system.out.println(doc); } }); while...
New Skin Notes - Archive of obsolete content
--dria wordpress skins need footer information.
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 appendprintf() 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 oldprivatemode = pbs.privatebrowsingmode; pbs.privatebrowsingenabled = true; /* this is all private */ pbs.privatebrowsingenabled = oldprivatemode; in this example, we save the current state of the private browsing mode setting in the oldprivatemode variable, then turn on private browsing by setting its value to true.
The Download Manager schema - Archive of obsolete content
see also nsidownloadmanager nsidownloadmanagerui nsidownloadprogresslistener ...
onFindAgainCommand - Archive of obsolete content
« xul reference home onfindagaincommand( findprevious ) return type: no return value call this method to handle your application's "find next" and "find previous" commands.
Methods - Archive of obsolete content
« xul reference home acceptdialog additemtoselection addpane addprogresslistener 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...
Mozprofile - Archive of obsolete content
in addition, subclasses firefoxprofile and thundebirdprofile are available with preset preferences for those applications.
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 }, endprefixmapping: 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 wordpress, joomla, magento, wocommerce and more.
The Business Benefits of Web Standards - Archive of obsolete content
the blogging community are particularly dynamic in this respect where on many platforms including wordpress, textpattern and habari, the site theme is a complete and discrete entity in its own right.
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, findproxyforurl(), 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.
Publishing your website - Learn web development
there are also free services available like neocities, blogger, and wordpress.
Introduction to client-side frameworks - Learn web development
popular examples include wordpress, joomla, and drupal.
Reviewer Checklist
[fennec: "prefs" can be gecko prefs, sharedpreferences values, or build-time flags.
Performance
better: // addon.js function onunload() { services.mm.removedelayedframescript("resources://my-addon/framescript.js"); services.ppmm.removedelayedprocessscript("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 childprocessmessagemanager = cc["@mozilla.org/childprocessmessagemanager;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...
Mozilla DOM Hacking Guide
static prbool sdosecuritycheckinaddproperty;: help me!
Profiling with the Firefox Profiler
for example:in the results above we can see that we're spending ~287 milliseconds in startup::xre_initchildprocess, 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 modprobe 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, prthreadpriority 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, prthreadpriority 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, prthreadpriority 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_setthreadpriority.
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 *tobewrappedprivkey <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_pkcs12createpasswordprivsafe 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_pkcs12createpasswordprivsafe 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_copyencryptedprivatekeyinfo mxr 3.2 and later seckey_copyprivatekeyinfo mxr 3.2 and later seckey_creatersaprivatekey mxr 3.2 and later seckey_destroyencryptedprivatekeyinfo 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 initlockedprop 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, /* addproperty */ js_propertystub, /* delproperty */ ...
JSAPI User Guide
*/ my_addproperty, 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.addproperty 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.addproperty, .delproperty, .getproperty, and .setproperty.
JS_PropertyStub
it can be used in jsclass.addproperty, and jsclass.getproperty.
Shell global objects
addpromisereactions(promise, onresolve, onreject) calls the js::addpromisereactions jsapi function with the given arguments.
XPConnect wrappers
note that a previous version of the current page recommended using __exposedprops__ to expose objects from chrome to content.
nsIDOMGlobalPropertyInitializer
it is also recommended to use __exposedprops__ to control which members are exposed.
nsIDownload
see also nsidownloadmanager nsidownloadprogresslistener nsixpinstallmanagerui ...
nsIFeedResultListener
see also nsifeedprogresslistener nsisupports interwiki link ...
nsIMessageWakeupService
the parentprocessmessagemanager is used for this, so messages send from childprocessmessagemanagers will be heard.
nsISocketTransportService
for more details on communicating information about proxies like socks (which are transparent to upper protocols), see nsiproxiedprotocolhandler , nsiprotocolproxyservice or proxies in necko.
nsITelemetry
canrecordprereleasedata readonly boolean a flag indicating whether telemetry is recording pre-release data.
nsIToolkitProfileService
selectedprofile 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.addprogresslistener(mylistener, ci.nsiwebprogress.notify_all); let webprogress = docshell.queryinterface(ci.nsiinterfacerequestor) .getinterface(ci.nsiwebprogress); webprogress.addprogresslistener(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/cardproperty;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 onloadprovider.
Drawing and Event Handling - Plugins
in this case, platformprint->embedprint.window contains the window in which the plug-in should print.
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 npembedprint 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.
Taking screenshots - Firefox Developer Tools
--dpr number the device pixel ratio to use when taking the screenshot.
Web Console Helpers - Firefox Developer Tools
--dpr number the device pixel ratio to use when taking the screenshot.
The JavaScript input interpreter - Firefox Developer Tools
--dpr number the device pixel ratio to use when taking the screenshot.
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 svganimatedpreserveaspectratio 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 texture2dprojlodext(sampler2d sampler, vec3 coord, float lod) vec4 texture2dprojlodext(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 texture2dprojgradext(sampler2d sampler, vec3 p, vec2 dpdx, vec2 dpdy) vec4 texture2dprojgradext(sampler2d sampler, vec4 p, vec2 dpdx, vec2 ...
Key Values - Web APIs
gdk_key_webcam (0x1008ff8f) qt::key_webcam (0x010000fa) "launchwordprocessor" [5] the word processor key.
MediaStreamTrack.applyConstraints() - Web APIs
syntax const appliedpromise = 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 trackreplacedpromise = 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 svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given element.
SVGFitToViewBox - Web APIs
interface overview also implement none methods none properties svganimatedpreserveaspectratio preserveaspectratio svganimatedrect viewbox normative document svg 1.1 (2nd edition) properties name type description preserveaspectratio svganimatedpreserv...
SVGImageElement - Web APIs
svgimageelement.preserveaspectratio read only an svganimatedpreserveaspectratio 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, svganimatedpreserveaspectratio, and svgstylable.
SourceBuffer.appendBufferAsync() - Web APIs
syntax appendpromise = 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.
WEBGL_compressed_texture_astc - Web APIs
ext.getsupportedprofiles() returns an array of strings containing the names of the astc profiles supported by the implementation.
Worklet.addModule() - Web APIs
WebAPIWorkletaddModule
syntax addpromise = worklet.addmodule(moduleurl); addpromise = 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 issupportedpromise = xr.issessionsupported(xrsessionmode) parameters xrsessionmode a domstring specifying the webxr session mode for which support is to be checked.
Web APIs
WebAPI
saoaepparams rsapssparams s svgaelement svgaltglyphdefelement svgaltglyphelement svgaltglyphitemelement svgangle svganimatecolorelement svganimateelement svganimatemotionelement svganimatetransformelement svganimatedangle svganimatedboolean svganimatedenumeration svganimatedinteger svganimatedlength svganimatedlengthlist svganimatednumber svganimatednumberlist svganimatedpoints svganimatedpreserveaspectratio svganimatedrect svganimatedstring svganimatedtransformlist svganimationelement svgcircleelement svgclippathelement svgcolorprofileelement svgcomponenttransferfunctionelement svgcursorelement svgdefselement svgdescelement svgelement svgellipseelement svgevent svgexternalresourcesrequired svgfeblendelement svgfecolormatrixelement svgfecomponenttransferelement svgfecompositeelem...
Event reference
uploadprogress 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.wordprocessingml.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
WebHTTPCORS
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.
Content negotiation - HTTP
dpr indicates the client's device pixel ratio.
Using HTTP cookies - HTTP
WebHTTPCookies
cookie-related regulations legislation or regulations that cover the use of cookies include: the general data privacy regulation (gdpr) 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
WebHTTPIndex
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); }, getownandprototypeenumerables: function(obj) { return this._getpropertynames(obj, true, true, this._enumerable); // or could use unfiltered for..in }, getownandprototypenonenumerables: function(obj) { return this._getpropertynames(obj, true, true, this._notenumerable); }, getownandprototypeenumerablesandnonenumerables: 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 resolvedprom = promise.resolve(33); let thenprom = resolvedprom.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 (gdpr).