Search completed in 1.17 seconds.
1220 results for "operation":
Your results are loading. Please wait...
Drag Operations - Web APIs
the following describes the steps that occur during a drag and drop operation.
... the drag operations described in this document use the datatransfer interface.
... starting a drag operation in this example, a listener is added for the dragstart event by using the ondragstart attribute.
...And 22 more matches
JS_SetOperationCallback
syntax void js_setoperationcallback(jscontext *cx, jsoperationcallback callback); jsoperationcallback js_getoperationcallback(jscontext *cx); void js_triggeroperationcallback(jsruntime *rt); name type description cx jscontext * a context.
... callback jsoperationcallback (only in js_setoperationcallback) the callback function to install.
... callback syntax jsbool (*jsoperationcallback)(jscontext *cx); name type description cx jscontext * pointer to a jscontext in which this callback was installed.
...And 15 more matches
FC_GetOperationState
name fc_getoperationstate - get the cryptographic operation state of a session.
... syntax ck_rv fc_getoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong_ptr puloperationstatelen ); parameters hsession [in] handle of the open session.
... poperationstate [out] pointer to a byte array of a length sufficient for containing the operation state or null.
...And 5 more matches
FC_SetOperationState
name fc_setoperationstate - restore the cryptographic operation state of a session.
... syntax ck_rv fc_setoperationstate( ck_session_handle hsession, ck_byte_ptr poperationstate, ck_ulong uloperationstatelen, ck_object_handle hencryptionkey, ck_object_handle hauthenticationkey ); parameters hsession [in] handle of the open session.
... poperationstate [in] pointer to a byte array containing the operation state.
...And 5 more matches
Atomic Operations
this chapter describes the global functions you use to perform atomic operations.
... atomic operations functions the api defined for the atomic functions is consistent across all supported platforms.
...for such systems, nspr performs atomic operations just as efficiently as the client could.
... therefore, to preserve portability, it is recommended that clients use the nspr api for atomic operations.
CanvasRenderingContext2D.globalCompositeOperation - Web APIs
the canvasrenderingcontext2d.globalcompositeoperation property of the canvas 2d api sets the type of compositing operation to apply when drawing new shapes.
... syntax ctx.globalcompositeoperation = type; type is a string identifying which of the compositing or blending mode operations to use.
... types examples changing the composite operation this example uses the globalcompositeoperation property to draw two rectangles that exclude themselves where they overlap.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); ctx.globalcompositeoperation = 'xor'; ctx.fillstyle = 'blue'; ctx.fillrect(10, 10, 100, 100); ctx.fillstyle = 'red'; ctx.fillrect(50, 50, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.globalcompositeoperation' in that specification.
Debug.msTraceAsyncOperationStarting - Archive of obsolete content
initiates a trace for an asynchronous operation.
Block cipher mode of operation - MDN Web Docs Glossary: Definitions of Web-related terms
a block cipher mode of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size.
Firefox Operational Information Database: SQLite
a large amount of operational information about websites visited and browser configuration is stored in relational databases in sqlite used by firefox.
FIPS mode of operation
general-purpose functions fc_getfunctionlist fc_initialize fc_finalize fc_getinfo slot and token management functions fc_getslotlist fc_getslotinfo fc_gettokeninfo fc_waitforslotevent fc_getmechanismlist fc_getmechanisminfo fc_inittoken fc_initpin fc_setpin session management functions fc_opensession fc_closesession fc_closeallsessions fc_getsessioninfo fc_getoperationstate fc_setoperationstate fc_login fc_logout object management functions these functions manage certificates and keys.
Index - Web APIs
WebAPIIndex
73 animation.pending api, animation, animations, property, reference, web animations, web animations api the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
... 374 budgetservice.getcost() api, budgetservice, method, reference, web budget api, getcost the getcost() property of the budgetservice interface returns a promise that resolves to a double indicating the worst-case background operation cost of the provided background operation.
... 375 budgetservice.reserve() api, budgetservice, method, reference, web budget api, reserve the reserve() property of the budgetservice interface returns a promise that resolves to a boolean indicating whether the requested budget operation can be reserved.
...And 90 more matches
Mail composition back end
pizzarro <rhp@netscape.com> contents overview sending messages nsimsgsend sending listener interfaces nsimsgsendlistener nsimsgcopyservicelistener copy operations copy to sent folder drafts templates "send later" sending unsent messages sending unsent messages listener quoting sample programs overview i've done considerable work in the past few weeks reorganizing the mail composition back end, so i thought it would be helpful to put together a small doc on the new interfaces and how one can use them.
...all of these methods are asynchronous operations.
... createandsendmessage the createandsendmessage method will create an rfc822 message and send it all in one operation as well as providing the ability to save disk files for later use.
...And 45 more matches
Index
in order to allow interoperability between software and devices that perform cryptographic operations, nss conforms to a standard called pkcs#11.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
... many (if not most) of the operations performed by nss involve the use of x.509 certificates (often abbreviated as “cert”, unfortunately making it easy to confuse with the term “computer emergency response team“).
...And 37 more matches
nsIZipWriter
operations on the archive can be performed one by one, or queued for later execution.
... 1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) once all the operations you wish to perform are added to the queue, a call to processqueue() will perform the operations in the order they were added to the queue.
... operations performed on the queue throw any errors that occur out to the observer.
...And 19 more matches
WebIDL bindings
c++ reflections of webidl constructs c++ reflections of webidl operations (methods) a webidl operation is turned into a method call on the underlying c++ object.
... the name of the c++ method is simply the name of the webidl operation with the first letter converted to uppercase.
...otherinstance); [throws] myinterface dosomethingelse(optional long maybenumber); [throws] void dosomethingelse(myinterface otherinstance); void dotheother(any something); void doyetanotherthing(optional boolean actuallydoit = false); static void staticoperation(any arg); }; will require these method declarations: class myclass { void dosomething(int32_t anumber); double dosomething(myclass* aotherinstance); already_addrefed<myinterface> dosomethingelse(optional<int32_t> amaybenumber, errorresult& rv); void dosomethingelse(myclass& aotherinstance, errorresult& rv); void dotheother(jscontext* ...
...And 15 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
multipart functions, such as bulk encryption, hashing, and mac functions (for example, c_digest and c_sign) and those that require overlapped operation (c_unwrap, c_decrypt) are handled by creating new sessions.
... if no new sessions are available, the one read-only session is used, and the state is saved and restored after each multipart operation.
...if you do not actually do the operation specified by that function, you can return ckr_function_not_supported.
...And 14 more matches
sslfnc.html
if you are performing operations that require write permission, for example s/mime operations such as adding a certificate, use nss_initreadwrite instead.
...therefore, an application cannot use nss to perform any cryptographic operations until after it enables appropriate cipher suites by calling one of the ssl export policy functions: nss_setdomesticpolicy, nss_setexportpolicy, and nss_setfrancepolicy configure the cipher suites for domestic, international, and french versions of software products with encryption features.
... use nss_initreadwrite rather than nss_init if you are performing operations that require write permission, such as some s/mime operations.
...And 14 more matches
NSS Tools modutil
you can use the tool to add and delete pkcs #11 modules, change passwords, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
...use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity.
...bling a specific slot or all slots within a module: -enable modulename [-slot slotname] disabling a specific slot or all slots within a module: -disable modulename [-slot slotname] enabling or disabling fips 140-2 compliance within the netscape communicator internal module: -fips [true | false] disabling interactive prompts for the security module database tool, to support scripted operation: -force jar installation file when a jar file is run by a server, by the security module database tool, or by any program that does not interpret javascript, a special information file must be included in the format described below.
...And 14 more matches
Index
MozillaTechXPCOMIndex
24 components.issuccesscode xpcom, xpcom:language bindings, xpconnect determines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.
...however, many things cause various database operations to be slow.
... 116 making cross-thread calls using runnables guide, threads, xpcom in the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
...And 14 more matches
Enhanced Extension Installation - Archive of obsolete content
there are not enough guards in the upgrade and uninstall process to handle failure and abort the operation, restoring the previous state.
... for extensions, on the next startup, the startup system notices the presence of the .autoreg file and starts the extension manager with a "dirty" flag, telling it to finish any install operations that may be pending.
... optionally, an operation key that tells the startup system that there is an install operation pending that needs to be finalized, e.g.
...And 13 more matches
Graceful asynchronous programming with Promises - Learn web development
this is useful for setting up a sequence of async operations to work correctly.
... essentially, a promise is an object that represents an intermediate state of an operation — in effect, a promise that a result of some kind will be returned at some point in the future.
... there is no guarantee of exactly when the operation will complete and the result will be returned, but there is a guarantee that when the result is available, or the promise fails, the code you provide will be executed in order to do something else with a successful result, or to gracefully handle a failure case.
...And 13 more matches
source-editor.jsm
method overview initialization and destruction void destroy(); void init(element aelement, object aconfig, function acallback); search operations number find(string astring, [optional] object options); number findnext(boolean awrap); number findprevious(boolean awrap); event management void addeventlistener(string aeventtype, function acallback); void removeeventlistener(string aeventtype, function acallback); undo stack operations boolean canredo(); boolea...
...n canundo(); void endcompoundchange(); boolean redo(); void resetundo(); void startcompoundchange(); boolean undo(); display management operations void focus(); number gettopindex(); boolean hasfocus(); void settopindex(number atopindex); content management operations number getcharcount(); string getindentationstring(); string getlinedelimiter(); number getlinecount(); number getlineend(number alineindex, boolean aincludedelimiter); number getlinestart(number alineindex); string getmode(); string gettext([optional] number astart, [optional] number aend); string getselectedtext(); void setmode(string amode); ...
... void settext(string atext, [optional] number astart, [optional] number aend); selection operations void dropselection(); number getcaretoffset(); object getcaretposition(); object getselection(); void setcaretoffset(number aoffset); void setcaretposition(number aline, [optional] number acolumn, [optional] number aalign); void setselection(number astart, number aend); breakpoint management void addbreakpoint(number alineindex, [optional] string acondition); array getbreakpoints(); boolean removebreakpoint(number alineindex); properties attribute type description dirty boolean set this value to false whenever you save the text; the editor will updat...
...And 13 more matches
NSPR Error Handling
pr_would_block_error the operation would have blocked, which conflicts with the semantics that have been established.
... pr_pending_interrupt_error the operation terminated because another thread has interrupted it with pr_interrupt.
... pr_io_timeout_error the i/o operation has not completed in the time specified for the preceding function.
...And 13 more matches
Index
13 jit optimization outcomes beginner, firefox, intro, needscontent, spidermonkey spidermonkey's optimizing jit, ionmonkey, uses different optimization strategies to speed up various operations.
... the most typical operations that are relevant for fast program execution are property accesses and function calls.
... 14 jit optimization strategies junk, spidermonkey spidermonkey's optimizing jit, ionmonkey, uses various strategies to optimize operations.
...And 13 more matches
Index - Archive of obsolete content
428 drag and drop events firefox 3 firefox 3 adds two new events that allow you to determine when drag operations begin and end.
... 1748 commands tutorials, xul, xul_tutorial a command is an operation which may be invoked.
... 1839 command xul elements, xul reference a command element can be used to invoke an operation that can come from multiple sources.
...And 12 more matches
HTML Drag and Drop API - Web APIs
a translucent representation of the draggable elements follows the pointer during the drag operation.
...a typical drag operation begins when a user selects a draggable element, drags the element to a droppable element, and then releases the dragged element.
... during drag operations, several event types are fired, and some events might fire many times, such as the drag and dragover events.
...And 12 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
46 color-interpolation-filters needsexample, svg, svg attribute the color-interpolation-filters attribute specifies the color space for imaging operations performed via filter effects.
... 48 color-rendering svg, svg attribute the color-rendering attribute provides a hint to the svg user agent about how to optimize its color interpolation and compositing operations.
... 65 edgemode filters, needscompattable, needsexample, svg, svg attribute the edgemode attribute determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
...And 12 more matches
Introducing asynchronous JavaScript - Learn web development
while each operation is being processed, nothing else can happen — rendering is paused.
...only one thing can happen at a time, on a single main thread, and everything else is blocked until an operation completes.
...you can try it for yourself: <button>click me</button> note: it is important to remember that alert(), while being very useful for demonstrating a synchronous blocking operation, is terrible for use in real world applications.
...And 11 more matches
DOMException - Web APIs
(legacy code value: 8 and legacy constant name: not_found_err) notsupportederror the operation is not supported.
...(legacy code value: 13 and legacy constant name: invalid_modification_err) namespaceerror the operation is not allowed by namespaces in xml.
... (legacy code value: 14 and legacy constant name: namespace_err) invalidaccesserror the object does not support the operation or argument.
...And 11 more matches
FileHandle API - Web APIs
basic operations create a filehandle because the intent is to allow the storage of files through indexeddb, creating a filehandle instance requires an indexeddb database.
... perform read and write operations to read or write within a handled file, it is required to get a lockedfile.
... writing there are three possible writing operations on a locked file: write : it's an arbitrary writing method which starts writing in the file at the lockedfile.location byte.
...And 11 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
content/clock.xul content/clock.js the xul to display a clock in the window, and the javascript to control its operation (these files will be used in phase 2).
... test install and operational check this brings us to the point where we finally install our hello world extension.
... <hbox align="center"> <label value="current time:" /> <textbox id="currenttime" /> </hbox> </dialog> listing 6: content for clock.js function initclock() { showcurrenttime(); window.setinterval(showcurrenttime, 1000); } function showcurrenttime() { var textbox = document.getelementbyid("currenttime"); textbox.value = new date().tolocaletimestring(); textbox.select(); } operations check perform an operations check to make sure that your changes to the source file are correct.
...And 9 more matches
Debug - Archive of obsolete content
constants async callback status codes contant description value debug.ms_async_callback_status_assign_delegate the synchronous work item assigned a callback or continuation to be run by an asynchronous operation.
... 0 debug.ms_async_callback_status_join the synchronous work item satisfied part of a join asynchronous operation.
... 1 debug.ms_async_callback_status_chooseany the synchronous work item satisfied a choice asynchronous operation.
...And 9 more matches
Choosing the right approach - Learn web development
asynchronous callbacks generally found in old-style apis, involves a function being passed into another function as a parameter, which is then invoked when an asynchronous operation has been completed, so that the callback can in turn do something with the result.
... single delayed operation repeating operation multiple sequential operations multiple simultaneous operations no yes (recursive callbacks) yes (nested callbacks) no code example an example that loads a resource via the xmlhttprequest api (run it live, and see the source): function loadasset(url, type, callback) { let xhr = new xmlhttprequest(); xhr.open('get', url); xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.appendc...
... single delayed operation repeating operation multiple sequential operations multiple simultaneous operations yes yes (recursive timeouts) yes (nested timeouts) no code example here the browser will wait two seconds before executing the anonymous function, then will display the alert message (see it running live, and see the source code): let mygreeting = settimeout(function() { alert...
...And 9 more matches
Error codes returned by Mozilla APIs
ns_error_abort (0x80004004) this error indicates that an operation failed and the caller should abort whatever action is being performed.
... this typically will occur if an operation could not complete properly.
... ns_error_unexpected (0x8000ffff) an operation did not complete due to a condition which was not expected.
...And 9 more matches
Performance
however, many things cause various database operations to be slow.
...this operation is extremely slow.
...one major problem is that the queue of file operations will get very long if there are many transactions.
...And 9 more matches
Address book sync client design
pizzarro <rhp@netscape.com> contents overview client side sync logic public interfaces overview there is an component available in the mozilla tree for performing synchronization operations against a server based address book.
...the static information that is held on the client for address book sync operations is stored in a file called absync.dat which is located in the root directory of the users profile information.
... // flags - operation to apply to this record.
...And 9 more matches
Commands - Archive of obsolete content
« previousnext » a command is an operation which may be invoked.
... command elements the command element is used to create commands which can be used to carry out operations.
...commands provide a suitable way to abstract operations from the code.
...And 8 more matches
sslerr.html
ssl_error_unsupported_certificate_type -12280 "unsupported certificate type." the operation encountered a certificate that was not one of the well known certificate types handled by the certificate library.
... ssl_error_token_insertion_removal -12205 "pkcs #11 token was inserted or removed while operation was in progress." a cryptographic operation required to complete the handshake failed because the token that was performing it was removed while the handshake was underway.
... ssl_error_token_slot_not_found -12204 "no pkcs#11 token could be found to do a required operation." a cryptographic operation required a pkcs#11 token with specific abilities, and no token could be found in any slot, including the "soft token" in the internal virtual slot, that could do the job.
...And 8 more matches
JIT Optimization Strategies
spidermonkey's optimizing jit, ionmonkey, uses various strategies to optimize operations.
... the most commonplace operations that are relevant for fast program execution are property accesses and function calls.
... optimization information is currently collected for the following operations: getproperty (obj.prop) setproperty (obj.prop = val) getelement (obj[elemname]) setelement (obj[elemname] = val) call (func(...)) at each operation site, ionmonkey tries a battery of strategies, from the most optimized but most restrictive to the least optimized but least restrictive.
...And 8 more matches
OS.File for the main thread
oin('c:', 'jean', 'testrenamed.txt')); promise.then( function() { console.log('rename successful') }, function(arejectreason) { console.log('rename failed, arejectreason = ', arejectreason) } ) the nooverwrite true is important, as default is false which means if a file in the directory exists already with the same name it will no longer be there after this "rename" operation, which is a "move".
...on most operating systems, this operation is handled directly by the operating system itself, which makes it as fast as possible.
... this operation is os-optimized under os x (native operation copyfile), linux/android (native operation splice), and windows (native operation copyfile).
...And 7 more matches
Introduction to NSPR
the netscape portable runtime (nspr) api allows compliant applications to use system facilities such as threads, thread synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
...each thread has a built-in per-thread error number and error string that are updated when nspr operations fail.
...in the latter case, interruption does cancel the i/o operation.
...And 7 more matches
nss tech note5
using nss to perform miscellaneous cryptographic operations nss technical note: 5 nss project info is at http://www.mozilla.org/projects/security/pki/nss/ you can browse the nss source online at http://lxr.mozilla.org/mozilla/source/security/nss/ and http://lxr.mozilla.org/security/ be sure to look for sample code first for things you need to do.
... ck_mechanism_type ciphermech = ckm_des_cbc_pad <big>(for example)</big> choose a slot on which to to do the operation pk11slotinfo* slot = pk11_getbestslot(ciphermech, null); or pk11slotinfo* slot = pk11_getinternalkeyslot(); /* alwys returns internal slot, may not be optimal */ prepare the key if using a raw key /* turn the raw key into a secitem */ secitem keyitem; keyitem.data = /* ptr to an array of key bytes */ keyitem.len = /* length of the array of ke...
...ng the key and parameter setup in above steps</big> create encryption context pk11context* enccontext = pk11_createcontextbysymkey(ciphermech, cka_encrypt or cka_decrypt, symkey, secparam); do the operation.
...And 7 more matches
PKCS #11 Module Specs
cipherorder - integer value specifiying the order in which tokens are searched when looking for a token to do a generic operation (des/hashing, etc).
... valid flags are: rsa - this token should be used for all rsa operations (other than private key operations where the key lives in another token).
... dsa - this token should be used for all dsa operations (other than private key operations where the key lives in another token).
...And 7 more matches
An overview of NSS Internals
in order to allow interoperability between software and devices that perform cryptographic operations, nss conforms to a standard called pkcs#11.
...this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
... many (if not most) of the operations performed by nss involve the use of x.509 certificates (often abbreviated as “cert”, unfortunately making it easy to confuse with the term “computer emergency response team“).
...And 6 more matches
JIT Optimization Outcomes
spidermonkey's optimizing jit, ionmonkey, uses different optimization strategies to speed up various operations.
... the most typical operations that are relevant for fast program execution are property accesses and function calls.
... noanalysisinfo todo noshapeinfo the baseline compiler recorded no usable shape information for this operation.
...And 6 more matches
IDBDatabaseException - Web APIs
in the indexeddb api, an idbdatabaseexception object represents exception conditions that can be encountered while performing database operations.
... constraint_err 4 a mutation operation in the transaction failed because a constraint was not satisfied.
... data_err 5 data provided to an operation does not meet requirements.
...And 6 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
35 block cipher mode of operation block cipher mode of operation, cryptography, glossary, security a block cipher mode of operation, usually just called a "mode" in context, specifies how a block cipher should be used to encrypt or decrypt messages that are longer than the block size.
... crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
... 122 dynamic programming language codingscripting, glossary a dynamic programming language is a programming language in which operations otherwise done at compile-time can be done at run-time.
...And 5 more matches
General asynchronous programming concepts - Learn web development
in our simple-sync.html example (see it running live), we add a click event listener to a button so that when clicked, it runs a time-consuming operation (calculates 10 million dates then logs the final one to the console) and then adds a paragraph to the dom: const btn = document.queryselector('button'); btn.addeventlistener('click', () => { let mydate; for(let i = 0; i < 10000000; i++) { let date = new date(); mydate = date } console.log(mydate); let pelem = document.createelement('p'); pelem.textcontent = 'this is a newly...
...the code runs in the order it appears in the source, and the later operation doesn't run till the earlier operation has finished running.
... function expensiveoperation() { for(let i = 0; i < 1000000; i++) { ctx.fillstyle = 'rgba(0,0,255, 0.2)'; ctx.beginpath(); ctx.arc(random(0, canvas.width), random(0, canvas.height), 10, degtorad(0), degtorad(360), false); ctx.fill() } } fillbtn.addeventlistener('click', expensiveoperation); alertbtn.addeventlistener('click', () => alert('you clicked me!') ); if you click the first button and then qui...
...And 5 more matches
Client-Server Overview - Learn web development
objective: to understand client-server interactions in a dynamic website, and in particular what operations need to be performed by server-side code.
... the diagram below shows the main elements of the "team coach" website, along with numbered labels for the sequence of operations when the coach accesses their "best team" list.
... after the coach submits the form with the team name and number of players, the sequence of operations is: the web browser creates an http get request to the server using the base url for the resource (/best) and encoding the team and player number either as url parameters (e.g.
...And 5 more matches
Mozilla's Section 508 Compliance
(d) sufficient information about a user interface element including the identity, operation and state of the element shall be available to assistive technology.
... functional performance criteria requirement windows linux/unix mac os requirement windows linux/unix mac os a) at least one mode of operation and information retrieval that does not require user vision shall be provided, or support for assistive technology used by people who are blind or visually impaired shall be provided.
...gnopernicus support in beta no screen reader support on mac os x b) at least one mode of operation and information retrieval that does not require visual acuity greater than 20/70 shall be provided in audio and enlarged print output working together or independently, or support for assistive technology used by people who are visually impaired shall be provided.
...And 5 more matches
NSS API Guidelines
same level as ssl lib/crmf cmmf.h, crmf.h, crmft.h, cmmft.h, crmffut.h cryptohi provides high-level cryptographic support operations: such as signing, verifying signatures, key generation, key manipulation, hashing; and data types.
... pkcs #11 lib/fortcrypt cryptint.h, fmutex.h, fortsock.h, fpkcs11.h, fpkcs11f.h, fpkcs11t.h, fpkmem.h, fpkstrs.h, genci.h, maci.h freebl provides the api to actual cryptographic operations.
...you must supply a library that implements the cryptographic operations, such as bsafe from rsa security.
...And 5 more matches
Bytecode Descriptions
format: jof_ic binary operators bitor, bitxor, bitand stack: lval, rval ⇒ (lval op rval) binary bitwise operations (|, ^, &).
...both operations call a js method which scripts can define however they want, so they check afterwards that the method returned an object.
...the spec says this operation takes one argument, but that argument is a record with two relevant fields, [[iterator]] and [[nextmethod]].
...And 5 more matches
Web Replay
inter-thread non-determinism is handled by first assuming the program is data race free: shared memory accesses which would otherwise race are either protected by locks or use apis that perform atomic operations.
... the following executions are unlikely to be supported by the initial release, but should be able to be handled at some point in the future: on x64, asm.js code relies on mprotect to handle out of bounds heap accesses; mprotect works differently while replaying, so some cooperation will be needed between the asm.js exception handler and the dirty memory exception handler.
... there is a new onpopframe handler, which is needed when doing reverse-step-in operations.
...And 5 more matches
nsIClipboard
widget/nsiclipboard.idlscriptable this interface supports basic clipboard operations such as: setting, retrieving, emptying, matching and supporting clipboard data.
...n long awhichclipboard); boolean hasdatamatchingflavors([array, size_is(alength)] in string aflavorlist, in unsigned long alength, in long awhichclipboard); void setdata(in nsitransferable atransferable, in nsiclipboardowner anowner, in long awhichclipboard); boolean supportsselectionclipboard(); boolean supportsfindclipboard(); constants most clipboard operations in firefox use kglobalclipboard, which is the one also used by the typical control-c/control-v keyboard shortcuts.
... the kselectionclipboard is peculiar to the x windows system, where it refers to the primary selection, which is the one that simple mouse selection and middle-click paste operations are using.
...And 5 more matches
nsIContentPrefService2
callback optional handlecompletion is called when the operation completes.
... callback optional handlecompletion is called when the operation completes.
... callback optional handlecompletion is called when the operation completes.
...And 5 more matches
DataTransfer.effectAllowed - Web APIs
the datatransfer.effectallowed property specifies the effect that is allowed for a drag operation.
... the copy operation is used to indicate that the data being dragged will be copied from its present location to the drop location.
... the move operation is used to indicate that the data being dragged will be moved, and the link operation is used to indicate that some form of relationship or connection will be created between the source and drop locations.
...And 5 more matches
Basic concepts - Web APIs
without transactional operations, the two instances could interfere with each other's modifications.
...instead, you "request" that a database operation happens.
... you get notified by a dom event when the operation finishes, and the type of event you get lets you know if the operation succeeded or failed.
...And 5 more matches
Event reference
dragend a drag operation is being ended (by releasing a mouse button or hitting the escape key).
... seeked a seek operation completed.
... seeking a seek operation began.
...And 5 more matches
Expressions and operators - JavaScript
there are also compound assignment operators that are shorthand for the operations listed in the following table: compound assignment operators name shorthand operator meaning assignment x = y x = y addition assignment x += y x = x + y subtraction assignment x -= y x = x - y multiplication assignment x *= y x = x * y division assignment x /= y x = x / y remainder assignment...
... in the case of logical assignments, (x &&= y), (x ||= y), and (x ??= y), the return value is that of the logical operation without the assignment, so x && y, x || y, and x ??
... note that the return values are always based on the operands’ values before the operation.
...And 5 more matches
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
the debug.mstraceasynccallbackcompleted function indicates that an asynchronous operation has completed.
... syntax debug.mstraceasynccallbackcompleted() parameters asyncoperationid the id associated with the asynchronous operation.
... status optional the status of the asynchronous operation.
...And 4 more matches
HTML parser threading
additionally, each nshtml5parser has an associated nshtml5treeopexecutor that turns the output (tree operations; discussed later) of the portable parser core into actions performed on the gecko dom.
...the tokenizer calls into the tree builder which outputs nshtml5treeoperation objects (tree ops) into a queue.
... each tree op represents a small operation, such as element creation or appending a node into another, that can later be performed on the main thread.
...And 4 more matches
JSS Provider Notes
it implements cryptographic operations in native code using the nss libraries.
... specifying the cryptotoken all cryptographic operations in jss and nss occur on a particular pkcs #11 token, implemented in software or hardware.
...by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss.
...And 4 more matches
Mozilla-JSS JCA Provider notes
it implements cryptographic operations in native code using the nss libraries.
...specifying the cryptotoken all cryptographic operations in jss and nss occur on a particular pkcs #11 token, implemented in software or hardware.
...by default, the jss provider carries out all operations except messagedigest on the internal key storage token, a software token included in jss/nss.
...And 4 more matches
NSS cryptographic module
this chapter describes the data types and functions that one can use to perform cryptographic operations with the nss cryptographic module.
... the nss cryptographic module has two modes of operation: the non-fips (default) mode and fips mode.
... the fips mode is an approved mode of operation compliant to fips 140-2.
...And 4 more matches
nsITextInputProcessor
for solving that issue, methods of this interface have been designed for performing a key operation or representing a change of composition state.
... void cancelcomposition(in nsidomkeyevent adomkeyevent optional, in unsigned long akeyflags optional); parameters adomkeyevent optional when the canceling composition is caused by a key operation, this should be specified.
... void commitcomposition(in nsidomkeyevent adomkeyevent optional, in unsigned long akeyflags optional); parameters adomkeyevent optional when the committing composition is caused by a key operation, this should be specified.
...And 4 more matches
nsIWebBrowserPersist
result unsigned long value indicating the success or failure of the persist operation.
... persist_flags_cleanup_on_failure 8192 automatically cleanup after a failed or cancelled operation, deleting all created files and directories.
... this flag does nothing for failed upload operations to remote servers.
...And 4 more matches
DataTransfer - Web APIs
the datatransfer object is used to hold the data that is being dragged during a drag and drop operation.
... properties standard properties datatransfer.dropeffect gets the type of drag-and-drop operation currently selected or sets the operation to a new type.
... datatransfer.effectallowed provides all of the types of operations that are possible.
...And 4 more matches
FileReader - Web APIs
file objects may be obtained from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
...this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
...this event is triggered each time the reading operation is aborted.
...And 4 more matches
Using IndexedDB - Web APIs
start a transaction and make a request to do some database operation, like adding or retrieving data.
... wait for the operation to complete by listening to the right kind of dom event.
...opening a database is just like any other operation — you have to "request" it.
...And 4 more matches
Using Promises - JavaScript
« previousnext » a promise is an object representing the eventual completion or failure of an asynchronous operation.
... callbacks added with then(), as above, will be called even after the success or failure of the asynchronous operation.
... chaining a common need is to execute two or more asynchronous operations back to back, where each subsequent operation starts when the previous operation succeeds, with the result from the previous step.
...And 4 more matches
Promises - Archive of obsolete content
promise apis for common asynchronous operations due to the performance and stability costs of synchronous io, many apis which rely on it have been deprecated.
... the following page contains examples of many promise-based replacement apis for common operations.
... these apis allow asynchronous operation to be achieved with a coding style similar to synchronous variants.
...And 3 more matches
Index - Archive of obsolete content
ArchiveMozillaXULIndex
1017 commands tutorials, xul, xul_tutorial a command is an operation which may be invoked.
... 1108 command xul elements, xul reference a command element can be used to invoke an operation that can come from multiple sources.
... for example, a clipboard paste operation can be invoked from the edit menu, a context menu and by pressing a keyboard shortcut.
...And 3 more matches
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
the debug.mstraceasynccallbackstarting function associates the callback stack with a previously specified asynchronous operation.
... syntax debug.mstraceasynccallbackstarting(asyncoperationid) parameters asyncoperationid the id associated with the asynchronous operation.
... remarks call this function in the callback function for the asynchronous operation after the call to debug.mstraceasyncoperationcompleted.
...And 3 more matches
Making asynchronous programming easier with async and await - Learn web development
status: ${response.status}`); } else { return response.blob(); } }) .then(myblob => { let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); }) .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); by now, you should have a reasonable understanding of promises and how they work, but let's convert this to use async/await to see how much simpler it makes things: async function myfetch() { let response = await fetch('coffee.jpg'); if (!response.ok) { throw new error(`http error!
... status: ${response.status}`); } else { let myblob = await response.blob(); let objecturl = url.createobjecturl(myblob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } } myfetch() .catch(e => { console.log('there has been a problem with your fetch operation: ' + e.message); }); it makes code much simpler and easier to understand — no more .then() blocks everywhere!
...when the result of operation returns, we return it out of the myfetch() function.
...And 3 more matches
Drawing graphics - Learn web development
the ctx variable now contains a canvasrenderingcontext2d object, and all drawing operations on the canvas will involve manipulating this object.
... 2d canvas basics as we said above, all drawing operations are done by manipulating a canvasrenderingcontext2d object (in our case, ctx).
... many operations need to be given coordinates to pinpoint exactly where to draw something — the top left of the canvas is point (0, 0), the horizontal (x) axis runs from left to right, and the vertical (y) axis runs from top to bottom.
...And 3 more matches
Addon
pendingoperations read only integer a bitfield holding all of the current operations that are waiting to be performed for this add-on.
... operations are generally deferred when a restart is necessary to accomplish them.
... permissions read only integer a bitfield holding all the the operations that can be performed on this add-on.
...And 3 more matches
gtstd.html
ssl is built on top of nspr, which handles sockets, threads, and related low-level os operations.
... netscape provides three built-in modules with nss and with server and client products: the default netscape internal pkcs #11 module comes with two built-in tokens: the generic crypto services token performs all cryptographic operations, such as encryption, decryption, and hashing.
...the fips 140-1 module includes a single, built-in fips 140-1 certificate db token (see figure 2.1), which handles both cryptographic operations and communication with the certx.db and keyx.db files.
...And 3 more matches
Starting WebLock
the next set of functionality manages the white list where acceptable domains are stored: void addsite(in string url); void removesite(in string url); attribute nsisimpleenumerator sites; operations in this set - add, remove, and enumerate - will be called from a user interface that manages the white list and adds the current website to the white list.
...a related interface called nsilocalfile provides access to operations specific to local files, but the nsifile functionality is adequate for the weblock component.
...the next operation on the nsifile returns results associated with the "b" path.
...And 3 more matches
nsISHistoryListener
return value true to allow the go back operation to proceed or false to cancel it.
... return value true to allow the go forward operation to proceed or false to cancel it.
... return value true to allow the operation to proceed or false to cancel it.
...And 3 more matches
Waterfall - Firefox Developer Tools
recorded operations, called markers, are shown as horizontal bars, laid out in a waterfall to reflect the serial nature of the browser's execution.
... markers the markers for operations are color-coded and labeled.
... the following operations are recorded: name and description color detailed information dom event javascript code that's executed in response to a dom event.
...And 3 more matches
DOMError - Web APIs
WebAPIDOMError
notsupportederror the operation is not supported invalidstateerror the object is in an invalid state.
... namespaceerror the operation is not allowed by namespaces in xml invalidaccesserror the object does not support the operation or argument.
... securityerror the operation is insecure.
...And 3 more matches
ProgressEvent.initProgressEvent() - Web APIs
the following values are allowed: value meaning loadstart the operation has started.
... progress the operation still is in progress.
... error the operation failed and didn't complete.
...And 3 more matches
Media events - Developer guides
seeked sent when a seek operation completes.
... seeking sent when a seek operation begins.
... waiting sent when the requested operation (such as playback) is delayed pending the completion of another operation (such as a seek).
...And 3 more matches
Meta programming - JavaScript
« previousnext » starting with ecmascript 2015, javascript gains support for the proxy and reflect objects allowing you to intercept and define custom behavior for fundamental language operations (e.g.
... proxies introduced in ecmascript 6, proxy objects allow you to intercept certain operations and to implement custom behaviors.
... invariants semantics that remain unchanged when implementing custom operations are called invariants.
...And 3 more matches
Atomics - JavaScript
the atomics object provides atomic operations as static methods.
... description the atomic operations are installed on an atomics module.
... atomic operations when memory is shared, multiple threads can read and write the same data in memory.
...And 3 more matches
jpm - Archive of obsolete content
-v --verbose verbose operation.
...specify --stop-on-error to stop running tests after the first failure: jpm test --stop-on-error --tbpl print test output in treeherder format --times number run tests number of times: jpm test --times 2 -v --verbose verbose operation.
... -v --verbose verbose operation: jpm xpi -v jpm post this command packages the add-on as an xpi file then posts it to some url.
...And 2 more matches
Template and Tree Listeners - Archive of obsolete content
nsixultreebuilderobserver - used to listen to particular tree operations.
...the tree widget informs the view when certain operations are performed that might affect the data.
... the tree view handles all of these operations, but allows an observer to be attached which is invoked during these operations.
...And 2 more matches
AddonManager
getaddonswithoperationsbytypes(in string types[], in addonlistcallback?
... pending operations constant description pending_none no operations are pending.
... operations requiring restart constant description op_needs_restart_none no operations will require a restart.
...And 2 more matches
NetUtil.jsm
both streams are automatically closed when the copy operation is completed.
... acallback an optional function that will be called when the copy operation is completed.
... the callback receives a single parameter: the nsresult status code for the copy operation.
...And 2 more matches
OSFile.jsm
one thing that all developers need to remember is that the duration of a file i/o operation is unbounded.
...operations can take an arbitrary amount of time.
... we are talking about several seconds to execute operations that look trivial, such as closing a file, or checking when it was last modified.
...And 2 more matches
Sqlite.jsm
all operations are asynchronous.
...sqlite.jsm exposes a transaction api built on top of task.jsm that allows transactions to be written as procedural javascript functions (as opposed to a series of callback driven operations).
... this returns a promise that is resolved when the operation completes.
...And 2 more matches
Introduction to Network Security Services
three shared libraries export public functions: the ssl library supports core ssl operations.
... the s/mime library supports core s/mime operations.
... the nss library supports core crypto operations.
...And 2 more matches
NSS tools : certutil
options and arguments running certutil always requires one and only one command option to specify the type of certificate operation.
...this operation should be performed by a ca.
... certutil -v -n certificate-name [-b time] [-e] [-u cert-usage] -d [sql:] directory for example, to validate an email certificate: $ certutil -v -n "john smith's email cert" -e -u s,r -d sql:/home/my/sha rednssdb modifying certificate trust settings the trust settings (which relate to the operations that a certificate is allowed to be used for) can be changed after a certificate is created or added to the database.
...And 2 more matches
NSS tools : modutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... options running modutil always requires one (and only one) option to specify the type of module operation.
...use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity.
...And 2 more matches
certutil
options and arguments running certutil always requires one (and only one) option to specify the type of certificate operation.
...this operation should be performed by a ca.
... certutil -v -n certificate-name [-b time] [-e] [-u cert-usage] -d [sql:]directory for example, to validate an email certificate: $ certutil -v -n "john smith's email cert" -e -u s,r -d sql:/home/my/sharednssdb modifying certificate trust settings the trust settings (which relate to the operations that a certificate is allowed to be used for) can be changed after a certificate is created or added to the database.
...And 2 more matches
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
... options running modutil always requires one (and only one) option to specify the type of module operation.
...use this option only after manually testing each planned operation to check for warnings and to ensure that bypassing the prompts will cause no security lapses or loss of database integrity.
...And 2 more matches
Redis Tips
they are also atomic operations.
... they are executed sequentially as a single atomic operation.
... (try this by breaking one of the set statements by leaving out the value argument.) you'll get one return value for each operation that didn't crash.
...And 2 more matches
mozIStorageVacuumParticipant
methods onbeginvacuum() called when a vacuum operation begins.
...return value return true to allow the vacuum operation to proceed, or false if you don't want the database to be vacuumed.
... you may wish to return false, for example, if you're in the middle of an operation that you don't want to (or can't) interrupt.
...And 2 more matches
nsIDragService
widget/nsidragservice.idlscriptable implements the drag service for handling drag and drop operations.
... dragdrop_action_copy 1 the drag and drop operation should copy the object.
... dragdrop_action_move 2 the drag and drop operation should move the object.
...And 2 more matches
nsIXMLHttpRequestEventTarget
1.0 66 introduced gecko 1.9.1 inherits from: nsidomeventtarget last changed in gecko 5.0 (firefox 5.0 / thunderbird 5.0 / seamonkey 2.2) attributes attribute type description onabort nsidomeventlistener a javascript function object that gets invoked if the operation is canceled by the user.
... onerror nsidomeventlistener a javascript function object that gets invoked if the operation fails to complete due to an error.
... onload nsidomeventlistener a javascript function object that gets invoked when the operation is successfully completed.
...And 2 more matches
DevTools API - Firefox Developer Tools
return value: a promise that is fulfilled once the operation has finished.
...if the method returns a promise, many operations (e.g.
...if the tool needs to perform asynchronous operations during destruction the method should return a promise that is resolved once the process is complete.
...And 2 more matches
FileSystemEntry.moveTo() - Web APIs
specifying a new name lets moveto() double as a rename operation.
... syntax filesystementry.moveto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a filesystemdirectoryentry object specifying the destination directory for the move operation.
... successcallback optional a function which is called when the move operation is succesfully completed.
...And 2 more matches
Using microtasks in JavaScript with queueMicrotask() - Web APIs
the main reason to use microtasks is simply that: to ensure consistent ordering of tasks, even when results or data is available synchronously, but while simultaneously reducing the risk of user-discernible delays in operations.
...t => result.arraybuffer()).then(data => { this.cache[url] = data; this.data = data; this.dispatchevent(new event("load")); }); } }; the problem introduced here is that by using a task in one branch of the if...else statement (in the case in which the image is available in the cache) but having promises involved in the else clause, we have a situation in which the order of operations can vary; for example, as seen below.
... we can ensure consistent ordering of these operations by using a microtask in the if clause to balance the two clauses: customelement.prototype.getdata = url => { if (this.cache[url]) { queuemicrotask(() => { this.data = this.cache[url]; this.dispatchevent(new event("load")); }); } else { fetch(url).then(result => result.arraybuffer()).then(data => { this.cache[url] = data; this.data = data; this.dispa...
...And 2 more matches
SubtleCrypto.sign() - Web APIs
WebAPISubtleCryptosign
it's different from rsassa-pkcs1-v1_5 in that it incorporates a random salt in the signature operation, so the same message signed with the same key will not result in the same signature each time.
... /* fetch the contents of the "message" textbox, and encode it in a form we can use for the sign operation.
... /* fetch the contents of the "message" textbox, and encode it in a form we can use for the sign operation.
...And 2 more matches
SubtleCrypto.verify() - Web APIs
exceptions the promise is rejected when the following exception is encountered: invalidaccesserror raised when the encryption key is not a key for the requested verifying algorithm or when trying to use an algorithm that is either unknown or isn't suitable for a verify operation.
... /* fetch the contents of the "message" textbox, and encode it in a form we can use for sign operation.
... /* fetch the contents of the "message" textbox, and encode it in a form we can use for sign operation.
...And 2 more matches
WebGL2RenderingContext.copyBufferSubData() - Web APIs
gl.copy_read_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations).
... gl.copy_write_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations).
... gl.transform_feedback_buffer: buffer for transform feedback operations.
...And 2 more matches
WebGLRenderingContext.bindBuffer() - Web APIs
gl.transform_feedback_buffer: buffer for transform feedback operations.
... gl.pixel_pack_buffer: buffer used for pixel transfer operations.
... gl.pixel_unpack_buffer: buffer used for pixel transfer operations.
...And 2 more matches
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
for example, if the object is facing an object located at (3, 1, -2)—that is, three meters to the right, one meter up, and two meters away from the origin point—the result is: [31-2]\left [ \begin{matrix} 3 \\ 1 \\ -2 \end{matrix} \right ] this can also be represented as an array: let directionvector = [3, 1, -2]; for the purposes of performing operations involving both the coordinates and the facing direction vector, the vector needs to include the w component.
...this is because each transform affects the position of the object and possibly the very coordinate system itself, which can dramatically change the results of the next operation performed.
... keep in mind that most webgl and webxr programming is done using third-party libraries which expand upon the basic functionality of webgl by adding routines that make it much easier to perform not only core matrix and other operations, but often also to simulate these standard cinematography techniques.
...And 2 more matches
handler.setPrototypeOf() - JavaScript
interceptions this trap can intercept these operations: object.setprototypeof() reflect.setprototypeof() invariants if the following invariants are violated, the proxy will throw a typeerror: if target is not extensible, the prototype parameter must be the same value as object.getprototypeof(target).
... approach 1: returning false this approach means that any mutating operation that throws an exception on failure to mutate, must create the exception itself.
... if the mutation is performed by an operation that doesn't ordinarily throw in case of failure, such as reflect.setprototypeof(), no exception will be thrown.
...And 2 more matches
Proxy - JavaScript
the proxy object enables you to create a proxy for another object, which can intercept and redefine fundamental operations for that object.
... description a proxy is created with two parameters: target: the original object which you want to proxy handler: an object that defines which operations will be intercepted and how to redefine intercepted operations.
... obj[prop] : 37; } }; const p = new proxy({}, handler); p.a = 1; p.b = undefined; console.log(p.a, p.b); // 1, undefined console.log('c' in p, p.c); // false, 37 no-op forwarding proxy in this example, we are using a native javascript object to which our proxy will forward all operations that are applied to it.
...And 2 more matches
<feComposite> - SVG: Scalable Vector Graphics
the <fecomposite> svg filter primitive performs the combination of two input images pixel-wise in image space using one of the porter-duff compositing operations: over, in, atop, out, xor, and lighter.
... additionally, a component-wise arithmetic operation (with the result clamped between [0..1]) can be applied.
... the arithmetic operation is useful for combining the output from the <fediffuselighting> and <fespecularlighting> filters with texture data.
...And 2 more matches
Appendix B: Install and Uninstall Scripts - Archive of obsolete content
then the user has the option to restart right away, wait to restart whenever is convenient, or even cancel the uninstall operation.
...so, you should listen to other events, like canceling the operation, to make sure that you know what is going on.
...then you'll have reasonable certainty that the add-on will be removed and you can perform any cleanup operations safely.
...you shouldn't perform very time-consuming operations here, at least not without telling users what is going on.
Custom XUL Elements with XBL - Archive of obsolete content
when you add a node to a xul document using an xbl binding, all normal dom operations can be performed on it.
...if you want some value to be preserved after such dom operations, you must set it as an attribute and not an internal value.
...this is likely due to some asynchronous operation related to node insertion.
... if you need to perform an operation to a node right after insertion, we recommend using a timeout to delay the operation (a timeout set to 0 works well).
Progress Meters - Archive of obsolete content
you typically see it when downloading files or when performing a lengthy operation.
... determinate progress meters are used when you know the length of time that an operation will take.
... the progress meter will fill up and, once full, the operation should be finished.
... indeterminate progress meters are used when you do not know the length of time of an operation.
Using the Editor from XUL - Archive of obsolete content
note that if they cancel, the close operation is aborted.
... editor event handling editing operations happen in response to user events: mouse, key, drag and drop, and ime (international text input) events.
... nstexteditorkeylistener this event listener handles key presses for typing, and other editing operations (backspace, delete, enter/return).
... another stack-based class, nsautorules, ensures that text insertion is wrapped with calls to nshtmleditor::startoperation() / endoperation().
XUL accessibility guidelines - Archive of obsolete content
trees provide alternative functionality for inaccessible operations.
...users who are used to navigating form fields themselves often end up repeating the jump operation and thereby skipping ahead one form field.
... mouse dependent scripting all mouse operations have keyboard accessible equivalents.
... operations exist that can only be performed with a mouse.
progressmeter - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a meter which can be used to display the progress of a lengthy operation.
... it is drawn as a bar that is filled as the operation completes.
...this is used when the length of time to complete an operation is not known beforehand.
... mode type: one of the values below a determinedprogressmeter is used in cases where you know how long an operation will take.
Introduction to Public-Key Cryptography - Archive of obsolete content
sometimes it may be useful to issue a single person one certificate and key pair for signing operations, and another certificate and key pair for encryption operations.
...these interactions include operations such as registration for certification, certificate retrieval, certificate renewal, certificate revocation, and key backup and recovery.
...to provide maximum operational flexibility, interactions with end entities can be separated from the other functions of a ca and handled by a separate service called a registration authority (ra).
...ras can be helpful in scaling an pki across different departments, geographical areas, or other operational units with varying policies and authentication requirements.
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
the debug.msupdateasynccallbackrelation function updates the relationship status between a synchronous work item and the associated asynchronous operation.
... syntax debug.msupdateasynccallbackrelation(relatedasyncoperationid, relationtype) parameters relatedasyncoperationid the id associated with the asynchronous operation.
... remarks the synchronous work item is typically the callback function for the asynchronous operation.
... this function may be called when an asynchronous operation is aborted, when a join operation is used, or in other scenarios.
Plug-in Development Overview - Gecko Plugin API Reference
write your plug-in code and implement the appropriate plug-in api methods for basic plug-in operation.
... npp_print: request a platform-specific print operation for the instance.
... the npn_geturlnotify function operates like npn_geturl, except that it notifies the plug-in of the result when the operation completes.
... the npn_posturlnotify function operates like npn_posturl, except that it notifies the plug-in of the result when the operation completes.
Fetching data from the server - Learn web development
add this next: request.responsetype = 'text'; fetching a resource from the network is an asynchronous operation, meaning that you have to wait for that operation to complete (e.g., the resource is returned from the network) before you can do anything with that response, otherwise, an error will be thrown.
... after that, you can see the .then() method chained onto the end of fetch() — this method is a part of promises, a modern javascript feature for performing asynchronous operations.
..."resolve" means "finish performing the specified operation at some point in the future".
... the specified operation, in this case, is to fetch a resource from a specified url (using an http request), and return the response for us to do something with.
Server-side web frameworks - Learn web development
web frameworks provide tools and libraries to simplify common web development operations.
... # django view function from django.http import httpresponse def index(request): # get an httprequest (request) # perform operations using information from the request.
...web frameworks often provide a database layer that abstracts database read, write, query, and delete operations.
...the template system also provides support for expressions (with syntax: {% expression %}), which allow templates to perform simple operations like iterating list values passed into the template.
Cross Process Object Wrappers
if browser code tries an unsafe cpow operation, the browser will throw an exception and you'll see an "unsafe cpow usage forbidden” error in the browser console.
...however, if an add-on passes a cpow into a platform api, and that platform api then attempts an unsafe operation on it, this will throw an exception.
... also, from firefox 47 onwards, browser code can no longer perform unsafe cpow operations.
... essentially, the problem is this: suppose the content process is busy with some long-running operation (for example, garbage collection).
Overview of Mozilla embedding APIs
these classes provide a variety of string operations as well as dealing with the memory management issues of storing the underlying data.
...this interface supports cut/copy/paste operations on the current selection within the webbrowser window.
...being reviewed interface definition: nsidomwindow.idl nsibasewindow this interface provides access to various window operations.
...being reviewed interface definition: nsibasewindow.idl nsirequest this interface provides a means to control various operations.
OS.File.Error
cross-platform attributes operation the human-readable name of the failed operation.
... becauseexists true if the operation failed because a file or directory exists, false otherwise.
... becausenosuchfile true if the operation failed because a file or directory does not exist, false otherwise.
... becauseclosed true if the operation failed because a file or directory is closed, false otherwise.
FC_DecryptDigestUpdate
name fc_decryptdigestupdate - continue a multi-part decrypt and digest operation syntax ck_rv fc_decryptdigestupdate( ck_session_handle hsession, ck_byte_ptr pencryptedpart, ck_ulong ulencryptedpartlen, ck_byte_ptr ppart, ck_ulong_ptr pulpartlen ); parameters hsession [in] session handle.
... description fc_decryptdigestupdate continues a multi-part decrypt and digest operation.
... after calling both fc_decryptinit and fc_digestinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_digestfinal and fc_decryptfinal.
FC_DecryptVerifyUpdate
name fc_decryptverifyupdate - continue a multi-part decrypt and verify operation syntax ck_rv fc_decryptverifyupdate( ck_session_handle hsession, ck_byte_ptr pencrypteddata, ck_ulong ulencrypteddatalen, ck_byte_ptr pdata, ck_ulong_ptr puldatalen ); parameters hsession [in] session handle.
... description fc_decryptverifyupdate continues a multi-part decryption and and signature verification operation.
... after calling both fc_decryptinit and fc_verifyinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_decryptfinal and fc_verifyfinal.
FC_DigestEncryptUpdate
name fc_digestencryptupdate - continue a multi-part digest and encryption operation syntax ck_rv fc_digestencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
... description fc_digestencryptupdate continues a multi-part digest and encryption operation.
... after calling both fc_digestinit and fc_encryptinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_digestfinal and fc_encryptfinal in that order.
FC_SignEncryptUpdate
name fc_signencryptupdate - continue a multi-part signing and encryption operation syntax ck_rv fc_signencryptupdate( ck_session_handle hsession, ck_byte_ptr ppart, ck_ulong ulpartlen, ck_byte_ptr pencryptedpart, ck_ulong_ptr pulencryptedpartlen ); parameters hsession [in] session handle.
... description fc_signencryptupdate continues a multi-part signature and encryption operation.
... after calling both fc_signinit and fc_encryptinit to set up the operations this function may be called multiple times.
... the operation is finished by calls to fc_signfinal and fc_encryptfinal.
FC_SignRecover
name fc_signrecover - sign data in a single recoverable operation.
...pdata [in] mechanism to be used for the signing operation.
...pussignaturelen [in, out] pointer to the size of the output buffer, replaced by the length of the signature if the operation is successful.
... description fc_signrecover signs data in a single operation where the (digest) data can be recovered from the signature.
FC_VerifyRecover
name fc_verifyrecover - verify data in a single recoverable operation.
...psignature [in] mechanism to be used for the signing operation.
...pusdatalen [in, out] pointer to the size of the output buffer, replaced by the length of the signature if the operation is successful.
... description fc_verifyrecover verifies data in a single operation where the (digest) data can be recovered from the signature.
NSS functions
later cert_verifysigneddata mxr 3.4 and later cert_verifysigneddatawithpublickey mxr 3.7 and later cert_verifysigneddatawithpublickeyinfo mxr 3.7 and later nss_cmpcertchainwcanames mxr 3.2 and later nss_findcertkeatype mxr 3.2 and later cryptography functions the public functions listed here perform cryptographic operations based on the pkcs #11 interface.
...ithalgorithmid mxr 3.12 and later vfy_verifydigest mxr deprecated 3.12 use vfy_verifydigestdirect or vfy_verifydigestwithalgorithmid vfy_verifydigestdirect mxr 3.12 and later vfy_verifydigestwithalgorithmid mxr 3.12 and later s/mime functions the public functions listed here perform s/mime operations using the s/mime toolkit.
... nss_cmssignerinfo_includecerts mxr 3.2 and later nss_cmsutil_verificationstatustostring mxr 3.2 and later nss_smimesignerinfo_savesmimeprofile mxr 3.4 and later nss_smimeutil_findbulkalgforrecipients mxr 3.2 and later pkcs #7 functions the public functions listed here perform pkcs #7 operations required by mail and news applications and by some of the nss tools.
... mxr 3.2 and later sec_pkcs7setcontent mxr 3.4 and later sec_pkcs7verifydetachedsignature mxr 3.4 and later sec_pkcs7verifysignature mxr 3.2 and later secmime_decryptionallowed mxr 3.4 and later pkcs #12 functions the public functions listed here perform pkcs #12 operations required by some of the nss tools and other applications.
JSGetObjectOps
description jsobjectops is used by js_newobject's internals to discover the set of high-level object operations to use for new objects of the given class.
...in contrast, all native and host objects have a jsobjectmap at obj->map, which may be shared among a number of objects, and which contains the jsobjectops *ops pointer used to dispatch object operations from api calls.
... thus jsclass (which pre-dates jsobjectops in the api) provides a low-level interface to class-specific code and data, while jsobjectops allows for a higher level of operation, which does not use the object's class except to find the class's jsobjectops struct, by calling clasp->getobjectops, and to finalize the object.
...it returns a pointer to a jsobjectops which is then used as a virtual table for operations on the new object.
Shell global objects
entrypoints(params) carry out some jsapi operation as directed by params, and return an array of objects describing which javascript entry points were invoked as a result.
... params is an object whose properties indicate what operation to perform.
... the return value is an array of strings, with one element for each javascript invocation that occurred as a result of the given operation.
...throws in case of internal error, or if the operation doesn't even make sense (for example, because the object is a revoked proxy).
Secure Development Guidelines
t mixed with sql instructions example: sqlite3_stmt *stmt; char *str = "select * from account where name='?'"; sqlite3_prepare_v2(db, str, strlen(str), &stmt, null); sqlite3_bind_text(stmt, 1, name, strlen(name), sqlite_transient); sqlite3_step(stmt); sqlite3_finalize(p_stmt); writing secure code: arithmetic issues integer overflows/underflows overflows occur when an arithmetic operation attempts to create a numeric value that is larger than can be represented within the available storage space max + 1 will be 0 and 0 – 1 will be max!
... } integer overflows/underflows: prevention difficult to fix: you need to check every arithmetic operation with user input arithmetic libraries like safeint can help signedness issues bits data type range 8 signed char -128 - +127 unsigned char 0 - +255 16 signed short -32768 - +32767 unsigned short 0 - +65535 32 signed int -2147483648 - +2147483647 unsigned int 0 - +4294967295 6...
... int i, fd; fd_set fdset; for( i = 0; i < 2000; i++) { fd = open("/dev/null", o_rdwr); } fd_set(fd, &fdset); } file i/o: race conditions operating on files can often lead to race conditions since the file system is shared with other processes you check the state of a file at one point in time and immediately after the state might have changed most file name operations suffer from these race conditions, but not when performed on file descriptors file i/o: race conditions consider the following example int main(int argc, char **argv) { char *file = argv[1]; int fd; struct stat statbuf; stat(file, &statbuf); if (s_islink(statbuf.st_mode)) { bailout(“symbolic link”); } else if (statbuf.st_uid != getuid) { ...
... 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 lockin...
nsIAsyncStreamCopier
.6 / thunderbird 3.1 / fennec 1.0) method overview void asynccopy(in nsirequestobserver aobserver, in nsisupports aobservercontext); void init(in nsiinputstream asource, in nsioutputstream asink, in nsieventtarget atarget, in boolean asourcebuffered, in boolean asinkbuffered, in unsigned long achunksize, in boolean aclosesource, in boolean aclosesink); methods asynccopy() starts the copy operation.
...aobservercontext the object to receive notifications with information about the progress of the copy operation.
...this controls the granularity of the copy operation.
... this value should match the segment size of any buffered streams involved in the operation.
nsIJumpListBuilder
return value true if the operation completed successfully.
...return value true if the operation completed successfully.
...return value true if the operation completed successfully.
... return value true if the operation completed successfully.
nsIMsgCloudFileProvider
acallback the nsirequestobserver for monitoring the start and stop states of the refresh operation.
... acallback the nsirequestobserver for monitoring the start and stop states of the delete operation.
... acallback the nsirequestobserver for monitoring the start and stop states of the new account creation operation.
... void createexistingaccount(in nsirequestobserver acallback); parameters acallback the nsirequestobserver for monitoring the start and stop states of the creation operation.
Plug-in Development Overview - Plugins
write your plug-in code and implement the appropriate plug-in api methods for basic plug-in operation.
... npp_print: request a platform-specific print operation for the instance.
... the npn_geturlnotify function operates like npn_geturl, except that it notifies the plug-in of the result when the operation completes.
... the npn_posturlnotify function operates like npn_posturl, except that it notifies the plug-in of the result when the operation completes.
UI Tour - Firefox Developer Tools
waterfall overview this presents a compressed view of the waterfall: recorded operations are color-coded using the same scheme as in the main waterfall view.
... for example, in the screenshot below a long-running paint operation (shown as a green bar in the waterfall overview) corresponds to a drop in the frame rate: zooming in you can use the overview to select a slice of the recording to examine in more detail.
...in the screenshot below we've selected that drop in the frame rate, and can see the long-running paint operation in more detail: details pane the details pane shows whichever tool is currently selected.
...the x-axis represents time, and the recorded operations are laid out as a waterfall, reflecting the serial nature of the browser's execution.
Compositing and clipping - Web APIs
we can, however, change this behaviour by setting the globalcompositeoperation property.
... globalcompositeoperation we can not only draw new shapes behind existing shapes but we can also use it to mask off certain areas, clear sections from the canvas (not limited to rectangles like the clearrect() method does) and more.
... globalcompositeoperation = type this sets the type of compositing operation to apply when drawing new shapes, where type is a string identifying which of the twelve compositing operations to use.
... if we compare clipping paths to the globalcompositeoperation property we've seen above, we see two compositing modes that achieve more or less the same effect in source-in and source-atop.
DataTransfer.files - Web APIs
the datatransfer.files property is a list of the files in the drag operation.
... if the operation includes no files, the list is empty.
... syntax datatransfer.files; return value a list of the files in a drag operation, one list item for each file in the operation.
... if the drag operation had no files, the list is empty.
DataTransfer.items - Web APIs
the read-only datatransfer property items property is a list of the data transfer items in a drag operation.
... the list includes one item for each item in the operation and if the operation had no items, the list is empty.
... syntax itemlist = datatransfer.items; return value a datatransferitemlist object containing datatransferitem objects representing the items being dragged in a drag operation, one list item for each object being dragged.
... if the drag operation had no data, the list is empty.
DataTransfer.types - Web APIs
the order of the formats is the same order as the data included in the drag operation.
... syntax datatransfer.types; return value an array of the data formats used in the drag operation.
...if the drag operation included no data, this list will be empty.
... if any files are included in the drag operation, then one of the types will be the string files.
Using Fetch - Web APIs
the code would look something like this: fetch('flowers.jpg') .then(response => { if (!response.ok) { throw new error('network response was not ok'); } return response.blob(); }) .then(myblob => { myimage.src = url.createobjecturl(myblob); }) .catch(error => { console.error('there has been a problem with your fetch operation:', error); }); supplying your own request object instead of passing a path to the resource you want to request into the fetch() call, you can create a request object using the request() constructor, and pass that in as a fetch() method argument: const myheaders = new headers(); const myrequest = new request('flowers.jpg', { method: 'get', headers: myheaders, mode: 'cors', cache: 'd...
...nsole.log(myheaders.has('set-cookie')); // false myheaders.set('content-type', 'text/html'); myheaders.append('x-custom-header', 'anothervalue'); console.log(myheaders.get('content-length')); // 11 console.log(myheaders.get('x-custom-header')); // ['processthisimmediately', 'anothervalue'] myheaders.delete('x-custom-header'); console.log(myheaders.get('x-custom-header')); // [ ] some of these operations are only useful in serviceworkers, but they provide a much nicer api for manipulating headers.
...the mutation operations will throw a typeerror if there is an immutable guard (see below).
...this is not exposed to the web, but it affects which mutation operations are allowed on the headers object.
FileSystemEntry.copyTo() - Web APIs
syntax filesystementry.copyto(newparent[, newname][, successcallback][, errorcallback]); parameters newparent a filesystemdirectoryentry object specifying the destination directory for the copy operation.
... successcallback optional a function which is called when the copy operation is succesfully completed.
... errors fileerror.invalid_modification_err the requested operation involves an impossible change, such as moving a directory inside itself or one of its own child directories, or copying an item within the same directory without renaming it.
... fileerror.quota_exceeded_err the operation exceeded the user's storage quota, or there isn't enough storage space left to complete the operation.
IDBObjectStore.add() - Web APIs
to determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the idbobjectstore.add request’s success event, because the transaction may still fail after the success event fires.
... returns an idbrequest object on which subsequent events related to this operation are fired.
... exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
... constrainterror an insert operation failed because the primary key constraint was violated (due to an already existing record with the same primary key value).
IDBObjectStoreSync - Web APIs
if this attribute is set to null, then the application must provide a key for each modification operation.
... constants mode constants constant value description read_only 1 modification operations are not allowed on this object store.
... read_write 0 modification operations are allowed on this object store.
... snapshot_read 2 any read operations must access a snapshot view of the data, which cannot change once it is created.
IDBRequest - Web APIs
each reading and writing operation on a database is done using a request.
... the request object does not initially contain any information about the result of the operation, but once information becomes available, an event is fired on the request, and the information becomes available through the properties of the idbrequest instance.
... all asynchronous operations immediately return an idbrequest instance.
...if an error occurs while performing the operation, the exception is made available through the result property and an error event is fired (idbrequest.onerror).
LockedFile.flush() - Web APIs
WebAPILockedFileflush
for performance reasons, a lockedfile object buffers all its operation in memory.
... this allows fast writing and reading operations.
...however, if something goes wrong before that, some operations can be lost.
... syntax var request = instanceoflockedfile.flush(); return a filerequest object to handle the success or failure of the operation.
LockedFile.truncate() - Web APIs
if the method is called with no argument, the operation removes all the bytes starting at the index set in lockedfile.location.
... if the method is called with an argument, the operation removes all the bytes starting at the index corresponding to the parameter and regardless of the value of lockedfile.location.
... syntax var request = instanceoflockedfile.truncate(start); parameters start optional a number representing the index where to start the operation.
... return a filerequest object to handle the success or failure of the operation.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
signal -- optional abortsignal that allows to cancell this scan() operation.
... return value a promise that resolves with undefined immediatelly after scheduling read operations for the nfc adapter.
... exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the scan operation was aborted with abortsignal passed in options.
... notallowederror the permission for this operation was rejected.
PublicKeyCredentialCreationOptions.extensions - Web APIs
note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.extensions.
... here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
...fingerprint, pin, pattern), how the key is protected, how the matcher (tool used for the authentication operation) is protected.
PublicKeyCredentialRequestOptions.extensions - Web APIs
note: an analogous option exists for the creation operation (navigators.credentials.create()), see publickeycredentialcreationoptions.extensions.
... here is the current (as of march 2019) list of potential extensions which may be used during the registration operation.
...in other words, this may be used server side to check if the current operation is based on the same biometric data that the previous authentication.
...fingerprint, pin, pattern), how the key is protected, how the matcher (tool used for the authentication operation) is protected.
PublicKeyCredentialRequestOptions.timeout - Web APIs
the timeout property, of the publickeycredentialrequestoptions dictionary, represents an hint, given in milliseconds, for the time the script is willing to wait for the completion of the retrieval operation.
... note: an analogous option exists for the creation operation (navigators.credentials.create()), see publickeycredentialcreationoptions.timeout.
... syntax timeout = publickeycredentialrequestoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
... examples var options = { challenge: new uint8array([/* bytes sent from the server */]), timeout: 6000 // wait a minute for the fetching operation // and maybe fail if it takes longer }; navigator.credentials.get({ "publickey": options }) .then(function (credentialinfoassertion) { // send assertion response back to the server // to proceed with the control of the credential }).catch(function (err) { console.error(err); }); specifications specification status comment web authentication: an api for accessing public key credentials level 1the definition of 'timeout' in that specification.
WebGL2RenderingContext.getBufferSubData() - Web APIs
gl.transform_feedback_buffer: buffer for transform feedback operations.
... gl.pixel_pack_buffer: buffer used for pixel transfer operations.
... gl.pixel_unpack_buffer: buffer used for pixel transfer operations.
... an invalid_operation error is generated if: zero is bound to target target is transform_feedback_buffer, and any transform feedback object is currently active.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.begintransformfeedback() starts a transform feedback operation.
... webgl2renderingcontext.endtransformfeedback() ends a transform feedback operation.
... webgl2renderingcontext.pausetransformfeedback() pauses a transform feedback operation.
... webgl2renderingcontext.resumetransformfeedback() resumes a transform feedback operation.
Basic scissoring - Web APIs
« previousnext » in this example, we see how to draw simple rectangles and squares using webgl scissoring operations.
... the reason for this distinction is that fragment color (and other fragment values, such as depth) may be manipulated and changed several times during graphics operations before finally being written to the screen.
... we have already seen how fragment color changes during graphics operations, by applying color masking.
..." + "your browser or device may not support webgl."; return; } gl.viewport(0, 0, gl.drawingbufferwidth, gl.drawingbufferheight); // enable scissoring operation and define the position and // size of the scissoring area.
Matrix math for the web - Web APIs
using the identity matrix it should return a matrix identical to the original, since a matrix multiplied by the identity matrix is always equal to itself: // sets identityresult to [4,3,2,1] let identityresult = multiplymatrixandpoint(identitymatrix, [4, 3, 2, 1]); returning the same point is not very useful, but there are other types of matrices that can perform helpful operations on points.
...these functions create a lot of new arrays, which can be particularly expensive for real-time operations due to garbage collection.
... another mind-bender is that matrix multiplication in webgl and css needs to happen in the reverse order that the operations intuitively happen.
...different operations like positioning points, calculating lighting, and posing animated characters all rely on this fundamental tool.
Adding 2D content to a WebGL context - Web APIs
this project uses the glmatrix library to perform its matrix operations, so you will need to include that in your project.
...this eliminates operations from every calculation we do in our shader.
... const positionbuffer = gl.createbuffer(); // select the positionbuffer as the one to apply buffer // operations to from here out.
... view the complete code | open this demo on a new page matrix utility operations matrix operations might seem complicated but they are actually pretty simple if you take them one step at a time.
ARIA Test Cases - Accessibility
once marked for drag and drop, screen reader should announce that this item has been picked up, to distinguish it from others that may be draggable, but are currently not selected for the operation.
... after drag and drop operation has completed, the new location of the item should be indicated in the virtual buffer representation.
... if the drag and drop operation caused a menu to open, focus should be tracked in that menu, and the user should be able to complete further interaction via the keyboard as usual.
...all drag and drop operations screen readers traditionally perform within the operating system are hit and miss games that are performed on pixel locations.
Redirections in HTTP - HTTP
http has a special kind of response, called a http redirect, for this operation.
... reorganization of a web site, with non-get links/operations.
... used to redirect after a put or a post, so that refreshing the result page doesn't re-trigger the operation.
...better than 302 when non-get operations are available on the site.
A re-introduction to JavaScript (JS tutorial) - JavaScript
this can be important for bit-wise operations.
... you can also use the unary + operator to convert values to numbers: + '42'; // 42 + '010'; // 10 + '0x10'; // 16 a special value called nan (short for "not a number") is returned if the string is non-numeric: parseint('hello', 10); // nan nan is toxic: if you provide it as an operand to any mathematical operation, the result will also be nan: nan + 5; // nan you can test for nan using the built-in isnan() function: isnan(nan); // true javascript also has the special values infinity and -infinity: 1 / 0; // infinity -1 / 0; // -infinity you can test for infinity, -infinity and nan values using the built-in isfinite() function: isfinite(1 / 0); // false isfinite(-infinity); // false isfinite(nan...
... boolean operations such as && (logical and), || (logical or), and !
... javascript also has bitwise operations.
Equality comparisons and sameness - JavaScript
there are four equality algorithms in es2015: abstract equality comparison (==) strict equality comparison (===): used by array.prototype.indexof, array.prototype.lastindexof, and case-matching samevaluezero: used by %typedarray% and arraybuffer constructors, as well as map and set operations, and also string.prototype.includes and array.prototype.includes since es2016 samevalue: used in all other places javascript provides three different value-comparison operations: === - strict equality comparison ("strict equality", "identity", "triple equals") == - abstract equality comparison ("loose equality", "double equals") object.is provides samevalue (new in es2015).
... which operation you choose depends on what sort of comparison you are looking to perform.
...ar str = '0'; console.log(num === num); // true console.log(obj === obj); // true console.log(str === str); // true console.log(num === obj); // false console.log(num === str); // false console.log(obj === str); // false console.log(null === undefined); // false console.log(obj === null); // false console.log(obj === undefined); // false strict equality is almost always the correct comparison operation to use.
...since there is only one representation for 0 in the internal 32-bit integer type, -0 will not survive a round trip after an inverse operation.
BigInt - JavaScript
91") // ↪ 9007199254740991n const hugehex = bigint("0x1fffffffffffff") // ↪ 9007199254740991n const hugebin = bigint("0b11111111111111111111111111111111111111111111111111111") // ↪ 9007199254740991n bigint is similar to number in some ways, but also differs in a few key matters — it cannot be used with methods in the built-in math object and cannot be mixed with instances of number in operations; they must be coerced to the same type.
... however, since these are bigints and not bigdecimals, this operation will round towards 0 (which is to say, it will not return any fractional digits).
... an operation with a fractional result will be truncated when used with a bigint.
... cryptography the operations supported on bigints are not constant time.
Promise - JavaScript
the promise object represents the eventual completion (or failure) of an asynchronous operation, and its resulting value.
... fulfilled: meaning that the operation completed successfully.
... rejected: meaning that the operation failed.
...if the promise has already been fulfilled or rejected when a corresponding handler is attached, the handler will be called, so there is no race condition between an asynchronous operation completing and its handlers being attached.
core/promise - Archive of obsolete content
}); chaining there are two ways to chain promise operations.
... flat chaining you can use then for chaining intermediate operations on promises (var data = readasync().then(parse).then(extract)).
... you can chain multiple then functions, because then returns a promise resolved to a return value of an operation and errors propagate through the promise chains.
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
listing 1: calc.js (stage 1) function rpncalc() { } rpncalc.prototype = { init: function() { }, push: function(val) { }, plus: function() { }, pop: function() { } } implement the addition operation create test case begin by creating the test case.
... implement the subtraction operation now let’s add subtraction.
... listing 4: test_calc.js (adding sample test case) '2 1 -': function() { var calc = new rpncalc.rpncalc(); calc.init(); calc.push(2); calc.push(1); calc.minus(); assert.equals(calc.pop(), 1); }, listing 5: calc.js (implementing subtraction operation) minus: function() { this._letfunc(this._minus); }, _minus: function(a, b) { return a - b; }, listing 6: calc.js (correcting mistake in implementation of subtraction) _letfunc: function(func) { // correct pop order b = this.pop(); a = this.pop(); this.push(func(a, b)); }, understanding source code in the open-source community, you can learn a lot about how software works by studying ...
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
listing 8: traversing directories file.initwithpath('c:\\'); file.append('documents and settings'); file.append('all users'); file.append('documents'); list files in specified directory use the directoryentries property to perform operations on all the files or folders in a given folder.
... outputting binary files listing 14 shows the opposite operation, taking a string of bytes and outputting them as a binary file.
... listing 19: reading a text-string setting var pref = components.classes['@mozilla.org/preferences-service;1'] .getservice(components.interfaces.nsiprefbranch); var dir = pref.getcharpref('browser.download.lastdir'); alert(decodeuricomponent(escape(dir))); writing preferences listing 20 shows the opposite operation, writing a text string to a unique preference.
Intercepting Page Loads - Archive of obsolete content
avoid heavy, time-consuming operations, or the user's browsing experience will become exasperating.
...shouldload is called for every load operation firefox tries to do, including images, scripts and xul documents.
... } return result; } the content policy is applied very early in the process, even before the request is made, allowing a very clean cancel operation.
Signing an XPI - Archive of obsolete content
warning: performing this operation while the browser is running could cause corruption of your security databases.
... if the browser is currently running, you should exit the browser before continuing this operation.
... u,u,cu certum root ca ct,c,c certum level iii ca ct,c,c the name given to the newly issued certificate in the mozilla firefox keystore is not the easiest key alias in the world to remember, so i've added an additional step here that lets you rename it (its not just a simple rename operation, unfortunately).
Drag and drop events - Archive of obsolete content
firefox 3 adds two new events that allow you to determine when drag operations begin and end.
... drag sent when a drag operation begins.
... dragend sent when a drag operation ends.
Supporting private browsing mode - Archive of obsolete content
an extension might wish to do this if it's currently in the middle of an operation that prevents safely turning off private browsing (such as a database update operation, for example).
... 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 private 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-mannere...
...d 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.
Uploading and Downloading Files - Archive of obsolete content
this operation can also be performed via a script using the xmlhttprequest object.
... object can then simply be passed to xmlhttprequest: function upload(posturl, fieldname, filepath) { var formdata = new formdata(); formdata.append(fieldname, new file(filepath)); var req = new xmlhttprequest(); req.open("post", posturl); req.onload = function(event) { alert(event.target.responsetext); }; req.send(formdata); } http put you can also upload a file using an http put operation.
... this is simpler but it doesn't allow sending additional data and web servers usually need special configuration to support put operations.
ContextMenus - Archive of obsolete content
for example, the following will attach a context menu with the id 'contentareacontextmenu' to a browser element: <browser context="contentareacontextmenu"> indicating the default item on some platforms, one of the items in a context menu is marked as being a default operation.
...what constitutes the default item isn't specified, but is usually the operation carried out when the item was left-clicked or pressed normally, as opposed to context clicked.
...you will still need to associate code with the element to handle the default operation.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
this does mean that the clipboard operations are limited to this single textbox.
...the first handler is the cut operation and is invoked when the control key is pressed along with the x key.
... a copy operation is similar but does not clear the text afterwards.
XUL Structure - Archive of obsolete content
http://localhost/~username/ ), regardless of whether they are html or xul or another document type, are limited in the type of operations they can perform, for security reasons.
...by accessing a file using a chrome url, the files receive elevated privileges to access local files, access preferences and bookmarks and perform other privileged operations.
... obviously, web pages do not get these privileges, unless they are signed with a digital certificate and the user has granted permission to perform these operations.
Security Controls - Archive of obsolete content
operational controls: the security controls that are primarily implemented and executed by people (as opposed to systems).
...for example, a security policy is a management control, but its security requirements are implemented by people (operational controls) and systems (technical controls).
...security controls to help thwart phishing, besides the management control of the acceptable use policy itself, include operational controls, such as training users not to fall for phishing scams, and technical controls that monitor emails and web site usage for signs of phishing activity.
Old Proxy API - Archive of obsolete content
object.keys(proxy) keys: function() -> string array function() { return this.getownpropertynames().filter( function (name) { return this.getownpropertydescriptor(name).enumerable } ); } invariants even though proxies provide a lot of power to users, some operations are not trapped in order to keep the language consistent: the triple equal (===) operator is not trapped.
... }; var p = proxy.create(incompletehandler); var q = p.blabla; // alerts 'property blabla accessed' and 1 is assigned to q p.azerty = "trying to set a property"; // throws an error since neither the set trap or the fundamental trap used in the set trap are implemented no-op forwarding proxy in this example, we are using a native javascript object to which our proxy will forward all operations that are applied to it.
... var o = object.create({}); var proxy = proxy.create(handlermaker(o)); proxy.blabla = 12; // thanks to the forwarding, o now has a 'blabla' property with a value of 12 o.blabla++; // just incrementing o.blabla alert(proxy.blabla); // alerts 13: the getting operation is forwarded to o which returns 13.
Index - Learn web development
49 asynchronous javascript beginner, codingscripting, guide, javascript, landing, promises, async, asynchronous, await, callbacks, requestanimationframe, setinterval, settimeout in this module we take a look at asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
... 86 useful string methods article, beginner, codingscripting, javascript, learn, case, indexof, l10n:priority, length, lower, replace, split, upper now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
... 220 client-server overview beginner, codingscripting, guide, intro, learn, server, server-side programming at this point you should have a good overview of the operations that server-side code has to perform, and know some of the ways in which a server-side web framework can make this easier.
Asynchronous JavaScript - Learn web development
in this module we take a look at asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
... handling async operations gracefully with promises promises are a comparatively new feature of the javascript language that allow you to defer further actions until after the previous action has completed, or respond to its failure.
... this is really useful for setting up a sequence of operations to work correctly.
Handling common JavaScript problems - Learn web development
making sure asynchronous operations have returned before trying to use the values they return.
...this kind of operation has been made easier to handle by the introduction of promises to the javascript language.
... for example: promises are a great new feature for performing asynchronous operations and making sure those operations are complete before code that relies on their results is used for something else.
Performance best practices for Firefox front-end engineers
when an interruptible reflow is interrupted, what really happens is that certain layout operations can be skipped in order to paint and process user events sooner.
... when an interruptible reflow is interrupted, the best-case scenario is that all layout is skipped, and the layout operation ends.
... indexeddb is preferable, as the api is asynchronous (all disk operations occur off of the main thread), and can be accessed from web workers.
Embedding Tips
in response it creates a persist object, creates a listener and starts the operation.
... as the operation progresses, methods on the listener such as onstatechange, onprogresschange etc.
...when the operation is completed, the onstatechange will be notified by a combination of state_stop | state_is_network state flags.
HTTP Cache
the cache is using a single background thread where any io operations like opening, reading, writing and erasing happen.
...ng priority cache files also file dooming happens here to prevent races read_priority: top level documents and head blocking script cache files are open and read as the first open read: any normal priority content, such as images are open and read here write: writes are processed as last, we cache data in memory in the mean time management: level for the memory pool and cacheentry background operations close: file closing level index: index is being rebuild here evict: files overreaching the disk space consumption limit are being evicted here note: special case for eviction - when an eviction is scheduled on the io thread, all operations pending on the open level are first merged to the open_priority level.
... the eviction preparation operation - i.e.
AddonListener
edsrestart) void onenabled(in addon addon) void ondisabling(in addon addon, in boolean needsrestart) void ondisabled(in addon addon) void oninstalling(in addon addon, in boolean needsrestart) void oninstalled(in addon addon) void onuninstalling(in addon addon, in boolean needsrestart) void onuninstalled(in addon addon) void onoperationcancelled(in addon addon) void onpropertychanged(in addon addon, in string properties[]) methods onenabling() called when an add-on is about to be enabled.
... void onuninstalled( in addon addon, ) parameters addon the addon that has been uninstalled onoperationcancelled() called when a pending operation for an add-on is cancelled.
... void onoperationcancelled( in addon addon, ) parameters addon the addon that has had a pending operation cancelled onpropertychanged() called when one or more properties of addon has changed.
Download
note: this method should be used in place of the cancel() and removepartialdata() methods while shutting down or disposing of the download object, to prevent other callers from interfering with the operation.
... this is required because cancellation and other operations are asynchronous.
... promise resolves to undefined when the operation has finished successfully.
JavaScript OS.Constants
emfile too many open files in the process enametoolong name too long enfile too many open files on the system enoent no such file or directory enomem cannot allocate memory enospc no space on device enotdir is not a directory enxio device no configured or does not support operation eopnotsupp (not always available under windows) operation not supported.
... eperm operation not permitted erange result too large etimedout (not always available under windows) operation timed out.
... ewouldblock (not always available under windows) operation would block.
Profile Manager
if you attempt to perform any operation on a locked profile, you'll get a warning; if you choose to continue despite the warning, you may encounter errors or corrupt a profile.
... it's strongly recommended to avoid operations on locked profiles.
... other operations context-clicking any profile in the profile list will cause a popup menu to appear with the following commands: copy - makes a copy of the profile using a name and location of your choice.
AsyncTestUtils extended framework
sometimes in your tests you need to wait for an operation to complete that does not occur synchronously (that is, it is not done when the function call you made to initiate the operation returns control to you).
... this is likely to happen when i/o is involved or a potentially expensive process wants to break itself up into smaller chunks (like a search operation) so that the ui stays responsive.
...when the asynchronous operation is complete, something needs to call async_driver().
Nonblocking IO In NSPR
a thread invoking an io function is blocked until the io operation is finished.
...a thread is typically created to attend to one of the simultaneous i/o operations that may potentially block.
...(note: <tt>pr_poll()</tt> also works with blocking file descriptors, although it is less useful in the blocking io model.) when <tt>pr_poll()</tt> reports that a file descriptor is ready for some io operation, the central thread invokes that io function on the file descriptor.
I/O Functions
this chapter describes the nspr functions used to perform operations such as system access, normal file i/o, and socket (network) i/o.
... for sample code that illustrates basic i/o operations, see introduction to nspr.
...the only i/o operation you can perform on a pollable event is to poll it with the pr_poll_read flag.
PR_Writev
timeout a value of type printervaltime describing the time limit for completion of the entire write operation.
... the value -1 indicates that the operation failed.
... description the thread calling pr_writev blocks until all the data is written or the write operation fails.
FIPS Mode - an explanation
it may not do any cryptographic operations that involve the use of cryptographic keys, nor allow any of the keys or certificates it holds to be seen or used, except when a user has successfully authenticated to it.
... nss divides its operations up into two "devices" rather than just one.
... one device does all the operations that may be done without needing to authenticate, and the other device stores the user's certificates and private keys and performs operations that use those private keys.
NSS_3.12_release_notes.html
bug 399326: libpkix is unable to validate cert for certusagestatusresponder bug 400947: thread unsafe operation in pkix_pl_hashtable_add cause selfserv to crash.
...bug 132485: built-in root certs slot description is empty bug 177184: nss_cmsdecoder_cancel might have a leak bug 232392: erroneous root ca tests in nss libraries bug 286642: util should be in a shared library bug 287052: function to get crl entry reason code has incorrect prototype and implementation bug 299308: need additional apis in the crl cache for libpkix bug 335039: nssckfwcryptooperation_updatecombo is not declared bug 340917: crlutil should init nss read-only for some options bug 350948: freebl macro change can give 1% improvement in rsa performance on amd64 bug 352439: reference leaks in modutil bug 369144: certutil needs option to generate subjectkeyid extension bug 391771: pk11_config_name and pk11_config_strings leaked on shutdown bug 401194: crash in lg_findobjects on win64...
...e bug 387621: certutil's random noise generator isn't very efficient bug 390185: signtool error message wrongly uses the term database bug 391651: need config.mk file for windows vista bug 396322: fix secutil's code and nss tools that print public keys bug 417641: miscellaneous minor nss bugs bug 334914: hopefully useless null check of out it in jar_find_next bug 95323: ckfw should support cipher operations.
NSS 3.14.3 release notes
new functions in pk11pub.h pk11_signwithsymkey - similar to pk11_sign, performs a signing operation in a single operation.
... new pkcs #11 mechanisms ckm_nss_hmac_constant_time - constant-time hmac operation for use when verifying a padded, mac-then-encrypted block of data.
... ckm_nss_ssl3_mac_constant_time - constant-time mac operation for use when verifying a padded, mac-then-encrypted block of data using the sslv3 mac.
NSS 3.15 release notes
support for single-operation (eg: not multi-part) symmetric key encryption and decryption, via pk11_encrypt and pk11_decrypt.
... in pk11pub.h pk11_decrypt - performs decryption as a single pkcs#11 operation (eg: not multi-part).
... pk11_encrypt - performs encryption as a single pkcs#11 operation (eg: not multi-part).
NSS 3.16.1 release notes
nss 3.16.1 source distributions are available on ftp.mozilla.org for secure https download: source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/nss_3_16_1_rtm/src/ new in nss 3.16.1 new functionality added the "ecc" flag for modutil to select the module used for elliptic curve cryptography (ecc) operations.
... new macros in secmod.h public_mech_ecc_flag - a public mechanism flag for elliptic curve cryptography (ecc) operations.
... in utilmodt.h secmod_ecc_flag - an nss-internal mechanism flag for elliptic curve cryptography (ecc) operations.
nss tech note6
g libfreebl_32int_3.chk on the 64-bit solaris sparc architecture, there are 2 freebl libraries : libfreebl_64int_3.so for ultrasparc t1 cpus, with a corresponding libfreebl_64int_3.chk libfreebl_64fpu_3.so for other ultrasparc cpus, with a corresponding libfreebl_64fpu_3.chk on the 32-bit hp-ux pa-risc architecture, there are 2 freebl libraries : libfreebl_32fpu_3.sl for cpus that do multiply operations faster in floating point, with a corresponding libfreebl_32fpu_3.chk libfreebl_32int_3.sl for other pa-risc cpus, with a corresponding libfreebl_32int_3.chk on the 64-bit hp-ux pa-risc architecture, there is only one freebl library, called libfreebl3.sl, with a corresponding libfreebl3.chk applications should always use nss binaries that are the output of the regular nss build process.
... if your application modifies nss binaries for any reason after they were built, then : the fips 140 mode of operation will no longer work, because the chk files will no longer match the softoken and freebl shared libraries .
...if you still decide to make unsupported changes, you can allow the softoken to come up in fips 140 mode of operation by regenerating the .chk files yourself.
PKCS11 Implement
it uses a single session for all single-part rsa operations such as logging in, logging out, signing, verifying, generating keys, wrapping keys, and so on.
... c_logout the nss calls c_logout on a token's initial session when the password is timed out when performing any kind of private key operation if "ask always" is turned on when changing a password when the user logs out object management c_createobject the nss calls c_createobject when loading new private keys and new certificates into a token.
... read/write and read-only requirements the nss assumes that the following operations always require a read/write session: creating a token object, such as with c_createobject (token) or c_destroyobject (token) changing a password initializing a token creating session objects must work with a read-only session.
FC_DecryptInit
name fc_decryptinit - initialize a decryption operation.
...pmechanism [in] mechanism to be used for the subsequent decryption operation.
... description fc_decryptinit initializes a decryption operation.
FC_DigestInit
name fc_digestinit - initialize a message-digest operation.
...pmechanism [in] mechanism to be used for the subsequent digest operation.
... description fc_digestinit initializes a message-digest operation.
FC_DigestUpdate
name fc_digestupdate - process the next block of a multi-part digest operation.
... description fc_digestupdate starts or continues a multi-part digest operation.
... one or more blocks may be part of the message digest operation.
FC_SignInit
name fc_signinit - initialize a signing operation.
...pmechanism [in] mechanism to be used for the subsequent signing operation.
... description fc_signinit initializes a signature operation.
FC_SignRecoverInit
name fc_signrecoverinit - initialize a sign recover operation.
...pmechanism [in] mechanism to be used for the signing operation.
... description fc_signrecoverinit initializes a initializes a signature operation where the (digest) data can be recovered from the signature.
FC_VerifyInit
name fc_verifyinit - initialize a verification operation.
...pmechanism [in] mechanism to be used for the verification operation.
... description fc_verifyinit initializes a verification operation where the signature is an appendix to the data.
NSS Tools certutil
this operation should be performed by a ca.
...this extension allows a certificate's key to be dedicated to supporting specific operations such as ssl server or object signing.
... or uid=jsmith, e=jsmith@netscape.com, cn=john smith, o=netscape communications corp., c=us : expired certificate or uid=jsmith, e=jsmith@netscape.com, cn=john smith, o=netscape communications corp., c=us : certificate not approved for this operation ...
NSS tools : signtool
digital signatures allow ssl-enabled clients to perform two important operations: * confirm the identity of the individual, company, or other entity whose digital signature is associated with the files * check whether the files have been tampered with since being signed if you have a signing certificate, you can use netscape signing tool to digitally sign files and package them as a jar file.
...the higher the level of compression, the smaller the output but the longer the operation takes.
... --verbosity value sets the quantity of information netscape signing tool generates in operation.
SpiderMonkey Internals
some spidermonkey bytecode operations have many special cases, depending on the type of their arguments.
...js api users should call js_gc or js_maybegc between script executions or from the operation callback, as often as necessary.
... watchpoints, for intercepting set operations on properties and running a debugger-supplied function that receives the old value and a pointer to the new one, which it can use to modify the new value being set.
JSAPI User Guide
to stop execution of scripts that run too long, use js_setoperationcallback.
...an access check callback function can use jsdbgapi.h functions such as js_frameiterator and js_stackframeprincipals to obtain the principals of the code that is trying to perform the checked operation.
... then it determines whether to allow the operation to proceed.
JSDeletePropertyOp
this callback may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
... the operation then fails, and the error is propagated to the caller.
... otherwise the callback must return true, and the property operation proceeds.
JSPropertyOp
each of these callbacks may veto the ongoing property operation by optionally reporting an error or raising an exception and then returning false.
... the operation then fails, and the error is propagated to the caller.
... otherwise the callback must return true, and the property operation proceeds.
JS_SetExtraGCRoots
syntax void js_setextragcroots(jsruntime *rt, jstracedataop traceop, void *data); argument meaning rt the runtime whose trace operation is to be set.
... traceop the trace operation.
... callback description generic trace operation that calls js_calltracer on additional traceable things.
SpiderMonkey 1.8.5
tocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_addnamedroot – use js_add*root js_addnamedrootrt – use js_add*root js_addroot – use js_add*root js_clearnewbornroots – no longer needed js_clearoperationcallback js_clearregexproots js_decompilescript js_destroyscript js_enterlocalrootscope js_executescriptpart js_forgetlocalroot js_getfunctionname js_getoperationlimit js_getscriptobject js_getstringbytes js_getstringchars js_isassigning js_leavelocalrootscope js_leavelocalrootscopewithresult js_newdouble js_newdoublevalue js_newscriptobject js_newstring js_poparguments js_push...
...arguments js_pushargumentsva js_removeroot js_removerootrt js_sealobject js_setbranchcallback js_setcallreturnvalue2 js_setcheckobjectaccesscallback js_setobjectprincipalsfinder js_setoperationlimit js_setprincipalstranscoder api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
...the primary change in this interface is that it no longer counts operations; embedders are expected find another mechanism (such as a watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback.
SpiderMonkey 31
after this method is called, normal jsapi operations are permitted.
... when all jsapi operation has completed, the corresponding js_shutdown method (currently non-mandatory, but highly recommended as it may become mandatory in the future) uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
... once all jsapi operation has completed, the corresponding js_shutdown method uninitializes spidermonkey, cleaning up memory and allocations performed by js_init.
Interfacing with the XPCOM cycle collector
this is the idle stage of the collector's operation, in which special variants of nsautorefcnt register and unregister themselves very rapidly with the collector, as they pass through a "suspicious" refcount event (from n+1 to n, for nonzero n).
...this is the scanning stage of the collector's operation.
...this is the unlinking stage of the collectors operation.
mozIStorageConnection
lasterrorstring autf8string the english error string reported by the sqlite library for the last sqlite operation.
... lastinsertrowid long long the row id from the last sql insert operation.
... this preload operation can dramatically speed up read operations because the data is loaded as one large block.
nsICancelable
netwerk/base/public/nsicancelable.idlscriptable this interface provides a means to cancel an operation that is in progress.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void cancel(in nsresult areason); methods cancel() call this method to request that this object abort whatever operation it may be performing.
... void cancel( in nsresult areason ); parameters areason a failure code indicating why the operation is being canceled.
nsIDOMUserDataHandler
1.0 66 introduced gecko 1.5 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void handle(in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst); constants constant value description node_cloned 1 the node was cloned.
...void handle( in unsigned short operation, in domstring key, in nsivariant data, in nsidomnode src, in nsidomnode dst ); parameters operation one of the node_* operation type constants from the above table.
...dst the new node, for clone and import operations.
nsIDragSession
widget/public/nsidragsession.idlscriptable provides support for interacting with an ongoing drag session during a drag and drop operation.
... datatransfer nsidomdatatransfer the data transfer object for the current drag operation.
... methods getdata() gets data from a drag and drop operation.
nsIMsgDatabase
string aproperty, in string avalue); void markimapdeleted(in nsmsgkey key, in boolean deleted, in nsidbchangelistener instigator); void applyretentionsettings(in nsimsgretentionsettings amsgretentionsettings, in boolean adeleteviafolder); boolean hasnew(); void clearnewlist(in boolean notify); void addtonewlist(in nsmsgkey key); void startbatch(); void endbatch(); nsimsgofflineimapoperation getofflineopforkey(in nsmsgkey messagekey, in boolean create); void removeofflineop(in nsimsgofflineimapoperation op); nsisimpleenumerator enumerateofflineops(); void listallofflineopids(in nsmsgkeyarrayptr offlineopids); native code only!
... void startbatch(); endbatch() void endbatch(); getofflineopforkey() offline operations - we could move these into an offline operation interface but it would have to be in nsmaildatabase, since local folders can be move destinations.
... nsimsgofflineimapoperation getofflineopforkey(in nsmsgkey messagekey, in boolean create); removeofflineop() void removeofflineop(in nsimsgofflineimapoperation op); enumerateofflineops() nsisimpleenumerator enumerateofflineops(); listallofflineopids() [noscript] void listallofflineopids(in nsmsgkeyarrayptr offlineopids); listallofflinedeletes() [noscript] void listallofflinedeletes(in nsmsgkeyarrayptr offlinedeletes); listallofflinemsgs() [noscript] void listallofflinemsgs(in nsmsgkeyarrayptr offlinemsgs); setattributesonpendinghdr() void setattributesonpendinghdr(in nsimsgdbhdr pendinghdr, in string property, in string propertyval, in long fla...
nsINavHistoryResultViewObserver
oid oncyclecell(in long row, in nsitreecolumn column); void onselectionchanged(); void onperformaction(in wstring action); void onperformactiononrow(in wstring action, in long row); void onperformactiononcell(in wstring action, in long row, in nsitreecolumn column); constants constant value description drop_before -1 the drag operation wishes to insert the dragged item before the indicated row.
... drop_on 0 the drag operation wishes to drop the dragged item onto the indicated row.
... drop_after 1 the drag operation wishes to insert the dragged item after the indicated row.
nsIXPConnect
performs an operation over all of |object|'s xows such as clearing their scopes or updating their concept of the current principal.
... void updatexows( in jscontextptr ajscontext, in nsixpconnectwrappednative aobject, in pruint32 away ); parameters ajscontext a context to use to perform js operations.
... away what operation to perform.
Storage
this can result in significantly higher overhead file operation.
...} note: calling reset is not an expensive operation, and nothing bad happens if you call reset more than once.
... transactions transactions can be used to either improve performance, or group statements together as an atomic operation.
Using the clipboard
three xpcom objects are needed to handle clipboard operations.
...the second parameter can usually be set to null but you could set it to an nsiclipboardowner so that you can tell when the data you've copied is overwritten by another copy operation.
...this would be the same one that cut and paste operations from the edit menu typically use.
Xray vision
waiving xray vision xray vision is a kind of security heuristic, designed to make most common operations on untrusted objects simple and safe.
... however, there are some operations for which they are too restrictive: for example, if you need to see expandos on dom objects.
... the aim of xray vision is to make most common operations simple and safe, avoiding the need to access the underlying object except in more involved cases.
MailNews Protocols
most commands/operations go through the folder object.
...the service class creates and initializes the url object for the operation, and hands that off to a protocol object to run.
...these implement nsimsgprotocol, inherit from nsmsgprotocol, and implement their own protocol-specific interface (nsiimapprotocol, nsipop3protocol, nsinntpprotocol) in addition, in mailnews/db/msgdb/public, we have protocol-specific msg db classes (and in the case of news, a nsinewsdatabase interface), so that we can use polymorphism when msg db operations need to be specialized for different kinds of folders.
Activity Manager examples
// assuming that gjunkprocessor is the entity initiating the junk processing // activity, and it has cancelfolderop method that cancels the operations on folders process.init("processing folder: " + folder.prettiestname, gjunkprocessor); // folder is being filtered/processed process.addsubject(folder); process.cancelhandler = new canceljunkprocess(); ...
...// same for the source folder, it is required for undo operation, but // since it is the subject of this activity (event), it goes into the // subject list.
... // wrap copyservice in a nsvariant component nscomptr<nsiwritablevariant> initiator = do_createinstance(ns_variant_contractid); initiator->setasisupports(reinterpret_cast<nsisupports*>(copyservice)); // subject of the delete operation is the imap folder // wrap it in a nsvariant component nscomptr<nsiwritablevariant> srcfolder = do_createinstance(ns_variant_contractid); srcfolder->setasisupports(reinterpret_cast<nsisupports*>(imapfolder)); copyevent->addsubject(srcfolder); copyevent->init(ns_literal_string("message copy event"), initiator, ns_literal_string("completed successfully"), pr_now() / pr_usec_per_msec, // start time pr_now() / pr_usec_per_msec); // completion time // do not forget to increase the ref counter if needed...
Add to iPhoto
these are declared near the top of the code: const osstatus = ctypes.int32_t; const cfindex = ctypes.long; const optionbits = ctypes.uint32_t; osstatus used to represent the status code resulting from an operation.
...the string can be stored in any of a number of encodings, so you use assorted functions that know how to cope with different encodings to set and get values of cfstrings, as well as to perform typical string operations.
... cfarray the cfarray type is used to create arrays of objects; the objects in the array can be of any type, thanks to a set of callbacks you can provide to handle managing their memory and performing operations such as comparisons.
Mozilla
you can in every case choose the program you prefer to do some operations, and you can also decide not to use any of my scripts and manually enter all of the commands by hand.
... firefox operational information database: sqlite a large amount of operational information about websites visited and browser configuration is stored in relational databases in sqlite used by firefox.
...for example, this popup notification is displayed when a web site requests geolocation information: using raii classes in mozilla raii classes are useful when two operations (e.g., lock/unlock, addref/release, pushstate/popstate) must be paired.
Drawing and Event Handling - Plugins
npp_print: request a platform-specific print operation for the instance.
...if either window or window->window is null, the plug-in must not perform any additional graphics operations on the window and should free any associated resources.
...both methods perform the same operations: they invalidate the specified drawing area prior to repainting or refreshing.
Plug-in Basics - Plugins
in general, the operation of all api functions is the same on all platforms.
...for information about windowed and windowless operation, see windowed and windowless plug-ins.
...the basic operations of the browser, such as navigation, history, and opening files, apply to all pages, regardless of the plug-ins in use.
Streams - Plugins
np_asfileonly: this plug-in gets full random access to the data using platform-specific file operations.
... npres_user_break: the user canceled the stream directly by clicking the stop button or indirectly by some action, such as by deleting the instance or initiating higher-priority network operations.
...this mode gives the plug-in full random access to the data with platform-specific file operations.
AesGcmParams - Web APIs
this must be unique for every encryption operation carried out with a given key.
... the additionaldata property is optional and may be omitted without compromising the security of the encryption operation.
...this determines the size in bits of the authentication tag generated in the encryption operation and used for authentication in the corresponding decryption.
BudgetService.getCost() - Web APIs
the getcost() property of the budgetservice interface returns a promise that resolves to a double indicating the worst-case background operation cost of the provided background operation.
... syntax var apromise = budgetservice.getcost(operation); apromise.then(function(somedouble){ ...
... }); parameters operation must be "silent-push".
BudgetService.reserve() - Web APIs
the reserve() property of the budgetservice interface returns a promise that resolves to a boolean indicating whether the requested budget operation can be reserved.
... syntax var apromise = budgetservice.reserve(operation); apromise.then(function(boolean){ ...
... }); parameters operation desc returns a promise that resolves to a boolean.
Cache.delete() - Web APIs
WebAPICachedelete
options optional an object whose properties control how matching is done in the delete operation.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when set to true, tells the matching operation not to perform vary header matching.
Cache.keys() - Web APIs
WebAPICachekeys
options optional an object whose properties control how matching is done in the keys operation.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when set to true, tells the matching operation not to perform vary header matching.
Cache.match() - Web APIs
WebAPICachematch
options optional an object that sets options for the match operation.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that when set to true tells the matching operation not to perform vary header matching — i.e.
CacheStorage.match() - Web APIs
options optional an object whose properties control how matching is done in the match operation.
... ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that, when set to true, tells the matching operation not to perform vary header matching.
Compositing example - Web APIs
this sample program demonstrates a number of compositing operations.
...extcontent = gcotext.pop(); dd.appendchild(p); var canvastodrawon = createcanvas(); var canvastodrawfrom = createcanvas(); var canvastodrawresult = createcanvas(); var ctx = canvastodrawresult.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.globalcompositeoperation = pop; ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.globalcompositeoperation = "source-over"; ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext(pop, 5, height/2 - 5); ctx.restore(); var ctx = canvastodrawon.getcontext('2d'); ...
... var lightmix = function() { var ctx = canvas2.getcontext("2d"); ctx.save(); ctx.globalcompositeoperation = "lighter"; ctx.beginpath(); ctx.fillstyle = "rgba(255,0,0,1)"; ctx.arc(100, 200, 100, math.pi*2, 0, false); ctx.fill() ctx.beginpath(); ctx.fillstyle = "rgba(0,0,255,1)"; ctx.arc(220, 200, 100, math.pi*2, 0, false); ctx.fill() ctx.beginpath(); ctx.fillstyle = "rgba(0,255,0,1)"; ctx.arc(160, 100, 100, math.pi*2, 0, false); ctx.fill(); ctx.resto...
DataTransfer.clearData() - Web APIs
the datatransfer.cleardata() method removes the drag operation's drag data for the given type.
... this method does not remove files from the drag operation, so it's possible for there still to be an entry with the type "files" left in the object's datatransfer.types list if there are any files included in the drag.
... this method can only be used in the handler for the dragstart event, because that's the only time the drag operation's data store is writeable.
DataTransfer.dropEffect - Web APIs
the datatransfer.dropeffect property controls the feedback (typically visual) the user is given during a drag and drop operation.
...for example, when the user hovers over a target drop element, the browser's cursor may indicate which type of operation will occur.
... syntax datatransfer.dropeffect; values a domstring representing the drag operation effect.
FileReader.readyState - Web APIs
the filereader readystate property provides the current state of the reading operation a filereader is in.
... 2 done the operation is complete.
... done the read operation is complete.
FileRequest.onprogress - Web APIs
summary this property specifies a callback function to be run repeatedly while the operation represented by a filerequest object is in progress.
...those objects contain two properties: loaded a number representing the current amount of bytes processed by the operation.
... total a number representing the total amount of bytes that will be processed by the operation.
FileSystemEntrySync - Web APIs
invalid_modification_err you tried one of the following disallowed operations: moving an entry into its parent without changing its name moving a parent directory into one of its child directories.
... invalid_modification_err you tried one of the following disallowed operations: moving an entry into its parent without changing its name moving a parent directory into one of its child directories.
... quota_exceeded_err the operation would cause the application to exceed its storage quota.
HTMLMediaElement.seekToNextFrame() - Web APIs
this method returns immediately, returning a promise, whose fulfillment handler is called when the seek operation is complete.
... syntax var seekcompletepromise = htmlmediaelement.seektonextframe(); htmlmediaelement.seektonextframe(); return value a promise which is fulfilled once the seek operation has completed.
... firefox 49 returns undefined instead of a promise, and performs the seek operation synchronously.
Recommended Drag Types - Web APIs
dragging files to an operating system folder you may want to add a file to an existing drag event session, and you may also want to write the file to disk when the drop operation happens over a folder in the operating system when your code receives notification of the target folder's location.
...the following sample offers an overview of this advanced case: // currentevent is an existing drag operation event currentevent.datatransfer.setdata("text/x-moz-url", url); currentevent.datatransfer.setdata("application/x-moz-file-promise-url", url); currentevent.datatransfer.setdata("application/x-moz-file-promise-dest-filename", leafname); currentevent.datatransfer.mozsetdataat('application/x-moz-file-promise', new dataprovider(success,error), 0, components.interfaces.nsisupports); function dataprovider(){} dataprovider.prototype = { queryinterface : function(iid) { if (iid.equals(components.interfaces.nsiflavordataprovider) ...
....log("target folder is = " + dir.path); var file = cc['@mozilla.org/file/local;1'].createinstance(components.interfaces.nsilocalfile); file.initwithpath(dir.path); file.appendrelativepath(name); console.log("output final path is =" + file.path); // now you can write or copy the file yourself… } } } see also html drag and drop api (overview) drag operations dragging and dropping multiple items html5 living standard: drag and drop ...
IndexedDB API - Web APIs
synchronous and asynchronous operations performed using indexeddb are done asynchronously, so as not to block applications.
...this method returns an idbrequest object; asynchronous operations communicate to the calling application by firing events on idbrequest objects.
... idbdatabaseexception represents exception conditions that can be encountered while performing database operations.
LockedFile.abort() - Web APIs
WebAPILockedFileabort
summary the abort method is used to release the lock on the lockedfile object, making it inactive: its active property is set to false and all ongoing operations are canceled.
... note: when an ongoing operation is canceled, there is no rollback (it is not a database transaction), therefore the file can be corrupted if the canceled operation was performing some writing.
... syntax var request = instanceoflockedfile.abort(); return a filerequest object to handle the success or failure of the operation.
MediaSessionActionDetails.fastSeek - Web APIs
the boolean property fastseek in the mediasessionactiondetails dictionary is an optional value which, when specified and true, indicates that the requested seekto operation is part of an ongoing series of seekto operations.
... your handler should take steps to return as quickly as possible by skipping any steps of its operation which are only necessary when the seek operation is complete.
... syntax let mediasessionactiondetails = { fastseek: shouldfastseek }; let shouldfastseek = mediasessionactiondetails.fastseek; value a boolean which is true if the action is part of an ongoing series of seek actions which should be treated as part of an overall seek operation.
NDEFWriter.write() - Web APIs
WebAPINDEFWriterwrite
signal -- optional abortsignal that allows to cancell this write operation.
... exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: aborterror the write operation was aborted with abortsignal passed in options.
... notallowederror the permission for this operation was rejected or overwrite is false and there are already records on the tag.
Node.setUserData() - Web APIs
WebAPINodesetUserData
note that such data will not be preserved when imported via node.importnode, as with node.clonenode() and node.renamenode() operations (though node.adoptnode does preserve the information), and equality tests in node.isequalnode() do not consider user data in making the assessment.
... this method offers the convenience of associating data with specific nodes without needing to alter the structure of a document and in a standard fashion, but it also means that extra steps may need to be taken if one wishes to serialize the information or include the information upon clone, import, or rename operations.
...the handler will be passed five arguments: an operation type integer (e.g., 1 to indicate a clone operation), the user key, the data on the node, the source node (null if being deleted), the destination node (the newly created node or null if none).if no handler is desired, one must specify null.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
... a gl.invalid_operation error is thrown if texture isn't 0 or the name of an existing texture object.
PerformanceNavigationTiming.type - Web APIs
the value must be one of the following: navigate navigation started by clicking a link, entering the url in the browser's address bar, form submission, or initializing through a script operation other than reload and back_forward as listed below.
... reload navigation is through the browser's reload operation or location.reload().
... back_forward navigation is through the browser's history traversal operation.
PublicKeyCredentialCreationOptions.timeout - Web APIs
the timeout property, of the publickeycredentialcreationoptions dictionary, represents an hint, given in milliseconds, for the time the script is willing to wait for the completion of the creation operation.
... note: an analogous option exists for the fetching operation (navigators.credentials.get()), see publickeycredentialrequestoptions.timeout.
... syntax timeout = publickeycredentialcreationoptions.timeout value a numerical hint, expressed in milliseconds, giving the time to wait for the creation operation to complete.
PublicKeyCredentialCreationOptions - Web APIs
publickeycredentialcreationoptions.pubkeycredparams an array of element which specify the desired features of the credential, including its type and the algorithm used for the cryptographic signature operations.
... publickeycredentialcreationoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the creation operation to complete.
... publickeycredentialcreationoptions.authenticatorselection optional an object whose properties are criteria used to filter out the potential authenticators for the creation operation.
SourceBuffer.abort() - Web APIs
the mse api is fully asynchronous, but this step seems to suggest a synchronous (blocking) operation, which doesn't make sense.
... saying that, current implementations can be useful in certain situations, when you want to stop the current append (or whatever) operation occuring on a sourcebuffer, and then immediately start performing operations on it again.
...a buffer is being appended but the operation has not yet completed) a user "scrubs" the video seeking to a new point in time.
SpeechSynthesisErrorEvent.error - Web APIs
audio-busy the operation couldn't be completed at this time because the user-agent couldn't access the audio output device (for example, the user may need to correct this by closing another application.) audio-hardware the operation couldn't be completed at this time because the user-agent couldn't identify an audio output device (for example, the user may need to connect a speaker or configure system settings.) netwo...
...rk the operation couldn't be completed at this time because some required network communication failed.
... synthesis-unavailable the operation couldn't be completed at this time because no synthesis engine was available (for example, the user may need to install or configure a synthesis engine.) synthesis-failed the operation failed because the synthesis engine raised an error.
SubtleCrypto.encrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
... operationerror raised when the operation failed for an operation-specific reason (e.g.
... supported algorithms the web crypto api provides four algorithms that support the encrypt() and decrypt() operations.
USBDevice - Web APIs
WebAPIUSBDevice
usbdevice.controltransferin() returns a promise that resolves with a usbtransferinresult when a command or status operation has been transmitted to the usb device.
... usbdevice.controltransferout() returns a promise that resolves with a usbtransferoutresult when a command or status operation has been transmitted from the usb device.
... usbdevice.reset() returns a promise that resolves when the device is reset and all app operations canceled and their promises rejected.
UserDataHandler - Web APIs
methods handle (operation, key, data, src, dst) (no return value) this method is a callback which will be called if a node is being cloned, imported, renamed and as well, if deleted or adopted.
... operation (unsigned short) is an operation type integer (see below).
... constants constant value operation node_cloned 1 node.clonenode() node_imported 2 document.importnode() node_deleted unimplemented (see bug 550400) 3 node_renamed unimplemented 4 node.renamenode() node_adopted 5 document.adoptnode() (node_renamed is currently not supported since node.renamenode() is not supported.) specification dom level 3 core: userdatahandler ...
WebGLRenderingContext.bufferData() - Web APIs
gl.transform_feedback_buffer: buffer for transform feedback operations.
... gl.pixel_pack_buffer: buffer used for pixel transfer operations.
... gl.pixel_unpack_buffer: buffer used for pixel transfer operations.
WebGLRenderingContext.bufferSubData() - Web APIs
gl.transform_feedback_buffer: buffer for transform feedback operations.
... gl.pixel_pack_buffer: buffer used for pixel transfer operations.
... gl.pixel_unpack_buffer: buffer used for pixel transfer operations.
WebGLRenderingContext.framebufferTexture2D() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
... a gl.invalid_operation error is thrown if texture isn't 0 or the name of an existing texture object.
WebGLRenderingContext.getBufferParameter() - Web APIs
gl.transform_feedback_buffer: buffer for transform feedback operations.
... gl.pixel_pack_buffer: buffer used for pixel transfer operations.
... gl.pixel_unpack_buffer: buffer used for pixel transfer operations.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
a gl.invalid_operation error is thrown if stride and offset are not multiples of the size of the data type.
... a gl.invalid_operation error is thrown if no webglbuffer is bound to the array_buffer target.
... when using a webgl 2 context, a gl.invalid_operation error is thrown if this vertex attribute is defined as a integer in the vertex shader (e.g.
Color masking - Web APIs
you can think of the color masking operation as if looking at the colored canvas through some tinted glass or color filter.
...this means that graphics operations in webgl are done in a certain order, where the output of each operation serves as the input of the next.
... so, for example, clearing operation sets the value of each pixel to the chosen clear color.
WebGL by example - Web APIs
clearing by clicking how to combine user interaction with graphics operations.
... basic scissoring how to draw simple rectangles and squares with scissoring operations.
... scissor animation some animation fun with scissoring and clearing operations.
WebGL constants - Web APIs
invalid_operation 0x0502 returned from geterror.
... framebuffer_incomplete_attachment 0x8cd6 framebuffer_incomplete_missing_attachment 0x8cd7 framebuffer_incomplete_dimensions 0x8cd9 framebuffer_unsupported 0x8cdd framebuffer_binding 0x8ca6 renderbuffer_binding 0x8ca7 max_renderbuffer_size 0x84e8 invalid_framebuffer_operation 0x0506 pixel storage modes constants passed to webglrenderingcontext.pixelstorei().
... gpu_disjoint_ext 0x8fbb a boolean indicating whether or not the gpu performed any disjoint operation.
Geometry and reference spaces in WebXR - Web APIs
fundamentals of 3d geometry while we'll examine here the required math operations used to compute the positions, orientations, and movement of objects in virtual space—plus the need to integrate the human viewer of the scene into the mix—a thorough introduction to geometry and the use of matrices and vectors to manage 3d representations of a scene is well beyond the scope of what can be accomplished in this article.
... you can learn more about the individual operations in matrix math for the web.
... geometry operations with matrices we offer a guide to matrix mathematics as it pertains to 3d geometry, including how matrices are used for the three primary transforms that need to be performed when rendering 3d scenes: translation is the use of a matrix to shift the position of a point through the virtual space.
Using Web Workers - Web APIs
s.postmessage = function(message) { worker.postmessage(message); } this.terminate = function() { worker.terminate(); } } then we add the methods of adding/removing listeners: this.addlisteners = function(name, listener) { listeners[name] = listener; } this.removelisteners = function(name) { delete listeners[name]; } here we let the worker handle two simple operations for illustration: getting the difference of two numbers and making an alert after three seconds.
... first we need to have the methods to handle the two simple operations: var queryablefunctions = { getdifference: function(a, b) { reply('printstuff', a - b); }, waitsometime: function() { settimeout(function() { reply('doalert', 3, 'seconds'); }, 3000); } } function reply() { if (arguments.length < 1) { throw new typeerror('reply - takes at least one argument'); return; } postmessage...
...transferable objects are transferred from one context to another with a zero-copy operation, which results in a vast performance improvement when sending large data sets.
Synchronous and asynchronous requests - Web APIs
xhr.onerror = xhrerror; xhr.open("get", url, true); xhr.send(null); } usage: function showmessage(message) { console.log(message + this.responsetext); } loadfile("message.txt", showmessage, "new message!\n\n"); the signature of the utility function loadfile declares (i) a target url to read (via an http get request), (ii) a function to execute on successful completion of the xhr operation, and (iii) an arbitrary list of additional arguments that are passed through the xhr object (via the arguments property) to the success callback function.
... line 1 declares a function invoked when the xhr operation completes successfully.
... line 5 declares a function invoked when the xhr operation fails to complete successfully.
ARIA: feed role - Accessibility
aria-busy when busy, such as when articles are being added or removed from the feed, set aria-busy="true" during the update operation.
... make sure it's reset to false when the operation is complete or the changes may not become visible.
...for example, setting aria-busy to true during the update operation if needed, and then to false upon completion.
CSP: sandbox - HTTP
if this keyword is not used, this operation is not allowed.
...if this keyword is not used, this operation is not allowed.
...if this keyword is not used, this operation is not allowed.
An overview of HTTP - HTTP
WebHTTPOverview
between the client and the server there are numerous entities, collectively called proxies, which perform different operations and act as gateways or caches, for example.
... requests an example http request: requests consists of the following elements: an http method, usually a verb like get, post or a noun like options or head that defines the operation the client wants to perform.
... typically, a client wants to fetch a resource (using get) or post the value of an html form (using post), though more operations may be needed in other cases.
Array - JavaScript
description arrays are list-like objects whose prototype has methods to perform traversal and mutation operations.
...the array's object properties and list of array elements are separate, and the array's traversal and mutation operations cannot be applied to these named properties.
... common operations create an array let fruits = ['apple', 'banana'] console.log(fruits.length) // 2 access an array item using the index position let first = fruits[0] // apple let last = fruits[fruits.length - 1] // banana loop over an array fruits.foreach(function(item, index, array) { console.log(item, index) }) // apple 0 // banana 1 add an item to the end of an array let newlength = fruits.push('orange') // ["apple", "banana", "orange"] remove an item from the end of an array let last = fruits.pop() // remove orange (from the end) // ["apple", "banana"] remove an item from the beginning of an array let first = fruits.shift() // remove apple from the front // ["banana"] add an item to the beginning of an array let newlength = fruits.unshift('strawberry') // add to the f...
Atomics.and() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... description the bitwise and operation only yields 1, if both a and b are 1.
... the truth table for the and operation is: a b a & b 0 0 0 0 1 0 1 0 0 1 1 1 for example, a bitwise and of 5 & 1 results in 0001 which is 1 in decimal.
Atomics.or() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... description the bitwise or operation yields 1, if either a or b are 1.
... the truth table for the or operation is: a b a | b 0 0 0 0 1 1 1 0 1 1 1 1 for example, a bitwise or of 5 & 1 results in 0101 which is 5 in decimal.
Atomics.xor() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
... description the bitwise xor operation yields 1, if a and b are different.
... the truth table for the xor operation is: a b a ^ b 0 0 0 0 1 1 1 0 1 1 1 0 for example, a bitwise xor of 5 ^ 1 results in 0100 which is 4 in decimal.
NaN - JavaScript
there are five different types of operations that return nan: number cannot be parsed (e.g.
... parseint("blabla") or number(undefined)) math operation where the result is not a real number (e.g.
...0 * infinity) any operation that involves a string and is not an addition operation (e.g.
Promise() constructor - JavaScript
the signature of this function is expected to be: function(resolutionfunc, rejectionfunc){ // typically, some asynchronous operation.
... therefore, the code within the executor has the opportunity to perform some operation and then reflect the operation's outcome(if the value is not another promise object) as either "fulfilled" or "rejected" by terminating with an invocation of either the resolutionfunc or the rejectionfunc, respectively.
...the side-effect is that the promiseobj becomes "resolved." typically, it works like this: the operation within executor is asynchronous and provides a callback.
async function - JavaScript
await expressions suspend progress through an async function, yielding control and subsequently resuming progress only when an awaited promise-based asynchronous operation is either fulfilled or rejected.
...as a result, we must be mindful of error handling behavior when dealing with concurrent asynchronous operations.
... in concurrentpromise, promise.all wires up the promise chain in one go, meaning that the operation will fail-fast regardless of the order of rejection of the promises, and the error will always occur within the configured promise chain, enabling it to be caught in the normal way.
switch - JavaScript
methods for multi-criteria case source for this technique is here: switch statement multiple cases in javascript (stack overflow) multi-case : single operation this method takes advantage of the fact that if there is no break below a case clause it will continue to execute the next case clause regardless if the case meets the criteria.
... (see the section what happens if i forgot a break?) this is an example of a single operation sequential case statement, where four different values perform exactly the same.
... var animal = 'giraffe'; switch (animal) { case 'cow': case 'giraffe': case 'dog': case 'pig': console.log('this animal will go on noah\'s ark.'); break; case 'dinosaur': default: console.log('this animal will not.'); } multi-case : chained operations this is an example of a multiple-operation sequential case clause, where, depending on the provided integer, you can receive different output.
color-interpolation-filters - SVG: Scalable Vector Graphics
the color-interpolation-filters attribute specifies the color space for imaging operations performed via filter effects.
... notes: this property just has an affect on filter operations.
...thus, in the default case, filter effects operations occur in the linearrgb color space, whereas all other color interpolations occur by default in the srgb color space.
edgeMode - SVG: Scalable Vector Graphics
the edgemode attribute determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
... two elements are using this attribute: <feconvolvematrix> and <fegaussianblur> feconvolvematrix for <feconvolvematrix>, edgemode determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
... fegaussianblur for <fegaussianblur>, edgemode determines how to extend the input image as necessary with color values so that the matrix operations can be applied when the kernel is positioned at or near the edge of the input image.
Understanding WebAssembly text format - WebAssembly
bulk memory operations bulk memory operations are a newer addition to the language (for example, in firefox 79) — seven new built-in operations are provided for bulk memory operations such as copying and initializing, to allow webassembly to model native functions such as memcpy and memmove in a more efficient, performant way.
... the new operations are: data.drop: discard the data in an data segment.
... note: you can find more information in the bulk memory operations and conditional segment initialization proposal.
places/bookmarks - Archive of obsolete content
save() and search() are both asynchronous functions: they synchronously return a placesemitter object, which then asynchronously emits events as the operation progresses and completes.
... data events are emitted for every individual operation (such as: each item saved, or each item found by a search query), whereas end events are emitted as the aggregate of an operation, passing an array of objects into the handler.
jpm-mobile - Archive of obsolete content
$ adb shell pm list packages | grep org.mozilla package:org.mozilla.firefox $ jpm-mobile run -b firefox # the package name is firefox -v --verbose verbose operation.
... $ adb shell pm list packages | grep org.mozilla package:org.mozilla.firefox $ jpm-mobile run -b firefox # the package name is firefox -v --verbose verbose operation.
JavaScript Daemons Management - Archive of obsolete content
mydaemon.close([backwards[, force]]) closes the daemon, doing synchronously all pending operations forward (index of each invocation increasing) or backwards (index decreasing).
... mydaemon.reclose([force]) closes the daemon, doing synchronously all pending operations in the same direction in which is oriented the daemon.
JavaScript timers - Archive of obsolete content
the setimmediate() function can be used instead of the settimeout(fn, 0) method to execute heavy operations in ie.
... setimmediate() calls a function immediately after the browser has completed other operations, such as events and display updates.
Code snippets - Archive of obsolete content
oxes alerts and notifications modal and non-modal ways to notify users preferences code used to read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other applications <canvas> related what wg canvas-related code signing a xpi how to sign an xpi with pki delayed execution performing background operations.
... browser-oriented code tabbed browser code (firefox/seamonkey) basic operations, such as page loading, with the tabbed browser, which is the heart of mozilla's browser applications cookies reading, writing, modifying, and removing cookies page loading code used to load pages, reload pages, and listen for page loads interaction between privileged and non-privileged code how to communicate from extensions to websites and vice-versa.
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
persist the persist attribute is an easy way to record and store a xul element’s state after it has been changed by a user operation.
... note: to see this sample in operation, use any image as the one to display and place it in the same folder as the xul document.
progress - Archive of obsolete content
loaded unsigned long (long) the number of bytes transferred since the beginning of the operation.
... total unsigned long (long) the total number of bytes of content that will be transferred during the operation.
Defining Cross-Browser Tooltips - Archive of obsolete content
authors who are faced with the prospect of editing a large collection of legacy documents should be able to convert their documents using a batch find-and-replace operation, for example substituting alt= for title=.
... if such a find-and-replace operation is somehow not feasible, authors with the ability to run proxy servers can use the approach proposed by christian jensen (cf.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
n -lll dn: ou=browser,ou=information,dc=int-evry,dc=fr dn: sn=http_server,ou=browser,ou=information,dc=int-evry, dc=fr cn: web1.int-evry.fr cn: web2.int-evry.fr dn: sn=http_unix_file, ou=browser,ou=information,dc=int-evry, dc=fr cn: /browser/config_file_unix.jsc dn: sn=http_win_file, ou=browser,ou=information,dc=int-evry, dc=fr cn: /browser/config_file_win.jsc netscape.cfg here we select an operational ldap server simply by testing a ldap query, to make sure that our ldap queries for setting preferences will be answered.
...we use the autoadmin operation to redirect // netscape.cfg to read the plain-text "config-file-unix.jsc" file.
Drag and Drop - Archive of obsolete content
ondrag called periodically throughout the drag and drop operation.
... ondragend called when the drag operation is finished.
generateCRMFRequest() - Archive of obsolete content
the dialog describes the key generation process and gives the user the opportunity to cancel the operation.
... "error:usercancel" the user has canceled the key generation operation "error:internalerror" the software encountered some internal error, such as out of memory ...
importUserCertificates - Archive of obsolete content
if the import operation succeeds, an empty string will be returned.
... if it fails, one of the following error strings will be returned: error string description "error:usercancel" the user canceled the import operation "error:invalidcertificate" one of the certificate packages was incorrectly formatted "error:internalerror" the software encountered some internal error, such as out of memory "error:invalidrequestid" the request id in the response message does not match any outstanding request ...
JavaScript crypto - Archive of obsolete content
this function will issue a user prompt to confirm the operation before the add or delete actually occurs.
...the next private operation on any token will require the user password again.
Space Manager Detailed Design - Archive of obsolete content
nsiframe* mframe; // single frame occupying the space nsvoidarray* mframes; // list of frames occupying the space }; bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsiframe*); bandrect(nscoord aleft, nscoord atop, nscoord aright, nscoord abottom, nsvoidarray*); ~bandrect(); // list operations bandrect* next() const {return (bandrect*)pr_next_link(this);} bandrect* prev() const {return (bandrect*)pr_prev_link(this);} void insertbefore(bandrect* abandrect) {pr_insert_before(abandrect, this);} void insertafter(bandrect* abandrect) {pr_insert_after(abandrect, this);} void remove() {pr_remove_link(this);} // split the band rect into two vertically, ...
...amelist(const bandrect* abandrect) const; print32 length() const; }; // circular linked list of band rects struct bandlist : bandrect { bandlist(); // accessors prbool isempty() const {return pr_clist_is_empty((prcliststr*)this);} bandrect* head() const {return (bandrect*)pr_list_head(this);} bandrect* tail() const {return (bandrect*)pr_list_tail(this);} // operations void append(bandrect* abandrect) {pr_append_link(abandrect, this);} // remove and delete all the band rects in the list void clear(); }; frameinfo* getframeinfofor(nsiframe* aframe); frameinfo* createframeinfo(nsiframe* aframe, const nsrect& arect); void destroyframeinfo(frameinfo*); void clearframeinfo(); void clearbandrects(); bandrect...
Writing to Files - Archive of obsolete content
in this example, the operations are enclosed in a try-catch block in order to capture any errors that might occur during the process.
...the write32 method performs a similar operation except that the value 1000 is written using four bytes, padding the unused bits with zeroes.
MenuButtons - Archive of obsolete content
in this situation, this menuitem performs the same operation as pressing the regular part of the button.
...as with this example, the 'menu-button' type of button is usually used when the menu provides more specific options pertaining to the operation.
Panels - Archive of obsolete content
naturally, this function would also include code to start the search operation.
...this is the normal way in which a user would cancel the operation.
PopupEvents - Archive of obsolete content
the default operation of the popupshowing event is to continue showing the popup.
...in this situation the command event has already been sent to the selected menuitem and the operation already carried out.
The Joy of XUL - Archive of obsolete content
xpconnect is a technology which enables simple interoperation between xpcom and javascript.
...the calendar application is comprised of a xul front end and an xpcom component that leverages libical, a native library written in c, for date operations and calendar data storage.
Additional Install Features - Archive of obsolete content
you can call this function at any point during the installation script to determine whether an error occured during the last operation.
...during installation, a log file is created that contains the operations that are performed.
command - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] a command element can be used to invoke an operation that can come from multiple sources.
... for example, a clipboard paste operation can be invoked from the edit menu, a context menu and by pressing a keyboard shortcut.
dialog - Archive of obsolete content
cancel: the cancel button which will cancel the operation.
... cancel: the cancel button which will cancel the operation.
prefwindow - Archive of obsolete content
cancel: the cancel button which will cancel the operation.
... cancel: the cancel button which will cancel the operation.
2006-11-10 - Archive of obsolete content
he wants to know how to create new threads using javascript for background download operations.
... neil deakin points out that "downloads and other network operations are always done in another thread so you shouldn't be creating one yourself".
NPN_SetValue - Archive of obsolete content
description a good place to set plugin operation mode such as windowless mode is npp_new, so the browser knows right away what mode the plugin is designed to operate in.
...to set windowless operation, call npn_setvalue with nppvpluginwindowbool as the variable parameter and false as the value parameter.
NPAPI plugin reference - Archive of obsolete content
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
... npp_print requests a platform-specific print operation for an embedded or full-screen plug-in.
Introduction to SSL - Archive of obsolete content
for more information about the handshake process, see "the ssl handshake." ciphers used with ssl the ssl protocol supports the use of a variety of different cryptographic algorithms, or ciphers, for use in operations such as authenticating the server and client to each other, transmitting certificates, and establishing session keys.
... using all data generated in the handshake so far, the client (with the cooperation of the server, depending on the cipher being used) creates the premaster secret for the session, encrypts it with the server's public key (obtained from the server's certificate, sent in step 2), and sends the encrypted premaster secret to the server.
Using IO Timeout And Interrupt On NT - Archive of obsolete content
a thread calling an io function is blocked until the io operation finishes, either due to a successful io completion or an error.
... if the io operation cannot complete before the specified timeout, the io function returns with <tt>pr_io_timeout_error</tt>.
Using JavaScript Generators in Firefox - Archive of obsolete content
function closegenerator() { settimeout(function() { generator.close(); }, 0); } // our main steps function databaseoperation() { mozindexeddb.open("mytestdatabase").onsuccess = grabevent; var event = yield; var db = event.target.result; if (db.version != "1.0") { db.setversion("1.0").onsuccess = grabevent; event = yield; var transaction = event.transaction; db.createobjectstore("stuff"); transaction.oncomplete = grabevent; yield; } db.transaction(["stuff"]).objectstore("stuff").
... yield; } generator = databaseoperation(); generator.next(); ...
Array comprehensions - Archive of obsolete content
var numbers = [1, 2, 3, 4]; var doubled = [for (i of numbers) i * 2]; console.log(doubled); // logs 2,4,6,8 this is equivalent to the following map() operation: var doubled = numbers.map(i => i * 2); comprehensions can also be used to select items that match a particular expression.
... here is a comprehension which selects only even numbers: var numbers = [1, 2, 3, 21, 22, 30]; var evens = [for (i of numbers) if (i % 2 === 0) i]; console.log(evens); // logs 2,22,30 filter() can be used for the same purpose: var evens = numbers.filter(i => i % 2 === 0); map() and filter() style operations can be combined into a single array comprehension.
RDF in Mozilla FAQ - Archive of obsolete content
refresh() takes a single parameter that indicates whether you'd like it to perform its operation synchronously ("blocking") or asynchrounously ("non-blocking").
...these methods return an nsirdfcontainer which allows you to do container-like operations without getting your hands too dirty.
The Business Benefits of Web Standards - Archive of obsolete content
reduce costs of maintenance and site operations what is maintenance anyway?
...ultimately that better user experience delivers the business or operational objectives of the site.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
depending on how processor-intensive these operations are, they can delay your async code even further, as any async code will execute only after the main thread is available.
...this is the key to the whole operation — you are setting the variable defined earlier to an active requestanimation() call, which takes the draw() function as its parameter.
Client-side storage - Learn web development
database operations take time.
... you don't want to hang the browser while you wait for the results, so database operations are asynchronous, meaning that instead of happening immediately, they will happen at some point in the future, and you get notified when they're done.
Useful string methods - Learn web development
previous overview: first steps next now that we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
...to actually update the value of the browsertype variable in a real program, you'd have to set the variable value to be the result of the operation; it doesn't just update the substring value automatically.
What is JavaScript? - Learn web development
operations on pieces of text (known as "strings" in programming).
...st buttons = document.queryselectorall('button'); for (let i = 0; i < buttons.length ; i++) { buttons[i].addeventlistener('click', createparagraph); } note: in general more comments are usually better than less, but you should be careful if you find yourself adding lots of comments to explain what variables are (your variable names perhaps should be more intuitive), or to explain very simple operations (maybe your code is overcomplicated).
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
try restarting the dev server and going to localhost:4200 again, and you'll now see that we have a fully-operational battlestation “todos left” counter and clear button: if you're asking yourself why we're not just doing the toggle on the component, since the function is entirely self-contained and not at all needing anything from the service, then you are 100% right to ask that question!
... however, because *eventually*, we'll want to persist or sync all changes to the todos list to local storage (see the final version of the app), it makes sense to have all persistent-state-changing operations be in the same place.
Working with Svelte stores - Learn web development
for security reasons the svelte repl works in a sandboxed environment which will not let you access web torage, and you will get a "the operation is insecure" error.
... notice that we only had to redefine the set() method, adding the operation to save the value to web storage.
Command line crash course - Learn web development
this allows you to run an operation against a potentially large number of files at once, all of which match the specified pattern.
... the pipe operator can connect these inputs and outputs together, allowing us to build up increasingly more complex operations to suit our needs — the output from one command can become the input to the next command.
Mozilla’s UAAG evaluation report
(p1) ni still working on active accessibility support for other kinds of content 6.4 programmatic operation.
... (p1) vg can use keyboard api to control mozilla, by generating keystrokes programmatically when in-process, can use dom to generate events uses active accessibility to provide program access to controls do not support all active accessibility features for programmatic operation (put_accname, put_accvalue not yet supported) 6.5 programmatic alert of changes.
Limitations of chrome scripts
if browser code tries an unsafe cpow operation, the browser will throw an exception and you'll see an "unsafe cpow usage forbidden” error in the browser console.
...however, if an add-on passes a cpow into a platform api, and that platform api then attempts an unsafe operation on it, this will throw an exception.
CustomizableUI.jsm
canundoreset bool whether the "restore defaults" operation can be reverted.
... this is only true after "restore defaults" has been performed and no other ui changes happen after the "restore defaults" operation.
JavaScript code modules
geometry.jsm provides routines for performing basic geometric operations on points and rectangles.
... task.jsm implements a subset of task.js to make sequential, asynchronous operations simple, using the power of javascript's yield operator.
Basics
so it responds to other browser operations such as the zoom (try view -> text zoom), and you can do links a 2 + b 2 = c 2 , apply stylistic effects a 2 + b 2 = c 2 , or use color a 2 + b 2 = c 2 in very strange ways p(x) q(x) = a0 + a1x + a2 x2 + ...
... you can also do other weird and risky things which are not portable, bongo warns, such as mixing mathml with other markups lizard + bongo = ∫ a b d x + mathml and javascript html content <p> and you can turn to javascript and the dom for dynamic operations.
MathML Demo: <mo> - operator, fence, separator, or accent
binary operators and relations the following table contains instances of all operators found on the swp binary operations and binary relations panels.
...in general, the lspace and rspace around the relation should be greater than that around the operation.
Gecko Profiler FAQ
when profiling hundred(s) of threads at low intervals, does this distort the measurement or operation?
...i want to profile all threads, not just main plus a couple of others) we haven’t done any measurements of how frequent sampling distorts measurement or operation.
MailNews automated testing
testing frameworks the asynctestutils extended framework supports: asynchronous test operation: a reasonably convenient means of writing tests that involve asynchronous operations by using generators.
... in the long term we would like to lose this extra complexity in favor of the event-loop-spinning style of operation used by mozmill.
Interval Timing
this chapter describes printervaltime and the functions that allow you to use it for timing purposes: interval time type and constants interval functions interval time type and constants all timed functions in nspr require a parameter that depicts the amount of time allowed to elapse before the operation is declared failed.
...such parameters are common in nspr functions such as those used for i/o operations and operations on condition variables.
Long Long (64-bit) Integers
« previousnext » this chapter describes the global functions you use to perform 64-bit integer operations.
...most of the 64-bit integer operations are implemented as macros.
PR_RecvFrom
timeout a value of type printervaltime specifying the time limit for completion of the receive operation.
...the operation blocks until one or more bytes are transferred, a timeout has occurred, or there is an error.
PR_Write
the value -1 indicates that the operation failed.
... description the thread invoking pr_write blocks until all the data is written or the write operation fails.
Encrypt Decrypt MAC Keys As Session Objects
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 "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s ...
...py(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt...
Encrypt and decrypt MAC using token
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 "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s ...
...py(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt...
4.3.1 Release Notes
sslsocket.ssl_renegotiate_requires_xtn - not yet implemented explicitly set the key usage for the generated private key in pkcs #11, each keypair can be marked with the operations it will be used to perform.
... some tokens require that a key be marked for an operation before the key can be used to perform that operation; other tokens don't care.
JSS
MozillaProjectsNSSJSS
nss is the cryptographic module where all cryptographic operations are performed.
...when nss is put in fips mode, jss ensures fips compliance by ensuring that all cryptographic operations are performed by the nss cryptographic module.
NSS 3.49.2 release notes
bugs fixed in nss 3.49.2 bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... nss 3.49.1 sped up pbkdf2 operations, though pbkdf1 operations are also relevant for older nss databases.
NSS 3.50 release notes
bugs fixed in nss 3.50 bug 1599514 - update dtls 1.3 implementation to draft-30 bug 1603438 - fix native tools build failure due to lack of zlib include dir if external bug 1599603 - nist sp800-108 kbkdf - pkcs#11 implementation bug 1606992 - cache the most recent pbkdf1 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
... nss 3.49.1 sped up pbkdf2 operations, though pbkdf1 operations are also relevant for older nss databases (also included in nss 3.49.2) bug 1608895 - gyp builds on taskcluster broken by setuptools v45.0.0 (for lacking python3) bug 1574643 - upgrade hacl* verified implementations of chacha20, poly1305, and 64-bit curve25519 bug 1608327 - two problems with neon-specific code in freebl bug 1575843 - detect aarch64 cpu features on freebsd bug 1607099 - remove the buildbot configuration bug 1585429 - add more hkdf test vectors bug 1573911 - add more rsa test vectors bug 1605314 - compare all 8 bytes of an mp_digit when clamping in windows assembly/mp_comba bug 1604596 - update wycheproof vectors and add support for cbc, p256-ecdh, and cmac tests bug 1608493 - use aes-ni for non-gcm aes ciphers...
Enc Dec MAC Output Public Key as CSR
, 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' for decrypt operation\n\n", "d"); fprintf(stderr, "%-20s specify db directory path\n\n", "-d "); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s s...
... default: return secfailure; } pr_fprintf(outfile, "%s\n", header); printasascii(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(type, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(type, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can'...
Encrypt Decrypt_MAC_Using Token
*/ 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 "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s ...
... */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt...
NSS Sample Code Sample_3_Basic Encryption and MACing
key = 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", " "); fprintf(stderr, "%-20s specify db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-20s specify db password [optional]\n\n", "-p <dbpwd>"); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f <dbpwdfi...
...py(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt...
EncDecMAC using token object - sample 3
-----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 "); fprintf(stderr, "%-20s specify db password file [optional]\n\n", "-f "); fprintf(stderr, "%-20s specify noise file name [optional]\n\n", "-z "); fprintf(stderr, "%-21s specify an input ...
...); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } pr_fprintf(outfile, "%s\n", header); printashex(outfile, buf, len); pr_fprintf(outfile, "%s\n\n", trailer); return secsuccess; } /* * initialize for encryption or decryption - common code */ pk11context * cryptinit(pk11symkey *key, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type, ck_attribute_type operation) { secitem ivitem = { sibuffer, iv, ivlen }; pk11context *ctx = null; secitem *secparam = pk11_paramfromiv(ckm_aes_cbc, &ivitem); if (secparam == null) { pr_fprintf(pr_stderr, "crypt failed : secparam null\n"); return null; } ctx = pk11_createcontextbysymkey(ckm_aes_cbc, operation, key, secparam); if (ctx == null) { pr_fprintf(pr_stderr, "crypt failed : can't create a context\n"); goto cleanup; }...
nss tech note2
using the pkcs #11 module logger nss technical note: 2 modes of operation extracting output from log files the logger displays all activity between nss and a specified pkcs #11 module.
...modes of operation the logger has several modes of operation: 1.
nss tech note7
it takes a modulus size data and does a raw rsa operation on the data.
...pkcs #1 v1.5 block formatting question: in pkcs #1 v1.5 (section 8.1 encryption-block formatting) and v2.1 (section 7.2.1 encryption operation), pkcs1 v1.5 padding is described like this: 00 || 02 || ps || 00 || m but in pkcs #1 v2.0 (section 9.1.2.1 encoding operation, step 3) and on the w3c web site (http://www.w3.org/tr/xmlenc-core/#rsa-1_5), pkcs1 v1.5 padding is described like this: 02 || ps || 00 || m 00 at the beginning is missing.
NSS PKCS11 Functions
description during the course of an ssl operation, it may be necessary for the user to log in to a pkcs #11 token (either a smart card or soft token) to access protected information, such as a private key.
...several functions in the nss libraries use the password callback function to obtain the password before performing operations that involve the protected information.
FC_DecryptFinal
name fc_decryptfinal - finish a multi-part decryption operation.
... description fc_decryptfinal returns the last block of data of a multi-part decryption operation.
FC_DecryptUpdate
name fc_decryptupdate - decrypt a block of a multi-part encryption operation.
...the block may be part of a multi-part decryption operation.
FC_Digest
pusdigestlen [in, out] pointer to the maximum size of the output buffer, replaced by the length of the message digest if the operation is successful.
... description fc_digest digests a message in a single operation according to the attributes of the previous call to fc_digestinit.
FC_DigestFinal
name fc_digestfinal - finish a multi-part digest operation.
... description fc_digestfinal finishes a multi-part digest operation by returning the complete digest and clearing the operation context.
FC_DigestKey
name fc_digestkey - add the digest of a key to a multi-part digest operation.
... description fc_digestkey continues a multi-part digest operation by digesting the value of a secret key.
FC_EncryptFinal
name fc_encryptfinal - finish a multi-part encryption operation.
... description fc_encryptfinal returns the last block of data of a multi-part encryption operation.
FC_EncryptInit
name fc_encryptinit - initialize an encryption operation.
... description fc_encryptinit initializes an encryption operation with the mechanism and key to be used.
FC_EncryptUpdate
name fc_encryptupdate - encrypt a block of a multi-part encryption operation.
...the block may be part of a multi-part encryption operation.
FC_GetFunctionList
name fc_getfunctionlist - get a pointer to the list of function pointers in the fips mode of operation.
... description fc_getfunctionlist stores in *ppfunctionlist a pointer to the nss cryptographic module's list of function pointers in the fips mode of operation.
FC_GetTokenInfo
ckf_rng (0x00000001): this device has a random number generator ckf_write_protected (0x00000002): this device is read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token can perform dual cryptographic operations ckf_token_initialized (0x00000400): the token has been initialized.
... if login is required (which is true for the fips mode of operation), this flag means the user's password has been initialized.
FC_Sign
pussignaturelen [in, out] pointer to the maximum size of the output buffer, replaced by the length of the signature if the operation is successful.
... description fc_sign signs a message in a single operation according to the attributes of the previous call to fc_signinit.
FC_SignFinal
name fc_signfinal - finish a multi-part signing operation.
... description fc_signfinal finishes a multi-part signing operation by returning the complete signature and clearing the operation context.
FC_SignUpdate
name fc_signupdate - process the next block of a multi-part signing operation.
... description fc_signupdate starts or continues a multi-part signature operation.
FC_VerifyFinal
name fc_verifyfinal - finish a multi-part verify operation.
... description fc_verifyfinal finishes a multi-part signature verification operation.
FC_VerifyRecoverInit
name fc_verifyrecoverinit - initialize a verification operation where data is recoverable.
... description fc_verifyrecoverinit initializes a signature verification operation where the (digest) data can be recovered from the signature.
FC_VerifyUpdate
name fc_verifyupdate - process the next block of a multi-part verify operation.
... description fc_verifyupdate starts or continues a multi-part signature verification operation where the signature is an appendix to the data.
NSS_Initialize
this may be necessary in order to ensure continuous operation and proper shutdown sequence if another piece of code is using the same pkcs#11 modules that nss is accessing without going through nss, for example, java sunpkcs11 provider.
...nss_init_reserved - currently has no effect, but may be used in the future to trigger better cooperation between pkcs#11 modules used by both nss and the java sunpkcs11 provider.
NSS tools : cmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
pkfnc.html
description during the course of an ssl operation, it may be necessary for the user to log in to a pkcs #11 token (either a smart card or soft token) to access protected information, such as a private key.
... several functions in the nss libraries use the password callback function to obtain the password before performing operations that involve the protected information.
ssltyp.html
secfailure the operation failed.
... secsuccess the operation succeeded.
NSS tools : cmsutil
MozillaProjectsNSStoolscmsutil
name cmsutil — performs basic cryptograpic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
... synopsis cmsutil [options] arguments description the cmsutil command-line uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
Network Security Services
nss ssl reference api used to invoke ssl operations.
... sample code demonstrates how nss can be used for cryptographic operations, certificate handling, ssl, etc.
Personal Security Manager (PSM)
personal security manager (psm) consists of a set of libraries that perform cryptographic operations on behalf of a client application.
... these operations include setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), and other common pki functions.
Rebranding SpiderMonkey (1.8.5)
we need to perform a recursive find and replace text operation on all files in the current directory.
... in the unix world we would issue the following command: find ./ -type f -exec sed -i "s/mozjs185/$brand/" {} \; windows users: notepad++ can be used to perform the recursive find and replace text operation.
Invariants
some jsstrings are allocated on the stack for quick operations.
... background: the fastest instructions for nameexpressions are fat opcodes that combine a load with additional operations, as in jsop_inclocal or jsop_getlocalprop.
JS_DefineProperty
result js::objectopresult &amp; (out parameter) receives the result of the operation.
... js_defineproperty is the fundamental operation on which several more convenient, higher-level functions are based, including js_definefunction, js_definefunctions, js_defineproperties, js_defineconstdoubles, js_defineobject, and js_initclass.
JS_IsAssigning
determine whether script is executing assignment operation.
... syntax jsbool js_isassigning(jscontext *cx); name type description description js_isassigning returns true if a script is executing and its current bytecode is a set (assignment) operation, even if there are native (no script) stack frames between the script and the caller to js_isassigning.
JS_ReportOutOfMemory
description call js_reportoutofmemory to report that an operation failed because the system is out of memory.
... call js_reportallocationoverflow if an operation fails because it tries to use more memory (or more of some other resource) than the application is designed to handle.
JS_SetBranchCallback
replaced with js_setoperationcallback.
... see also mxr id search for js_setbranchcallback js_setoperationcallback js_setoptions bug 477187 ...
JS_THREADSAFE
this means that any potentially long-running operation in a native must be bracketed with calls to js_suspendrequest() and js_resumerequest().
...the recommended technique in spidermonkey 1.8 and later is to periodically call js_yieldrequest from an operation callback.
SpiderMonkey 1.8.7
jsautorequest jsautosuspendrequest jsautocheckrequest jsautoentercompartment js::anchor<> js::call obsolete apis js_clearnewbornroots js_enterlocalrootscope js_leavelocalrootscope js_leavelocalrootscopewithresult js_forgetlocalroot js_newgrowablestring deleted apis js_getscopechain use js_getglobalforscopechain api changes operation callback js_setoperationcallback was introduced in js 1.8.0, replacing the branch callback, in anticipation of the addition of the tracing jit (tracemonkey).
...the primary change in this interface is that it no longer counts operations; embedders are expected find another mechanism (such as a watchdog thread) to trigger regular callbacks, via js_triggeroperationcallback.
TPS Tests
built-in functions sync(options) initiates a sync operation.
... if no options are passed, a default sync operation is performed.
Mozilla Projects
personal security manager (psm) personal security manager (psm) consists of a set of libraries that perform cryptographic operations on behalf of a client application.
... these operations include setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), and other common pki functions.
Gecko Roles
role_statusbar represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object.
... role_progressbar represents a progress bar, dynamically showing the user the percent complete of an operation in progress.
Querying Places
this allows for a simpler implementation and interface than a full logical operation with nested clauses while still being expressive.
...if you close a container and re-open it before any history or bookmark change notifications come, the results will generally still be there and this operation will be fast.
Using the Places annotation service
name, avalue, aflags, aexpiration); setitemannotationint32(aitemid, aname, avalue, aflags, aexpiration); setitemannotationint64(aitemid, aname, avalue, aflags, aexpiration); setitemannotationdouble(aitemid, aname, avalue, aflags, aexpiration); setitemannotationbinary(aitemid, aname, avalue, adatalen, aflags, aexpiration); from javascript there are two simple function to perform all of these operations: setpageannotation(auri, aname, avalue, aflags, aexpiration); setitemannotation(aitemid, aname, avalue, aflags, aexpiration); these annotations all take similar parameters: uri or itemid: this is the nsiuri of the page to annotate, or for items in the places database, the id of the item.
...however, it is more efficient to just try to do the operation and catch the exception; the extra check requires an additional database lookup (which has higher overhead).
Using the Places history service
observers generally stop updating ui when they are inside a batch, potentially making the operations faster.
... nsinavhistoryservice.endupdatebatch: ends a batch operation previously started with beginupdatebatch.
Detailed XPCOM hashtable guide
inserting/removing: o(n): adding and removing items from a large array can be time-consuming o(1): adding and removing items from hashtables is a quick operation wasted space: none: arrays are packed structures, so there is no wasted space.
...they provide the following features: hashtable operations can be completed without using an entry class, making code easier to read; optional thread-safety: the hashtable can manage a read-write lock around the table; predefined key classes provide automatic cleanup of strings/interfaces nsinterfacehashtable and nsclasshashtable automatically release/delete objects to avoid leaks.
Mozilla internal string guide
setcapacity() is appropriate to use before a sequence of multiple operations from the following list (without operations that are not on the list between the setcapacity() call and operations from the list): append() appendascii() appendliteral() appendprintf() appendint() appendfloat() lossyappendutf16toascii() appendasciitoutf16() do not call setcapacity() if the subsequent operations on the string do not meet the criteria above.
... operations that undo the benefits of setcapacity() include but are not limited to: setlength() truncate() assign() assignliteral() adopt() copyasciitoutf16() lossycopyutf16toascii() appendutf16toutf8() appendutf8toutf16() copyutf16toutf8() copyutf8toutf16() if your string is an nsauto[c]string and you are calling setcapacity() with a constant n, please instead declare the string as nsauto[c]stringn<n+1> without calling setcapacity() (while being mindful of not using such a large n as to overflow the run-time stack).
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
this is also a synchronous (blocking) operation, so if you're in javascript, consider using netutil.jsm as described below.
...ipwriter interface: // file is an nsifile object mapping to a zip archive var zipwriter = components.classes["@mozilla.org/zipwriter;1"] .createinstance(components.interfaces.nsizipwriter); zipwriter.open(file, ioflags); // stream is the output stream zipwriter.addentrystream("/path/to/zipped/file", modtime, compression, stream, queueforlater); // if queued for later operations, and all operations are queued zipwriter.processqueue(); // when we don't need the zipwriter anymore zipwriter.close(); concatenating input streams var stringstream = components.constructor("@mozilla.org/io/string-input-stream;1", "nsistringinputstream", "setdata"); function buildstream(data) { return ne...
Components.isSuccessCode
summary determines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.
...if the task is sufficiently complex that it can fail, the notification will include a status code indicating the success or failure of the operation (see, for example, nsirequestobserver.onstoprequest()).
Components.utils.unwaiveXrays
the waivexrays operation is transitive: it waives xrays not just for the given object, but for all properties of the object (and their properties, and so on).
... the unwaivexrays operation undoes the operation, so xray vision is restored transitively as well.
NS ConvertASCIItoUTF16 external
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
NS ConvertUTF16toUTF8 external
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
NS ConvertUTF8toUTF16 external
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
NS LossyConvertUTF16toASCII external
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
PromiseFlatCString (External)
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
PromiseFlatString (External)
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsACString (External)
methods beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsAString (External)
methods beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...onst - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsAutoString (External)
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsCAutoString (External)
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsCStringContainer (External)
methods beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsCString external
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsDependentCString external
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsDependentCSubstring external
arameters nsacstring& astr pruint32 astartpos pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* astart pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsDependentString external
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsDependentSubstring external
nsastring astr pruint32 astartpos pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar astart pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsLiteralCString (External)
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsLiteralString (External)
nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsStringContainer (External)
methods beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
nsString external
(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
mozIStorageAsyncStatement
(mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution thread.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
nsIAccessibleEditableText
the operations it supports includes setting text attributes and text contents while also replacing old text of an object with new text.
... it also includes and support basic operations such as, inserting text, copying text, cutting text, pasting text and deleting text at the specified position.
nsIAccessibleRole
role_statusbar 23 represents a status bar, which is an area at the bottom of a window that displays information about the current operation, state of the application, or selected object.
... role_progressbar 48 represents a progress bar, dynamically showing the user the percent complete of an operation in progress.
nsIBrowserHistory
note: if removing fewer than 10 pages, calling this repeatedly is preferable over calling removepages(), since that's about the point at which the overhead of setting up a batch operation doesn't make sense anymore.
... note: if removing fewer than 10 pages, calling removepage() repeatedly is preferable over calling this, since that's about the point at which the overhead of setting up a batch operation doesn't make sense anymore.
nsICacheService
netwerk/cache/public/nsicacheservice.idlscriptable handles visiting and evicting entries operations along with the creating of cache sessions and creation of temporary client ids operations for offline caching.
...ragepolicy); obsolete since gecko 1.9.2 void evictentries(in nscachestoragepolicy storagepolicy); void init(); obsolete since gecko 1.8 void shutdown(); obsolete since gecko 1.8 void visitentries(in nsicachevisitor visitor); attributes attribute type description cacheiotarget nsieventtarget the event target for cache i/o operation notifications.
nsICommandLine
you can determine if the flag was provided and remove it from the list of flags waiting to be processed in one operation.
...this is, essentially, a helper method that combines findflag() and removearguments() into one operation.
nsIDOMProgressEvent
loaded unsigned long long the number of bytes transferred since the beginning of the operation.
... total unsigned long long the total number of bytes of content that will be transferred during the operation.
nsIDOMWindowUtils
keep in mind that during a restyle operation, an element may be restyled multiple times (for example, when an inline element contains blocks).
... this includes the text of the script and details about its internal representation in spidermonkey, and counts for how often and in what ways each operation in the script executed.
nsIDocShell
implementations not supporting zoom should return 1.0 all the time for the get operation.
... addstate() do either a history.pushstate() or history.replacestate() operation, depending on the value of areplace.
nsIDownloadManager
note: prior to gecko 12.0, this was a synchronous operation; that is, once this method returned, you knew that the download was in the download manager's list.
...adding downloads to the download manager is now an asynchronous operation.
nsIFaviconService
note: this is an asynchronous operation; when it completes, a "places-favicons-expired" notification is dispatched through the observer's service.
...if that fails and the image is bigger than a maximum acceptable favicon size, the entire operation fails and the favicon isn't saved.
nsIFile
that is a very fast operation because it just changes directory information.
...that is a very fast operation because it just changes directory information.
nsIFocusManager
flag_bymouse 0x1000 focus is changing due to a mouse operation, for instance the mouse was clicked on an element.
... flag_bykey 0x2000 focus is changing due to a key operation, for instance pressing the tab key.
nsIInstallLocation
any nsifile operations that assume a directory and plain files will fail in firefox 4, unless you specify <em:unpack>.
...this cleans up the stage if there is nothing else left after the remove operation.
nsIMemoryMultiReporter
1.0 66 introduced gecko 7.0 inherits from: nsisupports last changed in gecko 12.0 (firefox 12.0 / thunderbird 12.0 / seamonkey 2.9) if you want to gather multiple measurements in a single operation (such as a single traversal of a large data structure), you can use a multi-reporter to do so.
...this is important; multi-reporters can special-case this operation so it's much faster than gathering all the reports, filtering out the unneeded ones, and adding up the rest.
nsIMessenger
the nsimessenger interface provides functions for managing the history, undo and redo operations, and for loading, saving, or deleting messages and attachments in mailnews.
...if this window contains a messagepane element (i think this may mean a xul:browser element with its id set to "messagepane"?), then the nsidocshell will be used for future nsimessenger operations.
nsIMsgMessageService
this is an async operation of course.note: you must pass in a url listener in order to figure out when the operation is done.
... note: this operation may be obsolete.
nsINavHistoryObserver
batch delete operations take place in two steps; the notifications come first, followed by a bulk delete.
...batch delete operations take place in two steps; the notifications come first, followed by a bulk delete.
nsITaskbarProgress
this should be used when the operation is complete or canceled.
... state_paused 4 display a determinate progress bar indicating that the operation has paused.
nsITransferable
these objects are used during drag-and-drop operations.
... note: currently, this can only be used on windows (in order to support network principal information in drag operations).
Reference Manual
reference-counting safeguards all of the operations that extract the underlying raw pointer out of an nscomptr use a c trick to implement another safety feature.
...on every platform, this operation generates the exact same code, and takes the same time, as performing this operation on a raw xpcom interface pointer.
Working with windows in chrome code
if we're sure the window that opened the progress dialog declares the canceloperation function, we can use window.opener.canceloperation() to notify it, like this: <button label="cancel" oncommand="opener.canceloperation(); close();" /> using a callback function.
... alternatively, the opener window can pass a callback function to the progress dialog in the same way we passed the status string in the previous example: function oncancel() { alert("operation canceled!"); } ...
Working with ArrayBuffers
introductory reading the pointer types section of the type conversion page explains the fundamentals of this operation.
... the second code example provides a specific illustration of the operation.
Version, UI, and Status Information - Plugins
displaying a status line message users are accustomed to checking the ui status line at the bottom of the browser window for updates on the progress of an operation or the url of a link on the page.
...the user might appreciate seeing the percentage completed of the current operation or the url of a button or other link object when the cursor is over it, all of which the browser shows.
Index - Firefox Developer Tools
after firefox 48, the default view is the tree map view, and you can switch to the aggregate view using the dropdown labeled "view:": 39 basic operations before firefox 50, the memory tool is not enabled by default.
...because repaints can be performance-intensive operations, eliminating unnecessary repaints can improve your website's responsiveness.
Paint Flashing Tool - Firefox Developer Tools
because repaints can be performance-intensive operations, eliminating unnecessary repaints can improve your website's responsiveness.
... repainting can be an expensive operation, so the browser tries to minimise the amount of repainting that it needs to do.
Animating CSS properties - Firefox Developer Tools
this operation is labeled "layout" but is also sometimes called "reflow".
...in the screenshot above we've highlighted a paint operation, and the box on the right tells us it took 13.11ms.
Intensive JavaScript - Firefox Developer Tools
there's also a video version of this walkthrough: the demo website looks like this: it has three controls: a radio button group to control how to run the javascript: as a single blocking operation in the main thread, as a series of smaller operations in the main thread using requestanimationframe(), or in another thread using a worker.
...it gives us a compressed view of the waterfall, which tells us what kinds of operations the browser is doing during the recording.
Web Audio Editor - Firefox Developer Tools
within that context they then construct a number of audio nodes, including: nodes providing the audio source, such as an oscillator or a data buffer source nodes performing transformations such as delay and gain nodes representing the destination of the audio stream, such as the speakers each node has zero or more audioparam properties that configure its operation.
...this gives you a high-level view of its operation, and enables you to ensure that all the nodes are connected in the way you expect.
BudgetService - Web APIs
methods budgetservice.getcost() returns a promise that resolves to a double, indicating the worst-case background operation cost of the provided background operation.
... budgetservice.reserve() returns a promise that resolves to a boolean, indicating whether the requested budget operation can be reserved.
CSS Typed Object Model API - Web APIs
this is easier for authors (for example, numeric values are reflected with actual js numbers, and have unit-aware mathematical operations defined for them).
... cssnumericvalue an interface representing operations that all numeric values can perform, including: cssnumericvalue.add - adds supplied numbers to the cssnumericvalue.
Cache.addAll() - Web APIs
WebAPICacheaddAll
the request objects created during retrieval become keys to the stored response operations.
... note: addall() will overwrite any key/value pairs previously stored in the cache that match the request, but will fail if a resulting put() operation would overwrite a previous cache entry stored by the same addall() method.
Cache.matchAll() - Web APIs
WebAPICachematchAll
ignoremethod: a boolean that, when set to true, prevents matching operations from validating the request http method (normally only get and head are allowed.) it defaults to false.
... ignorevary: a boolean that when set to true tells the matching operation not to perform vary header matching — i.e.
Cache - Web APIs
WebAPICache
the code handles exceptions thrown from the fetch() operation.
... return response; }); }).catch(function(error) { // this catch() will handle exceptions that arise from the match() or fetch() operations.
CanvasRenderingContext2D - Web APIs
canvasrenderingcontext2d.globalcompositeoperation with globalalpha applied this sets how shapes and images are drawn onto the existing bitmap.
... canvasrenderingcontext2d.setcompositeoperation() use canvasrenderingcontext2d.globalcompositeoperation instead.
Clients.matchAll() - Web APIs
WebAPIClientsmatchAll
syntax self.clients.matchall(options).then(function(clients) { // do something with your clients list }); parameters options optional an options object allowing you to set options for the matching operation.
... available options are: includeuncontrolled: a boolean — if set to true, the matching operation will return all service worker clients who share the same origin as the current service worker.
CredentialsContainer.get() - Web APIs
signal: an instance of abortsignal that can indicate that an ongoing get() operation should be halted.
... an aborted operation may complete normally (generally if the abort was received after the operation finished) or reject with an "aborterror" domexception.
DataTransfer.getData() - Web APIs
if the drag operation does not include data, this method returns an empty string.
...if the drag operation has no data or the operation has no data for the specified format, this method returns an empty string.
DirectoryEntrySync - Web APIs
quota_exceeded_error the operation would cause the application to exceed its storage quota.
... quota_exceeded_error the operation would cause the application to exceed its storage quota.
Document - Web APIs
WebAPIDocument
dragend fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
... dragexit fired when an element is no longer the drag operation's immediate selection target.
DragEvent - Web APIs
WebAPIDragEvent
dragend this event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
... dragexit this event is fired when an element is no longer the drag operation's immediate selection target.
EXT_float_blend - Web APIs
with this extension enabled, calling drawarrays() or drawelements() with blending enabled and a draw buffer with 32-bit floating-point components will no longer result in an invalid_operation error.
...texture(gl.texture_2d, tex); // use floating point format gl.teximage2d(gl.texture_2d, 0, gl.rgba32f, 1, 1, 0, gl.rgba, gl.float, null); const fb = gl.createframebuffer(); gl.bindframebuffer(gl.framebuffer, fb); gl.framebuffertexture2d(gl.framebuffer, gl.color_attachment0, gl.texture_2d, tex, 0); // enable blending gl.enable(gl.blend); gl.drawarrays(gl.points, 0, 1); // won't throw gl.invalid_operation with the extension enabled specifications specification status ext_float_blend draft ...
Element.msZoomTo() - Web APIs
WebAPIElementmsZoomTo
the scroll/zoom operation attempts to align this point with the contentx point.
...the scroll/zoom operation attempts to align this point with the contenty point.
FileError - Web APIs
WebAPIFileError
invalid_state_err 7 the operation cannot be performed on the current state of the interface object.
... not_found_err 1 a required file or directory could not be found at the time an operation was processed.
FileException - Web APIs
invalid_state_err 7 the operation cannot be performed on the current state of the interface object.
... not_found_err 1 a required file or directory could not be found at the time an operation was processed.
FileReader.abort() - Web APIs
WebAPIFileReaderabort
the abort method aborts the read operation.
... syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading).
FileReader.result - Web APIs
WebAPIFileReaderresult
this property is only valid after the read operation is complete, and the format of the data depends on which of the methods was used to initiate the read operation.
... syntax var file = instanceoffilereader.result value an appropiate string or arraybuffer based on which of the reading methods was used to initiate the read operation.
Introduction to the File and Directory Entries API - Web APIs
the asynchronous api can be used in cases where you don't want an outstanding operation to block the ui.
...you send requests for operations to happen, and get notified by callbacks.
HTMLMediaElement - Web APIs
this non-standard, experimental method makes it possible to manually drive reading and rendering of media at a custom speed, or to move through the media frame-by-frame to perform filtering or other operations.
... seeked fired when a seek operation completes seeking fired when a seek operation begins stalled fired when the user agent is trying to fetch media data, but data is unexpectedly not forthcoming.
In depth: Microtasks and the JavaScript runtime environment - Web APIs
each context additionally tracks the next line in the program that should be run and other information critical to that context's operation.
...a well-designed web site or app uses workers to perform any complex or lengthy operations, leaving the main thread to do as little work as possible beyond updating, laying out, and rendering the web page.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
the method returns an idbopendbrequest object immediately, and performs the open operation asynchronously.
... if the operation is successful, a success event is fired on the request object that is returned from this method, with its result attribute set to the new idbdatabase object for the connection.
IDBObjectStore.clear() - Web APIs
syntax var request = objectstore.clear(); returns an idbrequest object on which subsequent events related to this operation are fired.
... exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBObjectStore.get() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
...once this data object is retrieved, you could then update it using normal javascript, then put it back into the database using a idbobjectstore.put operation.
IDBObjectStore.openCursor() - Web APIs
to determine if the add operation has completed successfully, listen for the results’s success event.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.openKeyCursor() - Web APIs
to determine if the add operation has completed successfully, listen for the results’s success event.
... return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.put() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
... exceptions this method may raise a domexception of one of the following types: exception description readonlyerror the transaction associated with this operation is in read-only mode.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
unknownerror if the operation failed for reasons unrelated to the database itself.
... in addition to the error codes sent to the idbrequest object, asynchronous operations can also raise exceptions.
Key Values - Web APIs
typically used as an exit, cancel, or "escape this operation" button.
...opens an interface (typically a dialog box) for performing a find/search operation.
KeyframeEffect.getKeyframes() - Web APIs
composite the keyframeeffect.composite operation used to combine the values specified in this keyframe with the underlying value.
... this will be absent if the composite operation specified on the effect is being used.
KeyframeEffect.setKeyframes() - Web APIs
composite the keyframeeffect.composite operation used to combine the values specified in this keyframe with the underlying value.
... this will be auto if the composite operation specified on the effect is being used.
KeyframeEffect - Web APIs
keyframeeffect.iterationcomposite gets and sets the iteration composite operation for resolving the property value changes of this keyframe effect.
... keyframeeffect.composite gets and sets the composite operation property for resolving the property value changes between this and other keyframe effects.
LockedFile.append() - Web APIs
WebAPILockedFileappend
the write operation is performed at the end of the file, regardless of the lockedfile.location value, and actually sets this value to null.
... return a filerequest object to handle the success or failure of the operation.
LockedFile.location - Web APIs
its value indicates at which bytes within the file any write or read operation will start.
... this value is changed automatically after every read and write operation.
LockedFile.readAsArrayBuffer() - Web APIs
the reading operation starts at the position given by the lockedfile.location property.
... return a filerequest object to handle the success or failure of the operation.
LockedFile.readAsText() - Web APIs
the reading operation starts at the position given by the lockedfile.location property.
... return a filerequest object to handle the success or failure of the operation.
LockedFile - Web APIs
events handler lockedfile.oncomplete the complete event is triggered each time a read or write operation is successful.
... lockedfile.abort() makes the lockedfile inactive and cancels all ongoing operations.
Media Session action types - Web APIs
if you intend to perform multiple seekto operations in rapid succession, you can also specify the mediasessionactiondetails property fastseek property with a value of true.
... this lets the browser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
MediaSessionActionDetails.seekTime - Web APIs
usage notes to perform a "fast" seek (such as when issuing multiple seekto actions in sequence while handling a scrubbing operation, the details object's fastseek property's value is set to true, indicating that you should minimize or eliminate anything you do while handling the action that is only necessary at the final step.
... if the value of fastseek is false, or fastseek is missing, the action should be treated as the final action of the operation, and you should finalize any details that need to be handled.
MediaSessionActionDetails - Web APIs
if you intend to perform multiple seekto operations in rapid succession, you can also specify the mediasessionactiondetails property fastseek property with a value of true.
... this lets the browser know it can take steps to optimize repeated operations, and is likely to result in improved performance.
MouseScrollEvent - Web APIs
constants delta modes constant value description horizontal_axis 0x01 the event is caused by horizontal wheel operation.
... vertical_axis 0x02 the event is caused by vertical wheel operation.
Using Navigation Timing - Web APIs
determining navigation type to put the timing information obtained from performancetiming into the correct perspective, you need to know more about what sort of load operation occurred.
...performance.navigation.type indicates what kind of load operation took place: a navigation, a reload, or a shift through the browser's history.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
authenticatorselection, an optional property of the publickeycredentialcreationoptions dictionary, is an object giving criteria to filter out the authenticators to be used for the creation operation.
...the values may be: "required": user verification is required, the operation will fail if the response does not have the uv flag (as part of the authenticatordata property of authenticatorattestationresponse.attestationobject) "preferred": user verification is prefered, the operation will not fail if the response does not have the uv flag (as part of the authenticatordata property of authenticatorattestationresponse.attestationobject) "discouraged": user verification ...
PublicKeyCredentialRequestOptions.userVerification - Web APIs
note: an analogous option exists for the creation operation (navigators.credentials.create()), see the userverification property of publickeycredentialcreationoptions.authenticatorselection.
...the values may be: "required": user verification is required, the operation will fail if the response does not have the uv flag (as part of authenticatorassertionresponse.authenticatordata) "preferred": user verification is prefered, the operation will not fail if the response does not have the uv flag (as part of authenticatorassertionresponse.authenticatordata) "discouraged": user verification should not be employed as to minimize the user interaction during the process.
RTCError - Web APIs
WebAPIRTCError
the rtcerror interface describes an error which has occurred while handling webrtc operations.
... all rtcerror objects have their name set to operationerror.
RTCErrorEvent.error - Web APIs
syntax let errorinfo = rtcerrorevent.error; value an rtcerror object whose properties provide details about the error which has occurred in the context of a webrtc operation.
... all rtcerror objects have their name set to operationerror.
Response - Web APIs
WebAPIResponse
you can create a new response object using the response.response() constructor, but you are more likely to encounter a response object being returned as the result of another api operation—for example, a service worker fetchevent.respondwith, or a simple windoworworkerglobalscope.fetch().
...the fetch() call returns a promise, which resolves to the response object associated with the resource fetch operation.
RsaOaepParams - Web APIs
a digest of the label is part of the input to the encryption operation.
... unless your application calls for a label, you can just omit this argument and it will not affect the security of the encryption operation.
SVGSVGElement - Web APIs
this interface contains also various miscellaneous commonly-used utility methods, such as matrix operations and the ability to control the time of redraw on visual rendering devices.
...�)), then: the values for viewbox, preserveaspectratio, zoomandpan, transform and viewtarget within currentview will correspond to the values from the svg view specification fragment identifier svgsvgelement.currentscale on an outermost <svg> element, this float attribute indicates the current scale factor relative to the initial view to take into account user magnification and panning operations.
Using Service Workers - Web APIs
the below graphic shows a summary of the available service worker events: promises promises are a great mechanism for running async operations, with success dependant on one another.
... promises passed into waituntil() will block other events until completion, so you can rest assured that your clean-up operation will have completed by the time you get your first fetch event on the new service worker.
Streams API concepts - Web APIs
examples include a file access operation via a fetch or xhr call.
... the chunks inside the stream are read by a reader — this processes the data one chunk at a time, allowing you to do whatever kind of operation you want to do on it.
SubtleCrypto.decrypt() - Web APIs
exceptions the promise is rejected when the following exceptions are encountered: invalidaccesserror raised when the requested operation is not valid for the provided key (e.g.
... operationerror raised when the operation failed for an operation-specific reason (e.g.
SubtleCrypto.unwrapKey() - Web APIs
as with subtlecrypto.importkey(), you specify the key's import format and other attributes of the key to import details such as whether it is extractable, and which operations it can be used for.
...note that when using aes-gcm we have to pass the iv value into unwrapkey(), and this must be the same as the iv that was used in the corresponding wrapkey() operation.
SubtleCrypto - Web APIs
to perform operations like signing and encrypting, you pass a cryptokey object into the sign() or encrypt() function.
... the table below summarises which algorithms are suitable for which cryptographic operations: sign() verify() encrypt() decrypt() digest() derivebits() derivekey() wrapkey() unwrapkey() rsassa-pkcs1-v1_5 ✓ rsa-pss ✓ ecdsa ✓ hmac ✓ rsa-oaep ✓ ✓ a...
WebGLRenderingContext.bindFramebuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
WebGLRenderingContext.checkFramebufferStatus() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
WebGLRenderingContext.framebufferRenderbuffer() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
WebGLRenderingContext.getError() - Web APIs
gl.invalid_operation the specified command is not allowed for the current state.
... gl.invalid_framebuffer_operation the currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.
WebGLRenderingContext.getFramebufferAttachmentParameter() - Web APIs
used as a destination for drawing, rendering, clearing, and writing operations.
... gl.read_framebuffer: used as a source for reading operations.
WebGLRenderingContext.getProgramParameter() - Web APIs
gl.link_status: returns a glboolean indicating whether or not the last link operation was successful.
... gl.validate_status: returns a glboolean indicating whether or not the last validation operation was successful.
WebGLRenderingContext.readPixels() - Web APIs
a gl.invalid_operation error is thrown if type is gl.unsigned_short_5_6_5 and format is not gl.rgb.
... a gl.invalid_framebuffer_operation error is thrown if the currently bound framebuffer is not framebuffer complete.
WebGL model view projection - Web APIs
the more operations that are done on larger numbers, the more and more errors accumulate into the result.
... var moveinandout = 20 * math.sin(now * 0.002); var moveleftandright = 15 * math.sin(now * 0.0017); // move the camera around var position = mdn.translatematrix(moveleftandright, 0, 50 + moveinandout ); // multiply together, make sure and read them in opposite order var matrix = mdn.multiplyarrayofmatrices([ // exercise: rotate the camera view position ]); // inverse the operation for camera movements, because we are actually // moving the geometry in the scene, not the camera itself.
Keyframe Formats - Web APIs
composite the keyframeeffect.composite operation used to combine the values specified in this keyframe with the underlying value.
... this will be auto if the composite operation specified on the effect is being used.
Basic concepts behind Web Audio API - Web APIs
audio graphs the web audio api involves handling audio operations inside an audio context, and has been designed to allow modular routing.
... basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph.
Background audio processing using AudioWorklet - Web APIs
create module that defines a audio worklet processor class, based on audioworkletprocessor which takes audio from one or more incoming sources, performs its operation on the data, and outputs the resulting audio data.
... mixing inputs many nodes perform mixing operations, where the inputs are combined in some way into a single output.
Using the Web Audio API - Web APIs
the web audio api handles audio operations inside an audio context, and has been designed to allow modular routing.
... basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph.
Web Audio API - Web APIs
web audio concepts and usage the web audio api involves handling audio operations inside an audio context, and has been designed to allow modular routing.
... basic audio operations are performed with audio nodes, which are linked together to form an audio routing graph.
Window.openDialog() - Web APIs
WebAPIWindowopenDialog
the variables specified in the javascript code which gets loaded from the dialog), it is not possible to pass return values back past the close operation using globals (or any other constructs).
...you can then access this object from within the dialog code and set properties on it, containing the values you want to return or preserve past the window.close() operation.
Window.setImmediate() - Web APIs
this method is used to break up long running operations and run a callback function immediately after the browser has completed other operations such as events and display updates.
... this method can be used instead of the settimeout(fn, 0) method to execute heavy operations.
Window - Web APIs
WebAPIWindow
window.dommatrix read only returns a reference to a dommatrix object, which represents 4x4 matrices, suitable for 2d and 3d operations.
... window.dommatrixreadonly read only returns a reference to a dommatrixreadonly object, which represents 4x4 matrices, suitable for 2d and 3d operations.
WritableStream.WritableStream() - Web APIs
it can return a promise to signal success or failure of the write operation.
... the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
XMLHttpRequest.readyState - Web APIs
4 done the operation is complete.
... done the fetch operation is complete.
XRWebGLLayer.framebuffer - Web APIs
calling functions such as framebuffertexture2d(), framebufferrenderbuffer(), deleteframebuffer(), or getframebufferattachmentparameter() on an opaque framebuffer results in the webgl error invalid_operation (0x0502).
...attempting to clear, draw to, or read from the framebuffer results in a webgl invalid_framebuffer_operation error (0x0506).
Understandable - Accessibility
understandable states that information and the operation of user interface must be understandable.
... note: to read the w3c definitions for understandable and its guidelines and success criteria, see principle 3: understandable — information and the operation of user interface must be understandable.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
seeked a seek operation completed.
... seeking a seek operation began.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
seeked a seek operation completed.
... seeking a seek operation began.
HTTP conditional requests - HTTP
integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the already obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
... avoiding the lost update problem with optimistic locking a common operation in web applications is to update a remote document.
508 Loop Detected - HTTP
WebHTTPStatus508
it indicates that the server terminated an operation because it encountered an infinite loop while processing a request with "depth: infinity".
... this status indicates that the entire operation failed.
HTTP
WebHTTP
mozilla web security guidelines a collection of tips to help operational teams with creating secure web applications.
... http request methods the different operations that can be done with http: get, post, and also less common requests like options, delete, or trace.
Keyed collections - JavaScript
the following code shows some basic operations with a map.
... the following code shows some basic operations with a set.
Numbers and dates - JavaScript
this includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global math object to perform a wide variety of mathematical operations on numbers.
...there are caveats to using bigint, however; for example, you can't mix and match bigint and number values in the same operation, and you can't use the math object with bigint values.
Atomics.isLockFree() - JavaScript
the static atomics.islockfree() method is used to determine whether to use locks or atomic operations.
... return value a boolean indicating whether the operation is lock free.
Date.prototype.getTime() - JavaScript
this can be used to calculate the executing time of some operations.
... var end, start; start = new date(); for (var i = 0; i < 1000; i++) { math.sqrt(i); } end = new date(); console.log('operation took ' + (end.gettime() - start.gettime()) + ' msec'); specifications specification ecmascript (ecma-262)the definition of 'date.prototype.gettime' in that specification.
Intl - JavaScript
locales argument the locales argument requests that a particular locale (or a locale from a list of them) be considered for use in a given operation.
... this extension allows applications to encode information for their own private use, that will be ignored by all intl operations.
Object.freeze() - JavaScript
the result of calling object.freeze(object) only applies to the immediate properties of object itself and will prevent future property addition, removal or value re-assignment operations only on object.
... if the value of those properties are objects themselves, those objects are not frozen and may be the target of property addition, removal or value re-assignment operations.
Object.prototype.__proto__ - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, a very slow operation, in every browser and javascript engine.
...it is deprecated in favor of object.getprototypeof/reflect.getprototypeof and object.setprototypeof/reflect.setprototypeof (though still, setting the [[prototype]] of an object is a slow operation that should be avoided if performance is a concern).
handler.construct() - JavaScript
in order for the new operation to be valid on the resulting proxy object, the target used to initialize the proxy must itself have a [[construct]] internal method (i.e.
... interceptions this trap can intercept these operations: new proxy(...args) reflect.construct() invariants if the following invariants are violated, the proxy will throw a typeerror: the result must be an object.
SharedArrayBuffer - JavaScript
var sab = new sharedarraybuffer(1024); worker.postmessage(sab); updating and synchronizing shared memory with atomic operations shared memory can be created and updated simultaneously in workers or the main thread.
...to synchronize, atomic operations are needed.
WebAssembly.instantiate() - JavaScript
if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
... if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
parseInt() - JavaScript
if this argument is not a string, then it is converted to one using the tostring abstract operation.
...if nan is passed on to arithmetic operations, the operation result will also be nan.
Logical AND (&&) - JavaScript
se && true // f && t returns false a4 = false && (3 == 4) // f && f returns false a5 = 'cat' && 'dog' // t && t returns "dog" a6 = false && 'cat' // f && t returns false a7 = 'cat' && false // t && f returns false a8 = '' && false // f && f returns "" a9 = false && '' // f && f returns false conversion rules for booleans converting and to or the following operation involving booleans: bcondition1 && bcondition2 is always equal to: !(!bcondition1 || !bcondition2) converting or to and the following operation involving booleans: bcondition1 || bcondition2 is always equal to: !(!bcondition1 && !bcondition2) removing nested parentheses as logical expressions are evaluated left to right, it is always possible to remove parentheses from a complex express...
... the following composite operation involving booleans: bcondition1 || (bcondition2 && bcondition3) is always equal to: bcondition1 || bcondition2 && bcondition3 specifications specification ecmascript (ecma-262)the definition of 'logical and expression' in that specification.
Logical OR (||) - JavaScript
conversion rules for booleans converting and to or the following operation involving booleans: bcondition1 && bcondition2 is always equal to: !(!bcondition1 || !bcondition2) converting or to and the following operation involving booleans: bcondition1 || bcondition2 is always equal to: !(!bcondition1 && !bcondition2) removing nested parentheses as logical expressions are evaluated left to right, it is always possible to remove parentheses from a complex express...
... the following composite operation involving booleans: bcondition1 && (bcondition2 || bcondition3) is always equal to: !(!bcondition1 || !bcondition2 && !bcondition3) specifications specification ecmascript (ecma-262)the definition of 'logical or expression' in that specification.
Expressions and operators - JavaScript
unary operators a unary operation is operation with only one operand.
... bitwise shift operators operations to shift all bits of the operand.
JavaScript
asynchronous javascript discusses asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
... equality comparisons and sameness javascript provides three different value-comparison operations: strict equality using ===, loose equality using ==, and the object.is() method.
Animation performance and frame rate - Web Performance
this operation is labeled "layout" but is also sometimes called "reflow".
...in the screenshot above we've highlighted a paint operation, and the box on the right tells us it took 13.11ms.
Progressive web app structure - Progressive web apps (PWAs)
to have the javascript "operational", however, it has to be downloaded in its entirety.
... the streams api allows developers to have direct access to data streaming from the server — if you want to perform an operation on the data (for example, adding a filter to a video), you no longer need to wait for all of it to be downloaded and converted to a blob (or whatever) — you can start right away.
SVG Presentation Attributes - SVG: Scalable Vector Graphics
value: auto|srgb|linearrgb|inherit; animatable: yes color-interpolation-filters it specifies the color space for imaging operations performed via filter effects.
... value: auto|srgb|linearrgb|<name>|<iri>|inherit; animatable: yes color-rendering it provides a hint to the browser about how to optimize its color interpolation and compositing operations.
color-rendering - SVG: Scalable Vector Graphics
the color-rendering attribute provides a hint to the svg user agent about how to optimize its color interpolation and compositing operations.
...in this case, the svg user agent should perform color operations in a way that optimizes performance, which might mean sacrificing the color interpolation precision as specified by through the linearrgb value for color-interpolation-filters.
in2 - SVG: Scalable Vector Graphics
WebSVGAttributein2
feblend for <feblend>, in2 defines the second input image to the blending operation.
... value sourcegraphic | sourcealpha | backgroundimage | backgroundalpha | fillpaint | strokepaint | <filter-primitive-reference> default value sourcegraphic for first filter primitive, otherwise result of previous filter primitive animatable yes fecomposite for <fecomposite>, in2 defines the second input image to the compositing operation.
operator - SVG: Scalable Vector Graphics
either it defines the compositing or morphing operation to be performed.
...ter id="erode"> <femorphology operator="erode" radius="0.4"/> </filter> <filter id="dilate"> <femorphology operator="dilate" radius="0.8"/> </filter> <text x="0" y="15">normal text</text> <text x="0" y="40" filter="url(#erode)">thin text</text> <text x="0" y="65" filter="url(#dilate)">fat text</text> </svg> fecomposite for <fecomposite>, operator defines the compositing operation that is to be performed.
type - SVG: Scalable Vector Graphics
WebSVGAttributetype
for the <fecolormatrix> element, it indicates the type of matrix operation.
...the other keywords represent convenience shortcuts to allow commonly used color operations to be performed without specifying a complete matrix.
Using custom elements - Web Components
if you need a constructor and a mandatory super call, remember to pass along optional arguments and return the result of such a super call operation.
... class customelement extends htmlelement { constructor(...args) { const self = super(...args); // self functionality written in here // self.addeventlistener(...) // return the right context return self; } } if you don't need to perform any operation in the constructor, you can simply omit it so that its native behavior (see following) will be preserved.
Caching compiled WebAssembly modules - WebAssembly
ins(storename)) { console.log(`clearing out version ${event.oldversion} wasm cache`); db.deleteobjectstore(storename); } console.log(`creating version ${event.newversion} wasm cache`); db.createobjectstore(storename) }; }); } looking up modules in the database our next function — lookupindatabase() — provides a simple promise-based operation for looking up the given url in the object store we created above.
...t = store.get(url); request.onerror = reject.bind(null, `error getting wasm module ${url}`); request.onsuccess = event => { if (request.result) resolve(request.result); else reject(`module ${url} was not found in wasm cache`); } }); } storing and instantiating modules next, we define a function storeindatabase() that fires off an async operation to store a given wasm module in a given database.
hotkeys - Archive of obsolete content
the following commonly used hotkey combinations will not pass amo review: accel-z, accel-c, accel-x, accel-v or accel-q if you choose to use a key combination that's already defined, choose one which makes sense for the operation it will perform.
passwords - Archive of obsolete content
oncomplete is called when the operation has completed successfully and onerror is called when the function encounters an error.
places/history - Archive of obsolete content
usage this module exports a single function, search(), which synchronously returns a placesemitter object which then asynchronously emits data and end or error events that contain information about the state of the operation.
ui/toolbar - Archive of obsolete content
working with multiple browser windows there's only a single toolbar for all browser windows, so operations like show and hide work across all browser windows.
Creating Reusable Modules - Archive of obsolete content
for both these operations we'll use xpcom interfaces.
Getting Started (jpm) - Archive of obsolete content
it uses two sdk modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs.
Getting started (cfx) - Archive of obsolete content
it uses two sdk modules: the action button module, which enables you to add buttons to the browser, and the tabs module, which enables you to perform basic operations with tabs.
Canvas code snippets - Archive of obsolete content
gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgradient', 'getimagedata', 'putimagedata' ]; var props = ['canvas', 'fillstyle', 'font', 'globalalpha', 'globalcompositeoperation', 'linecap', 'linejoin', 'linewidth', 'miterlimit', 'shadowoffsetx', 'shadowoffsety', 'shadowblur', 'shadowcolor', 'strokestyle', 'textalign', 'textbaseline']; for (let m of methods) { let method = m; canvas2dcontext.prototype[method] = function() { this.ctx[method].apply(this.ctx, arguments); return this; }; } for (let m of gettermethods) { let method ...
File I/O - Archive of obsolete content
fostream.init(file, 0x02 | 0x08 | 0x20, 0666, 0); // write, create, truncate // in a c file operation, we have no need to set file mode with or operation, // directly using "r" or "w" usually.
Communication between HTML and your extension - Archive of obsolete content
what i wanted to do was have an extension "look" for something on an html page and if it found that something perform some operation on the found thing and then update the status bar with the results of the operation.
How to convert an overlay extension to restartless - Archive of obsolete content
worst case would be that you extract a file to a temporary location and then use nsifile operations upon the extracted file.
Adding Events and Commands - Archive of obsolete content
drag and drop operations involve several events.
Appendix A: Add-on Performance - Archive of obsolete content
if your add-on needs to perform a heavy operation like sorting or a complex mathematical calculation, you should use dom workers to offload the work to other threads.
Appendix D: Loading Scripts - Archive of obsolete content
disadvantages limited scoping: as data from the main thread may only be accessed via json message passing, there are significant difficulties in performing many operations in worker scopes.
JavaScript Object Management - Archive of obsolete content
these are all ui components and ui operations anyway, so they are better done in the chrome.
Local Storage - Archive of obsolete content
the fuel library has an uninstall event you can use to perform these operations.
Performance best practices in extensions - Archive of obsolete content
performing sequential, asynchronous operations can often be greatly simplified using promises.
MMgc - Archive of obsolete content
the gc typically is constructed early in your program's initialization, and then passed to operations like operator new for allocating gc objects.
Source code directories overview - Archive of obsolete content
it does not handle widgets or specific drawing routines; it just provides the primitive operations for drawing.
Kill the XUL.mfl file for good - Archive of obsolete content
this is meant to speed up the operation of mozilla, however in a fileserver based environment, this can be problematic: at several megabytes a pop, these files will take up a considerable amount of space, because each user has his own...
Content states and the style system - Archive of obsolete content
this is an expensive operation, however, so the style system tries to minimize the number of style reresolves it does.
Layout System Overview - Archive of obsolete content
so really, this sequence of operations resolve style, create frame, layout frame, gets repeated many times as the content becomes available.
JavaScript Client API - Archive of obsolete content
ewguid = utils.makeguid(); your store object must implement the following methods: itemexists(id) createrecord(id, collection) changeitemid(oldid, newid) getallids() wipe() create(record) update(record) remove(record) you may also find it useful to override other methods of the base implementation, for example applyincomingbatch if the underlying storage for your data supports batch operations.
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
onfirstrun() may be called anywhere in your jetpack, but if it is called as the result of some asynchronous operation such as a timeout or xmlhttprequest, it is ignored.
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
4 completed - finished with all operations.
Mozilla Application Framework in Detail - Archive of obsolete content
bclient api, and java plug-ins; nspr, a runtime engine that provides platform-independence (across over a dozen platforms) for non-gui operating system facilities with support for threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking; psm, a set of libraries that perform cryptographic operations including setting up an ssl connection, object signing and signature verification, certificate management (including issuance and revocation), other common pki functions, and s/mime support; an sql support that provides the ability to set up data sources, query a database, and retrieve results as javascript objects or rdf data sources; and an api for directory services via the lightweight dire...
Nanojit - Archive of obsolete content
from an operational point of view, it is creating a function, which takes an integer input, and adds it to two, and outputs the result.
Supporting per-window private browsing - Archive of obsolete content
.getservice(components.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.
Venkman Introduction - Archive of obsolete content
debugging basics this section provides a brief example of a debugging session in order to familiarize you with some of the basic commands and operations of the debugger.
Using XPInstall to Install Plugins - Archive of obsolete content
unlike native code installers (for example, files called setup.exe), the programming language for install operations in xpi is javascript.
dirRemove - Archive of obsolete content
recursive an optional boolean value indicating whether the remove operation is to be performed recursively (1) or not (0).
Return Codes - Archive of obsolete content
exist -243 registry value does not exist invalid_signature -260 the signature used in the xpi is not valid invalid_hash -261 the hash used in the xpi is not valid invalid_hash_type -262 the has used in the xpi is not of a valid type out_of_memory -299 insufficient memory for operation gestalt_unknown_error -5550 gestalt_invalid_argument -5551 ...
buttons - Archive of obsolete content
cancel: the cancel button which will cancel the operation.
dlgtype - Archive of obsolete content
cancel the cancel button which will cancel the operation.
panel.type - Archive of obsolete content
drag specify this for a panel that's being used as a drag image for a drag and drop operation.
progressmeter.mode - Archive of obsolete content
« xul reference home mode type: one of the values below a determinedprogressmeter is used in cases where you know how long an operation will take.
XUL Events - Archive of obsolete content
if you capture this event at the document level, you can be notified of document changes warning: it should be noted that the addition of any mutation event listeners to a document degrades the performance of subsequent dom operations in that document, and that removing the listeners later does not mitigate or reverse the effect.
Reading from Files - Archive of obsolete content
in fact, it is a good idea to enclose file reading and writing operations within a try-catch block to capture any errors that might occur during the process.
Moving, Copying and Deleting Files - Archive of obsolete content
it is a good idea to enclose file operations within a try-catch block in order to capture any errors that might occur.
findbar - Archive of obsolete content
you should specify true as the input parameter to perform a "find previous" operation, or false to perform a "find next." startfind( mode ) return type: no return value call this method to handle your application's "find" command.
onFindAgainCommand - Archive of obsolete content
you should specify true as the input parameter to perform a "find previous" operation, or false to perform a "find next." example typically, you'll simply bind this method to your "find next" and "find previous" commands, like this: <command name="cmd_find_previous" oncommand="gfindbar.onfindagaincommand(true);"/> <command name="cmd_find_next" oncommand="gfindbar.onfindagaincommand(false);"/> ...
Extensions - Archive of obsolete content
for instance, if an image was context clicked, you may wish to hide the menu item you have added if the operation it performed wouldn't apply to images.
Menus - Archive of obsolete content
the user may select a command to invoke it, or may cancel the operation by pressing escape or clicking outside the menu.
buttons - Archive of obsolete content
cancel: the cancel button which will cancel the operation.
commandManager - Archive of obsolete content
« xul reference commandmanager type: nsicommandmanager the command manager handles operations on the editor.
contentViewerEdit - Archive of obsolete content
« xul reference contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
Introduction - Archive of obsolete content
next » a xul template is a means of producing a block of content for each result from some query or query-like operation.
RDF Modifications - Archive of obsolete content
these are called when performing a lot of operations on a datasource.
Creating a Wizard - Archive of obsolete content
after the last page, the operation is carried out.
Install Scripts - Archive of obsolete content
it is important to note that during step two, you only indicate which files should be installed and any other operations you wish to have happen.
Manipulating Lists - Archive of obsolete content
typically, you will use these properties to iterate over the list and perform some operation for each item.
Tree View Details - Archive of obsolete content
the view should then perform any necessary operations to retrieve the child rows and then update the tree with the new rows.
XPCOM Interfaces - Archive of obsolete content
services provide general functions which either get or set global data or perform operations on other objects.
The Implementation of the Application Object Model - Archive of obsolete content
since this presentation happens "on demand", no content node is instantiated until the application specifically requests it, or demands an operation that requires the instantiation of the node to successfully complete, e.g., asking for the number of children of a content node.
browser - Archive of obsolete content
contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
button - Archive of obsolete content
cancel the cancel button which will cancel the operation.
editor - Archive of obsolete content
commandmanager type: nsicommandmanager the command manager handles operations on the editor.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
drag specify this for a panel that's being used as a drag image for a drag and drop operation.
tabbrowser - Archive of obsolete content
contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
toolbarbutton - Archive of obsolete content
cancel the cancel button which will cancel the operation.
XUL - Archive of obsolete content
drag and drop how to perform drag and drop operations.
2006-12-01 - Archive of obsolete content
suggestion for status bar suggestion that a new status bar be implemented that would have a hover>appear style of operation similar to the mac "menu".
2006-10-06 - Archive of obsolete content
summary: mozilla.dev.builds - september 30th to october 6th 2006 tb mozilla_1_8_branch build problem on mac os x (10.4.7, universal build) ludwig hügelschäfer stated that he has been encountering an error when he executes a "make export" operation on thunderbird (part of the mozilla_1_8_branch) since september 15th.
NPN_RequestRead - Archive of obsolete content
this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
NPP_Destroy - Archive of obsolete content
note: you should not perform any graphics operations in npp_destroy as the instance's window is no longer guaranteed to be valid.
NPP_DestroyStream - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
NPP_NewStream - Archive of obsolete content
this mode allows the plug-in full random access to the data using platform-specific file operations.
NPP_Print - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary requests a platform-specific print operation for an embedded or full-screen plug-in.
NPP_SetWindow - Archive of obsolete content
in this case, the plug-in must not perform any additional graphics operations on the window and should free any associated resources.
NPP_URLNotify - Archive of obsolete content
npres_user_break: user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
SSL and TLS - Archive of obsolete content
both of these protocols support using a variety of different cryptographic algorithms, or ciphers, for operations such as authenticating the server and client, transmitting certificates, and establishing session keys.
Using SSH to connect to CVS - Archive of obsolete content
do file a server operations bug in bugzilla and attach yourid_dsa.pub to the bug.
Browser Feature Detection - Archive of obsolete content
among the methods of browser detection, many people recommend using the existence of specific properties or methods in a browser's dom to detect the browser type and whether it supports a given operation.
Processing XML with E4X - Archive of obsolete content
these filter operations are specified using an expression contained in parentheses: var html = <html> <p id="p1">first paragraph</p> <p id="p2">second paragraph</p> </html>; alert(html.p.(@id == "p1")); // alerts "first paragraph" nodes matching the path before the expression (in this case the paragraph elements) are added to the scope chain before the expression is evaluated, as if they had been specified usin...
ArrayBuffer.transfer() - Archive of obsolete content
this operation leaves oldbuffer in a detached state.
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
indicates that the callback stack associated with a previously specified asynchronous operation has completed.
handler.enumerate() - Archive of obsolete content
interceptions this trap can intercept these operations: property enumeration / for...in: for (var name in proxy) {...} reflect.enumerate() invariants if the following invariants are violated, the proxy will throw a typeerror: the enumerate method must return an object.
Archived JavaScript Reference - Archive of obsolete content
this operation leaves oldbuffer in a detached state.date.prototype.tolocaleformat()the non-standard tolocaleformat() method converts a date to a string using the specified formatting.
Reference - Archive of obsolete content
; //function note that math is not a constructor function, but merely a global object with methods and properties useful to perform various mathematical operations.
Parsing microformats in JavaScript - Archive of obsolete content
string = html.match(a); performs the specified matching operation on the html and returns the result.
Popup Window Controls - Archive of obsolete content
<html> <head> <title>detecting popup controls</title> <script type="text/javascript"> <!-- // attempt to open an unsolicited window var popup = window.open('about:blank', 'popup'); if (!popup) { // the user has suppressed the popup } // --> </script> </head> <body> <!-- your page here --> </body> </html> if your popup window is crucial to the operation of your web site you can notify the user and ask them to add your site to the list of sites which are allowed to use unsolicited popup windows.
3D collision detection - Game development
the overlapping area between two non-rotated boxes can be checked with logical comparisons alone, whereas rotated boxes require additional trigonometric operations, which are slower to calculate.
GLSL Shaders - Game development
shaders run on a gpu (graphics processing unit), which is optimized for such operations.
Efficient animation for web games - Game development
it is worth trying to batch similar operations, and to schedule them at a time when screen updates are unlikely to occur, or when such updates are of a more subtle nature.
Tiles and tilemaps overview - Game development
one simple technique consists of pre-rendering the map in a canvas on its own (when using the canvas api) or on a texture (when using webgl), so tiles don't need to be re-drawn every frame and rendering can be done in just one blitting operation.
Visual JS GE - Game development
ml_sys.exe — multilanguage tool for string labels (smart xml operation; no empty tags).
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
Callback function - MDN Web Docs Glossary: Definitions of Web-related terms
note, however, that callbacks are often used to continue code execution after an asynchronous operation has completed — these are called asynchronous callbacks.
Cipher suite - MDN Web Docs Glossary: Definitions of Web-related terms
a typical cipher suite looks like ecdhe_rsa_with_aes_128_gcm_sha256 or ecdhe-rsa-aes128-gcm-sha256, indicating: ecdhe (elliptic curve diffie-hellman ephemeral) for key exchange rsa for authentication aes-128 as the cipher, with galois/counter mode (gcm) as the block cipher mode of operation sha-256 as the hash-based message authentication code (hmac) learn more mozilla recommended cipher suite choices for tls ...
Dynamic programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a dynamic programming language is a programming language in which operations otherwise done at compile-time can be done at run-time.
Encryption - MDN Web Docs Glossary: Definitions of Web-related terms
without knowing the secret, the reverse operation, decryption, is mathematically hard to perform.
Falsy - MDN Web Docs Glossary: Definitions of Web-related terms
h are coerced to false in boolean contexts, and thus bypass the if block): if (false) if (null) if (undefined) if (0) if (-0) if (0n) if (nan) if ("") the logical and operator, && if the first object is falsy, it returns that object false && "dog" // ↪ false 0 && "dog" // ↪ 0 specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
Git - MDN Web Docs Glossary: Definitions of Web-related terms
what sets it apart from previous scm systems is the ability to do common operations (branching, committing, etc.) on your local development machine, without having to change the master repository or even having write access to it.
High-level programming language - MDN Web Docs Glossary: Definitions of Web-related terms
a high-level programming language has a significant abstraction from the details of computer operation.
REST - MDN Web Docs Glossary: Definitions of Web-related terms
a document, is transferred with its state and relationships via well-defined, standarized operations and formats or services call themselves restful when they directly modify type of document as opposed to triggering actions somewhere.
SIMD - MDN Web Docs Glossary: Definitions of Web-related terms
simd allows one same operation to be performed on multiple data points resulting in data level parallelism and thus performance gains — for example, for 3d graphics and video processing, physics simulations or cryptography, and other domains.
SISD - MDN Web Docs Glossary: Definitions of Web-related terms
see also simd for a parallel architecture that allows one same operation to be performed on multiple data points.
Snap positions - MDN Web Docs Glossary: Definitions of Web-related terms
a scroll container may set snap positions — points that the scrollport will stop moving at after a scrolling operation is completed.
Truthy - MDN Web Docs Glossary: Definitions of Web-related terms
examples of truthy values in javascript (which will be coerced to true in boolean contexts, and thus execute the if block): if (true) if ({}) if ([]) if (42) if ("0") if ("false") if (new date()) if (-42) if (12n) if (3.14) if (-3.14) if (infinity) if (-infinity) specifications specification ecmascript (ecma-262)the definition of 'toboolean abstract operation' in that specification.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
a value's data type also affects the operations that are valid on that value.
Origin - MDN Web Docs Glossary: Definitions of Web-related terms
some operations are restricted to same-origin content, and this restriction can be lifted using cors.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
in other words, a method is safe if it leads to a read-only operation.
MDN Web Docs Glossary: Definitions of Web-related terms
ext argument aria arpa arpanet array ascii asynchronous atag attribute b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) block (scripting) block cipher mode of operation boolean boot2gecko bootstrap bounding box breadcrumb brotli browser browsing context buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn ...
Client-side form validation - Learn web development
you need to determine how to validate your data: string operations, type conversion, regular expressions, and so on.
JavaScript basics - Learn web development
after declaring a variable, you can give it a value: myvariable = 'bob'; also, you can do both these operations on the same line: let myvariable = 'bob'; you retrieve the value by calling the variable name: myvariable; after assigning a value to a variable, you can change it later in the code: let myvariable = 'bob'; myvariable = 'steve'; note that variables may hold values that have different data types: variable explanation example string this is a sequence of text ...
Build your own function - Learn web development
in a real application, such a message box would probably be called in response to new data being available, or an error having occurred, or the user trying to delete their profile ("are you sure about this?"), or the user adding a new contact and the operation completing successfully, etc.
Third-party APIs - Learn web development
most of these operations are fairly obvious, but a few are worth calling out: we used a for loop (for(var j = 0; j < current.keywords.length; j++) { ...
A first splash into JavaScript - Learn web development
we add 1 to the guesscount variable so the player uses up their turn (++ is an incrementation operation — increment by 1), and empty the value out of the form text field and focus it again, ready for the next guess to be entered.
JavaScript First Steps - Learn web development
useful string methods now we've looked at the very basics of strings, let's move up a gear and start thinking about what useful operations we can do on strings with built-in methods, such as finding the length of a text string, joining and splitting strings, substituting one character in a string for another, and more.
Working with JSON - Learn web development
we then do a very similar operation with a paragraph: create it, set its text content and append it to the header.
JavaScript — Dynamic client-side scripting - Learn web development
asynchronous javascript in this module we take a look at asynchronous javascript, why it is important, and how it can be used to effectively handle potential blocking operations such as fetching resources from a server.
Perceived performance - Learn web development
even if an operation is going to take a long time (because of latency or or inavailability of the main thread), it is possible to keep the user engaged while they wait by showing a loading spinner, or a series of useful hints and tips (or jokes, or whatever else you think might be appropriate).
What is web performance? - Learn web development
even if an operation is going to take a long time (because of latency or whatever), it is possible to keep the user engaged while they wait by showing a loading spinner, or a series of useful hints and tips (or jokes, or whatever else you think might be appropriate).
The business case for web performance - Learn web development
expectation versus reality in performance business performance (in revenue, operations, etc.) is directly related to how to web performance.
Introduction to the server side - Learn web development
a dynamic site can return different data for a url based on information provided by the user or stored preferences and can perform other operations as part of returning a response (e.g.
Server-side website programming - Learn web development
learning pathway getting started with server-side programming is usually easier than client-side development, because dynamic websites tend to perform a lot of very similar operations (retrieving data from a database and displaying it in a page, validating user-entered data and saving it in a database, checking user permissions and logging users in, etc.), and are constructed using web frameworks that make these and other common web server operations easy.
Componentizing our Svelte app - Learn web development
or we could take a more generic approach and emit a single update event for both operations.
Dynamic behavior in Svelte: working with variables and props - Learn web development
note: array has several mutable operations — push(), pop(), splice(), shift(), unshift(), reverse(), and sort().
Accessibility API cross-reference
for other kinds of keyboard operation, e.g.
Mozilla accessibility architecture
to make this less expensive, once the child count or any child of an accessible is asked for, both the child count and the children are calculated at the same time and then cached, so that we can avoid doing these expensive operations more than once.
Software accessibility: Where are we today?
realizing that complete accessibility was not possible without cooperation between applications and accessibility aids such as screen reading software or voice recognition software, microsoft active accessibility defines a windows-based standard by which applications can communicate context and other pertanent information to accessibility aids.
Accessible Toolkit Checklist
in this case, adding a complete or even a partial accessibility solution is major work, and will require more than one full time person as well as cooperation from windows assistive technology vendors when parts of your msaa solution isn't working.
Debugging on Windows
it is possible to change the interrupt code in memory (which causes you to break into debugger) to be a nop (no operation).
How Mozilla's build system works
the execution environment is strictly controlled, so moz.build files can only perform a limited set of operations.
Browser API
mozbrowserfindchange sent when a search operation is performed on the browser <iframe> content (see htmliframeelement search methods.) mozbrowserfirstpaint sent when the <iframe> paints content for the first time (this doesn't include the initial paint from about:blank.) mozbrowsericonchange sent when a new icon (e.g.
PBackground
instead, it simply turns all of its operations into ipdl calls on a set of pbackground-based actors and the processing, file i/o, etc, can be controlled from the pbackground thread regardless of where the dom calls are being made.
Code Samples
var beinguninstalled; let listener = { onuninstalling: function(addon) { if (addon.id == "youraddon@youraddon.com") { beinguninstalled = true; } }, onoperationcancelled: function(addon) { if (addon.id == "youraddon@youraddon.com") { beinguninstalled = (addon.pendingoperations & addonmanager.pending_uninstall) != 0; } } } try { components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.addaddonlistener(listener); } catch (ex) {} ...
Assert.jsm
undefined report( failed, actual, expected, message, operator ); parameters failed indicates if the assertion failed or not actual the result of evaluating the assertion expected expected result from the test author message short explanation of the expected result operator operation qualifier used by the assertion method (ex: '==') examples custom reporter example components.utils.import("resource://testing-common/assert.jsm"); let assert = new assert(); assert.setreporter(function customreporter(err, message, stack) { if (err) { do_report_result(false, err.message, err.stack); } else { do_report_result(true, message, stack); } }); ...
DeferredTask.jsm
if a special operation or error logging is needed on completion, it can be better handled from within the task itself, for example using a try/catch/finally clause in the task.
Downloads.jsm
saver: optional string representing the class of the download operation.
Geometry.jsm
the geometry.jsm javascript code module provides routines for performing common geometry operations on points and rectangles.
Following the Android Toasts Tutorial from a JNI Perspective
toast description a toast provides simple feedback about an operation in a small popup.
Examples
function promisevalueaftertimeout(avalue, atimeout) { let deferred = promise.defer(); try { // an asynchronous operation will trigger the resolution of the promise.
Task.jsm
the task.jsm javascript code module implements a subset of task.js to make sequential, asynchronous operations simple, using the power of javascript's yield operator.
WebRequest.jsm
to perform one of these operations, include a property with the appropriate name in the object returned from the listener, and assign it the desired value, as detailed in the table below: operation available in return property cancel onbeforerequest cancel boolean value set to true.
Localization formats
in this case, the choice to use customized values for msgid was error-prone, onerous, and unfamiliar to localizers who are used to more customary gettext operations.
Mozilla Framework Based on Templates (MFBT)
floatingpoint.h provides various operations for examining and working upon double-precision floating point values, and for producing various special floating point values.
Profiling with the Firefox Profiler
it may have significant performance impact, especially on graphics operations.
about:memory
it also lets you do other memory-related operations like trigger gc and cc, dump gc & cc logs, and dump dmd reports.
Performance
it also lets you do other memory-related operations like trigger gc and cc, dump gc & cc logs, and dump dmd reports.
L20n Javascript API
ctx.requestlocales('pl'); if registerlocales hasn't been called, the special i-default locale is used, which means that the following minimal code is valid and will result in a fully operational context instance.
Midas editor module security preferences
if you want to allow multiple urls to access the paste operation, separate the urls with a space.
About NSPR
that method of operation is preferred though it is possible to configure the network i/o channels as non-blocking in the traditional sense.
Optimizing Applications For NSPR
a file descriptor is not usable after an io operation on it fails with either <tt>pr_io_timeout_error</tt> or <tt>pr_io_interrupt_error</tt>.
Anonymous Shared Memory
both sides should adhere strictly to the protocol for proper operation.
Date and Time
note that absolute and clock times are not normally used in timing operations.
I/O Types
for sample code that illustrates basic i/o operations, see introduction to nspr.
Monitors
when the calling thread resumes, it has the same entry count it had before the wait operation.
NSPR Types
re are some simple examples of the use of these types: in dowhim.h: pr_extern( void ) dowhatimean( void ); static void pr_callback rootfunction(void *arg); in dowhim.c: pr_implement( void ) dowhatimean( void ) { return; }; prthread *thread = pr_createthread(..., rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit integer types signed integers print8 print16 print32 unsigned integers pruint8 pruint16 pruint32 64-bit integer types different platforms treat 64-bit num...
PR_Accept
timeout a value of type printervaltime specifying the time limit for completion of the accept operation.
PR_AcceptRead
timeout the timeout interval only applies to the read portion of the operation.
PR_AtomicIncrement
the result of the function is the value of the memory after the operation.
PR_AtomicSet
the memory modification is unconditional--that is, it isn't a test and set operation.
PR_CEnterMonitor
this reference must remain valid as long as there are monitoring operations being performed.
PR_Connect
timeout a value of type printervaltime specifying the time limit for completion of the connect operation.
PR_EnterMonitor
the operation is neither timed nor interruptible.
PR_GetRandomNoise
pr_getrandomnoise is intended to provide a "seed" value for a another random number generator that may be suitable for cryptographic operations.
PR_Initialize
in addition to establishing the sequence of operations, pr_initialize implicitly calls pr_cleanup on exiting the primordial function.
PR_Interrupt
the interrupted thread returns pr_failure (-1) with an error code (see pr_geterror) for blocking operations that return a prstatus (such as i/o operations, monitor waits, or waiting on a condition).
PR_LoadLibrary
if the operation fails, returns null.
PR_Lock
acquiring the lock is not an interruptible operation, nor is there any timeout mechanism.
PR_NormalizeTime
call this function in these situations: to normalize a time after performing arithmetic operations directly on the field values of the calendar time object.
PR_Notify
if no thread is waiting on the monitor, the notify operation is a no-op.
PR_NotifyAll
if no threads are waiting, the operation is no-op.
PR_NotifyAllCondVar
if no threads are waiting, the operation is no-op.
PR_NotifyCondVar
if no thread is waiting on the condition variable, the notify operation is a no-op.
PR_Recv
timeout a value of type printervaltime specifying the time limit for completion of the receive operation.
PR_Send
timeout a value of type printervaltime specifying the time limit for completion of the receive operation.
PR_SendTo
timeout a value of type printervaltime specifying the time limit for completion of the receive operation.
PR_Shutdown
how the kind of disallowed operations on the socket.
PR_TransmitFile
timeout time limit for completion of the transmit operation.
PR_WaitSemaphore
the "test and decrement" operation is performed atomically.
NSPR API Reference
o functions functions that operate on pathnames functions that act on file descriptors directory i/o functions socket manipulation functions converting between host and network addresses memory-mapped i/o functions anonymous pipe function polling functions pollable events manipulating layers network addresses network address types and constants network address functions atomic operations pr_atomicincrement pr_atomicdecrement pr_atomicset interval timing interval time type and constants interval functions date and time types and constants time parameter callback functions functions memory management operations memory allocation functions memory allocation macros string operations pl_strlen pl_strcpy pl_strdup pl_strfree floating point number to s...
Cryptography functions
the public functions listed here perform cryptographic operations based on the pkcs #11 interface.
NSS FAQ
MozillaProjectsNSSFAQ
the psm binary provides a client module that performs cryptographic operations on behalf of applications.
NSS 3.14.1 release notes
applications which use multiple pkcs#11 modules, which do not indicate which tokens should be used by default for particular algorithms, and which do make use of cipherorder may now find that cryptographic operations occur on a different pkcs#11 token.
NSS 3.14.2 release notes
bug 813857 - modification of certificate trust flags from multiple threads is now a thread-safe operation.
NSS 3.14 release notes
(see warnings against using c_encryptupdate/c_decryptupdate above) ckm_sha224_key_derivation ckm_sha256_key_derivation ckm_sha384_key_derivation ckm_sha512_key_derivation changes in nss 3.14 bug 333601 - performance enhancements for intel macs when building for intel macs, nss will now take advantage of optimized assembly code for common operations.
NSS 3.35 release notes
this better enables stateless server operation.
NSS 3.36.1 release notes
bugs fixed in nss 3.36.1 certain smartcard operations could result in a deadlock.
NSS 3.48.1 release notes
bugs fixed in nss 3.48.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
NSS 3.49.1 release notes
bugs fixed in nss 3.49.1 bug 1606992 - cache the most recent pbkdf2 password hash, to speed up repeated sdr operations, important with the increased kdf iteration counts.
NSS Sample Code Sample1
keyinfo = seckey_decodedersubjectpublickeyinfo(pubkeydata); if (!keyinfo) { rv = 1; goto done; } pubkey = seckey_extractpublickey(keyinfo); if (!pubkey) { rv = 1; goto done; } // export the encryption key rv = wrapkey(menckey, pubkey, &data); if (rv) goto done; // export the mac key rv = wrapkey(mmackey, pubkey, wrappedmackey); if (rv) goto done; // commit the rest of the operation *wrappedenckey = data; data = 0; done: if (data) secitem_freeitem(data, pr_true); if (pubkey) seckey_destroypublickey(pubkey); if (keyinfo) seckey_destroysubjectpublickeyinfo(keyinfo); return rv; } int server::importkeys(secitem *wrappedenckey, secitem *wrappedmackey) { int rv = 0; if (mwrappedenckey || mwrappedmackey) { rv = 1; goto done; } mwrappedenckey = secitem_dupitem...
NSS Sample Code sample2
if you choose something else, then data padding is the * application's responsibility */ ciphermech = ckm_des_cbc_pad; slot = pk11_getbestslot(ciphermech, null); /* slot = pk11_getinternalkeyslot(); is a simpler alternative but in * theory, it *may not* return the optimal slot for the operation.
NSS Sample Code sample3
* this code uses the simplest of the init functions, which does not * require a nss database to exist */ nss_nodb_init("."); /* get a slot to use for the crypto operations */ slot = pk11_getinternalkeyslot(); if (!slot) { cout << "getinternalkeyslot failed" << endl; status = 1; goto done; } /* * part 1 - simple hashing */ cout << "part 1 -- simple hashing" << endl; /* initialize data */ memset(data, 0xbc, sizeof data); /* create a context for hashing (digesting) */ context = pk11_createdigestcontext(sec_oid_md5); if (!co...
NSS Sample Code
nss sample code the collection of sample code here demonstrates how nss can be used for cryptographic operations, certificate handling, ssl, etc.
NSS Tech Notes
tn5: using nss to perform miscellaneous cryptographic operations.
New NSS Samples
new nss sample code this collection of sample code demonstrates how nss can be used for cryptographic operations, certificate handling, ssl, etc.
PKCS 12 functions
the public functions listed here perform pkcs #12 operations required by some of the nss tools and other applications.
PKCS 7 functions
the public functions listed here perform pkcs #7 operations required by mail and news applications and by some of the nss tools.
FC_Finalize
syntax ck_rv fc_finalize (ck_void_ptr preserved); parameters fc_finalize has one parameter: preserved must be null description fc_finalize shuts down the nss cryptographic module in the fips mode of operation.
FC_Initialize
description fc_initialize initializes the nss cryptographic module for the fips mode of operation.
FC_Verify
description fc_verify verifies a signature in a single-part operation, where the signature is an appendix to the data.
NSS tools : crlutil
reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS tools : pk12util
if no suitable replacement for the desired algorithm can be found, the tool returns the error no security module can perform the requested operation.
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
sslintro.html
one of these functions must be called before any cryptographic operations can be performed with nss.
S/MIME functions
the public functions listed here perform s/mime operations using the s/mime toolkit.
NSS Tools
source, documentation, tasks/plans cmsutil 1.0 performs basic cms operations such as encrypting, decrypting, and signing messages.
NSS Tools cmsutil
using cmsutil newsgroup: mozilla.dev.tech.crypto the cmsutil command-line utility uses the s/mime toolkit to perform basic operations, such as encryption and decryption, on cryptographic message syntax (cms) messages.
NSS Tools crlutil
reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS Tools pk12util
if no suitable replacement for the desired algorithm can be found a "no security module can perform the requested operation" will appear on the error message.
NSS tools : crlutil
MozillaProjectsNSStoolscrlutil
reasoncode non-critical code where: reasoncode: identifies the name of an extension non-critical: should be set to 0 since this is non-critical extension code: the following codes are available: unspecified (0), keycompromise (1), cacompromise (2), affiliationchanged (3), superseded (4), cessationofoperation (5), certificatehold (6), removefromcrl (8), privilegewithdrawn (9), aacompromise (10) * add invalidity date extension: the invalidity date is a non-critical crl entry extension that provides the date on which it is known or suspected that the private key was compromised or that the certificate otherwise became invalid.
NSS tools : pk12util
if no suitable replacement for the desired algorithm can be found, the tool returns the error no security module can perform the requested operation.
NSS tools : vfychain
modutil can add and delete pkcs #11 modules, change passwords on security databases, set defaults, list module contents, enable or disable slots, enable or disable fips 140-2 compliance, and assign default providers for cryptographic operations.
Multithreading in Necko
background threads are used to manage all i/o operations (with the exception of few cases).
Rhino Examples
sharing the global scope allows both information to be shared across threads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
64-bit Compatibility
for all intents and purposes they are also 32-bit on 64-bit platforms: intn, uintn jsintn, jsuintn, jsbool general problems with pointers when performing bitwise operations on pointer values, make sure that both operands are 64-bit.
Functions
some of these can even be fused with other operations into combo instructions like jsop_getargprop, jsop_forlocal, and jsop_inclocal.
Property cache
nor do operations such as add that only need to look up a property (.tostring) in unusual cases.
SpiderMonkey Internals: Thread Safety
in a js_threadsafe build, these operations are handled specially: access to jsruntime data structures garbage collection accesses to jsruntime data structures are serialized with a few mutexes.
Self-hosted builtins in SpiderMonkey
some general-purpose functions provided in this way are: the abstract operations toobject, tointeger, and iscallable specified in the ecmascript language specification.
Introduction to the JavaScript shell
running the javascript shell the shell offers two modes of operation.
JS::CompileOffThread
the callback will be invoked while off the main thread, so its operations must be thread safe.
JS::ToBoolean
it implements the toboolean operation described in ecma 262 §7.1.2.this function can not fail and the return value is always the boolean conversion of the argument.
JSCheckAccessOp
jscheckaccessop implementations generally work by using jsdbgapi functions such as js_frameiterator and js_stackframeprincipals to obtain the principals of the code attempting the checked operation, then examining those principals and comparing them with the system's security policy.
JSErrorReport
it will not cause the current operation to fail.
JSObjectOps.getProperty
each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
JSObjectOps.getRequiredSlot
these operations are infallible, so required slots must be pre-allocated, or implementations must suppress out-of-memory errors.
JSResolveOp
receives the result of resolve operation.
JSTraceOp
description jstraceop is the function type for trace operation of the class called to enumerate all traceable things reachable from obj's private data structure.
JS_AddExternalStringFinalizer
callback syntax typedef void (*jsstringfinalizeop)(jscontext *cx, jsstring *str); name type description cx jscontext * pointer to a jscontext which the finalizer may use for certain very limited operations (not documented).
JS_ClearNonGlobalObject
description js_clearnonglobalobject removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation.
JS_ClearScope
description js_clearscope removes all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation.
JS_DefineObject
this function combines two operations: creating an object and storing it in a property of another object.
JS_DeleteElement
result js::objectopresult &amp; (out parameter) receives the result of the operation.
JS_DeleteProperty
result js::objectopresult &amp; (out parameter) receives the result of the operation.
JS_FlushCaches
the operation might be delayed if the cache cannot be flushed currently because native code is currently executing.
JS_GetNaNValue
nan is typically used in javascript as the return value of a numeric operation when an argument is invalid or conversion fails.
JS_Init
this article covers features introduced in spidermonkey 31 initializes the js engine so that further operations can be performed.
JS_InitClass
note: starting with spidermonkey 1.8, the prototype and constructor are set up with stub getter and setter operations instead of class operations.
JS_LeaveLocalRootScopeWithResult
this slot is rooted, but the value will eventually be overwritten by some other operation, and it is very difficult to figure out exactly when this will happen—or more to the point, guarantee that it won't happen in the time it takes some specific chunk of code to run.
JS_MakeStringImmutable
this makes the substring operation, and regular expression matches, faster.
JS_MaybeGC
calling js_maybegc periodically when the application is busy, from a jsbranchcallback or jsoperationcallback added in spidermonkey 1.8, can keep memory usage down and improve performance.
JS_NewGlobalObject
if an error occurs and the operation aborts, callers should skip firing the hook.
JS_PreventExtensions
result js::objectopresult &amp; (out parameter) receives the result of the operation.
JS_SetAllNonReservedSlotsToUndefined
description js_setallnonreservedslotstoundefined assignes undefined to all of obj's own properties, except the special __proto__ and __parent__ properties, in a single operation.
JS_ShutDown
this may not always be the case; it's recommended that all embedders call this method when all other jsapi operations have completed, to be future-proof.
JS_SuspendRequest
description in js_threadsafe builds, when a multi-threaded application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after.
JS_TracerInit
in the latter case, the only operations the callback may perform on thing are to call js_tracechildren or the debug-only js_printtracethinginfo function.
JSAPI reference
extprivate added in spidermonkey 17 js_setsecondcontextprivate added in spidermonkey 17 js_setinterruptcallback added in spidermonkey 31 js_getinterruptcallback added in spidermonkey 31 js_requestinterruptcallback added in spidermonkey 31 js_checkforinterrupt added in jsapi 45 js_destroycontextmaybegc obsolete since jsapi 14 js_setbranchcallback obsolete since javascript 1.9.1 js_setoperationcallback obsolete since jsapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1.9.1 js_setoperationlimit obsolete since javascript 1.9.1 js_max_operation_limit obsolete since javascript 1.9.1 js_operation_weight_base obsolete since j...
SavedFrame
asyncparent if this stack frame was called as a result of an asynchronous operation, for example if the function referenced by this frame is a promise handler, this property points to the stack frame responsible for the asynchronous call, for example where the promise was created.
TPS History Lists
the history list used for operations other than delete has the following properties: uri: required.
Using RAII classes in Mozilla
raii classes are useful when two operations (e.g., lock/unlock, addref/release, pushstate/popstate) must be paired.
Animated PNG graphics
MozillaTechAPNG
1 apng_blend_op_over the frame should be composited onto the output buffer based on its alpha, using a simple over operation as described in the alpha channel processing section of the extensions to the png specification, version 1.2.0.
Embedded Dialog API
these new windows can be entire new browser windows opened in response to web page script, or dialogs or alerts which may arise from script or merely during normal operation of the browser.
Life After XUL: Building Firefox Interfaces with HTML
problems / solutions: accessibility localization caching for working offline / pre-caching for snappy first run visual performance / jank security privacy operations tooling build process third-party library use and management ...
Places Developer Guide
it provides code samples for many common use-cases, such as crud operations, searching, and observing.
Accessing the Windows Registry Using XPCOM
you can read the interface documentation for a full explanation, but we will show only the three most commonly used modes here: access_read — for reading values, enumerating keys, and receiving notifications access_write — for setting values and creating sub keys access_all — access for all operations in addition to open() and create(), there are the openchild() and createchild() methods.
An Overview of XPCOM
this is the contract id for the ldap operation component: "@mozilla.org/network/ldap-operation;1" the format of the contract id is the domain of the component, the module, the component name, and the version number, separated by slashes.
Making cross-thread calls using runnables
in the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
XPCOM hashtable guide
inserting/removing: o(n): adding and removing items from a large array can be time-consuming o(1): adding and removing items from hashtables is a quick operation wasted space: none: arrays are packed structures, so there is no wasted space.
XPCOM guide
MozillaTechXPCOMGuide
the problem would not exist with java's interfaces).making cross-thread calls using runnablesin the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
Introduction to XPCOM for the DOM
nscomptr's are an extension of the c auto_ptr, managing the reference counting operations for you, and providing several facilities for comparison, initialization, etc...
Components.utils.cloneInto
contentwindow, {clonefunctions: true}); // page script var test = document.getelementbyid("test"); test.addeventlistener("click", function() { window.addonscriptobject.greetme(); }, false); cloning objects that contain dom elements by default, if the object you clone contains objects that are reflected from c++, such as dom elements, the cloning operation will fail with an error.
Components.utils.evalInSandbox
mysandbox.double = double; var result = components.utils.evalinsandbox("x = y + 2; double(x) + 3", mysandbox); console.log(result); // 17 console.log(mysandbox.x); // 7 operations on objects you insert into this sandbox global scope do not carry privileges into the sandbox: mysandbox.foo = components; // this will give a "permission denied" error components.utils.evalinsandbox("foo.classes", mysandbox); optional arguments you can optionally specify the js version, filename, and line number of the code being evaluated.
Components.utils.forceGC
users should note that garbage collection is a very expensive operation and should only be forced when it is known to be absolutely necessary.
Components.utils
this operation is non-deterministic because it is affected by the scheduling of the garbage collector and the cycle collector.
Components.utils.schedulePreciseGC
note: garbage collection is a very expensive operation and should only be forced when it is known to be absolutely necessary.
Components.utils.waiveXrays
xray vision is designed to make most simple operations safe.
Language bindings
bjects that conform to the nsijsid interface.components.interfacescomponents.interfaces is a read-only object whose properties are interfaces indexed by their names.components.interfacesbyidcomponents.interfacesbyid is a read-only array of classes indexed by iid.components.issuccesscodedetermines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.components.lastresultcomponents.managercomponents.manager is a convenience reflection of the global native component manager service.
IAccessibleEditableText
1.0 66 introduced gecko 1.9 inherits from: iunknown last changed in gecko 1.9 (firefox 3) this interface is typically used in conjunction with the iaccessibletext interface and complements that interface with the additional capability of clipboard operations.
imgIContainer
type_vector 1 flag_none 0x0 flags for imgicontainer operations.
imgIDecoder
this object also implements the imgidecoderobserver interface; you should queryinterface() it to that interface and call its notification methods while handling the decode operation.
mozIAsyncHistory
if more than one operation is performed for a given visit, only one callback will be given (i.e.
mozIStorageError
interrupt 9 the operation was terminated by an interrupt.
mozIStoragePendingStatement
fails only if you attempt to cancel the operation more than once.
mozIStorageProgressHandler
last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) inherits from: nsisupports method overview boolean onprogress(in mozistorageconnection aconnection); methods onprogress() the onprogress() method is called periodically while an sqlite operation is ongoing.
mozIVisitInfoCallback
if more than one operation is done for a given visit, this method is only called once (for all changes at once).
nsIArray
ns_error_out_of_memory if there is not enough memory to complete the operation.
nsICacheSession
netwerk/cache/public/nsicachesession.idlscriptable handles open synchronous and asynchronous cache entry operations along with evicting cache entries and checking for cache devices instantiation according to the session storage policies.
nsIClipboardDragDropHookList
it provides basic operations such as adding, removing and enumerating clipboard hooks for the nsiclipboarddragdrophooks interface.
nsICollection
it provides basic operations on those items like: getting, setting, appending, removing, and so on.
nsICookieService
batch-deleted a set of cookies were deleted as part of a purge operation.
nsICryptoHash
computing the hash of a string another common operation is computing the hash value of a string.
nsIDOMGeoPositionError
the nsidomgeopositionerror interface represents an error that occurred while performing geolocation operations.
nsIDOMGeoPositionOptions
the nsidomgeopositionoptions interface is used to specify options for geolocation operations.
nsIDOMParser
if you instantiate a domparser by calling createinstance(), and you don't call the domparser's init() method, attempting to initiate a parsing operation will automatically call init() on the domparser with a null principal and null pointers for documenturi and baseuri.
nsIDOMXPathException
dom/interfaces/xpath/nsidomxpathexception.idlscriptable describes an exception resulting from xpath operations.
nsIFileInputStream
(the file will only be reopened if it is closed for some reason.) defer_open 1<<4 if this is set, the file will be opened (i.e., a call to pr_open() done) only when we do an actual operation on the stream, or more specifically, when one of the following is called: seek() tell() available() read() readline() defer_open is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well.
nsIFrameLoader
this can be used to decide what operations may or may not be allowed on the loader's docshell.
nsIHttpServer
if the handler throws an * exception during server operation, fallback is to the genericized error * handler (the x00 version), then to 500, using a user-defined error * handler if one exists or the server default handler otherwise.
nsIIDNService
this combines two operations: running the rfc 3490 "tounicode" operation on the original string, then converting the resulting unicode string into utf-8 format.
nsIINIParserWriter
aflags optional flags controlling the file write operation.
nsILoginManagerCrypto
if the user is not logged in, performing a crypto operation will result in a master password prompt.
nsIMarkupDocumentViewer
bidioptions pruint32 use this attribute to access all the bidi options in one operation.
nsIMsgDBHdr
it is also mandatory to set msghdr.folder.msgdatabase = null after performing this kind of operations to prevent leaking.
nsIMsgWindow
if you are checking this flag, you need to clear it before you start your operation since there's no convenient place to clear it.
nsINavBookmarksService
this method exists because complex delete->undo operations rely on recreated folders to have the same id they had before they were deleted, so that any other items deleted in different transactions can be re-inserted correctly.
nsINavHistoryContainerResultNode
the container may be a result_type_remote_container node that has been dynamically generated by the remote container api, or a bookmark folder (result_type_folder) for which some service (such as livemarks) has registered to provide certain operations.
nsINavHistoryResult
this is used to prevent rapid flickering of changes when performing batch or temporary operations on the result structure.
nsINavHistoryResultObserver
methods batching() lets the observer know when a batch operation in places is about to start or end.
nsINavHistoryService
this will probably not be commonly used other than for backup/restore type operations.
nsIObserver
be careful, though, because other uses of nsiobserver may not support these operations correctly within observe.
nsIPrefService
many of the branch methods do nothing on a default branch because the operations only make sense when applied to user set preferences.
nsIPrincipal
the order is significant; if an operation is performed on a set of capabilities, the minimum is computed.
nsIProtocolProxyService
return value an nsicancelableobject that can be used to cancel the asynchronous operation.
nsISHistory
during purge operation, the latest documents are maintained and older numentries documents are removed from history.
nsISecurityCheckedComponent
the two special return values of '"allaccess" or "noaccess" unconditionally allow or deny access to the operation.
nsIThreadPool
listener nsithreadpoollistener an optional listener that will be notified when a thread is created or destroyed in the course of the thread pool's operation.
nsIURI
netwerk/base/public/nsiuri.idlscriptable this is an interface for an uniform resource identifier with internationalization support, offering attributes that allow setting and querying the basic components of a uri, and methods for performing basic operations on uris.
nsIURIFixup
the fixup object implementer should honour this flag and only perform any lengthy keyword (or search) operation if it is set.
nsIUpdateCheckListener
toolkit/mozapps/update/nsiupdateservice.idlscriptable an interface describing an object that listens to the progress of an update check operation.
nsIWinTaskbar
fails if a jump list build operation has already been initiated, developers should make use of a single instance of nsijumplistbuilder for building lists within an application.
nsIWindowWatcher
it maintains a list of open top-level windows, and allows some operations on them.
NS_CStringCopy
the implementation may employ reference counting techniques to optimize this operation.
NS_StringCopy
the implementation may employ reference counting techniques to optimize this operation.
Warnings
sort operations this warning message will say something about the number of sort operations that have occurred for a sql statement.
Xptcall Porting Guide
theory of operation there are really two pieces of functionality: invoke and stubs...
XPIDL
an exception to the above rule is if the parameter has the iid_is property (a special case for some queryinterface-like operations).
Mail client architecture overview
url display and dispatching - in order to perform network operations such as downloading new mail, copying and moving messages, and displaying messages from a remote server, the url system interacts with necko and reflects it's state to the mail window.
Mail event system
getservice(components.interfaces.nsiatomservice); var testpropertyatom = atomservice.getatom("testproperty"); // now fire the test notification folder.notifyintpropertychanged(testpropertyatom, 0, 100); // now we would do some operations to change the message count, such // as copying a message into this folder or something.
libmime content type handlers
sample content type handler plugin to see an example of a content type handler plugin, the source for the handler of the content type "text/calendar" can be viewed at the following link: calendar plugin note: this plugin simply creates a blue table in the output stream to identify the fact that it is operational, but the basic constructs of what is needed to build a functional content type handler can be seen.
Zombie compartments
for example, for an add-on that remembers passwords, visit a site that requires a password; for an add-on that performs an operation involving a specific page element such as an image or a chunk of text, perform that operation.
Using COM from js-ctypes
ishellitem ifileoperation ishelllink & ipersistfile - create shortcut files.
Working with data
quirks in equality equality doesn't work the same way in javascript as it does in c, which means certain operations might not work the way you expect.
UInt64
arithmetic operations const uint64 = ctypes.uint64; const int64 = ctypes.int64; function ensureuint64(aarr) { // makes elements in aarr a uint64 if it can be made, else throws for (var i=0; i<aarr.length; i++) { var ccon = aarr[i].constructor.name; if (ccon != 'uint64') { if (['string', 'number'].indexof(ccon) > -1) { aarr[i] = ...
PKCS #11 Netscape Trust Objects - Network Security Services
pkcs #11 is a standard that defines ways to store certificates, keys and perform crypto operations.
Constants - Plugins
npres_user_break 2 user canceled stream directly by clicking the stop button or indirectly by some action such as deleting the instance or initiating higher-priority network operations.
Initialization and Destruction - Plugins
you should not perform any graphics operations in npp_destroy because the instance window is no longer guaranteed to be valid.
Plug-in Side Plug-in API - Plugins
npp_print requests a platform-specific print operation for an embedded or full-screen plug-in.
Debugger.Frame - Firefox Developer Tools
when this handler is called, this frame’s current execution location, as reflected in its offset and environment properties, is the operation which caused it to be unwound.
Debugger.Object - Firefox Developer Tools
theframe argument is the current stack frame, whose code is about to perform the operation on the object being reported.
Deprecated tools - Firefox Developer Tools
this gave a high-level view of its operation, and enabled you to ensure that all the nodes are connected in the way you expect.
Performance - Firefox Developer Tools
you get four sub-tools to examine aspects of the profile in more detail: the waterfall shows the different operations the browser was performing, such as executing layout, javascript, repaints, and garbage collection the call tree shows the javascript functions in which the browser spent most of its time the flame chart shows the javascript call stack over the course of the recording the allocations view shows the heap allocations made by your code over the course of the recording.
Console messages - Firefox Developer Tools
a reflow is the name given to the operation in which the browser calculates the layout of all or part of the page.
about:debugging - Firefox Developer Tools
once you have loaded a temporary extension, you can see information about it and perform operations on it.
ANGLE_instanced_arrays.drawArraysInstancedANGLE() - Web APIs
if gl.current_program is null, a gl.invalid_operation error is thrown.
ANGLE_instanced_arrays.drawElementsInstancedANGLE() - Web APIs
if offset is a invalid multiple of the size of the given type, a gl.invalid_operation error is thrown.
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
Animation.playState - Web APIs
previously, web animations defined a pending value to indicate that some asynchronous operation such as initiating playback was yet to complete.
Animation - Web APIs
WebAPIAnimation
animation.pending read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
Background Tasks API - Web APIs
this establishes a box (id "container") that's used to present the progress of an operation (because you never know how long decoding "quantum filament tachyon emissions" will take, after all) as well as a second main box (with the id "logbox"), which is used to display textual output.
Bluetooth.requestDevice() - Web APIs
securityerror this operation is not permitted in this context due to security concerns.
BluetoothCharacteristicProperties - Web APIs
the bluetoothcharacteristicproperties interface of the the web bluetooth api provides the operations that are valid on the given bluetoothremotegattcharacteristic.
BroadcastChannel.close() - Web APIs
syntax var str = channel.close(); example // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.close()' in that specification.
BroadcastChannel.name - Web APIs
syntax var str = channel.name; examples // connect to a channel var bc = new broadcastchannel('test_channel'); // more operations (like postmessage, …) // log the channel name to the console console.log(bc.name); // "test_channel" // when done, disconnect from the channel bc.close(); specifications specification status comment html living standardthe definition of 'broadcastchannel.name' in that specification.
CSSNumericValue - Web APIs
the cssnumericvalue interface of the css typed object model api represents operations that all numeric values can perform.
CSS Font Loading API - Web APIs
fontfacesource a mixin providing all of the fonts used in font-related operations, unless defined otherwise.
Cache.add() - Web APIs
WebAPICacheadd
the add() method is functionally equivalent to the following: fetch(url).then(function(response) { if (!response.ok) { throw new typeerror('bad response status'); } return cache.put(url, response); }) for more complex operations, you'll need to use cache.put() directly.
Cache.put() - Web APIs
WebAPICacheput
in such cases you are better off using cache.add()/cache.addall(), as they are shorthand functions for one or more of these operations.
CanvasRenderingContext2D.save() - Web APIs
the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoffset, shadowoffsetx, shadowoffsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled.
Applying styles and colors - Web APIs
note: shadows are only drawn for source-over compositing operations.
Basic animations - Web APIs
earth = new image(); function init() { sun.src = 'https://mdn.mozillademos.org/files/1456/canvas_sun.png'; moon.src = 'https://mdn.mozillademos.org/files/1443/canvas_moon.png'; earth.src = 'https://mdn.mozillademos.org/files/1429/canvas_earth.png'; window.requestanimationframe(draw); } function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.globalcompositeoperation = 'destination-over'; ctx.clearrect(0, 0, 300, 300); // clear canvas ctx.fillstyle = 'rgba(0, 0, 0, 0.4)'; ctx.strokestyle = 'rgba(0, 153, 255, 0.4)'; ctx.save(); ctx.translate(150, 150); // earth var time = new date(); ctx.rotate(((2 * math.pi) / 60) * time.getseconds() + ((2 * math.pi) / 60000) * time.getmilliseconds()); ctx.translate(105, 0); ctx.fillrect(0, -12, 40, 24);...
Optimizing canvas - Web APIs
pre-render similar primitives or repeating objects on an offscreen canvas if you find yourself repeating some of the same drawing operations on each animation frame, consider offloading them to an offscreen canvas.
Transformations - Web APIs
the current values of the following attributes: strokestyle, fillstyle, globalalpha, linewidth, linecap, linejoin, miterlimit, linedashoffset, shadowoffsetx, shadowoffsety, shadowblur, shadowcolor, globalcompositeoperation, font, textalign, textbaseline, direction, imagesmoothingenabled.
Clipboard - Web APIs
WebAPIClipboard
this asynchronous operation signals that it's finished by resolving the returned promise.
ClipboardEvent - Web APIs
clipboardevent.clipboarddata read only is a datatransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its mime type.
Console.time() - Web APIs
WebAPIConsoletime
starts a timer you can use to track how long an operation takes.
console - Web APIs
WebAPIConsole
console.group("first group"); console.log("in the first group"); console.group("second group"); console.log("in the second group"); console.warn("still in the second group"); console.groupend(); console.log("back to the first group"); console.groupend(); console.debug("back to the outer level"); the output looks like this: timers you can start a timer to calculate the duration of a specific operation.
Console API - Web APIs
the console api provides functionality to allow developers to perform debugging tasks, such as logging messages or the values of variables at set points in your code, or timing how long an operation takes to complete.
Crypto.subtle - Web APIs
WebAPICryptosubtle
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations.
DOMMatrix() - Web APIs
the dommatrix constructor creates a new dommatrix object which represents 4x4 matrices, suitable for 2d and 3d operations..
DOMMatrix - Web APIs
WebAPIDOMMatrix
the dommatrix interface represents 4×4 matrices, suitable for 2d and 3d operations including rotation and translation.
DOMMatrixReadOnly() - Web APIs
the dommatrixreadonly constructor creates a new dommatrixreadonly object which represents 4x4 matrices, suitable for 2d and 3d operations.
DOMMatrixReadOnly - Web APIs
the dommatrixreadonly interface represents a read-only 4×4 matrix, suitable for 2d and 3d operations.
DOMParser - Web APIs
WebAPIDOMParser
you can perform the opposite operation—converting a dom tree into xml or html source—using the xmlserializer interface.
DOMTokenList.toggle() - Web APIs
force optional a boolean that, if included, turns the toggle into a one way-only operation.
DOMTokenList - Web APIs
returns a boolean indicating whether token is in the list after the operation.
DataTransfer.mozCursor - Web APIs
default uses the default gecko behavior, which is to set the cursor to an arrow during the drag operation.
DataTransfer.mozSourceNode - Web APIs
the datatransfer.mozsourcenode property is used to determine the node over which the mouse cursor was located when the the drag operation was initiated (for example, when a <button> was clicked).
DataTransfer.setData() - Web APIs
the datatransfer.setdata() method sets the drag operation's drag data to the specified data and type.
DataTransferItem - Web APIs
during a drag operation, each drag event has a datatransfer property which contains a list of drag data items.
DataTransferItemList - Web APIs
during a drag operation, each dragevent has a datatransfer property and that property is a datatransferitemlist.
Document: drag event - Web APIs
bubbles yes cancelable yes default action continue the drag & drop operation.
Document: dragend event - Web APIs
the dragend event is fired when a drag operation is being ended (by releasing a mouse button or hitting the escape key).
Document: dragexit event - Web APIs
the dragexit event is fired when an element is no longer the drag operation's immediate selection target.
Document: dragover event - Web APIs
bubbles yes cancelable yes default action reset the current drag operation to "none".
Document: dragstart event - Web APIs
bubbles yes cancelable yes default action initiate the drag-and-drop operation.
Document.fonts - Web APIs
WebAPIDocumentfonts
examples doing operation after all fonts are loaded document.fonts.ready.then(function() { // any operation that needs to be done only after all the fonts // have finished loading can go here.
Document.fullscreen - Web APIs
although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
Document.fullscreenEnabled - Web APIs
although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
Document.getElementsByClassName() - Web APIs
here we'll find all div elements that have a class of 'test': var testelements = document.getelementsbyclassname('test'); var testdivs = array.prototype.filter.call(testelements, function(testelement){ return testelement.nodename === 'div'; }); get the first element whose class is 'test' this is the most commonly used method of operation.
Document: scroll event - Web APIs
examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
Document.write() - Web APIs
WebAPIDocumentwrite
for example: <script> document.write("<h1>main title</h1>") </script> note: document.write() and document.writeln do not work in xhtml documents (you'll get an "operation is not supported" [ns_error_dom_not_supported_err] error in the error console).
Document.writeln() - Web APIs
WebAPIDocumentwriteln
note: document.writeln (like document.write) does not work in xhtml documents (you'll get a "operation is not supported" (ns_error_dom_not_supported_err) error on the error console).
DocumentOrShadowRoot.fullscreenElement - Web APIs
although this property is read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
DragEvent.dataTransfer - Web APIs
the dragevent.datatransfer property holds the drag operation's data (as a datatransfer object).
EXT_disjoint_timer_query - Web APIs
ext.gpu_disjoint_ext a glboolean indicating whether or not the gpu performed any disjoint operation.
Element.animate() - Web APIs
WebAPIElementanimate
you can also include a composite operation or iteration composite operation in your options list: composite optional determines how values are combined between this animation and other, separate animations that do not specify their own specific composite operation.
Element.innerHTML - Web APIs
WebAPIElementinnerHTML
document.documentelement.innerhtml = "<pre>" + document.documentelement.innerhtml.replace(/</g,"&lt;") + "</pre>"; operational details what exactly happens when you set value of innerhtml?
Element: scroll event - Web APIs
examples scroll event throttling since scroll events can fire at a high rate, the event handler shouldn't execute computationally expensive operations such as dom modifications.
Event.msConvertURL() - Web APIs
the msconverturl method instructs the html paste operation on how to modify the src attribute that corresponds to each file in the clipboarddata.files collection, allowing otherwise inaccessible files to be converted to blob or data uris.
FetchEvent.request - Web APIs
the code also handles exceptions thrown from the serviceworkerglobalscope.fetch operation.
Fetch basic concepts - Web APIs
however, the operation will work if guard is request and the header name isn't a forbidden header name .
Fetch API - Web APIs
WebAPIFetch API
aborting a fetch browsers have started to add experimental support for the abortcontroller and abortsignal interfaces (aka the abort api), which allow operations like fetch and xhr to be aborted if they have not already completed.
Using files from web applications - Web APIs
after creating the new filereader object, we set up its onload function and then call readasdataurl() to start the read operation in the background.
File - Web APIs
WebAPIFile
file objects are generally retrieved from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
FileReader: loadstart event - Web APIs
the loadstart event is fired when a file read operation has begun.
FileReader.readAsArrayBuffer() - Web APIs
when the read operation is finished, the readystate becomes done, and the loadend is triggered.
FileReader.readAsBinaryString() - Web APIs
when the read operation is finished, the readystate becomes done, and the loadend is triggered.
FileReader.readAsDataURL() - Web APIs
when the read operation is finished, the readystate becomes done, and the loadend is triggered.
FileReader.readAsText() - Web APIs
when the read operation is complete, the readystate is changed to done, the loadend event is triggered, and the result property contains the contents of the file as a text string.
FileRequest - Web APIs
filerequest.onprogress a callback handler called repeatedly while the operation represented by the filerequest is in progress.
FileSystemEntry.getMetadata() - Web APIs
syntax filesystementry.getmetadata(successcallback[, errorcallback]); parameters successcallback a function which is called when the copy operation is succesfully completed.
FileSystemEntry.getParent() - Web APIs
errors fileerror.invalid_state_err the operation failed because the file system's state doesn't permit it.
File and Directory Entries API - Web APIs
asynchronous api the asynchronous api should be used for most operations, to prevent file system accesses from blocking the entire browser if used on the main thread.
FontFaceSet - Web APIs
fontfaceset.ready read only promise which resolves once font loading and layout operations have completed.
GlobalEventHandlers.onanimationcancel - Web APIs
all we do here is log information to the console, but you might find other use cases, such as starting a new animation or effect, or terminating some dependent operation.
HTMLCanvasElement.getContext() - Web APIs
desynchronized: boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop (gecko only) willreadfrequently: boolean that indicates whether or not a lot of read-back operations are planned.
HTMLElement - Web APIs
htmlelement.dropzone read only returns a domsettabletokenlist reflecting the dropzone global attribute and describing the behavior of the element regarding a drop operation.
HTMLMediaElement.load() - Web APIs
usage notes calling load() aborts all ongoing operations involving this media element, then begins the process of selecting and loading an appropriate media resource given the options specified in the <audio> or <video> element and its src attribute or child <source> element(s).
HTMLMediaElement: seeked event - Web APIs
the seeked event is fired when a seek operation completed, the current playback position has changed, and the boolean seeking attribute is changed to false.
HTMLMediaElement: seeking event - Web APIs
the seeking event is fired when a seek operation starts, meaning the boolean seeking attribute has changed to true and the media is seeking a new position.
File drag and drop - Web APIs
function dragoverhandler(ev) { console.log('file(s) in drop zone'); // prevent default behavior (prevent file from being opened) ev.preventdefault(); } see also html drag and drop api drag operations html5 living standard: drag and drop ...
Dragging and Dropping Multiple Items - Web APIs
see also html drag and drop api (overview) drag operations recommended drag types html5 living standard: drag and drop ...
Headers - Web APIs
WebAPIHeaders
the mutation operations will throw a typeerror if the header has an immutable guard.
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
syntax myidbcursor.delete(); returns an idbrequest object on which subsequent events related to this operation are fired.
IDBCursor.update() - Web APIs
WebAPIIDBCursorupdate
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBCursor - Web APIs
WebAPIIDBCursor
operations are performed on the underlying index or object store.
IDBCursorSync - Web APIs
operations are performed on the underlying index or object store.
IDBCursorWithValue - Web APIs
operations are performed on the underlying index or object store.
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
methods that create transactions throw an exception if a closing operation is pending.
IDBDatabase: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain ...
IDBDatabaseSync - Web APIs
timeout the interval that this operation is allowed to take to acquire locks on all the objects stores and indexes identified in storenames.
IDBFactory.cmp() - Web APIs
WebAPIIDBFactorycmp
the cmp() method of the idbfactory interface compares two values as keys to determine equality and ordering for indexeddb operations, such as storing and iterating.
IDBFactory.deleteDatabase() - Web APIs
the method returns an idbopendbrequest object immediately, and performs the deletion operation asynchronously.
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
return value a idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.get() - Web APIs
WebAPIIDBIndexget
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.getAllKeys() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.openCursor() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBIndex.openKeyCursor() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.count() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.createIndex() - Web APIs
any sorting operations performed on the data via key ranges will then obey sorting rules of that locale (see locale-aware sorting.) you can specify its value in one of three ways: string: a string containing a specific locale code, e.g.
IDBObjectStore.delete() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.getAll() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.getAllKeys() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.getKey() - Web APIs
return value an idbrequest object on which subsequent events related to this operation are fired.
IDBObjectStore.keyPath - Web APIs
if this property is null, the application must provide a key for each modification operation.
IDBObjectStore - Web APIs
if this attribute is null, the application must provide a key for each modification operation.
IDBRequest: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items...
IDBTransaction: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contai...
IDBTransaction.mode - Web APIs
versionchange allows any operation to be performed, including ones that delete and create object stores and indexes.
IDBTransaction - Web APIs
version_change "versionchange" (2 in chrome) allows any operation to be performed, including ones that delete and create object stores and indexes.
IDBTransactionSync - Web APIs
methods abort() call this method to signal a need to cancel the effects of the operations performed by this transaction.
Browser storage limits and eviction criteria - Web APIs
the global limit is a "soft limit" since there's a chance that some space will be freed and the operation can continue.
install - Web APIs
returns install returns true if the function succeeded and false if it did not, but these values are not always reliable as a determinant of the success of the operation.
KeyframeEffectOptions - Web APIs
properties composite optional determines how values are combined between this animation and other, separate animations that do not specify their own specific composite operation.
LockManager.request() - Web APIs
}); } the do_write() function use the same lock but in 'exclusive' mode which will delay invocation of the request() call in do_read() until the write operation has completed.
LockedFile.active - Web APIs
WebAPILockedFileactive
if the object is inactive then it is impossible to perform any read or write operation with it.
LockedFile.oncomplete - Web APIs
these events occur each time a read or write operation is successful.
LockedFile.write() - Web APIs
WebAPILockedFilewrite
return a filerequest object to handle the success or failure of the operation.
MediaRecorderErrorEvent.error - Web APIs
invalidstateerror an operation was attempted in a context in which it isn't allowed, or a request has been made on an object that's deleted or removed.
Recording a media element - Web APIs
there's a little more than this, but it's just informational rather than being part of the core operation of the app.
Navigation Timing API - Web APIs
performancenavigation the type used to return the value of navigation, which contains information explaining the context of the load operation described by this performance instance.
NavigatorConcurrentHardware - Web APIs
the navigatorconcurrenthardware mixin adds to the navigator interface features which allow web content to determine how many logical processors the user has available, in order to let content and web apps optimize their operations to best take advantage of the user's cpu.
NodeIterator - Web APIs
nodeiterator.detach() this operation is a no-op.
OffscreenCanvas.getContext() - Web APIs
(gecko only) willreadfrequently: boolean that indicates whether or not a lot of read-back operations are planned.
PaymentResponse.complete() - Web APIs
syntax completepromise = paymentrequest.complete(result); parameters result optional a domstring indicating the state of the payment operation upon completion.
Pbkdf2Params - Web APIs
this determines how computationally expensive (that is, slow) the derivekey() operation will be.
Performance - Web APIs
performance.navigation read only a legacy performancenavigation object that provides useful context about the operations included in the times listed in timing, including whether the page was a load or a refresh, how many redirections occurred, and so forth.
PerformancePaintTiming - Web APIs
the performancepainttiming interface of the paint timing provides timing information about "paint" (also called "render") operations during web page construction.
PerformanceTiming - Web APIs
some correspond to dom events; others describe the time at which internal browser operations of interest took place.
Permissions.query() - Web APIs
WebAPIPermissionsquery
}) parameters permissiondescriptor an object that sets options for the query operation consisting of a comma-separated list of name-value pairs.
Permissions.revoke() - Web APIs
var revokepromise = navigator.permissions.revoke(descriptor); parameters descriptor an object based on the permissiondescriptor dictionary that sets options for the operation consisting of a comma-separated list of name-value pairs.
PublicKeyCredentialCreationOptions.pubKeyCredParams - Web APIs
these objects define the type of public-key and the algorithm used for cryptographic signature operations.
PublicKeyCredentialRequestOptions.rpId - Web APIs
note: an analogous option exists for the creation operation (navigators.credentials.create()), see the id property of publickeycredentialcreationoptions.rp.
PublicKeyCredentialRequestOptions - Web APIs
publickeycredentialrequestoptions.timeout optional a numerical hint, in milliseconds, which indicates the time the caller is willing to wait for the retrieval operation to complete.
RTCIceCandidate.address - Web APIs
note: if port is null — and port is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.foundation - Web APIs
note: if port is null — and port is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.port - Web APIs
note: if port is null, passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.priority - Web APIs
note: if priority is null, passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.protocol - Web APIs
note: if protocol is null — and protocol is supported by the user agent — passing the candidate to addicecandidate() will fail, throwing an operationerror exception.
RTCIceCandidate.type - Web APIs
if type is null, that information was missing from the candidate's a-line, which will cause rtcpeerconnection.addicecandidate() to throw an operationerror exception.
RTCPeerConnection.addIceCandidate() - Web APIs
operationerror this can happen for a number of reasons: the value specified for sdpmid is non-null and doesn't match the media description id of any media description included within the remotedescription.
RTCPeerConnection.createAnswer() - Web APIs
operationerror generation of the sdp failed for some reason; this is a general failure catch-all exception.
RTCPeerConnection.createDataChannel() - Web APIs
operationerror either the specified id is already in use or, if no id was specified, the webrtc layer was unable to automatically generate an id because all ids are in use.
RTCPeerConnection.createOffer() - Web APIs
operationerror examining the state of the system to determine resource availability in order to generate the offer failed for some reason.
RTCPeerConnection.setRemoteDescription() - Web APIs
operationerror any errors that occur which don't match the others specifeid here are reported as operationerror.
RTCPeerConnection: idpvalidationerror event - Web APIs
instead, you should watch for the rtcpeerconnection.peeridentity promise to be rejected with an operationerror.
RTCRtpSender.setParameters() - Web APIs
operationerror any error condition which occurs that isn't covered by one of the other error codes results in an operationerror.
Range.surroundContents() - Web APIs
that is, unlike the alternative above, if there are partially selected nodes, they will not be cloned and instead the operation will fail.
ReadableStream.pipeThrough() - Web APIs
signal: if set to an abortsignal object, ongoing pipe operations can then be aborted via the corresponding abortcontroller.
ReadableStream.pipeTo() - Web APIs
signal: if set to an abortsignal object, ongoing pipe operations can then be aborted via the corresponding abortcontroller.
Request - Web APIs
WebAPIRequest
you can create a new request object using the request() constructor, but you are more likely to encounter a request object being returned as the result of another api operation, such as a service worker fetchevent.request.
Response.redirected - Web APIs
in the code below, a textual message is inserted into an element when a redirect occurred during the fetch operation.
SVGElement: resize event - Web APIs
this event is only applicable to outermost svg elements and is dispatched after the resize operation has taken place.
SVGMatrix - Web APIs
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
SVGTransformList - Web APIs
the consolidation operation creates new svgtransform object as the first and only item in the list.
Selection API - Web APIs
once your selection is in a variable, you perform a variety of operations on it, for example copying the selection to a text string using selection.tostring(), adding a range (as represented by a standard range object) to the selection (or removing one) with selection.addrange()/selection.removerange(), or changing the selection to be the entire contents of a dom node using selection.selectallchildren().
ServiceWorkerGlobalScope.onfetch - Web APIs
the code also handles exceptions thrown from the fetch() operation.
ServiceWorkerGlobalScope - Web APIs
the code also handles exceptions thrown from the fetch() operation.
ServiceWorkerRegistration.unregister() - Web APIs
the promise will resolve to false if no registration was found, otherwise it resolves to true irrespective of whether unregistration happened or not (it may not unregister if someone else just called serviceworkercontainer.register() with the same scope.) the service worker will finish any ongoing operations before it is unregistered.
ServiceWorkerRegistration - Web APIs
the service worker will finish any ongoing operations before it is unregistered.
SourceBuffer.appendStream() - Web APIs
maxsize an unsigned long value indicating the maximum number of bytes that can be appended in this operation.
SourceBuffer.updating - Web APIs
whether an sourcebuffer.appendbuffer(), sourcebuffer.appendstream(), or sourcebuffer.remove() operation is currently in progress.
SourceBuffer - Web APIs
whether an sourcebuffer.appendbuffer(), sourcebuffer.appendstream(), or sourcebuffer.remove() operation is currently in progress.
SourceBufferList: indexed property getter - Web APIs
exceptions no specific exceptions are thrown, but if the supplied index is great than or equal to sourcebufferlist.length, the operation will return undefined.
Streams API - Web APIs
related stream apis and operations bytelengthqueuingstrategy provides a built-in byte length queuing strategy that can be used when constructing streams.
SubtleCrypto.deriveKey() - Web APIs
it's designed to derive key material from some high-entropy input, such as the output of an ecdh key agreement operation.
TrackDefaultList.TrackDefault() - Web APIs
errors no specific errors are returned, but if the supplied index is great than or equal to trackdefaultlist.length, the operation will return undefined.
USBDevice.controlTransferOut() - Web APIs
the controltransferout() method of the usbdevice interface returns a promise that resolves with a usbouttransferresult when a command or status operation has been transmitted to the usb device.
USBDevice.reset() - Web APIs
WebAPIUSBDevicereset
the reset() method of the usbdevice interface returns a promise that resolves when the device is reset and all app operations canceled and their promises rejected.
WEBGL_lose_context.restoreContext() - Web APIs
syntax gl.getextension('webgl_lose_context').restorecontext(); errors thrown invalid_operation if the context was not lost.
WebGL2RenderingContext.beginTransformFeedback() - Web APIs
the webgl2renderingcontext.begintransformfeedback() method of the webgl 2 api starts a transform feedback operation.
WebGL2RenderingContext.bindBufferBase() - Web APIs
syntax void gl.bindbufferbase(target, index, buffer); parameters target a glenum specifying the target for the bind operation.
WebGL2RenderingContext.bindBufferRange() - Web APIs
syntax void gl.bindbufferrange(target, index, buffer, offset, size); parameters target a glenum specifying the target for the bind operation.
WebGL2RenderingContext.drawElementsInstanced() - Web APIs
if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown.
WebGL2RenderingContext.drawRangeElements() - Web APIs
if offset is a valid multiple of the size of the given type, a gl.invalid_operation error is thrown.
WebGL2RenderingContext.endTransformFeedback() - Web APIs
the webgl2renderingcontext.endtransformfeedback() method of the webgl 2 api ends a transform feedback operation.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
WebGL2RenderingContext.pauseTransformFeedback() - Web APIs
the webgl2renderingcontext.pausetransformfeedback() method of the webgl 2 api pauses a transform feedback operation.
WebGL2RenderingContext.resumeTransformFeedback() - Web APIs
the webgl2renderingcontext.resumetransformfeedback() method of the webgl 2 api resumes a transform feedback operation.
WebGLRenderbuffer - Web APIs
the webglrenderbuffer interface is part of the webgl api and represents a buffer that can contain an image, or can be source or target of an rendering operation.
WebGLRenderingContext.createRenderbuffer() - Web APIs
return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
WebGLRenderingContext.drawArrays() - Web APIs
if gl.current_program is null, a gl.invalid_operation error is thrown.
WebGLRenderingContext.drawElements() - Web APIs
if offset is not a valid multiple of the size of the given type, a gl.invalid_operation error is thrown.
WebGLRenderingContext.getParameter() - Web APIs
ext.gpu_disjoint_ext glboolean ext_disjoint_timer_query returns whether or not the gpu performed any disjoint operation.
WebGLRenderingContext.getProgramInfoLog() - Web APIs
return value a domstring that contains diagnostic messages, warning messages, and other information about the last linking or validation operation.
WebGLRenderingContext.getShaderInfoLog() - Web APIs
return value a domstring that contains diagnostic messages, warning messages, and other information about the last compile operation.
WebGLRenderingContext.getShaderPrecisionFormat() - Web APIs
gl.invalid_operation if the shader compiler isn't supported.
WebGLRenderingContext.getUniformLocation() - Web APIs
gl_invalid_operation the program parameter doesn't correspond to a glsl program generated by webgl, or the specified program hasn't been linked successfully.
WebGLRenderingContext.isContextLost() - Web APIs
another page running in the user's browser performs an operation using the gpu that takes too long, causing hte browser to decide to reset the gpu in order to break the stall.
WebGLRenderingContext.pixelStorei() - Web APIs
ck_skip_rows number of rows of pixel locations skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_images number of pixel images skipped before the first pixel is read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.readpixels() operations, as well as unpacking of textures with the webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d() methods.
WebGLRenderingContext.uniform[1234][fi][v]() - Web APIs
they retain the values assigned to them by a call to this method until the next successful link operation occurs on the program object, when they are once again initialized to 0.
WebGLTexture - Web APIs
the webgltexture interface is part of the webgl api and represents an opaque texture object providing storage and state for texturing operations.
Clearing by clicking - Web APIs
« previousnext » this example demonstrates how to combine user interaction with webgl graphics operations by clearing the rendering context with a random color when the user clicks.
Raining rectangles - Web APIs
this example combines clearing the drawing buffer with solid colors and scissoring operations.
Scissor animation - Web APIs
« previousnext » a simple webgl example in which we have some animation fun using scissoring and clearing operations.
WebGL best practices - Web APIs
batch draw calls (prefer fewer-but-larger draw calls) fewer, larger draw operations will generally improve performance.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
negotiation is an inherently asymmetric operation: one side needs to serve as the "caller" while the other peer is the "callee." the perfect negotiation pattern smooths this difference away by separating that difference out into independent negotiation logic, so that your application doesn't need to care which end of the connection it is.
Taking still photos with WebRTC - Web APIs
the html markup our html interface has two main operational sections: the stream and capture panel and the presentation panel.
Using WebRTC data channels - Web APIs
if you go even larger, the delays can become untenable unless you are certain of your operational conditions.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
because each of these is defined using a reference space as its foundation, the webxr device api can easily be used to convert among the coordinate systems, perform operations affecting these spaces and their corresponding objects, and so forth.
Starting up and shutting down a WebXR session - Web APIs
on operational details obviously, this was a just an example.
Advanced techniques: Creating and sequencing audio - Web APIs
in floating point audio, 1 is a convenient number to map to "full scale" for mathematical operations on signals, so oscillators, noise generators and other sound sources typically output bipolar signals in the range -1 to 1.
Controlling multiple parameters with ConstantSourceNode - Web APIs
being able to shorten the number of operations to adjust them all will prove invaluable for code size and performance both.
Web NFC API - Web APIs
low-level operations are currently not supported by the api, however there is a public discussion about api that would add such functuionality.
Functions and classes available to Web Workers - Web APIs
48 (48) (yes) (yes) (yes) domrequest and domcursor respectively, these objects represents an ongoing operation (with listeners for reacting to the operation completely successfully, or failing, for example), and an ongoing operation over a list of results.
Web Workers API - Web APIs
web workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
1,5 seconds // passing the 'this' object with .call won't work // because this will change the value of this inside settimeout itself // while we want to change the value of this inside myarray.mymethod // in fact, it will be an error because settimeout code expects this to be the window object: settimeout.call(myarray, myarray.mymethod, 2000); // error: "ns_error_xpc_bad_op_on_wn_proto: illegal operation on wrappednative prototype object" settimeout.call(myarray, myarray.mymethod, 2500, 2); // same error as you can see there are no ways to pass the this object to the callback function in the legacy javascript.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
settimeout.call(myarray, myarray.mymethod, 2.0*1000); // error: "ns_error_xpc_bad_op_on_wn_proto: illegal operation on wrappednative prototype object" settimeout.call(myarray, myarray.mymethod, 2.5*1000, 2); // same error possible solutions a common way to solve the problem is to use a wrapper function that sets this to the required value: settimeout(function(){myarray.mymethod()}, 2.0*1000); // prints "zero,one,two" after 2 seconds settimeout(function(){myarray.mymethod('1')}, 2.5*1000); // prints "one" a...
WindowProxy - Web APIs
all operations performed on a windowproxy object will also be applied to the underlying window object it currently wraps.
Worker.terminate() - Web APIs
WebAPIWorkerterminate
this does not offer the worker an opportunity to finish its operations; it is simply stopped at once.
Worker - Web APIs
WebAPIWorker
this does not let worker finish its operations; it is halted at once.
WritableStream - Web APIs
the highwatermark property, which is set when creating the counting strategy (line 35), sets the maximum amount of data that the writablestream instance will handle in a single write() operation.
WritableStreamDefaultWriter.write() - Web APIs
the write() property of the writablestreamdefaultwriter interface writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
WritableStreamDefaultWriter - Web APIs
writablestreamdefaultwriter.write() writes a passed chunk of data to a writablestream and its underlying sink, then returns a promise that resolves to indicate the success or failure of the write operation.
Using XMLHttpRequest - Web APIs
one can also detect all three load-ending conditions (abort, load, or error) using the loadend event: req.addeventlistener("loadend", loadend); function loadend(e) { console.log("the transfer finished (although we don't know if it succeeded or not)."); } note there is no way to be certain, from the information received by the loadend event, as to which condition caused the operation to terminate; however, you can use this to handle tasks that need to be performed in all end-of-transfer scenarios.
XMLHttpRequest.open() - Web APIs
async optional an optional boolean parameter, defaulting to true, indicating whether or not to perform the operation asynchronously.
XMLHttpRequest.responseType - Web APIs
this restriction is designed in part to help ensure that synchronous operations aren't used for large transactions that block the browser's main thread, thereby bogging down the user experience.
XMLHttpRequest.upload - Web APIs
abort onabort the upload operation was aborted.
XPathException - Web APIs
in the dom xpath api the xpathexception interface represents exception conditions that can be encountered while performing xpath operations.
XRSession.onsqueezeend - Web APIs
in response to the end of the squeeze operation, this code looks to see if there is an object currently being held by the user by checking to see if the variable user.heldobject contains a reference to an object representing the held item.
XRWebGLLayer() - Web APIs
operationerror the resources (including memory buffers) needed for the layer to operate could not be allocated.
XRWebGLLayerInit.stencil - Web APIs
you can store values into each entry in the stencil bufer, then specify an operation that determines which stencil buffer values correspond to pixels which should be drawn to the screen during each frame.
An overview of accessible web applications and widgets - Accessibility
examples include (but are certainly not limited to): aria-checked: indicates the state of a checkbox or radio button aria-disabled: indicates that an element is visible, but not editable or otherwise operable aria-grabbed: indicates the 'grabbed' state of an object in a drag-and-drop operation (for a full list of aria states, consult the aria list of states and properties.) developers should use aria states to indicate the state of ui widget elements and use css attribute selectors to alter the visual appearance based on the state changes (rather than using script to change a class name on the element).
Cognitive accessibility - Accessibility
change setting based on an active request form control operation and data entry should result in predictable behavior.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
this is likely to be a painful road even if you are a major player, in terms of getting the cooperation of at vendors.
Accessibility documentation index - Accessibility
understandable states that information and the operation of user interface must be understandable.
Perceivable - Accessibility
1.3.4 orientation (aa) added in 2.1 content does not restrict its view and operation to a single display orientation, such as portrait or landscape, unless a specific display orientation is essential.
CSS Scroll Snap - CSS: Cascading Style Sheets
css scroll snap is a module of css that introduces scroll snap positions, which enforce the scroll positions that a scroll container’s scrollport may end at after a scrolling operation has completed.
Using CSS transforms - CSS: Cascading Style Sheets
it is a space-separated list of transforms, which are applied one after the other, as requested by the composition operation.
mask-composite - CSS: Cascading Style Sheets
the mask-composite css property represents a compositing operation used on the current mask layer with the mask layers below it.
mask - CSS: Cascading Style Sheets
WebCSSmask
<compositing-operator> sets the compositing operation used on the current mask layer.
<transform-function> - CSS: Cascading Style Sheets
each function applies a geometric operation in either 2d or 3d.
regexp:replace() - EXSLT
WebEXSLTregexpreplace
syntax regexp:replace(originalstring, regexpstring, flagsstring, replacestring) parameters originalstring the string perform a search-and-replace operation upon.
WAI ARIA Live Regions/API Support - Developer guides
does not require author's cooperation.
Ajax - Developer guides
WebGuideAJAX
file objects may be obtained from a filelist object returned as a result of a user selecting files using the <input> element, from a drag and drop operation's datatransfer object, or from the mozgetasfile() api on an htmlcanvaselement.
User input and controls - Developer guides
tutorials touch events guide managing screen orientation using fullscreen mode dragging and dropping multiple items drag operations guide reference mouseevent keyboardevent touch events pointer_lock_api screen orientation api fullscreen api drag & drop content editable ...
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
if, for example, you indicate success or failure of an operation by changing the color of a shape from white to green for success and red for failure, users with red-green color-blindness won't be able to use your site properly.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
this might be used, for example, to indicate the words that matched a search operation.
HTTP caching - HTTP
WebHTTPCaching
targets of caching operations http caching is optional, but reusing a cached resource is usually desirable.
Connection management in HTTP/1.x - HTTP
this simple model held an innate limitation on performance: opening each tcp connection is a resource-consuming operation.
Want-Digest - HTTP
examples want-digest: sha-256 want-digest: sha-512;q=0.3, sha-256;q=1, md5;q=0 basic operation the sender provides a list of digests which it is prepared to accept, and the server uses one of them: request: get /item want-digest: sha-256;q=0.3, sha;q=1 response: http/1.1 200 ok digest: sha-256=x48e9qookqqrvdts8nojrjn3owduoywxbf7kbu9dbpe= unsupported digests the server does not support any of the requested digest algorithms, so uses a different algorithm: request: get /it...
Warning - HTTP
WebHTTPHeadersWarning
112 disconnected operation the cache is disconnected from the rest of the network.
HTTP Index - HTTP
WebHTTPIndex
http provides a special kind of response, called http redirect, to perform this operation and is used for numerous goals: temporary redirection while site maintenance is ongoing, permanent redirection to keep external links working after a change of the site's architecture, progress pages when uploading a file, and so on.
POST - HTTP
WebHTTPMethodsPOST
cification, post is designed to allow a uniform method to cover the following functions: annotation of existing resources posting a message to a bulletin board, newsgroup, mailing list, or similar group of articles; adding a new user through a signup modal; providing a block of data, such as the result of submitting a form, to a data-handling process; extending a database through an append operation.
416 Range Not Satisfiable - HTTP
WebHTTPStatus416
content-range: bytes */12777 faced with this error, browsers usually either abort the operation (for example, a download will be considered as non-resumable) or ask for the whole document again.
JavaScript data types and data structures - JavaScript
however, it is still possible to create another string based on an operation on the original string.
Indexed collections - JavaScript
writing 0 empties it entirely: let cats = ['dusty', 'misty', 'twiggy'] console.log(cats.length) // 3 cats.length = 2 console.log(cats) // logs "dusty, misty" - twiggy has been removed cats.length = 0 console.log(cats) // logs []; the cats array is empty cats.length = 3 console.log(cats) // logs [ <3 empty items> ] iterating over arrays a common operation is to iterate over the values of an array, processing each one in some way.
Iterators and generators - JavaScript
« previousnext » processing each of the items in a collection is a very common operation.
Inheritance and the prototype chain - JavaScript
l console.log(b.a); // 1 (inherited) var c = object.create(b); // c ---> b ---> a ---> object.prototype ---> null var d = object.create(null); // d ---> null console.log(d.hasownproperty); // undefined, because d doesn't inherit from object.prototype delete operator with object.create and new operator using object.create of another object demonstrates prototypical inheritance with the delete operation: var a = {a: 1}; var b = object.create(a); console.log(a.a); // print 1 console.log(b.a); // print 1 b.a=5; console.log(a.a); // print 1 console.log(b.a); // print 5 delete b.a; console.log(a.a); // print 1 console.log(b.a); // print 1(b.a value 5 is deleted but it showing value from its prototype chain) delete a.a; console.log(a.a); // print undefined console.log(b.a); // print undefined the...
TypeError: property "x" is non-configurable and can't be deleted - JavaScript
in non-strict code, the operation returns false.
SyntaxError: applying the 'delete' operator to an unqualified name is deprecated - JavaScript
in non-strict code, the operation just returns false.
AggregateError - JavaScript
it is thrown when multiple errors need to be reported by an operation, for example by promise.any(), when all promises passed to it reject.
Array.prototype.concat() - JavaScript
furthermore, any operation on the new array (except operations on elements which are object references) will have no effect on the original arrays, and vice versa.
Array.prototype.copyWithin() - JavaScript
the sequence is copied and pasted as one operation; pasted sequence will have the copied values even when the copy and paste region overlap.
Array.prototype.forEach() - JavaScript
example code let ratings = [5, 4, 5]; let sum = 0; let sumfunction = async function (a, b) { return a + b } ratings.foreach(async function(rating) { sum = await sumfunction(sum, rating) }) console.log(sum) // naively expected output: 14 // actual output: 0 examples no operation for uninitialized values (sparse arrays) const arraysparse = [1,3,,7] let numcallbackruns = 0 arraysparse.foreach((element) => { console.log(element) numcallbackruns++ }) console.log("numcallbackruns: ", numcallbackruns) // 1 // 3 // 7 // numcallbackruns: 3 // comment: as you can see the missing value between 3 and 7 didn't invoke callback function.
Atomics.add() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
Atomics.compareExchange() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
Atomics.exchange() - JavaScript
this atomic operation guarantees that no other write happens between the read of the old value and the write of the new value.
Atomics.notify() - JavaScript
note: this operation works with a shared int32array only.
Atomics.sub() - JavaScript
this atomic operation guarantees that no other write happens until the modified value is written back.
Atomics.wait() - JavaScript
note: this operation only works with a shared int32array and may not be allowed on the main thread.
DataView - JavaScript
return new int16array(buffer)[0] === 256; })(); console.log(littleendian); // true or false 64-bit integer values because javascript does not currently include standard support for 64-bit integer values, dataview does not offer native 64-bit operations.
JSON.parse() - JavaScript
// we split the second stage into 4 regexp operations in order to work around // crippling inefficiencies in ie's and safari's regexp engines.
Map - JavaScript
other operations on the data fail: wrongmap.has('bla') // false wrongmap.delete('bla') // false console.log(wrongmap) // map { bla: 'blaa', bla2: 'blaaa2' } the correct usage for storing data in the map is through the set(key, value) method.
Number.parseFloat() - JavaScript
if this argument is not a string, then it is converted to one using the tostring abstract operation.
Number.parseInt() - JavaScript
if this argument is not a string, then it is converted to one using the tostring abstract operation.
Object.defineProperty() - JavaScript
rty(obj, 'key', descriptor); // being explicit object.defineproperty(obj, 'key', { enumerable: false, configurable: false, writable: false, value: 'static' }); // recycling same object function withvalue(value) { var d = withvalue.d || ( withvalue.d = { enumerable: false, writable: false, configurable: false, value: value } ); // avoiding duplicate operation for assigning value if (d.value !== value) d.value = value; return d; } // ...
Object.setPrototypeOf() - JavaScript
warning: changing the [[prototype]] of an object is, by the nature of how modern javascript engines optimize property accesses, currently a very slow operation in every browser and javascript engine.
Promise.prototype.then() - JavaScript
the value received and returned is: 33" // promise {[[promisestatus]]: "resolved", [[promisevalue]]: 33} description as the then and promise.prototype.catch() methods return promises, they can be chained — an operation called composition.
handler.apply() - JavaScript
interceptions this trap can intercept these operations: proxy(...args) function.prototype.apply() and function.prototype.call() reflect.apply() invariants if the following invariants are violated, the proxy will throw a typeerror.
handler.defineProperty() - JavaScript
interceptions this trap can intercept these operations: object.defineproperty() reflect.defineproperty() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be added, if the target object is not extensible.
handler.deleteProperty() - JavaScript
interceptions this trap can intercept these operations: property deletion: delete proxy[foo] and delete proxy.foo reflect.deleteproperty() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be deleted, if it exists as a non-configurable own property of the target object.
handler.get() - JavaScript
interceptions this trap can intercept these operations: property access: proxy[foo]and proxy.bar inherited property access: object.create(proxy)[foo] reflect.get() invariants if the following invariants are violated, the proxy will throw a typeerror: the value reported for a property must be the same as the value of the corresponding target object property if the target object property is a non-writable, non-configurable own data property...
handler.getOwnPropertyDescriptor() - JavaScript
interceptions this trap can intercept these operations: object.getownpropertydescriptor() reflect.getownpropertydescriptor() invariants if the following invariants are violated, the proxy will throw a typeerror: getownpropertydescriptor() must return an object or undefined.
handler.getPrototypeOf() - JavaScript
description interceptions this trap can intercept these operations: object.getprototypeof() reflect.getprototypeof() __proto__ object.prototype.isprototypeof() instanceof invariants if the following invariants are violated, the proxy will throw a typeerror: getprototypeof() method must return an object or null.
handler.has() - JavaScript
interceptions this trap can intercept these operations: property query: foo in proxy inherited property query: foo in object.create(proxy) with check: with(proxy) { (foo); } reflect.has() invariants if the following invariants are violated, the proxy will throw a typeerror: a property cannot be reported as non-existent, if it exists as a non-configurable own property of the target object.
handler.isExtensible() - JavaScript
interceptions this trap can intercept these operations: object.isextensible() reflect.isextensible() invariants if the following invariants are violated, the proxy will throw a typeerror: object.isextensible(proxy) must return the same value as object.isextensible(target).
handler.ownKeys() - JavaScript
interceptions this trap can intercept these operations: object.getownpropertynames() object.getownpropertysymbols() object.keys() reflect.ownkeys() invariants if the following invariants are violated, the proxy will throw a typeerror: the result of ownkeys() must be an array.
handler.preventExtensions() - JavaScript
interceptions this trap can intercept these operations: object.preventextensions() reflect.preventextensions() invariants if the following invariants are violated, the proxy will throw a typeerror: object.preventextensions(proxy) only returns true if object.isextensible(proxy) is false.
handler.set() - JavaScript
interceptions this trap can intercept these operations: property assignment: proxy[foo] = bar and proxy.foo = bar inherited property assignment: object.create(proxy)[foo] = bar reflect.set() invariants if the following invariants are violated, the proxy will throw a typeerror: cannot change the value of a property to be different from the value of the corresponding target object property if the corresponding target object property is a no...
Proxy() constructor - JavaScript
handler an object whose properties are functions that define the behavior of the proxy when an operation is performed on it.
Proxy.revocable() - JavaScript
handler an object whose properties are functions define the behavior of proxy p when an operation is performed on it.
Reflect.setPrototypeOf() - JavaScript
it sets the prototype (i.e., the internal [[prototype]] property) of a specified object to another object or to null, and returns true if the operation was successful, or false otherwise.
Reflect - JavaScript
reflect is a built-in object that provides methods for interceptable javascript operations.
RegExp.prototype[@@split]() - JavaScript
syntax regexp[symbol.split](str[, limit]) parameters str the target of the split operation.
RegExp.$1-$9 - JavaScript
regexp.$1 : '0'; number; // "24" please note that any operation involving the usage of other regular expressions between a re.test(str) call and the regexp.$n property, might have side effects, so that accessing these special properties should be done instantly, otherwise the result might be unexpected.
Set - JavaScript
// 4 [...myset2] // [1, 2, 3, 4] // intersect can be simulated via let intersection = new set([...set1].filter(x => set2.has(x))) // difference can be simulated via let difference = new set([...set1].filter(x => !set2.has(x))) // iterate set entries with foreach() myset.foreach(function(value) { console.log(value) }) // 1 // 2 // 3 // 4 implementing basic set operations function issuperset(set, subset) { for (let elem of subset) { if (!set.has(elem)) { return false } } return true } function union(seta, setb) { let _union = new set(seta) for (let elem of setb) { _union.add(elem) } return _union } function intersection(seta, setb) { let _intersection = new set() for (let elem of setb) { ...
String.prototype.replace() - JavaScript
the important thing here is that additional operations are needed on the matched item before it is given back as a replacement.
String.prototype.substring() - JavaScript
a better method for replacing strings is as follows: function replacestring(olds, news, fulls) { return fulls.split(olds).join(news) } the code above serves as an example for substring operations.
String - JavaScript
some of the most-used operations on strings are to check their length, to build and concatenate them using the + and += string operators, checking for the existence or location of substrings with the indexof() method, or extracting substrings with the substring() method.
TypeError() constructor - JavaScript
the typeerror() constructor creates a new error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.
TypeError - JavaScript
the typeerror object represents an error when an operation could not be performed, typically (but not exclusively) when a value is not of the expected type.
WeakMap - JavaScript
such an implementation would have two main inconveniences: the first one is an o(n) set and search (n being the number of keys in the map) since both operations must iterate through the list of keys to find a matching value.
WebAssembly.Table.prototype.grow() - JavaScript
exceptions if the grow() operation fails for whatever reason, a rangeerror is thrown.
WebAssembly.instantiateStreaming() - JavaScript
if the operation fails, the promise rejects with a webassembly.compileerror, webassembly.linkerror, or webassembly.runtimeerror, depending on the cause of the failure.
isNaN() - JavaScript
origin of nan values nan values are generated when arithmetic operations result in undefined or unrepresentable values.
null - JavaScript
it is one of javascript's primitive values and is treated as falsy for boolean operations.
parseFloat() - JavaScript
if this argument is not a string, then it is converted to one using the tostring abstract operation.
Assignment (=) - JavaScript
the assignment operation evaluates to the assigned value.
Bitwise AND (&) - JavaScript
the truth table for the and operation is: a b a and b 0 0 0 0 1 0 1 0 0 1 1 1 .
Bitwise AND assignment (&=) - JavaScript
the bitwise and assignment operator (&=) uses the binary representation of both operands, does a bitwise and operation on them and assigns the result to the variable.
Bitwise NOT (~) - JavaScript
the truth table for the not operation is: a not a 0 1 1 0 9 (base 10) = 00000000000000000000000000001001 (base 2) -------------------------------- ~9 (base 10) = 11111111111111111111111111110110 (base 2) = -10 (base 10) bitwise noting any number x yields -(x + 1).
Bitwise OR (|) - JavaScript
the truth table for the or operation is: a b a or b 0 0 0 0 1 1 1 0 1 1 1 1 .
Bitwise OR assignment (|=) - JavaScript
the bitwise or assignment operator (|=) uses the binary representation of both operands, does a bitwise or operation on them and assigns the result to the variable.
Bitwise XOR (^) - JavaScript
the truth table for the xor operation is: a b a xor b 0 0 0 0 1 1 1 0 1 1 1 0 .
Bitwise XOR assignment (^=) - JavaScript
the bitwise xor assignment operator (^=) uses the binary representation of both operands, does a bitwise xor operation on them and assigns the result to the variable.
Exponentiation (**) - JavaScript
// this is invalid in javascript, as the operation is ambiguous.
Logical NOT (!) - JavaScript
n4 = !!false // !!falsy returns false n5 = !!"" // !!falsy returns false n6 = !!boolean(false) // !!falsy returns false converting between nots the following operation involving booleans: !!bcondition is always equal to: bcondition specifications specification ecmascript (ecma-262)the definition of 'logical not expression' in that specification.
Logical OR assignment (||=) - JavaScript
logical or assignment short-circuits as well, meaning it only performs an assignment if the logical operation would evaluate the right-hand side.
Unary plus (+) - JavaScript
syntax operator: +x description although unary negation (-) also can convert non-numbers, unary plus is the fastest and preferred way of converting something into a number, because it does not perform any other operations on the number.
yield - JavaScript
if an optional value is passed to the generator's next() method, that value becomes the value returned by the generator's current yield operation.
Strict mode - JavaScript
javascript was designed to be easy for novice developers, and sometimes it gives operations which should be errors non-error semantics.
Template literals (Template strings) - JavaScript
the tag function can then perform whatever operations on these arguments you wish, and return the manipulated string.
Autoplay guide for media and Web Audio APIs - Web media technologies
returning a promise to allow you to determine success or failure of the operation was added more recently.
Digital video concepts - Web media technologies
this decoding operation must mirror the method used during encoding, which is represented by three numbers separated by colons (":").
CSS and JavaScript animation performance - Web Performance
the key is that as long as the properties we want to animate do not trigger reflow/repaint (read css triggers for more information), we can move those sampling operations out of the main thread.
Privacy, permissions, and information security
cooperation among web content, the web browser, and the web server is needed to achieve as much privacy and information security as possible.
Installing and uninstalling web apps - Progressive web apps (PWAs)
unfortunately, there isn't a standard for icons and symbols used for operations such as this.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
push is used to deliver new content from the server to the app without any client-side intervention, and its operation is handled by the app's service worker.
Graphic design for responsive sites - Progressive web apps (PWAs)
webgl/canvas you can create a canvas to draw interactive graphics on using the html <canvas> element, then use the canvas api to create shapes, lines, import image files, create text, do compositing operations, and much more.
Structural overview of progressive web apps - Progressive web apps (PWAs)
if you want to perform an operation on the data (for example, adding a filter to a video), you no longer need to wait for all of it to be downloaded and converted to a blob (or whatever).
color-interpolation - SVG: Scalable Vector Graphics
the color-interpolation property chooses between color operations occurring in the srgb color space or in a (light energy linear) linearized rgb color space.
k1 - SVG: Scalable Vector Graphics
WebSVGAttributek1
the k1 attribute defines one of the values to be used within the the arithmetic operation of the <fecomposite> filter primitive.
k2 - SVG: Scalable Vector Graphics
WebSVGAttributek2
the k2 attribute defines one of the values to be used within the the arithmetic operation of the <fecomposite> filter primitive.
k3 - SVG: Scalable Vector Graphics
WebSVGAttributek3
the k3 attribute defines one of the values to be used within the the arithmetic operation of the <fecomposite> filter primitive.
k4 - SVG: Scalable Vector Graphics
WebSVGAttributek4
the k4 attribute defines one of the values to be used within the the arithmetic operation of the <fecomposite> filter primitive.
pathLength - SVG: Scalable Vector Graphics
this can affect the actual rendered lengths of paths; including text paths, animation paths, and various stroke operations.
radius - SVG: Scalable Vector Graphics
WebSVGAttributeradius
the radius attribute represents the radius (or radii) for the operation on a given <femorphology> filter primitive.
scale - SVG: Scalable Vector Graphics
WebSVGAttributescale
when the value of this attribute is 0, this operation has no effect on the source image.
stdDeviation - SVG: Scalable Vector Graphics
the stddeviation attribute defines the standard deviation for the blur operation.
transform - SVG: Scalable Vector Graphics
ill="blue" transform="translate(50)" /> <!-- vertical translation --> <rect x="5" y="5" width="40" height="40" fill="red" transform="translate(0 50)" /> <!-- both horizontal and vertical translation --> <rect x="5" y="5" width="40" height="40" fill="yellow" transform="translate(50,50)" /> </svg> scale the scale(<x> [<y>]) transform function specifies a scale operation by x and y.
vector-effect - SVG: Scalable Vector Graphics
vector effects are applied before any of the other compositing operations, i.e.
<feComponentTransfer> - SVG: Scalable Vector Graphics
it allows operations like brightness adjustment, contrast adjustment, color balance or thresholding.
<feConvolveMatrix> - SVG: Scalable Vector Graphics
a wide variety of imaging operations can be achieved through convolutions, including blurring, edge detection, sharpening, embossing and beveling.
<feDropShadow> - SVG: Scalable Vector Graphics
value type: <number>; default value: 2; animatable: yes stddeviation this attribute defines the standard deviation for the blur operation in the drop shadow.
Filter effects - SVG: Scalable Vector Graphics
between the filter tags, goes a list of primitives, basic operations that build on top of the previous operations (like blurring, adding a lighting effect, etc).
Features restricted to secure contexts - Web security
web crypto api has been restricted to https since early days (api was visible in http as well but operations failed).
Subdomain takeovers - Web security
preventing subdomain takeovers is a matter of order of operations in lifecycle management for virtual hosts and dns.
Transport Layer Security - Web security
the mozilla operations security (opsec) team maintains a wiki entry with reference configurations for servers.
Types of attacks - Web security
the variety of attacks based on xss is almost limitless, but they commonly include transmitting private data like cookies or other session information to the attacker, redirecting the victim to a webpage controlled by the attacker, or performing other malicious operations on the user's machine under the guise of the vulnerable site.
Web security
security-related glossary terms block cipher mode of operation certificate authority challenge-response authentication cipher cipher suite ciphertext cors cors-safelisted request header cors-safelisted response header cross-site scripting cryptanalysis cryptographic hash function cryptography csp csrf decryption digital certificate dtls encryption ...
choose - XPath
syntax choose( boolean , object1, object2 ) arguments boolean the boolean operation to use when determining which object to return.
Using the WebAssembly JavaScript API - WebAssembly
note: since an arraybuffer’s bytelength is immutable, after a successful memory.prototype.grow() operation the buffer getter will return a new arraybuffer object (with the new bytelength) and any previous arraybuffer objects become “detached”, or disconnected from the underlying memory they previously pointed to.
Compiling an Existing C Module to WebAssembly - WebAssembly
the result of the encoding operation is an output buffer and its length.