Search completed in 0.92 seconds.
GlobalEventHandlers.ondragexit - Web APIs
the globaleventhandler.ondrag
exit property is an event handler for the drag
exit event.
... the ondrag
exit event is a gecko specific event listener.
... syntax var drag
exithandler = targetelement.ondrag
exit; return value drag
exithandler the drag
exit event handler for element targetelement.
...And 4 more matches
Document.exitFullscreen() - Web APIs
the document method
exitfullscreen() requests that the element on this document which is currently being presented in full-screen mode be taken out of full-screen mode, restoring the previous state of the screen.
... syntax
exitpromise = document.
exitfullscreen(); parameters none.
... return value a promise which is resolved once the user agent has finished
exiting full-screen mode.
...And 3 more matches
PR_CExitMonitor
syntax #include <prcmon.h> prstatus pr_c
exitmonitor(void *address); parameters the function has the following parameters: address the address of the protected object--the same address previously passed to pr_centermonitor.
... description using the value specified in the address parameter to find a monitor in the monitor cache, pr_c
exitmonitor decrements the entry count associated with the monitor.
... if the decremented entry count is zero, the monitor is
exited.
Document: dragexit event - Web APIs
the drag
exit event is fired when an element is no longer the drag operation's immediate selection target.
... interface dragevent event handler property ondrag
exit examples see the drag event for example code or this jsfiddle demo.
... specifications specification status comment html living standardthe definition of 'drag
exit' in that specification.
PR_ExitMonitor
syntax #include <prmon.h> prstatus pr_
exitmonitor(prmonitor *mon); parameter the function has the following parameter: mon a reference to an existing structure of type prmonitor.
... description if the decremented entry count is zero, pr_
exitmonitor releases the monitor's lock.
Document.exitPointerLock() - Web APIs
the
exitpointerlock() method asynchronously releases a pointer lock previously requested through element.requestpointerlock.
... syntax document.
exitpointerlock(); specifications specification status comment pointer lockthe definition of 'document' in that specification.
PR_ProcessExit
syntax #include <prinit.h> void pr_process
exit(printn status); parameter pr_process
exit has one parameter: status the
exit status code of the process.
Tracing JIT
the native code returns a pointer to a structure called a side
exit.
... the monitor inspects the side
exit and, depending on the
exit condition, reconstructs a certain number of interpreter frames and flushes a certain set of writes back to the spidermonkey heap.
... frame reconstruction is necessary because a trace may inline a number of function calls, and may
exit before those function calls return.
...And 10 more matches
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable runtime (nspr); the ability of a thread to abruptly
exit.
...abrupt termination has been available in the unix/c environment for some time (
exit()), and i assume that the basic semantics defined there are applicable here.
... in that environment,
exit() may be called and any time, and results in the calling thread's immediate termination.
...And 8 more matches
Guide to the Fullscreen API - Web APIs
this article demonstrates how to use the fullscreen api to place a given element into full-screen mode, as well as how to detect when the browser enters or
exits full-screen mode.
...when fullscreen mode is
exited, the document again receives a fullscreenchange event.
... note that the fullscreenchange event doesn't provide any information itself as to whether the document is entering or
exiting fullscreen mode, but if the document has a non null fullscreenelement, you know you're in fullscreen mode.
...And 7 more matches
Fullscreen API - Web APIs
the fullscreen api adds methods to present a specific element (and its descendants) in full-screen mode, and to
exit full-screen mode once it is no longer needed.
... methods on the document interface document.
exitfullscreen() requests that the user agent switch from full-screen mode back to windowed mode.
... event handlers on documents document.onfullscreenchange an event handler for the fullscreenchange event that's sent to a document when that document is placed into full-screen mode, or when that document
exits full-screen mode.
...And 7 more matches
Looping code - Learn web development
if he has reached 10 portions (the point where the condition is no longer true, so the loop
exits), he can stop collecting and go home.
... in pseudocode, this would look something like the following: loop(food = 0; foodneeded = 10) { if (food >= foodneeded) {
exit loop; // we have enough food; let's go home } else { food += 2; // spend an hour collecting 2 more food // loop will then run again } } so the amount of food needed is set at 10, and the amount the farmer currently has is set at 0.
...if so, we can
exit the loop.
...And 6 more matches
Introduction to NSPR
pr_cleanup waits for the last user thread to
exit before returning, whereas it ignores system threads when determining when a process should
exit.
...the thread must also reinstate the monitored invariant before
exiting the monitor.
...the thread makes an absolute assertion of the expression's evaluation both on entering and on
exiting the monitor.
...And 6 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\"...
... fprintf(stderr, "%-30s - certificate signing request \n\n", "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); fprintf(stderr, "%-30s - to enable ascii [optional]\n\n", "-a"); fprintf(stderr, "%-30s - to save certificate to header file as sig verification [optional]\n\n", "-v");
exit(-1); } /* * validate the options used for generate csr command */ static void validategeneratecsrcommand(const char *progname, const char *dbdir, certname *subject, const char *subjectstr, const char *certreqfilename) { prbool validationfailed = pr_false; if (!subje...
...= pr_true; } if (!certreqfilename) { pr_fprintf(pr_stderr, "%s -g -d %s -s %s -r: certificate request file name not found\n", progname, dbdir, subjectstr); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-g -d <dbdirpath> -s <subject> -r <csr> \n");
exit(-1); } } /* * validate the options used for add cert to db command */ static void validateaddcerttodbcommand(const char *progname, const char *dbdir, const char *nicknamestr, const char *truststr, const char *certfilename, const char *certreqfile...
...And 6 more matches
sample2
ostring #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif /* sample 6 commands */ typedef enum { generate_csr, add_cert_to_db, save_cert_to_header, encrypt, decrypt, sign, verify, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4, pubkey = 5, lab = 6, certenc= 7, certvfy= 8, sig = 9 } headertype; /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s %s %s %s %s %s %s %s %s %s\n\n", progname, " -<g|a|h|e|ds|v> -d <dbdirpath> ", "[-p <dbpwd> | -f <dbpwdfile>] [-z <noisefilename>] [-a <\"\">]", "-s <subject> -r <csr> | ", "-n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ] | ", "-n <nickname> -b <headerfilename> | ", "-b <hea...
...rintf(stderr, "%-30s - certificate issuer nickname\n\n", "-u <issuernickname>"); fprintf(stderr, "%-30s - certificate signing request \n\n", "-r <csr>"); fprintf(stderr, "%-30s - generate a self-signed cert [optional]\n\n", "-x"); fprintf(stderr, "%-30s - to enable ascii [optional]\n\n", "-a"); fprintf(stderr, "%-30s - to save certificate to header file as sig verification [optional]\n\n", "-v");
exit(-1); } /* * validate the options used for generate csr command */ static void validategeneratecsrcommand(const char *progname, const char *dbdir, certname *subject, const char *subjectstr, const char *certreqfilename) { prbool validationfailed = pr_false; if (!subject) { pr_fprintf(pr_stderr, "%s -g -d %s -s: improperly formatted name: \"%s\"\n", progname, dbdir, subjectstr); validationfailed = p...
...r_true; } if (!certreqfilename) { pr_fprintf(pr_stderr, "%s -g -d %s -s %s -r: certificate request file name not found\n", progname, dbdir, subjectstr); validationfailed = pr_true; } if (validationfailed) { fprintf(stderr, "\nusage: %s %s \n\n", progname, "-g -d <dbdirpath> -s <subject> -r <csr> \n");
exit(-1); } } /* * validate the options used for add cert to db command */ static void validateaddcerttodbcommand(const char *progname, const char *dbdir, const char *nicknamestr, const char *truststr, const char *certfilename, const char *certreqfilename, const char *issuernamestr, const char *serialnumberstr, prbool selfsign) { prbool validationfailed = pr_false; if (!nicknamestr) { pr_fprintf(pr_stderr, "%s -a -d %s -n : nick name is missing\n", progname, dbdir); validationfailed = pr_true; } ...
...And 6 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
a microtask is a short function which is executed after the function or program which created it
exits and only if the javascript execution stack is empty, but before returning control to the event loop being used by the user agent to drive the script's execution environment.
... first, each time a task
exits, the event loop checks to see if the task is returning control to other javascript code.
...generally, it's about capturing or checking results, or performing cleanup, after the main body of a javascript execution context
exits, but before any event handlers, timeouts and intervals, or other callbacks are processed.
...And 6 more matches
Index - Web APIs
909 document.
exitfullscreen() api, dom, document, full, full-screen, fullscreen api, method, reference,
exitfullscreen, fullscreen, screen the document method
exitfullscreen() requests that the element on this document which is currently being presented in full-screen mode be taken out of full-screen mode, restoring the previous state of the screen.
... 910 document.
exitpointerlock() api, experimental, method, reference, mouse lock the
exitpointerlock() method asynchronously releases a pointer lock previously requested through element.requestpointerlock.
... 985 document: drag
exit event dom, event, reference, drag and drop the drag
exit event is fired when an element is no longer the drag operation's immediate selection target.
...And 6 more matches
Bytecode Descriptions
code must not jump into or out of this region: control can enter only by executing jsop::iter and can
exit only by executing a jsop::enditer or by exception unwinding.
... (a jsop::enditer is always emitted at the end of the loop, and extra copies are emitted on "
exit slides", where a break, continue, or return statement
exits the loop.) typically a single try note entry marks the contiguous chunk of bytecode from the instruction after jsop::iter to jsop::enditer (inclusive); but if that range contains any instructions on
exit slides, after a jsop::enditer, then those must be correctly noted as outside the loop.
... enditer stack: iter, iterval ⇒
exit a for-in loop, closing the iterator.
...And 5 more matches
Pointer Lock API - Web APIs
as it has recently unprefixed, you would currently declare it something like this, for example if you wanted to request pointer lock on a canvas element: canvas.requestpointerlock = canvas.requestpointerlock || canvas.mozrequestpointerlock; canvas.requestpointerlock() if a user has
exited pointer lock via the default unlock gesture, or pointer lock has not previously been entered for this document, an event generated as a result of an engagement gesture must be received by the document before requestpointerlock will succeed.
... (from https://w3c.github.io/pointerlock/#extensions-to-the-element-interface) pointerlockelement and
exitpointerlock() the pointer lock api also extends the document interface, adding both a new property and a new method.
... the new property is used for accessing the currently locked element (if any), and is named pointerlockelement and the new method on document is
exitpointerlock() and, as the name implies, it is used to
exit the pointer lock.
...And 5 more matches
NSS Tools modutil
if communicator iscurrently running, you should
exit communicator before continuing thisoperation.
...if communicator iscurrently running, you should
exit communicator before continuing thisoperation.
...if communicator iscurrently running, you should
exit communicator before continuing thisoperation.
...And 4 more matches
Creating JavaScript jstest reftests
a different approach is to use the expect
exitcode(
exitcode) function which outputs a string: --- note: in this testcase, we expect
exit code <
exitcode> --- that tells the post-processing scripts jsdriver.pl or post-process-logs.pl that the test passes if the shell or browser terminates with that
exit code.
... multiple calls to expect
exitcode will tell the post-processing scripts that the test actually passed if any of the
exit codes are found when the test terminates.
...in the javascript shell, an uncaught exception or out of memory error will terminate the shell with an
exit code of 3.
...And 4 more matches
system - Archive of obsolete content
le.log("id = " + system.id); // host application name console.log("name = " + system.name); // host application version console.log("version = " + system.version); // host application vendor console.log("vendor = " + system.vendor); // host application profile directory console.log("profile directory = " + system.pathfor("profd")); quit the host application to quit the host application, use the
exit() function.
... var system = require("sdk/system"); system.
exit(); globals functions
exit(code) quits the host application with the specified code.
... if code is omitted,
exit() uses the success code 0.
...And 3 more matches
Actionscript Acceptance Tests - Archive of obsolete content
the
exitcode is optional, but must be defined in this file if non-zero.
... verifyerror: error #1021
exitcode: 1 testname.
exitcode file that specifies the expected
exitcode.
... (note that if a .err file is defined, the .
exitcode file will be ignored).
...And 2 more matches
HTTP logging
windows if firefox is already running,
exit out of it.
... once you've reproduced the problem,
exit firefox and look for the generated log files in your temporary directory.
... when the problem has been reproduced,
exit firefox and look for the generated log files, which you can find at /tmp/log.txt.
...And 2 more matches
How to embed the JavaScript engine
jsautorequest ar(cx); // in practice, you would want to
exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const char *script = "'hello'+'w...
... jsautorequest ar(cx); // in practice, you would want to
exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr, js::fireonnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const c...
... jsautorequest ar(cx); // in practice, you would want to
exit this any // time you're spinning the event loop js::rootedobject global(cx, js_newglobalobject(cx, &global_class, nullptr, js::fireonnewglobalhook)); if (!global) return 1; js::rootedvalue rval(cx); { // scope for jsautocompartment jsautocompartment ac(cx, global); js_initstandardclasses(cx, global); const c...
...And 2 more matches
JS_SetFunctionCallback
sets a callback to be run whenever a javascript function is invoked or
exited.
... fcb jsfunctioncallback the callback to execute when javascript functions are invoked and
exited.
... description js_setfunctioncallback sets a c function to be called each time a javascript function is invoked or
exits.
...And 2 more matches
nsIAppShellService
nsiwebnav createwindowlessbrowser (in bool aischrome) void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.8 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.8 void enterlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void
exitlastwindowclosingsurvivalarea(); obsolete since gecko 1.8 void gethiddenwindowandjscontext(out nsidomwindow ahiddendomwindow, out jscontext ajscontext); native code only!
...(and at application startup, on platforms that do not normally quit when the last window has closed, call enter once, but not
exit) void enterlastwindowclosingsurvivalarea(); parameters none.
...
exitlastwindowclosingsurvivalarea() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) void
exitlastwindowclosingsurvivalarea(); parameters none.
...And 2 more matches
nsIAppStartup
upstate(in long awindowwidth, in long awindowheight); obsolete since gecko 1.9.1 void destroyhiddenwindow(); void doprofilestartup(in nsicmdlineservice acmdlineservice, in boolean caninteract); obsolete since gecko 1.9.1 void ensure1window(in nsicmdlineservice acmdlineservice); obsolete since gecko 1.9.1 void enterlastwindowclosingsurvivalarea(); void
exitlastwindowclosingsurvivalarea(); void getstartupinfo(); void hidesplashscreen(); obsolete since gecko 1.9.1 void initialize(in nsisupports nativeappsupportorsplashscreen); obsolete since gecko 1.9.1 void quit(in pruint32 amode); void restartinsafemode(in pruint32 aquitmode); void run(); attributes attribute type descript...
...
exitlastwindowclosingsurvivalarea() this method serves for situations when all application windows will be closed but we don't want to take this as a signal to quit the application.
... void
exitlastwindowclosingsurvivalarea(); parameters none.
...And 2 more matches
nsIWebBrowserChrome
inherits from: nsisupports last changed in gecko 0.9.6 method overview void destroybrowserwindow(); void
exitmodaleventloop(in nsresult astatus); boolean iswindowmodal(); void setstatus(in unsigned long statustype, in wstring status); void showasmodal(); void sizebrowserto(in long acx, in long acy); attributes attribute type description chromeflags unsigned long the chrome flags for this browser chrome.
...
exitmodaleventloop()
exit a modal event loop if we're in one.
... the implementation should also
exit out of the loop if the window is destroyed.
...And 2 more matches
Key Values - Web APIs
typically used as an
exit, cancel, or "escape this operation" button.
... qt::key_voicedial (0x01100008) keycode_voice_assist (231) [1] prior to firefox 37, the home button generated a key code of "
exit".
... keycode_dvr (173) "
exit" the
exit button, which
exits the curreent application or menu.
...And 2 more matches
Supporting per-window private browsing - Archive of obsolete content
to be notified when such a session ends (i.e., when the last private window is closed), observe the last-pb-context-
exited notification.
... function pbobserver() { /* clear private data */ } var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(pbobserver, "last-pb-context-
exited", false); preventing a private session from ending if there are unfinished transactions involving private data, where the transactions will be terminated by the ending of a private session, an add-on can vote to prevent the session from ending (prompting the user is recommended).
... to do this, observe the last-pb-context-
exiting notification and set the data field of the nsisupportsprbool subject to true.
...ponents.interfaces.nsiobserverservice); os.addobserver(function (asubject, atopic, adata) { asubject.queryinterface(components.interfaces.nsisupportsprbool); // if another extension has not already canceled entering the private mode if (!asubject.data) { /* you should display some user interface here */ asubject.data = true; // cancel the operation } }, "last-pb-context-
exiting", false); forcing a channel into private mode usually, network channels inherit the privacy status of the document that created them, which means that they work correctly most of the time.
Supporting private browsing mode - Archive of obsolete content
{ // ignore exceptions in older versions of firefox } }, observe : function (asubject, atopic, adata) { if (atopic == "private-browsing") { if (adata == "enter") { this._inprivatebrowsing = true; if (this.watcher && "onenterprivatebrowsing" in this._watcher) { this.watcher.onenterprivatebrowsing(); } } else if (adata == "
exit") { this._inprivatebrowsing = false; if (this.watcher && "on
exitprivatebrowsing" in this._watcher) { this.watcher.on
exitprivatebrowsing(); } } } else if (atopic == "quit-application") { this._os.removeobserver(this, "quit-application"); this._os.removeobserver(this, "private-browsing"); } }, get inprivatebrowsing() { ...
... }, on
exitprivatebrowsing : function() { // we have just left private browsing mode!
... to do this, simply watch for the private browsing private-browsing-cancel-vote notification with the subject "
exit", and set its data field to true to cancel the operation, like this: var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(function (asubject, atopic, adata) { asubject.queryinterface(components.interfaces.nsisupportsprbool); // if another extension has not already canceled entering the priva...
...te mode if (!asubject.data) { if (adata == "
exit") { // if we are leaving the private mode /* you should display some user interface here */ asubject.data = true; // cancel the operation } } }, "private-browsing-cancel-vote", false); note: a well-mannered extension should display some sort of user interface to indicate that private browsing mode will be kept on, and possibly offer the option to cancel whatever operation is preventing the extension from allowing private browsing to be shut off.
Componentizing our Svelte app - Learn web development
add the following set of functions below your previous function to handle these actions: function oncancel() { name = todo.name // restores name to its initial value and editing = false // and
exit editing mode } function onsave() { update({ name: name }) // updates todo name editing = false // and
exit editing mode } function onremove() { dispatch('remove', todo) // emit remove event } function onedit() { editing = true // enter editing mode } function ontoggle() { update({ completed: !todo.completed}) /...
... the <input>'s value property will be bound to the name variable, and the buttons to cancel and save the changes call oncancel() and onsave() respectively (we added those functions earlier): when oncancel() is invoked, name is restored to its original value (when passed in as a prop) and we
exit editing mode (by setting editing to false).
... when onsave() in invoked, we run the update() function — passing it the modified name — and
exit editing mode.
...in the end, it boils down to how comfortable you feel dealing with this level of compl
exity in a single component.
JSAPI User Guide
(this is a mere nicety if the process is about to
exit anyway.
...*/ js_reporterror(cx, "command failed with
exit code %d", rc); return false; } this is very much like the javascript statement throw new error("command failed with
exit code " + rc);.
...function to be called whenever a javascript function is about to be called, or has finished executing: void functransition(const jsfunction *func, const jsscript *scr, const jscontext *const_cx, jsbool entering) { jscontext *cx = const_cast<jscontext*>(const_cx); jsstring *name = js_getfunctionid((jsfunction*)func); const char *ent
exit; const char *namestr; /* build a c string for the function's name */ if (!name) { namestr = "unnamed function"; } else { namestr = js_encodestring(cx, name); } /* build a string for whether we're entering or
exiting */ if (entering) { ent
exit = "entering"; } else { ent
exit = "
exiting"; } /* output information about the trace */ printf("%s javascript fun...
...ction: %s at time: %ld", ent
exit, namestr, clock()); } void enabletracing(jscontext *cx) { js_setfunctioncallback(cx, functransition); } void disabletracing(jscontext *cx) { js_setfunctioncallback(cx, nullptr); } ...
nsIAppShell
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void create(inout int argc, inout string argv); obsolete since gecko 1.9 void dispatchnativeevent(in prbool arealevent, in voidptr aevent); obsolete since gecko 1.9 void
exit(); void favorperformancehint(in boolean favorperfoverstarvation, in unsigned long starvationdelay); void getnativeevent(in prboolref arealevent, in voidptrref aevent); obsolete since gecko 1.9 void listentoeventqueue(in nsieventqueue aqueue, in prbool alisten); obsolete since gecko 1.9 void resumenative(); void run(); void runinstablestate(in nsirunnable arunnable); void spindown...
...
exit()
exit the handle event loop.
... void
exit(); parameters none.
...do not leave until
exit() is called.
nsIProcess
nal] in nsiobserver observer, [optional] in boolean holdweak); void runw(in boolean blocking, [array, size_is(count)] in wstring args, in unsigned long count); void runwasync([array, size_is(count)] in wstring args, in unsigned long count, [optional] in nsiobserver observer, [optional] in boolean holdweak); attributes attribute type description
exitvalue long the value returned by the process upon
exit.
... this is only valid after the process has
exited.
... observer optional an observer that will be notified when the process
exits.
... observer optional an observer that will be notified when the process
exits.
Document - Web APIs
globaleventhandlers.ondrag
exit is an eventhandler representing the code to be called when the drag
exit event is raised.
... document.
exitpointerlock() release the pointer lock.
... drag
exit fired when an element is no longer the drag operation's immediate selection target.
... also available via the ondrag
exit property.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
as one of these code segments begins execution, a new context is constructed in which to run it; that context is then destroyed when the code
exits.
...when it
exits, the context is removed from the context stack.
... the main program
exits and its execution context is removed from the execution stack; as there are no contexts remaining on the stack, program execution ends.
... each time a task
exits, and the execution context stack is empty, each microtask in the microtask queue is executed, one after another.
Movement, orientation, and motion: A WebXR example - Web APIs
handling the startup and shutdown ui then we call the setupxrbutton() function, which handles configuring the "enter/
exit webxr" button to enable or disable it as necessary depending on the availability of webxr support for the session type specified in the session_type constant.
... the webxr session is toggled on and off by the handler for click events on the button, whose label is appropriately set to either "enter webxr" or "
exit webxr".
... function sessionstarted(session) { let refspacetype; xrsession = session; xrbutton.innertext = "
exit webxr"; xrsession.addeventlistener("end", sessionended); let canvas = document.queryselector("canvas"); gl = canvas.getcontext("webgl", { xrcompatible: true }); if (allowmouserotation) { canvas.addeventlistener("pointermove", handlepointermove); canvas.addeventlistener("contextmenu", (event) => { event.preventdefault(); }); } if (allowkeyboardmotion) { document.addevent...
...session.requestreferencespace(refspacetype) .then((refspace) => { xrreferencespace = refspace.getoffsetreferencespace( new xrrigidtransform(viewerstartposition, cubeorientation)); animationframerequestid = xrsession.requestanimationframe(drawframe); }); return xrsession; } after storing the newly-created xrsession object into xrsession, the label of the button is set to "
exit webxr" to indicate its new function after starting the scene, and a handler is installed for the end event, so we get notified when the xrsession ends.
Creating a cross-browser video player - Developer guides
naturally the fullscreen button needs to actually do something, so, like the other buttons, a click event handler is attached in which we call a user defined function handlefullscreen: fullscreen.addeventlistener('click', function(e) { handlefullscreen(); }); the handlefullscreen function is defined as follows: var handlefullscreen = function() { if (isfullscreen()) { if (document.
exitfullscreen) document.
exitfullscreen(); else if (document.mozcancelfullscreen) document.mozcancelfullscreen(); else if (document.webkitcancelfullscreen) document.webkitcancelfullscreen(); else if (document.ms
exitfullscreen) document.ms
exitfullscreen(); setfullscreendata(false); } else { if (videocontainer.requestfullscreen) videocontainer.requestfullscreen(); ...
... if the browser is currently in fullscreen mode, then it must be
exited and vice versa.
...interestingly document must be used for
exiting/cancelling fullscreen mode, whereas any html element can request fullscreen mode, here the videocontainer is used as it also contains the custom controls which should also appear with the video in fullscreen mode.
...when a video goes into fullscreen mode, it usually displays a message indicating that the user can press the esc key to
exit fullscreen mode, so the code also needs to listen for relevant events in order to call the setfullscreendata() function to ensure the control styling is correct: document.addeventlistener('fullscreenchange', function(e) { setfullscreendata(!!(document.fullscreen || document.fullscreenelement)); }); document.addeventlistener('webkitfullscreenchange', function() { setfullscreendata(!!documen...
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
// go through the ldap replicas list for(i = 0; i < ldap_servers.length; i ++) { // search for attribute mail & cn through ldap servers where uid = $user|$username getldapattributes(ldap_servers[i], "ou=people,dc=int-evry,dc=fr", "uid=" + env_user, "uid,cn,mail"); // if we catch a running ldap server,
exit the loop, if(ldap_values) { running_ldap_server = ldap_servers[i]; // if $mozilla_debug=1 display in a popup the running server if (env_mozdebug) { displayerror("getldapattributes: debug 2 running_ldap_server: " + running_ldap_server); } break; } } unique script for windows and linux an if...
...// go through the ldap replicas list for(i = 0; i < ldap_servers.length; i ++) { // search for attribute mail & cn through ldap servers where uid = $user|$username getldapattributes(ldap_servers[i], "ou=people,dc=int-evry,dc=fr", "uid=" + env_user, "uid,cn,mail"); // if we catch a running ldap server,
exit the loop, if(ldap_values) { running_ldap_server = ldap_servers[i]; // if $mozilla_debug=1 display in a popup the running server if (env_mozdebug) { displayerror("getldapattributes: debug 2 running_ldap_server: " + running_ldap_server); } break; } } // 5) set user preferences //browser lockpref("browser.startup.homepage", "http://www.int-evry.fr...
...config( "autoadmin.global_config_url", \ "http://lugdunum.int-evry.fr/browser/config-file-unix.jsc" ); // how often (in minutes) to update // every 6 hours seems a good interval to keep hosts who don't ever //
exit netscape updated on current changes.
Drag and Drop JavaScript Wrapper - Archive of obsolete content
if we wanted to handle the other cases also, we can call the other functions, as in the following example: <description value="click and drag this text." ondraggesture="nsdraganddrop.startdrag(event,textobserver)" ondragover="nsdraganddrop.dragover(event,textobserver)" ondrag
exit="nsdraganddrop.drag
exit(event,textobserver)" ondragdrop="nsdraganddrop.drop(event,textobserver)" /> as mentioned earlier, there is nothing special that happens during a dragenter event, so you can just write that yourself.
...ondrag
exit(event, session) this function should be defined when something should happen on a drag
exit.
...for elements that can have objects dropped on them, you should define ondragover, ondrop and getsupportedflavours (and, if desired, ondrag
exit).
Layout System Overview - Archive of obsolete content
(note: it is unclear if this is really a benefit - it may have been better to use a copy of the content model for each presentation, and to remove the compl
exity of managing separate presentations - analysis is needed here).
...there is, of course, some compl
exity involved with managing these two models simultaneously...
...digging just a tiny bit deeper into the system we find that the compl
exity (and interest) mushrooms very rapidly.
Anonymous Content - Archive of obsolete content
mouseover and mouseout events mouseover and mouseout events are retargeted if the mouse genuinely enters or
exits the bound element (in addition to entering or
exiting some anonymous content).
... if, however, the user has simply moved the mouse from one anonymous element to another, without entering or
exiting the bound element itself, then the event is stopped.
...if the user continues moving to the right and leaves the button, then the mouseout generated will be retargeted, since the file control will also have been
exited.
Using IO Timeout And Interrupt On NT - Archive of obsolete content
due to a limitation of the present implementation of nspr io on nt, programs must follow the following guideline: if a thread calls an nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the thread
exits.
... canceling overlapped io by closing the file descriptor therefore, we need to cancel the outstanding overlapped io request before the thread
exits.
... conclusions as long as we need to support nt 3.51, we need to program under the guideline that after an io timeout or interrupt error, the thread must make sure the file descriptor is closed before it
exits.
Using SSH to connect to CVS - Archive of obsolete content
posix shell eval `ssh-agent -s` ssh-add ~/.ssh/id_dsa $shell ssh-agent -k
exit x windows in "~/.xinitrc" add "ssh-add".
... ms-dos command prompt cygwin for /f "tokens=1,2,3* delims=; " %%a in ('ssh-agent -c') do if "%%a"=="setenv" set %%b=%%c set home=/cygdrive/c/path/to/your/cygwin/home/directory ssh-add ~/.ssh/id_dsa start /b /wait cmd.exe ssh-agent -k
exit essentially both sets of commands do the same thing.
...since it's important that you kill the agent when you're finished with it, the last three lines start a child environment that, when
exited, will result in the agent's process being killed.
Deploying our app - Learn web development
the test also
exited with a special signal that tells the command line that it was successful — an
exit signal of 0.
... if there's a failure the test fails with an
exit code of 1 — this is a system-level value that says "something failed".
... in our build script, npm run test is called, then you see the string && — this means "if the thing on the left succeeded (
exited with zero), then do this thing on the right".
Introducing a complete toolchain - Learn web development
toolchains and their inherent compl
exity as with any chain, the more links you have in your toolchain, the more complex and potentially brittle it is — for example it might be more complex to configure, and easier to break.
...we will however be avoiding any superfluous tooling, with the aim of keeping compl
exity to a minimum.
... although this stage of our toolchain can be quite painful, because we've chosen a tool that purposely tries to reduce configuration and compl
exity, there's really nothing more we need to do during the development phase.
Package management basics - Learn web development
open it up and it should look something like this: { "name": "parcel-experiment", "version": "1.0.0", "description": "a simple npm package to learn about using npm", "main": "index.js", "scripts": { "test": "echo \"error: no test specified\" &&
exit 1" }, "author": "chris mills", "license": "isc" } so this is the config file that defines your package.
... webpack requires some configuration (though “some” might be understating the compl
exity of some developers’ webpack configurations).
...open it up, and its scripts member should look like this: "scripts": { "test": "echo \"error: no test specified\" &&
exit 1", }, update it so that it looks like this, and save the file: "scripts": { "test": "echo \"error: no test specified\" &&
exit 1", "dev": "parcel serve index.html" }, we’ve added a custom dev command as an npm script.
mach
python based mach tends to involve more compl
exity and potential for breakage.
...you will see a big mach error message when all that happened was an invoked command returned a non-0
exit code - possibly expectedly so in mozilla!
... the return value from the @command method should be the integer
exit code from the process.
HTTP Cache
onsumer reference ++ (dropped back after an opener is removed from the fifo) state == notloaded: state = loading when open_truncate flag was used: cachefile is created as 'new', state = empty otherwise: cachefile is created and load on it started cacheentry::onfileready notification is now expected state == loading: just do nothing and
exit call to cacheentry::invokecallbacks cacheentry::invokecallbacks (entry atomic): called on: a new opener has been added to the fifo via an asyncopen call asynchronous result of cachefile open the writer throws the entry away the output stream of the entry has been opened or closed metadataready or setvalid on the entry has been called the entry has been doomed stat...
...dropped back when the consumer releases the entry) oncacheentryavailable is invoked on the opener with anew = false and the entry opener is removed from the fifo result == entry_not_wanted: oncacheentryavailable is invoked on the opener with null for the entry opener is removed from the fifo state == writing or revalidating: do nothing and
exit any other value of state is unexpected here (assertion failure) loop this process while there are openers in the fifo cacheentry::onfileready (entry atomic): load result == failure or the file has not been found on disk (is new): state = empty otherwise: state = ready since the cache file has been found and is usable containing meta data and data of the entry call to cacheentry::inv...
...okecallbacks cacheentry::onhandleclosed (entry atomic): called when any consumer throws the cache entry away if the handle is not the handle given to the current writer, then
exit state == writing: the writer failed to call metadataready on the entry - state = empty state == revalidating: the writer failed the re-validation process and failed to call setvalid on the entry - state = ready call to cacheentry::invokecallbacks all consumers release the reference: the entry may now be purged (removed) from memory when found expired or least used on overrun of the memory pool limit when this is a disk cache entry, its cached data chunks are released from memory and only meta data is kept intermediate memory caching of frequently used metadata (a.k.a.
CustomizableUI.jsm
oncustomizeend(awindow) fired when
exiting customize mode in awindow.
... parameters awindow the window entering customize mode notifyendcustomizing() notify listeners that a window is
exiting customize mode.
... parameters awindow the window
exiting customize mode dispatchtoolboxevent() notify toolbox(es) of a particular event.
Monitors
monitor type monitor functions with a mutex of type prlock, a single thread may enter the monitor only once before it
exits, and the mutex can have multiple associated condition variables.
...each subsequent time the thread successfully enters the same monitor, the thread's entry count is incremented again, and each time the thread
exits the monitor, the thread's entry count is decremented.
... pr_
exitmonitor decrements the entry count associated with a specified monitor.
NSS Sample Code Sample_1_Hashing
, "%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage message and
exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { ...
...(hash_algtotal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output");
exit(-1); } /* * check for the missing arguments */ static void printmsgand
exit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value)) printmsgand
exit(progname, opt) /* * digests a file according to the specified algorithm.
... fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) {
exit(-1); } return 0; } </sechash.h></secmodt.h></secoid.h></prio.h></plgetopt.h></prtypes.h></prprf.h> ...
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\...
...n", "-f <plainpasswc>");
exit(-1); } /* initialize the slot password */ char *initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a passw...
... break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progname); pr_init(pr_user_thread, pr_priority_normal, 0); /* create the database */ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup();
exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
Hashing - sample 1
"%02x:", data[i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* * prints a usage message and
exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; htype++) { ...
...(hash_algtotal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output");
exit(-1); } /* * check for the missing arguments */ static void printmsgand
exit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value)) printmsgand
exit(progname, opt) /* * digests a file according to the specified algorithm.
... fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) {
exit(-1); } return 0; } ...
sample1
i]); column += 3; } else { pr_fprintf(out, "%02x", data[i]); column += 2; break; } if (column > 76 || (i % 16 == limit)) { newline(out); column = level; limit = i % 16; } } if (column != level) { newline(out); } } /* prints a usage message and
exits */ static void usage(const char *progname) { int htype; int hash_algtotal = sizeof(hash_names) / sizeof(hash_names[0]); fprintf(stderr, "usage: %s -t type [ < input ] [ > output ]\n", progname); fprintf(stderr, "%-20s specify the digest method (must be one of\n", "-t type"); fprintf(stderr, "%-20s ", ""); for (htype = 0; htype < hash_algtotal; hty...
...otal - 2)) fprintf(stderr, " or "); else if (htype != (hash_algtotal - 1)) fprintf(stderr, ", "); } fprintf(stderr, " (case ignored))\n"); fprintf(stderr, "%-20s define an input file to use (default is stdin)\n", "< input"); fprintf(stderr, "%-20s define an output file to use (default is stdout)\n", "> output");
exit(-1); } /* check for the missing arguments */ static void printmsgand
exit(const char *progname, char opt) { fprintf(stderr, "%s: option -%c requires an argument\n", progname, opt); usage(progname); } #define require_arg(opt,value) if (!(value)) printmsgand
exit(progname, opt) /* digests a file according to the specified algorithm.
... fprintf(stderr, "%s: invalid digest type - %s\n", progname, hashname); usage(progname); } /* digest it and print the result */ rv = digestfile(pr_stdout, pr_stdin, hashoidtag); if (rv != secsuccess) { fprintf(stderr, "%s: problem digesting data (%d)\n", progname, port_geterror()); } rv = nss_shutdown(); if (rv != secsuccess) {
exit(-1); } return 0; } ...
Tutorial: Embedding Rhino
in this document: runscript: a simple embedding entering a context initializing standard objects collecting the arguments evaluating a script printing the result
exiting the context expose java apis using java apis implementing interfaces adding java objects using javascript objects from java using javascript variables calling javascript functions javascript host objects defining host objects counter example counter's constructors class name dynamic properties defining javascript "methods...
...
exiting the context the code } finally { context.
exit(); }
exits the context.
...there should be a call to
exit for every call to enter.
Rhino scopes and contexts
to associate the current thread with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply
exit the context: context.
exit(); these calls will work properly even if there is already a context associated with the current thread.
... remember to put the
exit() call in a finally block if you're executing code that could throw an exception.
...you can create a scope using one context and then evaluate a script using that scope and another context (either by
exiting the current context and entering another, or by executing on a different thread).
Rhino shell
runcommand(commandname, [arg, ...] [options]) execute the specified command with the given argument and options as a separate process and return the
exit status of the process.
... js> function test(x) { print("entry"); java.lang.thread.sleep(x*1000); print("
exit"); } js> var o = { f : sync(test) }; js> spawn(function() {o.f(5);}); thread[thread-0,5,main] entry js> spawn(function() {o.f(5);}); thread[thread-1,5,main] js>
exit entry
exit runcommand here are a few examples of invoking runcommand under linux.
..._array = [1, 2, 3, 4]; js> runcommand("echo", { args: arg_array}) 1 2 3 4 0 examples for windows are similar: js> // invoke shell command js> runcommand("cmd", "/c", "date /t") 27.08.2005 0 js> // run sort collectiong the output js> var opt={input: "c\na\nb", output: 'sort output:\n'} js> runcommand("sort", opt) 0 js> print(opt.output) sort output: a b c js> // invoke notepad and wait until it
exits js> runcommand("notepad") 0 ...
Secure Development Guidelines
51615 int vuln_funct(int size) { char buf[1024]; if (size > sizeof(buf) - 1) return -1; } signedness issues: don’t mix signed and unsigned integers use unsigned integers for sizes, offsets, and indexes casting and truncation example: void vuln_funct() { u_int32_t size1 = 0xffffffff; u_int16_t size2 = size1; void *ptr = malloc(size2); if (!ptr)
exit(
exit_failure); memcpy(ptr, user_data, size1); } casting issues: sign extension example: int main() { int32_t new_size = 0; int8_t size = 0xff; new_size = size; printf("0x%08x\r\n", new_size); } casting issues: sign extension prevention be careful with signed integers use unsigned integers for sizes, offsets, and indexes denial of service: divide by zero...
...riting arbitrary content to any file race conditions occur when two separate execution flows share a resource and its access is not synchronized properly race condition types include file (previously covered) thread (two threads share a resource but don’t lock it) signal race conditions example char *ptr; void sighandler() { if (ptr) free(ptr); _
exit(0); } int main() { signal(sigint, sighandler); ptr = malloc(1000); if (!ptr)
exit(0); ...
... it would lead to a double free race conditions: prevention be very careful when working with threads, the file system, or signals track down shared resources and lock them accordingly for signal handlers never use non-atomic operations longjmp() is a sign of badness even
exit() could cause problems, but _
exit() is okay deadlocks and locking issues locks are used when dealing with threads acquiring more than one lock to perform an action if a second thread acquires the same locks but in a different order, it causes denial of service since both threads will be waiting forever deadlocks and locking issues example func_a() { lock(locka...
Detailed XPCOM hashtable guide
mozilla's hashtable implementations mozilla has several hashtable implementations, which have been tested and, tuned, and hide the inner compl
exities of hashtable implementations: pldhash - low-level c api; stores keys and data in one large memory structure; uses the heap efficiently; client must declare an "entry class" and may not hold onto entry pointers.
...it hides many of the compl
exities of pldhash (callback functions, the ops structure, etc).
... nsbasehashtable and friends: nsdatahashtable, nsinterfacehashtable, and nsclasshashtable these c++ templates provide a high-level interface for using hashtables that hides most of the compl
exities of pldhash.
XPCShell Reference
quit(
exitcode) quit()
exits the shell.
... you can specify arguments that will get translated to an
exit code.
... quit(5) will
exit xpcshell with a result code of 5.
Element: fullscreenchange event - Web APIs
if document.fullscreenelement has a value it will
exit full-screen mode.
... if (document.fullscreenelement) { console.log(`element: ${document.fullscreenelement.id} entered fullscreen mode.`); } else { console.log('leaving full-screen mode.'); } }); document.getelementbyid('toggle-fullscreen').addeventlistener('click', (event) => { if (document.fullscreenelement) { //
exitfullscreen is only available on the document object.
... document.
exitfullscreen(); } else { document.getelementbyid('fullscreen-div').requestfullscreen(); } }); specifications specification status fullscreen api living standard ...
Element.requestFullscreen() - Web APIs
it's also important to listen for fullscreenchange to be aware when, for example, the user manually toggles full-screen mode, or when the user switches applications, causing your application to temporarily
exit full-screen mode.
... function togglefullscreen() { let elem = document.queryselector("video"); if (!document.fullscreenelement) { elem.requestfullscreen().catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.
exitfullscreen(); } } if the document isn't already in full-screen mode—detected by looking to see if document.fullscreenelement has a value—we call the video's requestfullscreen() method.
... if, on the other hand, full-screen mode is already in effect, we call document.
exitfullscreen() to disable full-screen mode.
GlobalEventHandlers.onkeypress - Web APIs
urn event.charcode === 0 || /\d/.test(string.fromcharcode(event.charcode)); } const input = document.queryselector('input'); input.onkeypress = numbersonly; // prevent pasting (since pasted content might include non-number characters) input.onpaste = event => false; result capture the typing of a hidden word the following javascript function will do something after the user types the word "
exit" in any point of a page.
... /* type the word "
exit" in any point of your page...
... */ (function () { const ssecret = /* choose your hidden word...: */ "
exit"; let noffset = 0; document.onkeypress = function(opevt) { let oevent = opevt || window.event, nchr = oevent.charcode, snodetype = oevent.target.nodename.touppercase(); if (nchr === 0 || oevent.target.contenteditable.touppercase() === "true" || snodetype === "textarea" || snodetype === "input" && oevent.target.type.touppercase() === "text") { return true; } if (nchr !== ssecret.charcodeat(noffset)) { noffset = nchr === ssecret.charcodeat(0) ?
Using IndexedDB - Web APIs
if the onupgradeneeded event
exits successfully, the onsuccess handler of the open database request will then be triggered.
...<iframe> content) cannot access indexeddb if the browser is set to never accept third party cookies (see bug 1147821.) warning about browser shutdown when the browser shuts down (because the user chose the quit or
exit option), the disk containing the database is removed unexpectedly, or permissions are lost to the database store, the following things happen: each transaction on every affected database (or all open databases, in the case of browser shutdown) is aborted with an aborterror.
... since the user can
exit the browser at any time, this means that you cannot rely upon any particular transaction to complete, and on older browsers, you don't even get told when they don't complete.
An overview of HTTP - HTTP
like the browser cache) filtering (like an antivirus scan or parental controls) load balancing (to allow multiple servers to serve the different requests) authentication (to control access to different resources) logging (allowing the storage of historical information) basic aspects of http http is simple http is generally designed to be simple and human readable, even with the added compl
exity introduced in http/2 by encapsulating http messages into frames.
... http messages can be read and understood by humans, providing easier testing for developers, and reduced compl
exity for newcomers.
... though http/2 adds some compl
exity, by embedding http messages in frames to improve performance, the basic structure of messages has stayed the same since http/1.0.
InternalError: too much recursion - JavaScript
examples this recursive function runs 10 times, as per the
exit condition.
... function loop(x) { if (x >= 10) // "x >= 10" is the
exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0); setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion this recursive function is missing a base case.
... as there is no
exit condition, the function will call itself infinitely.
private-browsing - Archive of obsolete content
" console.log(document.body.innerhtml);" + "});"; function logpublicpagecontent(worker) { if (privatebrowsing.isprivate(worker)) { console.log("private window, doing nothing"); } else { worker.port.emit("log-content"); } } pagemod.pagemod({ include: "*", contentscript: loggingscript, onattach: logpublicpagecontent }); tracking private-browsing
exit sometimes it can be useful to cache some data from private windows while they are open, as long as you don't store it after the private browsing windows have been closed.
... to do this with the sdk, you can listen to the system event named "last-pb-context-
exited": var events = require("sdk/system/events"); function listener(event) { console.log("last private window closed"); } events.on("last-pb-context-
exited", listener); globals functions isprivate(object) function to check whether the given object is private.
Automated testing tips and tricks - Archive of obsolete content
lag to add a profile entry to profiles.ini and populate the new profile directory with a prefs.js file firefox-bin -createprofile "testprofile ${profile_dir}/testprofile" next, start firefox to populate the new profile directory with the rest of the default settings firefox-bin -p testprofile -chrome chrome://tests/content/quit.xul<code> the above process may
exit before the profile is completely created.
...le dump in a new profile add user_pref("browser.dom.window.dump.enabled", true); to profiledir/user.js how to execute test code with chrome privileges using a chrome doc - see sbtests.xul in http://people.mozilla.com/~davel/scripts/ for an example firefox-bin -p sbtestprofile -chrome chrome://sbtests/content/ above code calls the quit function in quit.js to
exit after test is finished how to detect content onload event from chrome use the domcontentloaded event chromewindow.addeventlistener('domcontentloaded',callbackfunction,false); ...
LIR - Archive of obsolete content
turns a quad 36 calld double call subroutine that returns a double branch 37 j void jump always 38 jt void jump if true 39 jf void jump if false 40 jtbl void jump to address in table 41 label void a jump target (no machine code is emitted for this) 42 not in use guards 43 x void
exit always 44 xt void
exit if true 45 xf void
exit if false 46 xtbl void
exit via indirect jump 47 xbarrier void a lir_xbarrier cause no code to be generated, but it acts like a never-taken guard in that it inhibits certain optimisations, such as dead stack store elimination.
...11 i2d double convert int to double 112 ui2d double convert unsigned int to double 113 d2i integer convert double to int (no exceptions raised) 114 dasq quad 64 bit interpret the bits of a double as a quad 115 qasd double 64 bit interpret the bits of a quad as a double overflow arithmetic 116 addxovi integer add int and
exit on overflow 117 subxovi integer subtract int and
exit on overflow 118 mulxovi integer multiply int and
exit on overflow 119 addjovi integer add int and branch on overflow 120 subjovi integer subtract int and branch on overflow 121 muljovi integer multiply int and branch on overflow 122 addjovq quad 64 bit add quad a...
Nanojit - Archive of obsolete content
lins *rec_ins = out.insskip(sizeof(guardrecord) + sizeof(side
exit)); guardrecord *guard = (guardrecord *) rec_ins->payload(); memset(guard, 0, sizeof(*guard)); side
exit *
exit = (side
exit *)(guard + 1); guard->
exit =
exit; guard->
exit->target = f; f->lastins = out.insguard(lir_loop, out.insimm(1), rec_ins); // compile the fragment.
... todo: explain guards, guard records, vmside
exit, fragmento, verbosewriter::formatguard...
Running Tamarin acceptance tests - Archive of obsolete content
: will print a period (.) for each test run regardless of results, then print the test run summary when finished --ascargs= : additional arguments to pass to asc.jar --vmargs= : additional arguments to pass to avmshell --random : run tests in random order --timeout : max time for testrun --verify : run a verify pass instead of running abcs --verifyonly : run a -dverifyonly pass: only checks test
exitcode (only works with debugger vms) testing the android shell the instructions above apply to running tests on an android device as well, but with a few differences.
...h avmshell /data/local/tamarin/avmshell $ adb shell 'chmod 777 /data/local/tamarin/avmshell' copy android_runner.sh, if it doesn't already exist on the phone in /data/local/tamarin $ adb push tamarin-redux/platform/android/android_runner.sh /data/local/tamarin/android_runner.sh $ adb shell 'chmod 777 /data/loca/android_runner.sh' test it out with a simple .abc or no args for usage (should return
exitcode=0) $ tamarin-redux/platform/android/android_shell.py hello.abc hello
exitcode=0 test it out by retrieving the version information of the shell on the android device $ $avm -dversion shell 1.4 debug build 6299:455bca954565 features avmsystem_32bit;avmsystem_unaligned_int_access;avmsystem_little_endian;avmsystem_arm;avmsystem_unix; avmfeature_jit;avmfeature_abc_interp;avmfeature_selftest;avmfea...
Running Tamarin performance tests - Archive of obsolete content
enable additional output -e --avm avmplus command to use -a --asc compiler to use -g --globalabc deprecated but still works - use builtin.abc (used to be location of global.abc) -b --builtinabc location of builtin.abc -s --shellabc location of shell_toplevel.abc -x --exclude comma separated list of directories to skip -h --help display help and
exit -t --notime do not generate timestamps (cleaner diffs) -f --forcerebuild force rebuild all test files -c --config sets the config string [default os-tvm] -q --quiet display minimum output during testrun -l --log also log all output to given logfile --summaryonly only display final summary --rebuildtests rebuild the tests only - do not run against vm ...
...ne the executable must be 'avmshell' $ adb push avmshell /data/app/avmshell $ adb shell chmod 777 /data/app/avmshell copy android_runner.sh, if it doesn't already exist on the phone in /data/app $ adb push tamarin-redux/platform/android/android_runner.sh /data/app/android_runner.s $ adb shell chmod 777 /data/app/android_runner.sh test it out with a simple .abc or no args for usage (should return
exitcode=0) $ tamarin-redux/platform/android/android_shell.h hello.abc hello
exitcode=0 running performance tests to run performance tests on android you don't need to pass --androidthreads or --threads=1 as with the acceptance tests; in fact, a usage error will result.
Venkman Introduction - Archive of obsolete content
step out executes until the current function call
exits.
... as you can see, this is a very modest introduction to the functionality of the javascript debugger and the compl
exity that scripts can have.
XUL Events - Archive of obsolete content
attribute: ondragenter drag
exit this event is sent when the mouse pointer moves away from an element during a drag.
... attribute: ondrag
exit draggesture this event is sent when the user starts dragging the element, usually by holding down the mouse button and moving the mouse.
xulauncher - Archive of obsolete content
ucture and # needed meta files in /tmp, copy the xul-file over and start it # usage: # xulauncher xulfile.xul [options] ############################################################################## # check if theres atleast one parameter ############################################################################## if [ $# -lt 1 ] then echo "you need to give the xul file as first parameter"
exit fi # check if 1st parameter is a file ############################################################################## if [ !
... -f "$1" ] then echo "\"$1\" is not a file"
exit fi # define some variables ############################################################################## wd=/tmp ext=".xul" xulfile=`basename $1` xulname=${xulfile%$ext} xuldir="$wd/$xulname/chrome/$xulname/" xulprefdir="$wd/$xulname/defaults/preferences" xulappini="$wd/$xulname/application.ini" xulmanifest="$wd/$xulname/chrome/chrome.manifest" xulprefs="$wd/$xulname/defaults/preferences/prefs.js" # make minimal directory structure ############################################################################## mkdir -p $xuldir mkdir -p $xulprefdir # create application.ini file ############################################################################## echo " [app] vendor=xulauncher.sh name=$xulname version=0.0.1 buildid=`date +%y%m%d...
Anatomy of a video game - Game development
games are constantly looping through these stages, over and over, until some end condition occurs (such as winning, losing, or
exiting to go to bed).
...this feels like unnecessary compl
exity but it might just be good optimization (not necessarily, of course).
Algorithm - MDN Web Docs Glossary: Definitions of Web-related terms
computer scientists compare the efficiency of algorithms through the concept of "algorithmic compl
exity" or "big o" notation.
... learn more general knowledge algorithm on wikipedia technical reference explanations of sorting algorithms explanations of algorithmic compl
exity ...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
10 abstraction abstraction, coding, codingscripting, glossary, programming language abstraction in computer programming is a way to reduce compl
exity and allow efficient design and implementation in complex software systems.
... it hides the technical compl
exity of systems behind simpler apis.
Handling common accessibility problems - Learn web development
if you do need compl
exity, you should consider using wai-aria (accessible rich internet applications), a specification that provides semantics (in the form of new html attributes) for items such as complex form controls and updating panels that can be understood by most browsers and screen readers.
... esc (when inside rotor)
exit rotor.
Profiling with the Firefox Profiler
label stack the label stack (formerly called "pseudo stack") uses function entry/
exit tags added by hand to important points in the code base.
...these add raii helpers, which are used by the profiler to track entries/
exits of the annotated functions.
powermetrics
the second column counts "package idle
exit" wakeups, which wake up the entire package as opposed to just a single core; such wakeups are particularly expensive, and this count is a subset of the first column's count.
...for example, firing a single sub-2ms deadline can also cause a package idle
exit wakeup.
nglayout.debug.disable_xul_cache
possible values and their effects: true: do not cache parsed xul documents and do not save the cache to the xul fastload file on
exit; re-read the source files each time the window or dialog needs to be displayed.
... false: cache xul documents in memory and save the cache to disk on
exit to improve performance.
PR_CEnterMonitor
in the latter case, the calling thread is likely to find the monitor locked by another thread and waits for that thread to
exit before continuing.
... note: pr_centermonitor and pr_c
exitmonitor must be paired--that is, there must be an
exit for every entry--or the object will never become available for any other thread.
PR_Cleanup
when the primordial thread returns from main, the process immediately and silently
exits.
... that is, the process (if necessary) forcibly terminates any existing threads and
exits without significant blocking and without error messages or core files.
PR_CreateThread
description if you want the thread to start up waiting for the creator to do something, enter a lock before creating the thread and then have the thread's root function enter and
exit the same lock.
... when you are ready for the thread to run,
exit the lock.
PR_DetachThread
the
exit process is invoked.
...a native thread not created by nspr is automatically attached the first time it calls an nspr function, and automatically detached when it
exits.
PR_Wait
description a call to pr_wait causes the thread to release the monitor's lock, just as if it had called pr_
exitmonitor as many times as it had called pr_entermonitor.
... pr_
exitmonitor(&ml); a thread can be resumed from a wait for a variety of reasons.
Encrypt Decrypt MAC Keys As Session Objects
ac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr, "%-20s specify db directory path\n\n", ...
...; fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", "");
exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * gene...
Encrypt and decrypt MAC using token
ac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr, "%-20s specify db directory path\n\n", ...
...; fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", "");
exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * gene...
Enc Dec MAC Output Public Key as CSR
*/ #ifndef port_errortostring #ifndef sec_error_base #define sec_error_base (-0x2000) #define port_errortostring(err) pr_errortostring((err), pr_language_i_default) #endif #endif /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -s -r -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'g' for generating rsa keypair for wrapping\n\n", "g"); fprintf(stderr, "%-20s specify 'e' for encrypt operation\n\n", "e"); fprintf(stderr, "%-20s specify 'd' ...
...; fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", "");
exit(-1); } /* map option letter enumerated commad type */ static commandtype option2command(const char* c) { switch (*c) { case 'g': return gen_csr; case 'e': return encrypt; case 'd': return decrypt; default: return unknown; } } /* * wrap the symkey using public key */ secstatus wrapkey(pk11symkey* key, seckeypublickey *pubkey, secitem **wrappedkey) { secstatus rv; ...
Encrypt Decrypt_MAC_Using Token
ac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and
exit.
...; fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", "");
exit(-1); } /* * gather a cka_id.
NSS Sample Code Sample_3_Basic Encryption and MACing
mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* print a usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c <a|b> -d <dbdirpath> [-z <noisefilename>] " "[-p <dbpwd> | -f <dbpwdfile>] -i <ipfilename> -o <opfilename>\n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c <a|b>"); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", ...
...ut file and produces\n", "note :"); fprintf(stderr, "%-7s <ipfilename>.enc and <ipfilename>.header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes <ipfilename>.enc and <ipfilename>.header\n", ""); fprintf(stderr, "%-7s as input files and produces <opfilename> as a final output file.\n\n", "");
exit(-1); } /* this source code form is subject to the terms of the mozilla public * license, v.
Initialize NSS database - sample 2
/* * print a usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d [-p ]" " [-f ]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d "); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p "); fprintf(stderr, "%-15s specify a password file\n\n", "-f ");
exit(-1); } /* * initslotpassword */ char * initslotpassword(pk11slotinfo *slot, prbool retry, void *arg) { file *input; file *output; char *p0 = null; char *p1 = null; ...
... break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progname); pr_init(pr_user_thread, pr_priority_normal, 0); /* create the database */ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup();
exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
EncDecMAC using token object - sample 3
efine iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_header "-----begin mac-----" #define mac_trailer "-----end mac-----" #define pad_header "-----begin pad-----" #define pad_trailer "-----end pad-----" typedef enum { encrypt, decrypt, unknown } commandtype; typedef enum { symkey = 0, mackey = 1, iv = 2, mac = 3, pad = 4 } headertype; /* * print usage message and
exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -c -d [-z ] " "[-p | -f ] -i -o \n\n", progname); fprintf(stderr, "%-20s specify 'a' for encrypt operation\n\n", "-c "); fprintf(stderr, "%-20s specify 'b' for decrypt operation\n\n", " "); fprintf(stderr, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fpri...
...", "-i "); fprintf(stderr, "%-21s specify an output file name\n\n", "-o "); fprintf(stderr, "%-7s for encrypt, it takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", "");
exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generate...
Index
296 js_getfunctioncallback jsapi reference, obsolete, spidermonkey returns the callback currently configured to be called when javascript functions are invoked or
exited, as established by a prior call to js_setfunctioncallback.
... 457 js_setfunctioncallback jsapi reference, obsolete, spidermonkey js_setfunctioncallback sets a c function to be called each time a javascript function is invoked or
exits.
Redis Tips
time compl
exity - each command's compl
exity is given in big-o notation.
... this adds processing time and compl
exity for your application, but could save you space in redis for large data sets.
places.sqlite Database Troubleshooting
sqlite> .
exit open a new shell for the new database: my_work_folder> sqlite3 places.sqlite sqlite> pragma integrity_check; if the result is not ok, the file cannot be recovered; stop here and please file a bug.
... nn must be replaced with the number we had noted previously: sqlite> pragma user_version = nn; let's update the page_size value: sqlite> pragma journal_mode = truncate; sqlite> pragma page_size = 32768; sqlite> vacuum; sqlite> pragma journal_mode = wal; sqlite> .
exit copy the new places.sqlite to the profile folder, overwriting the existing one.
HOWTO
however, when you start your script, it
exits immediately, before the network request returns.
...both success and error callbacks, put: gscriptdone = true; if you forget some condition where your script should
exit but you don't add this statement, your script will hang (busy wait).
mozIPlacesAutoComplete
note: pages will not be automatically unregistered when private browsing mode is entered or
exited.
...note: pages will not be automatically unregistered when private browsing mode is entered or
exited.
nsIAccessibleEvent
event_contexthelp_end 0x0021 0x001e a window has
exited context-sensitive help mode.
... event_dragdrop_end 0x0023 0x0020 an application is about to
exit drag-and-drop mode.
nsIAnnotationObserver
this is not called when annotations are expired (normally happens when the application
exits).
...this is not called when annotations are expired (normally happens when the application
exits).
nsIAnnotationService
long long adestitemid, in boolean aoverwritedest); void addobserver(in nsiannotationobserver aobserver); void removeobserver(in nsiannotationobserver aobserver); nsiuri getannotationuri(in nsiuri auri, in autf8string aname); constants constant value description expire_session 0 for temporary data that can be discarded when the user
exits.
... removed at application
exit.
nsIMsgIncomingServer
canemptytrashon
exit boolean read only.
... downloadonbiff boolean downloadsettings nsimsgdownloadsettings emptytrashon
exit boolean filterscope nsmsgsearchscopevalue read only.
Using the Multiple Accounts API
use lsub instead of list) preference: mail.server.server.cleanup_inbox_on_
exit - boolean, should we purge the inbox when we quit?
... preference: mail.server.server.empty_trash_on_
exit boolean, (should not be imap-specific) - should we empty this server's trash when we quit?
Web Console remoting - Firefox Developer Tools
the console actor provides the lastprivatecontext
exited notification: { "from": "conn0.console19", "type": "lastprivatecontext
exited" } this notification is sent only when your client is attached to the global console actor, it does not make sense for tab console actors.
...also added the lastprivatecontext
exited notification for the global console actor.
Using the CSS Painting API - Web APIs
we also add a little bit of compl
exity later in this tutorial.
... adding compl
exity the above examples might not seem very exciting, as you could recreate them in a few different ways with existing css properties, e.g.
Client.postMessage() - Web APIs
examples sending a message from a service worker to a client: addeventlistener('fetch', event => { event.waituntil(async function() { //
exit early if we don't have access to the client.
... const client = await clients.get(event.clientid); //
exit early if we don't get the client.
console - Web APIs
console.groupend()
exits the current inline group.
... to
exit the current group, simply call console.groupend().
DragEvent - Web APIs
drag
exit this event is fired when an element is no longer the drag operation's immediate selection target.
... globaleventhandlers.ondrag
exit a global event handler for the drag
exit event.
Element: mouseout event - Web APIs
the mouseleave event is added to the <ul> to color the list purple whenever the mouse
exits the <ul>.
... mouseout is added to the list to color the targeted element orange when the mouse
exits it.
GlobalEventHandlers.ondragend - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function drag
exit_handler(ev) { console.log("drag
exit"); // change the source element's border back to green to signify a drag
exit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/
exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler;...
... el.ondrag
exit = drag
exit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondrag
exit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragend' in that specification.
GlobalEventHandlers.ondragenter - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function drag
exit_handler(ev) { console.log("drag
exit"); // change the source element's border back to green to signify a drag
exit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/
exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragend_handler;...
... el.ondrag
exit = drag
exit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondrag
exit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragenter' in that specification.
GlobalEventHandlers.ondragleave - Web APIs
var el=document.getelementbyid("target"); el.style.background = "pink"; } function drag
exit_handler(ev) { console.log("drag
exit"); // change the source element's background color back to green to signify a drag
exit event ev.currenttarget.style.background = "green"; } function init() { // set handlers for the source's enter/leave/end/
exit events var el=document.getelementbyid("source"); el.ondragenter = dragenter_handler; el.ondragleave = dragleave_handler; el.ondragend = dragen...
...d_handler; el.ondrag
exit = drag
exit_handler; } </script> <body onload="init();"> <h1>examples of <code>ondragenter</code>, <code>ondragleave</code>, <code>ondragend</code>, <code>ondrag
exit</code></h1> <div> <p id="source" ondragstart="dragstart_handler(event);" draggable="true"> select this element, drag it to the drop zone and then release the selection to move the element.</p> </div> <div id="target" ondrop="drop_handler(event);" ondragover="dragover_handler(event);">drop zone</div> </body> </html> specifications specification status comment html living standardthe definition of 'ondragleave' in that specification.
MouseEvent.relatedTarget - Web APIs
that is: event name target relatedtarget mouseenter the eventtarget the pointing device entered to the eventtarget the pointing device
exited from mouseleave the eventtarget the pointing device
exited from the eventtarget the pointing device entered to mouseout the eventtarget the pointing device
exited from the eventtarget the pointing device entered to mouseover the eventtarget the pointing device entered to the eventtarget the pointing device
exited from dragenter the eventtarget the pointing device entered to the eventtarget the pointing device
exited from drag
exit the eventtarge...
...t the pointing device
exited from the eventtarget the pointing device entered to for events with no secondary target, relatedtarget returns null.
TextTrack.mode - Web APIs
this is done by setting the pauseon
exit property on each cue to true.
... window.addeventlistener("load", event => { let trackelem = document.queryselector("track"); let track = trackelem.track; track.mode = "showing"; for (let index=0; index < track.cues.length; index++) { let cue = track.cues[index]; cue.pauseon
exit = true; }; }); specifications specification status comment html living standardthe definition of 'mode' in that specification.
TextTrack - Web APIs
events cuechange fired when cues are entered and
exited.
... a given text cue appears when the cue is entered and disappears when the cue is
exited.
TextTrackCue - Web APIs
texttrackcue.pauseon
exit a boolean for whether the video will pause when this cue stops being displayed.
... texttrackcue.on
exit the event handler for the
exit event.
Using bounded reference spaces - Web APIs
although the user's xr system may provide automated detection and protection against
exiting the safe area, it is always good practice to handle this yourself, watching for collisions between the user's position and the boundary of the world, and providing guidance to move back toward the origin point, or at least to stay inside the safe zone.
...g: async function onactivatexrbutton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual,
exiting at once if a session is already in place, then requesting a new session using immersive-vr mode.
Lighting a WebXR setting - Web APIs
the concavity or conv
exity of the surface at the target location.
... realism in augmented reality augmented reality introduces an additional level of compl
exity to lighting your objects, since your virtual objects need to exist within a physical world that has its own light sources.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
<title>javascript typewriter - mdn example</title> <script> function typewriter (sselector, nrate) { function clean () { clearinterval(nintervid); btyping = false; bstart = true; ocurrent = null; asheets.length = nidx = 0; } function scroll (osheet, npos, beraseandstop) { if (!osheet.hasownproperty('parts') || amap.length < npos) { return true; } var orel, b
exit = false; if (amap.length === npos) { amap.push(0); } while (amap[npos] < osheet.parts.length) { orel = osheet.parts[amap[npos]]; scroll(orel, npos + 1, beraseandstop) ?
... amap[npos]++ : b
exit = true; if (beraseandstop && (orel.ref.nodetype - 1 | 1) === 3 && orel.ref.nodevalue) { b
exit = true; ocurrent = orel.ref; spart = ocurrent.nodevalue; ocurrent.nodevalue = ''; } osheet.ref.appendchild(orel.ref); if (b
exit) { return false; } } amap.length--; return true; } function typewrite () { if (spart.length === 0 && scroll(asheets[nidx], 0, true) && nidx++ === asheets.length - 1) { clean(); return; } ocurrent.nodevalue += spart.charat(0); spart = spart.slice(1); } function sheet (onode) { this.ref = onode; if (!onode.haschildnodes()) { return; } this.parts = array.prototype.slice.call(onode.childnodes); for (var nchild = 0; nchild < this.parts.length; nchild...
XRBoundedReferenceSpace.boundsGeometry - Web APIs
it's important that your content not be designed to require the user to
exit the bounds specified by boundsgeometry.
... however, if the user's surroundings permit them to move in such a way as to
exit the defined bounds, your content must be able to gracefully handle the situation, which is not considered an error condition.
A hybrid approach - Developer guides
this keeps the compl
exity of altering content on the server side, but still allows our layouts to benefit from the flexibility and future-readiness of responsive design.
... in many cases, the added compl
exity of the hybrid approach is not even necessary.
Functions - JavaScript
var x = 0; while (x < 10) { // "x < 10" is the loop condition // do stuff x++; } ...can be converted into a recursive function declaration, followed by a call to that function: function loop(x) { if (x >= 10) // "x >= 10" is the
exit condition (equivalent to "!(x < 10)") return; // do stuff loop(x + 1); // the recursive call } loop(0); however, some algorithms cannot be simple iterative loops.
... (the inner scope variable "overrides" the outer one, until the program
exits the inner scope.) var createpet = function(name) { // the outer function defines a variable called "name".
InternalError - JavaScript
examples too much recursion this recursive function runs 10 times, as per the
exit condition.
... function loop(x) { if (x >= 10) // "x >= 10" is the
exit condition return; // do stuff loop(x + 1); // the recursive call } loop(0); setting this condition to an extremely high value, won't work: function loop(x) { if (x >= 1000000000000) return; // do stuff loop(x + 1); } loop(0); // internalerror: too much recursion for more information, see internalerror: too much recursion.
Web audio codec guide - Web media technologies
hiss, static, or background noise increases the audio compl
exity, which generally reduces the amount of compression which is possible.
...it's a good general-purpose audio codec that can efficiently handle both low-compl
exity audio such as speech as well as music and other high-compl
exity sounds.
Codecs used by WebRTC - Web media technologies
cb is a subset of the main profile, and is specifically designed for low-compl
exity, low-delay applications such as mobile video and videoconferencing, as well as for platforms with lower performing video processing capabilities.
...opus's scalability and flexibility are useful when dealing with audio that may have varying degrees of compl
exity.
The "codecs" parameter in common media types - Web media technologies
mpeg-4 audio object types id audio object type profile support 0 null 1 aac main main 2 aac lc (low compl
exity) main, scalable, hq, ld v2, aac, he-aac, he-aac v2 3 aac ssr (scalable sampling rate) main 4 aac ltp (long term prediction) main, scalable, hq 5 sbr (spectral band replication) he-aac, he-aac v2 6 aac scalable main, scalable, hq 7 twinvq (coding for ultra-low bit rates) main, scalable 8 celp (code-excited l...
...tion coding) main, scalable, speech, ld 10 – 11 reserved 12 ttsi (text to speech interface) main, scalable, speech, synthetic, ld 13 main synthetic main, synthetic 14 wavetable synthesis 15 general midi 16 algorithmic synthesis and audio effects 17 er aac lc (error resilient aac low-compl
exity) hq, mobile internetworking 18 reserved 19 er aac ltp (error resilient aac long term prediction) hq 20 er aac scalable (error resilient aac scalable) mobile internetworking 21 er twinvq (error resilient twinvq) mobile internetworking 22 er bsac (error reslient bit-sliced arithmetic coding) mobile internetworking ...
system/child_process - Archive of obsolete content
tdin) examples adaption of node's documentation for spawn(): var child_process = require("sdk/system/child_process"); var ls = child_process.spawn('/bin/ls', ['-lh', '/usr']); ls.stdout.on('data', function (data) { console.log('stdout: ' + data); }); ls.stderr.on('data', function (data) { console.log('stderr: ' + data); }); ls.on('close', function (code) { console.log('child process
exited with code ' + code); }); writing to child process' stdin because the sdk implementation does not include a write() method for child processes, you must use the "raw" emit event.
cfx - Archive of obsolete content
cfx supports the following global options: -h, --help - show a help message and
exit -v, --verbose - enable lots of output "command-specific options" are documented alongside the commands.
jpm-mobile - Archive of obsolete content
jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help message and
exit -v, --version - print the jpm version number installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already.
jpm - Archive of obsolete content
jpm usage is: jpm [command] [options] jpm supports the following global options: -h, --help - show a help message and
exit -v, --version - print the jpm version number --addon-dir - directory for your source code, defaulting to the current directory installation jpm is distributed with the node package manager npm.
Appendix D: Loading Scripts - Archive of obsolete content
this means that any and all javascript objects passed in our out of them are wrapped in inter-compartment proxy objects, which consume additional memory and add an extra layer of compl
exity to all property accesses and method calls.
MMgc - Archive of obsolete content
leak detection (for unmanaged memory) when the application is
exiting, mmgc will detect memory leaks in its unmanaged memory allocators and print out the addresses and sizes of the leaked objects, and stack traces if stack traces are enabled.
Getting Started - Archive of obsolete content
ar!/mozapps/ skin messenger my_theme jar:chrome/my_theme.jar!/messenger/ skin messenger-newsblog my_theme jar:chrome/my_theme.jar!/messenger-newsblog/ skin communicator my_theme jar:chrome/my_theme.jar!/communicator/ skin help my_theme jar:chrome/my_theme.jar!/help/ skin navigator my_theme jar:chrome/my_theme.jar!/navigator/ skin editor my_theme jar:chrome/my_theme.jar!/editor/ save the file and
exit the text editor.
Getting Started - Archive of obsolete content
myskin/1.0:communicator"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:editor"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:global"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:messenger"/> <rdf:description chrome:skinversion="1.0" about="urn:mozilla:skin:myskin/1.0:navigator"/> save the file and
exit the text editor.
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
<rdf:li resource="urn:mozilla:skin:my_theme:communicator"/> <rdf:li resource="urn:mozilla:skin:my_theme:editor"/> <rdf:li resource="urn:mozilla:skin:my_theme:global"/> <rdf:li resource="urn:mozilla:skin:my_theme:messenger"/> <rdf:li resource="urn:mozilla:skin:my_theme:navigator"/> save the file and
exit the text editor.
Makefile.mozextension.2 - Archive of obsolete content
either remove (clean it), or choose individual targets to build.";
exit 1; } @echo $(mkdir) $(project) $(mkdir) $(project)/content $(project)/locale $(project)/locale/en-us $(project)/components/ $(project)/defaults/ $(project)/defaults/preferences/ $(project)/locale/de-de $(project)/skin make_xpi: $(mkdir) $(project)/chrome && \ cd $(project) && \ $(zipprog) -r chrome/$(project).jar content locale skin && \ $(zipprog) -r $(project).xpi chrome.manifest ins...
Tamarin build documentation - Archive of obsolete content
alternatively, run make, in which case the process will complete with errors when it tries to create the shared lib crt0.o: $ /android-public/android-ndk/toolchains/arm-eabi-4.4.0/prebuilt/darwin-x86/bin/../lib/gcc/arm-eabi/4.4.0/../../../../arm-eabi/bin/ld: crt0.o: no such file: no such file or directory collect2: ld returned 1
exit status make[2]: *** [link_app.] error 1 make[1]: *** [openssl] error 2 make: *** [build_apps] error 1 you can ignore these errors.
Using XPInstall to Install Plugins - Archive of obsolete content
it can be a way to ensure a smooth user-experience when obtaining plugins, without obliging the user to
exit the browsing environment to launch a binary installer (the classic setup.exe experience on windows) or obliging the user to restart their browser.
Building accessible custom components in XUL - Archive of obsolete content
(we could have laid out the grid by rows instead of columns, but that just shifts the compl
exity to a different navigation command.) here is the keyboard navigation code: <code> const key_up = 38; const key_down = 40; const key_left = 37; const key_right = 39; function cell_keypress(e) { var current = e.target; switch (e.keycode) { case key_up: spreadsheet_up(current); break; case key_down: spreadsheet_down(current); break; case key_left:...
Menus - Archive of obsolete content
<menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menuitem label="new"/> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="
exit"/> </menupopup> </menu> </menubar> there are five tags used in this example, described briefly here: menubar a row of menus that appears along the top of the window or screen.
The Joy of XUL - Archive of obsolete content
in fact, many developers invest a significant amount of effort to achieve these results in their dhtml web applications but at the cost of compl
exity and performance and without any supporting standards.
Code Samples - Archive of obsolete content
c chat const name = "irc:chatzilla" const uri = "chrome://chatzilla/content/" calendar const name = "calendarmainwindow" const uri = "chrome://calendar/content/" * at the time of writing, sunbird's passwords window is broken close the current window to close the window containing the button, possibly leaving other windows open: close()
exit the application to
exit the application, first closing all its windows: components .classes['@mozilla.org/toolkit/app-startup;1'] .getservice(components.interfaces.nsiappstartup) .quit(components.interfaces.nsiappstartup.eattemptquit) ...
More Menu Features - Archive of obsolete content
mple-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menu id="new-menu" label="new"> <menupopup id="new-popup"> <menuitem label="window"/> <menuitem label="message"/> </menupopup> </menu> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="
exit"/> </menupopup> </menu> </menubar> </toolbox> adding a menu to our find files example let's add a menu to the find files dialog.
Simple Menu Bars - Archive of obsolete content
example of a simple menu bar example 1 : source view <toolbox flex="1"> <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menuitem label="new"/> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="
exit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> </toolbox> here, a simple menu bar is created using the menubar element.
menu - Archive of obsolete content
entcontainer, selected, tabindex, value methods appenditem, getindexofitem, getitematindex, insertitemat, removeitemat style classes menu-iconic example <menubar id="sample-menubar"> <menu id="file-menu" label="file"> <menupopup id="file-popup"> <menuitem label="new"/> <menuitem label="open"/> <menuitem label="save"/> <menuseparator/> <menuitem label="
exit"/> </menupopup> </menu> <menu id="edit-menu" label="edit"> <menupopup id="edit-popup"> <menuitem label="undo"/> <menuitem label="redo"/> </menupopup> </menu> </menubar> attributes acceltext type: string text that appears beside the menu label to indicate the shortcut key (accelerator key) to use to invoke the command.
Windows and menus in XULRunner - Archive of obsolete content
ipt src="main.js"/> <toolbox> <menubar id="menubar"> <menu id="file-menu" label="&file;"> <menupopup id="file-popup"> <menuitem label="&file.new;" oncommand="dofilenew();"/> <menuitem label="&file.open;" oncommand="dofileopen();"/> <menuitem label="&file.save;" oncommand="dofilesave();"/> <menuseparator/> <menuitem label="&file.
exit;" oncommand="dofile
exit();"/> </menupopup> </menu> <menu id="edit-menu" label="&edit;"> <menupopup id="edit-popup"> <menuitem label="&edit.undo;" oncommand="doeditundo();"/> <menuitem label="&edit.redo;" oncommand="doeditredo();"/> </menupopup> </menu> </menubar> <toolbar id="main-toolbar"> <toolbarbutton id="open" label=...
Mozprocess - Archive of obsolete content
basic usage: process = processhandler(['command', '-line', 'arguments'], cwd=none, # working directory for cmd; defaults to none env={}, # environment to use for the process; defaults to os.environ )
exit_code = process.waitforfinish(timeout=60) # seconds see an example in https://github.com/mozilla/mozbase/b...profilepath.py processhandler may be subclassed to handle process timeouts (by overriding the ontimeout() method), process completion (by overriding onfinish()), and to process the command output (by overriding processoutputline()).
2006-11-10 - Archive of obsolete content
with the following options: ./configure --enable-application=browser --prefix=$prefix --enable-extensions=default,spatialnavigation then he tried running "make" and received the following error: /usr/bin/ld: testtarray.o(.text+0x2237): unresolvable relocation against symbol `nstarray_base::semptyhdr' /usr/bin/ld: final link failed: nonrepresentable section on output collect2: ld returned 1
exit status gmake[3]: *** [testtarray] error 1 gmake[3]: leaving directory `/usr/mozilla2/src/mozilla/xpcom/tests' gmake[2]: *** [libs] error 2 gmake[2]: leaving directory `/usr/mozilla2/src/mozilla/xpcom' gmake[1]: *** [tier_2] error 2 gmake[1]: leaving directory `/usr/mozilla2/src/mozilla' make: *** [default] error 2 he is not sure what is wrong with his build, and is asking for help on how to res...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
ect * from comments"); var doc = document.implementation.createdocument('', 'comments', null); var root = doc.documentelement; rs_comments.rows.foreach(function(row, index) { if (true || index < 10) { var node = doc.createelement('comment'); node.setattribute('id', row.id); node.setattribute('name', row.name); node.setattribute('message', row.message); root.appendchild(node); } }); jaxer.response.
exit(200, doc); </script> the data from the database is represented in xml format as follows: <comments> <comment message="”jaxer" name="”nigel" id="”1”"></comment> ...
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
the time between when content is painted to the page and when all the functionality becomes responsive to human interaction often varies based on the the size and compl
exity of the javascript needing to be downloaded, parsed, and executed on the main thread, and on the device speed or lack thereof (think low end mobile devices).
Test your skills: Loops - Learn web development
loops 2 in this next task, we want you to write a simple program that, given a name, searches an array of objects containing names and phone numbers (phonebook) and, if it finds the name, outputs the name and phone number into the paragraph (para) and then
exits the loop before it has run its course.
Drawing graphics - Learn web development
using a library because of its compl
exity, most people write 3d graphics code using a third party javascript library such as three.js, playcanvas, or babylon.js.
Object-oriented JavaScript for beginners - Learn web development
remove the code you inserted so far, and add in this replacement constructor — this is exactly the same as the simple example in principle, with just a bit more compl
exity: function person(first, last, age, gender, interests) { this.name = { first : first, last : last }; this.age = age; this.gender = gender; this.interests = interests; this.bio = function() { alert(this.name.first + ' ' + this.name.last + ' is ' + this.age + ' years old.
Working with Svelte stores - Learn web development
ler) => { subs = [...subs, handler] // add handler to the array of subscribers handler(value) // call handler with current value return () => subs = subs.filter(sub => sub !== handler) // return unsubscribe function } const set = (new_value) => { if (value === new_value) return // same value,
exit value = new_value // update value subs.foreach(sub => sub(value)) // update subscribers } const update = (update_fn) => set(update_fn(value)) // update function return { subscribe, set, update } // store contract } here we declare subs, which is an array of subscribers.
Accessible Toolkit Checklist
orting the basic msaa states on every item: unavailable, focused, readonly, offscreen, focusable to avoid extra work, utilize implementing an msaa server mnemonics ability to define in xml for any widget with a text label (via attribute or a preceding char in label) automatically define mnemonics for all standard common dialogs (like yes/no confirmations and retry/
exit error dialogs) support mnemonics in dialogs created via method calls layout engine - drawing underline under correct letter events - making keystrokes do the right thing msaa support, via iaccessible's get_acckeyboardshortcut support for ms windows settings when high contrast checkbox is set (in accessibility control panel, spi_gethighcontrast), or whe...
Debugging Frame Reflow
r=0 a=uc,uc c=uc,15 cnt=871 block 0268a764 r=0 a=uc,uc c=uc,uc cnt=872 block 0268a764 d=0,0 me=0 cell 0268a6c0 d=0,0 me=0 row 0268a594 d=uc,20 value 20 is not a whole pixel rowg 0268a02c d=uc,695 value 695 is not a whole pixel while unaligned values at the entrance of a frame reflow can be ignored, when they appear at the
exit of a routine this can cause display errors like stray lines.
Configuring Build Options
other options mk_add_options autoclobber=1 if a clobber would be required before a build, this will cause mach to clobber and continue with the build instead of asking the user to manually clobber and
exiting.
Makefile - variables
python_unit_tests list of python scripts to check
exit status for make check xpc_shell_tests no_xpcshell_manifest_check inhibit validating manifest files when running xpcshell tests.
Eclipse CDT Manual Setup
for projects the size and compl
exity of mozilla, it's impractical to manually configure eclipse when there is a valid set of defines and includes paths for each of the different parts of the source code.
Inner and outer windows
in order to represent these levels of compl
exity, two "types" of window need to be considered.
Multiple Firefox profiles
launching firefox into a desired profile although it is possible in some cases to have multiple instances of firefox running in different profiles, to avoid confusion, you might want to first
exit/quit/terminate all running instances of firefox, firefox developer edition or nightly.
Embedding Tips
when finished with preview mode, call nsiwebbrowserprint::
exitprintpreview().
How to add a build-time test
(example to run the testcookie program) in the test program: if the test fails,
exit with a non-zero status and/or print the string "fail" to stdout if the test passes,
exit with a zero status and don't print the string "fail" (bonus points for printing "pass" :) ) write the test so that you expect it to pass on all platforms, since if the test fails, the tree will go orange (once we've set this up - see bug 352240 for status).
How to get a stacktrace with WinDbg
q: the first four frames of my stack trace look like this: 0012fe20 7c90e89a ntdll!kifastsystemcallret 0012fe24 7c81cd96 ntdll!zwterminateprocess+0xc 0012ff20 7c81cdee kernel32!_
exitprocess+0x62 0012ff34 6000179e kernel32!
exitprocess+0x14 this looks wrong to me?!
DownloadLastDir.jsm
when the user
exits private browsing mode, the last download directory value is reverted to the preference's value.
Sqlite.jsm
the compl
exities of xpcom are mostly hidden from view.
Task.jsm
; throw new task.result("value"); } note: if you want to
exit early from a generator function, without returning a value for the task, you can just use the return statement without any arguments.
openLocationLastURL.jsm
the value preserved across accesses is not preserved when the user
exits private browsing mode.
Localization content best practices
avoid unnecessary compl
exity in strings consider this string: privacy-link = <p>by proceeding you accept the <a href="https://www.mozilla.org/privacy" class="external">privacy terms</a>.</p> in this case, you shouldn't put the url inside the localization string, unless you need it to be localizable.
mozilla::MonitorAutoEnter
when the mozilla::monitorautoenter goes out of scope, its destructor will
exit() the underlying mozilla::monitorautoenter.
BloatView
xpcom_mem_bloat_log if set, this causes a bloat log to be printed on program
exit, and each time nstracerefcnt::dumpstatistics is called.
Leak Gauge
you must
exit the browser before post-processing the log file or the results will be unreliable.
MailNews automated testing
in the long term we would like to lose this extra compl
exity in favor of the event-loop-spinning style of operation used by mozmill.
Optimizing Applications For NSPR
if the spawned thread establishes and
exits before the parent thread is resumed, the parent will be left with an invalid pointer to the child.
Cached Monitors
pr_c
exitmonitor decrements the entry count associated with a cached monitor.
PR_AttachThread
a native thread not created by nspr is automatically attached the first time it calls an nspr function, and automatically detached when it
exits.
PR_CWait
while the thread is waiting, it
exits the monitor (just as if it had called pr_c
exitmonitor as many times as it had called pr_centermonitor).
PR_Initialize
in addition to establishing the sequence of operations, pr_initialize implicitly calls pr_cleanup on
exiting the primordial function.
PR_Lock
description when pr_lock returns, the calling thread is "in the monitor," also called "holding the monitor's lock." any thread that attempts to acquire the same lock blocks until the holder of the lock
exits the monitor.
PR_NewThreadPrivateIndex
if a destructor function is registered with a new index, it will be called at one of two times, as long as the private data is not null: when replacement private data is set with pr_setthreadprivate when a thread
exits the index maintains independent data values for each binding thread.
Process Initialization
pr_init pr_initialize pr_initialized pr_cleanup pr_disableclockinterrupts pr_blockclockinterrupts pr_unblockclockinterrupts pr_setconcurrency pr_process
exit pr_abort module initialization initialization can be tricky in a threaded environment, especially initialization that must happen exactly once.
NSS FAQ
the integration effort depends on an number of factors, such as developer skill set, application compl
exity, and the level of security required for your application.
Index
if you are installing the keys and certificate in the communicator databases, you must
exit communicator before using this option; otherwise, you risk corrupting the databases.
NSS_3.12_release_notes.html
bug 330721: remove os/2 vacpp compiler support from nss bug 408260: certutil usage doesn't give enough information about trust arguments bug 410226: leak in create_objects_from_handles bug 415007: pk11_findcertfromdersubjectandnickname is dead code bug 416267: compiler warnings on solaris due to extra semicolon in sec_asn1_mksub bug 419763: logger thread should be joined on
exit bug 424471: counter overflow in bltest bug 229335: remove certificates that expired in august 2004 from tree bug 346551: init secitem dertemp in crmf_encode_popoprivkey bug 395080: double backslash in sysdir filenames causes problems on os/2 bug 341371: certutil lacks a way to request a certificate with an existing key bug 382292: add support for camellia to cmd/symkeyutil bug 385642: add additio...
NSS 3.46 release notes
sions in ssl_constructextensions bug 1415118 - nss build with ./build.sh --enable-libpkix fails bug 1539788 - add length checks for cryptographic primitives (cve-2019-17006) bug 1542077 - mp_set_ulong and mp_set_int should return errors on bad values bug 1572791 - read out-of-bounds in der_decodetimechoice_util from sslexp_delegatecredential bug 1560593 - cleanup.sh script does not set error
exit code for tests that "failed with core" bug 1566601 - add wycheproof test vectors for aes-kw bug 1571316 - curve25519_32.c:280: undefined reference to `pr_assert' when building nss 3.45 on armhf-linux bug 1516593 - client to generate new random during renegotiation bug 1563258 - fips.sh fails due to non-existent "resp" directories bug 1561598 - remove -wmaybe-uninitialized warning in pqg.c b...
NSS Sample Code sample4
be in buf1 */ rv = pk11_pubdecryptraw(pvtkey, buf1, &outlen, modulus_len, buf2, modulus_len); if (rv != secsuccess) { fprintf(stderr, "decrypt with private key failed (err %d)\n", pr_geterror()); goto cleanup; } fprintf(stderr, "result of decryption, outlen = %d\n", outlen); fprintf(stderr, "result of decryption, buf = \n%s\n", buf1);
exit(0); cleanup: if (cert) cert_destroycertificate(cert); if (pubkey) seckey_destroypublickey(pubkey); if (pvtkey) seckey_destroyprivatekey(pvtkey); if (buf1) free(buf1); if (buf2) free(buf2);
exit(1); } char *passwdcb(pk11slotinfo *info, prbool retry, void *arg) { if (!retry) return pl_strdup("test"); else return null; } ...
NSS Sample Code sample5
utlen = %d\n", outlen); fprintf(stderr, "result of decryption, buf = \n%s\n", buf1); cleanup: if (cert) cert_destroycertificate(cert); if (pubkey) seckey_destroypublickey(pubkey); if (pvtkey) seckey_destroyprivatekey(pvtkey); if (spki) seckey_destroysubjectpublickeyinfo(spki); if (slot) pk11_freeslot(slot); if (buf1) free(buf1); if (buf2) free(buf2);
exit(1); } ...
NSS Sample Code sample6
*/ rv = nss_initreadwrite("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror());
exit(1); } /* generate a key with id 1.
NSS tools : signtool
if you are installing the keys and certificate in the communicator databases, you must
exit communicator before using this option; otherwise, you risk corrupting the databases.
Rhino Debugger
break on function
exit selecting debug->break on function return will give control to the debugger whenever the execution is about to return from a function or script.
Scripting Java
function can use it to distinguish on behalf of which method it was called: js> var frame = new packages.javax.swing.jframe(); js> frame.addwindowlistener(function(event, methodname) { if (methodname == "windowclosing") { print("calling system.
exit()..."); java.lang.system.
exit(0); } }); js> frame.setsize(100, 100); js> frame.visible = true; true js> calling system.
exit()...
Creating JavaScript tests
even tests that check for polynomial time compl
exity will start to fail in a few years when they have sped up enough to run faster than the granularity of the os scheduler or when run on platforms with higher latencies than your development workstation.
GC Rooting Guide
use js::persistentrooted<t> for things that are alive until the process
exits (or until you manually delete the persistentrooted for a reason not based on gc finalization.) ...
Hacking Tips
args=..., construct=js::no_construct) at js/src/vm/interpreter.cpp:476 #3 0x000000000069bdcf in js::jit::docallfallback(jscontext*, js::jit::baselineframe*, js::jit::iccall_fallback*, uint32_t, js::value*, js::mutablehandlevalue) (cx=0x14f2640, frame=0x7fffffff6ad8, stub_=0x1798838, argc=1, vp=0x7fffffff6a88, res=jsval_void) at js/src/jit/baselineic.cpp:6113 #4 0x00007ffff7f41395 in <<jitframe_
exit>> () #5 0x00007ffff7f42223 in <<jitframe_baselinestub>> () #6 0x00007ffff7f4423d in <<jitframe_baselinejs>> () #7 0x00007ffff7f4222e in <<jitframe_baselinestub>> () #8 0x00007ffff7f4326a in <<jitframe_baselinejs>> () #9 0x00007ffff7f38d5f in <<jitframe_entry>> () #10 0x00000000006a86de in enterbaseline(jscontext*, js::jit::enterjitdata&) (cx=0x14f2640, data=...) at js/src/jit/baselinejit.cpp...
Functions
such a function is guaranteed never to be called again after the enclosing function
exits.
Invariants
the function can be called after control
exits that enclosing scope) then upvar instructions cannot be used for that nameexpression.
JS_GetFunctionCallback
returns the callback currently configured to be called when javascript functions are invoked or
exited, as established by a prior call to js_setfunctioncallback.
Clipboard - Web APIs
due to both potential security concerns and technical compl
exities, the process of integrating this api is happening gradually in most browsers.
ContentIndex - Web APIs
they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentind
exitems = self.registration.index.getall(); specifications specification status comment unknownthe definition of 'contentindex' in that specification.
Content Index API - Web APIs
they are accessible from the workerglobalscope.self property: // service worker script self.registration.index.add(item); self.registration.index.delete(item.id); const contentind
exitems = self.registration.index.getall(); contentdelete event when an item is removed from the user agent interface, a contentdelete event is received by the service worker.
Document: fullscreenchange event - Web APIs
to find out whether the element is entering or
exiting full-screen mode, check the value of documentorshadowroot.fullscreenelement: if this value is null then the element is
exiting full-screen mode, otherwise it is entering full-screen mode.
Element: mouseenter event - Web APIs
combined with the corresponding mouseleave (which is fired at the element when the mouse
exits its content area), the mouseenter event acts in a very similar way to the css :hover pseudo-class.
Element: mouseleave event - Web APIs
this means that mouseleave is fired when the pointer has
exited the element and all of its descendants, whereas mouseout is fired when the pointer leaves the element or leaves one of the element's descendants (even if the pointer is still within the element).
Element.onfullscreenchange - Web APIs
function togglefullscreen() { let elem = document.queryselector("video"); elem.onfullscreenchange = handlefullscreenchange; if (!document.fullscreenelement) { elem.requestfullscreen().then({}).catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.
exitfullscreen(); } } function handlefullscreenchange(event) { let elem = event.target; let isfullscreen = document.fullscreenelement === elem; adjustmycontrols(isfullscreen); } specifications specification status comment fullscreen apithe definition of 'onfullscreenchange' in that specification.
Element - Web APIs
event handlers element.onfullscreenchange an event handler for the fullscreenchange event, which is sent when the element enters or
exits full-screen mode.
Comparison of Event Targets - Web APIs
event type event.target event.relatedtarget mouseover the eventtarget which the pointing device entered the eventtarget which the pointing device
exited mouseout the eventtarget which the pointing device
exited the eventtarget which the pointing device entered todo: also needs descriptions for dragenter and drag
exit events.
Using files from web applications - Web APIs
$_files['myfile']['name']);
exit; } ?><!doctype html> <html> <head> <title>dnd binary upload</title> <meta http-equiv="content-type" content="text/html; charset=utf-8"> <script type="application/javascript"> function sendfile(file) { const uri = "/index.php"; const xhr = new xmlhttprequest(); const fd = new formdata(); xhr.open("post", uri, true); x...
GlobalEventHandlers.onpointerleave - Web APIs
the global event handler for the pointerleave event, which is delivered to a node when the pointer (mouse cursor, fingertip, etc.)
exits its hit test area (for example, if the cursor
exits an element or window's content area).
GlobalEventHandlers - Web APIs
globaleventhandlers.ondrag
exit is an eventhandler representing the code to be called when the drag
exit event is raised.
HashChangeEvent - Web APIs
here is a version that allows only one handler to be bound to the onhashchange property: ;(function(window) { //
exit if the browser implements that event if ( "onhashchange" in window.document.body ) { return; } var location = window.location, oldurl = location.href, oldhash = location.hash; // check the location hash on a 100ms interval setinterval(function() { var newurl = location.href, newhash = location.hash; // if the hash has changed and a handler has been bound...
Intersection Observer API - Web APIs
the intersection observer api lets code register a callback function that is executed whenever an element they wish to monitor enters or
exits another element (or the viewport), or when the amount by which the two intersect changes by a requested amount.
KeyboardEvent.charCode - Web APIs
actually with the chinese ime i'm using, entering the ime results in a keypress event with keycode = 229 and no other key events fire until the ime
exits (which may happen after multiple characters are inputted).
MediaRecorder.mimeType - Web APIs
}) .catch(function(error) { console.log(error.message); }); changing line 14 to the following causes mediarecorder to try to use avc constrained baseline profile level 4 for video and aac-lc (low compl
exity) for audio, which is good for mobile and other possible resource-constrained situations.
Multi-touch interaction - Web APIs
this additional feature can be used to provide richer user interaction models but at the cost of additional compl
exity in the multi-touch interaction handling.
Using Touch Events - Web APIs
the introduction of new input mechanisms results in increased application compl
exity to handle various input events, such as key events, mouse events, pen/stylus events, and touch events.
WebGL model view projection - Web APIs
next, objects which partially extrude outside the viewing frustum are clipped by dropping any polygons which are entirely outside the frustum, and by clipping the polygons which cross outside the frustrum so that they no longer
exit it.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
"offer") { await pc.setlocaldescription(); signaler.send(description: pc.localdescription); } } else if (candidate) { try { await pc.addicecandidate(candidate); } catch(err) { if (!ignoreoffer) { throw err; } } } } catch(err) { console.error(err); } } while the difference in code size is minor, and the compl
exity isn't reduced much either, the code is much, much more reliable.
WebXR application life cycle - Web APIs
when the time comes (such as when the user
exits your app or navigates away from your site), end the xr session; otherwise, continue the loop until the user chooses to
exit xr mode.
Using Web Workers - Web APIs
there is a bit more compl
exity here as well (worker.js): onconnect = function(e) { var port = e.ports[0]; port.onmessage = function(e) { var workerresult = 'result: ' + (e.data[0] * e.data[1]); port.postmessage(workerresult); } } first, we use an onconnect handler to fire code when a connection to the port happens (i.e.
Window.confirm() - Web APIs
example if (window.confirm("do you really want to leave?")) { window.open("
exit.html", "thanks for visiting!"); } produces: notes the following text is shared between this article, dom:window.prompt and dom:window.alert dialog boxes are modal windows — they prevent the user from accessing the rest of the program's interface until the dialog box is closed.
XRReferenceSpace: reset event - Web APIs
for a bounded-floor reference space, the coordinate system can be reset if the user
exits the boundaries of the reference space and enters a new one (such as by crossing from one level to another in a game, where each level is its own map with its own coordinate system).
ARIA: timer role - Accessibility
the author of the timer must take full responsibility for not letting users get stuck in a focus limbo or trap focus inside something the user cannot
exit of.
ARIA: application role - Accessibility
the author of the application must take full responsibility for not letting users get stuck in a focus limbo or trap focus inside something the user cannot
exit of.
Web Accessibility: Understanding Colors and Luminance - Accessibility
in the article, certain colors more likely to cause epileptic fits, researchers find, the authors noted that "..compl
exities underlying brain dynamics could be modulated by certain color combinations more than the other, for example, red-blue flickering stimulus causes larger cortical excitation than red-green or blue-green stimulus.." adaption our eyes don't adapt equally, in the same way, going from light areas to dark ones, and vice versa.
Understandable - Accessibility
for example, if pressing a button causes the application to
exit the current view, the user should be asked to confirm this action, save their work if appropriate, etc.
@supports - CSS: Cascading Style Sheets
the following example returns true if the browser's transform-origin property doesn't consider 10em 10em 10em valid: @supports not (transform-origin: 10em 10em 10em) {} as with any operator, the not operator can be applied to a declaration of any compl
exity.
Coordinate systems - CSS: Cascading Style Sheets
whenever the mouse enters, moves around inside, or
exits the inner box, the corresponding event is handled by updating a set of informational messages within the box, listing out the current mouse coordinates in each of the four available coordinate systems.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
safari datalist listitem div { color: black; -moz-appearance: listitem; -webkit-appearance: listitem; } <div>lorem</div> firefox chrome safari edge media-enter-fullscreen-button div{ color: black; -webkit-appearance: media-enter-fullscreen-button; } <div>lorem</div> chrome safari media-
exit-fullscreen-button div{ color: black; -webkit-appearance: media-
exit-fullscreen-button; } <div>lorem</div> chrome safari media-fullscreen-volume-slider div{ color: black; -moz-appearance: media-fullscreen-volume-slider; -webkit-appearance: media-fullscreen-volume-slider; } <div>lorem</div> safari media-full...
set:intersection() - EXSLT
in other words, it returns a node-set containing all the nodes that
exits in both nodeset1 and nodeset2.
Sets (set) - EXSLT
in other words, it returns a node-set containing all the nodes that
exits in both nodeset1 and nodeset2.set:leading()set:leading() returns the nodes in one node-set that come before the first node in the other node-set.set:trailing()set:trailing() returns the nodes in one node-set that come after the first node in the other node-set.
Event reference
drag
exit dragevent mozilla specific a drag operation is being ended (use dragend instead).
Global attributes - HTML: Hypertext Markup Language
the event handler attributes: onabort, onautocomplete, onautocompleteerror, onblur, oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncontextmenu, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondrag
exit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onse...
Evolution of HTTP - HTTP
theoretically, several parallel connections could be used (typically between 5 and 8), bringing considerable overhead and compl
exity.
HTTP caching - HTTP
in order to have the new versions, all the links to them must be changed, that is the drawback of this method: additional compl
exity that is usually taken care of by the tool chain used by web developers.
CSP: report-uri - HTTP
$log_file; mail($email_address, $email_subject, $message, 'content-type: text/plain;charset=utf-8'); } else if (filesize($log_file) > $log_file_size_limit) {
exit(0); } file_put_contents($log_file, $json_data, file_append | lock_ex); } specifications specification status comment content security policy level 3the definition of 'report-uri' in that specification.
Loops and iteration - JavaScript
this expression usually initializes one or more loop counters, but the syntax allows an expression of any degree of compl
exity.
Warning: unreachable code after return statement - JavaScript
warnings will not be shown for semicolon-less returns if these statements follow it: throw break var function examples invalid cases function f() { var x = 3; x += 4; return x; // return
exits the function immediately x -= 3; // so this line will never run; it is unreachable } function f() { return // this is treated like `return;` 3 + 4; // so the function returns, and this line is never reached } valid cases function f() { var x = 3; x += 4; x -= 3; return x; // ok: return after all other statements } function f() { return 3 + 4 // ok: semicolon-le...
for...of - JavaScript
upon
exiting a loop, the generator is closed and trying to iterate over it again does not yield any further results.
Digital audio concepts - Web media technologies
whereas lossless compression algorithms usually manage no better than a 40-50% of the size of the original, uncompressed sound data, modern lossy compression algorithms can reduce the size of the audio to between 5-20% of the original size, depending on the compl
exity of the audio.
Lazy loading - Web Performance
polyfill include this polyfill to provide support for older and currently incompatible browsers: loading-attribute-polyfill intersection observer api intersection observers allow the user to know when an observed element enters or
exits the browser’s viewport.
Privacy, permissions, and information security
while specifications for these technologies either state or recommend tactics for handling situations like this, browsers may offer different solutions to improve security even further or to try new features, or try to reduce compl
exity for users, among other possible reasons.
SVG Event Attributes - SVG: Scalable Vector Graphics
attributes animation event attributes onbegin, onend, onrepeat document event attributes onabort, onerror, onresize, onscroll, onunload document element event attributes oncopy, oncut, onpaste global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondrag
exit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onse...
SVG Attribute reference - SVG: Scalable Vector Graphics
to, by, autoreverse, accelerate, decelerate animation addition attributes additive, accumulate event attributes animation event attributes onbegin, onend, onrepeat document event attributes onabort, onerror, onresize, onscroll, onunload global event attributes oncancel, oncanplay, oncanplaythrough, onchange, onclick, onclose, oncuechange, ondblclick, ondrag, ondragend, ondragenter, ondrag
exit, ondragleave, ondragover, ondragstart, ondrop, ondurationchange, onemptied, onended, onerror, onfocus, oninput, oninvalid, onkeydown, onkeypress, onkeyup, onload, onloadeddata, onloadedmetadata, onloadstart, onmousedown, onmouseenter, onmouseleave, onmousemove, onmouseout, onmouseover, onmouseup, onmousewheel, onpause, onplay, onplaying, onprogress, onratechange, onreset, onresize, onscroll, onse...
Compiling a New C/C++ Module to WebAssembly - WebAssembly
(note that we need to compile with no_
exit_runtime, which is necessary as otherwise when main()
exits the runtime would be shut down — necessary for proper c emulation, e.g., at
exits are called — and it wouldn't be valid to call compiled code.) emcc -o hello3.html hello3.c -o3 -s wasm=1 --shell-file html_template/shell_minimal.html -s no_
exit_runtime=1 -s "extra_exported_runtime_methods=['ccall']" if you load the example in ...