Search completed in 1.16 seconds.
Web Locks API - Web APIs
the web
locks api allows scripts running in one tab or worker to asynchronously acquire a lock, hold it while work is performed, then release it.
... web
locks concepts and usage a lock is an abstract concept representing some potentially shared resource, identified by a name chosen by the web app.
... navigator.
locks.request('my_resource', async lock => { // the lock has been acquired.
...And 11 more matches
WakeLockSentinel - Web APIs
the wake
locksentinel interface of the screen wake lock api provides a handle to the underlying platform wake lock and can be manually released and reacquired.
... an acquired wake
locksentinel can be released manually via the release() method, or automatically via the platform wake lock.
...releasing all wake
locksentinel instances of a given wake lock type will cause the underlying platform wake lock to be released.
...And 4 more matches
WakeLockSentinel.release() - Web APIs
the release() method of the wake
locksentinel interface releases the wake
locksentinel, returning a promise that is resolved once the sentinel has been successfully released.
... syntax wake
locksentinel.release().then(...); parameters none.
... examples in this example, when a user clicks a button the wake
locksentinel is released.
... wakelockoffbutton.addeventlistener('click', () => { wake
locksentinel.release(); }) specifications specification status comment screen wake lock apithe definition of 'release()' in that specification.
JavaScript building blocks - Learn web development
in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code b
locks such as conditional statements, loops, functions, and events.
... functions — reusable b
locks of code another essential concept in coding is functions.
... image gallery now that we've looked at the fundamental building b
locks of javascript, we'll test your knowledge of loops, functions, conditionals and events by building a fairly common item you'll see on a lot of websites — a javascript-powered image gallery.
Locks
for an introduction to nspr thread synchronization, including
locks and condition variables, see introduction to nspr.
... pr_lock
locks a specified lock object.
... pr_unlock un
locks a specified lock object.
Navigator.locks - Web APIs
the
locks read-only property of the navigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
... syntax var lockmanager = navigator.
locks value a lockmanager object.
... specifications specification status comment web
locks apithe definition of '
locks' in that specification.
WakeLockSentinel.type - Web APIs
the read-only type property of the wake
locksentinel interface returns a string representation of the currently acquired wake
locksentinel type.
... syntax var type = wake
locksentinel.type; value a string representation of the currently acquired wake lock type.
... examples this example shows an asynchronous function that acquires a wake
locksentinel, then logs the type to the console.
WorkerNavigator.locks - Web APIs
the
locks read-only property of the workernavigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
... syntax var lockmanager = navigator.
locks value a lockmanager object.
... specifications specification status comment web
locks apithe definition of '
locks' in that specification.
Stacking with floated blocks - CSS: Cascading Style Sheets
for floated b
locks, the stacking order is a bit different.
... floating b
locks are placed between non-positioned b
locks and positioned b
locks: the background and borders of the root element descendant non-positioned b
locks, in order of appearance in the html floating b
locks descendant positioned elements, in order of appearance in the html actually, as you can see in the example below, the background and border of the non-positioned block (div #4) is completely unaffected by floating b
locks, but the content is affected.
...this behavior can be shown with an added rule to the above list: the background and borders of the root element descendant non-positioned b
locks, in order of appearance in the html floating b
locks descendant non-positioned inline elements descendant positioned elements, in order of appearance in the html note: if an opacity value is applied to the non-positioned block (div #4), then something strange happens: the background and border of that block pops up above the floating b
locks and the positioned b
locks.
Functions — reusable blocks of code - Learn web development
previous overview: building b
locks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
...}) and conditional b
locks (e.g.
Locks.mode - Web APIs
lockmanager is the object returned by navigator.
locks.
... // should show "exclusive" (the default) navigator.
locks.request("my_resource", show_lock_properties); // should show "exclusive" navigator.
locks.request("my_resource", {mode: "exclusive"}, show_lock_properties); // should show "shared" navigator.
locks.request("my_resource", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web
locks apithe definition of 'mode' in that specification.
Locks.name - Web APIs
lockmanager is the object returned by navigator.
locks.
... navigator.
locks.request("net_db_sync", show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web
locks apithe definition of 'name' in that specification.
DMD
in this mode, dmd tracks the contents of the heap, including which heap b
locks have been reported by memory reporters.
... it helps us reduce the "heap-unclassified" value in firefox's about:memory page, and also detects if any heap b
locks are reported twice.
...you can dump that information to file, giving a profile of the live heap b
locks at that point in time.
...And 23 more matches
Index - Web APIs
2063 idbmutablefile api, dom, files, reference, référence(2) the idbmutablefile interface provides access in read or write mode to a file, dealing with all the necessary
locks.
...when an application creates an idbtransactionsync object, it b
locks until the browser is able to reserve the require database objects.
... 2201 keyboard.unlock() api, keyboard api, keyboard lock, method, reference, keyboard, unlock() the unlock() method of the keyboard interface un
locks all keys captured by the keyboard.lock() method and returns synchronously.
...And 22 more matches
Parser API
functions interface function <: node { id: identifier | null; params: [ pattern ]; defaults: [ expression ]; rest: identifier | null; body: b
lockstatement | expression; generator: boolean; expression: boolean; } a function declaration or expression.
... interface b
lockstatement <: statement { type: "b
lockstatement"; body: [ statement ]; } a block statement, i.e., a sequence of statements surrounded by braces.
... interface trystatement <: statement { type: "trystatement"; block: b
lockstatement; handler: catchclause | null; guardedhandlers: [ catchclause ]; finalizer: b
lockstatement | null; } a try statement.
...And 11 more matches
NSS Code Coverage
colors green: 70-100% of b
locks tested.
... yellow: 40-70% of b
locks tested.
... orange: 0-40% of b
locks tested.
...And 10 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.
... if we record and later replay the order in which threads acquire
locks (and, by extension, release
locks and use condvars) then accesses on lock-protected memory will occur in the same order.
... acquisition order of
locks is recorded in a data stream for each lock.
...And 7 more matches
Index - Learn web development
after that, we discuss some key building b
locks in detail, such as variables, strings, numbers and arrays.
... 89 javascript building b
locks article, assessment, beginner, codingscripting, conditionals, functions, guide, introduction, javascript, landing, loops, module, events, l10n:priority in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code b
locks such as conditional statements, loops, functions, and events.
... 92 functions — reusable b
locks of code api, article, beginner, browser, codingscripting, custom, functions, guide, javascript, learn, method, anonymous, invoke, l10n:priority, parameters another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than havi...
...And 6 more matches
Enc Dec MAC Output Public Key as CSR
/* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include #include #include #include #include #include #include #include #include #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define default_key_bits 1024 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped m...
... int publicexponent, const char *noisefilename, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[b
locksize + 1]; rv = generaterandom(randbuf, b
locksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, b
locksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = pu...
...r_close(outfile); } return rv; } /* * mac and encrypt the input file content */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglen...
...And 6 more matches
Encrypt Decrypt_MAC_Using Token
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-...
...e); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglen...
...*/ if (ptextlen != b
locksize) { paddinglength = b
locksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = b
locksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf...
...And 6 more matches
MMgc - Archive of obsolete content
another way to think about it: unmanaged memory is c++ operators new and delete managed memory is c++ operator new, with optional delete mmgc contains a page allocator called gcheap, which allocates large b
locks (megabytes) of memory from the system and doles out 4kb pages to the unmanaged memory allocator (fixedmalloc) and the managed memory allocator (gc).
...threading gets more complicated because it makes sense to re-write chunkmalloc and chunkallocbase to get their b
locks from the gcheap.
...each fixed size allocator maintains a doubly linked list of 4k b
locks that it obtains from the gcheap.
...And 5 more matches
Encrypt Decrypt MAC Keys As Session Objects
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-...
...e); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglen...
...v = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != b
locksize) { paddinglength = b
locksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = b
locksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf...
...And 5 more matches
Encrypt and decrypt MAC using token
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-...
...e); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglen...
...v = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != b
locksize) { paddinglength = b
locksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = b
locksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf...
...And 5 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
ers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-...
...e); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglen...
...v = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != b
locksize) { paddinglength = b
locksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = b
locksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf...
...And 5 more matches
LockManager.request() - Web APIs
when a "shared" lock for a given name is held, other "shared"
locks for the same name can be granted, but no "exclusive"
locks with that name can be held or granted.
... steal optional: if true, then any held
locks with the same name will be released, and the request will be granted, preempting any queued requests for it.
... await navigator.
locks.request('my_resource', async lock => { // the lock was granted.
...And 5 more matches
EncDecMAC using token object - sample 3
*/ /* nspr headers */ #include #include #include #include #include #include #include /* nss headers */ #include #include /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define b
locksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #define mackey_header "-----begin mackey ckaid-----" #define mackey_trailer "-----end mackey ckaid-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_h...
... trailer\n"); port_free(filedata.data); return secfailure; } } else { body = nonbody; } cleanup: pr_close(file); hextobuf(body, item, ishexdata); return secsuccess; } /* * encryptandmac */ secstatus encryptandmac(prfiledesc *infile, prfiledesc *headerfile, prfiledesc *encfile, pk11symkey *ek, pk11symkey *mk, unsigned char *iv, unsigned int ivlen, prbool ascii) { secstatus rv; unsigned char ptext[b
locksize]; unsigned int ptextlen; unsigned char mac[digestsize]; unsigned int maclen; unsigned int nwritten; unsigned char encbuf[b
locksize]; unsigned int encbuflen; secitem noparams = { sibuffer, null, 0 }; pk11context *ctxmac = null; pk11context *ctxenc = null; unsigned int pad[1]; secitem paditem; unsigned int paddinglength; static unsigned int firsttime = 1; int j; ctxmac = pk11_createcontextbysymk...
... null) { pr_fprintf(pr_stderr, "can't create mac context\n"); rv = secfailure; goto cleanup; } rv = macinit(ctxmac); if (rv != secsuccess) { goto cleanup; } ctxenc = encryptinit(ek, iv, ivlen, ckm_aes_cbc); /* read a buffer of plaintext from input file */ while ((ptextlen = pr_read(infile, ptext, sizeof(ptext))) > 0) { /* encrypt using it using cbc, using previously created iv */ if (ptextlen != b
locksize) { paddinglength = b
locksize - ptextlen; for ( j=0; j < paddinglength; j++) { ptext[ptextlen+j] = (unsigned char)paddinglength; } ptextlen = b
locksize; } rv = encrypt(ctxenc, encbuf, &encbuflen, sizeof(encbuf), ptext, ptextlen); if (rv != secsuccess) { pr_fprintf(pr_stderr, "encrypt failure\n"); goto cleanup; } /* save the last block of ciphertext as the next iv */ iv = encbuf; ivlen = encbufl...
...And 4 more matches
Index
looking at the code level, nss deals with b
locks of raw data all the time.
...the implementation of arenas makes sure that all individual memory b
locks are tracked.
... once a task is done, regardless whether it completed or was aborted, the programmer simply needs to release the arena, and all individually allocated b
locks will be released automatically.
...And 3 more matches
Invariants
locks "are we holding the runtime-wide gc lock?" is a static yes or no for almost every line of code.
... a thread that holds the gc lock never does anything that b
locks.
... a thread that is in a request never does anything that b
locks.
...And 3 more matches
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
</div> </body> we can summarize how the whitespace here is handled as follows (the may be some slight differences in exact behavior between browsers, but this basically works): because we’re inside a block formatting context, everything must be a block, so our 3 text nodes also become b
locks, just like the 2 <div>s.
... b
locks occupy the full width available and are stacked on top of each other, which means that we end up with a layout composed of this list of b
locks: <block>⏎⇥</block> <block>◦◦hello◦◦</block> <block>⏎◦◦◦</block> <block>◦◦world!◦◦</block> <block>◦◦⏎</block> this is then simplified further by applying the processing rules for whitespace in inline formatting contexts to these b
locks: <block></block> <block>hello</block> <block></block> <block>world!</block> <block></block> the 3 empty b
locks we now have are not going to occupy any space in the final layout, because they don’t contain anything, so we’ll end up with only 2 b
locks taking up space in the page.
...these elements behave like inline elements on the outside, and b
locks on the inside, and are often used to display more complex pieces of ui than just text, side-by-side on the same line, for example navigation menu items.
...And 3 more matches
Syntax - CSS: Cascading Style Sheets
the css syntax reflects this goal and its basic building b
locks are: the property which is an identifier, that is a human-readable name, that defines which feature is considered.
... css declaration b
locks declarations are grouped in b
locks, that is in a structure delimited by an opening brace, '{' (u+007b left curly bracket), and a closing one, '}' (u+007d right curly bracket).
... b
locks sometimes can be nested, so opening and closing braces must be matched.
...And 3 more matches
Index - Archive of obsolete content
74 content/loader provides one of the building b
locks for those modules that use content scripts to interact with web content, such as panel and page-mod.
... 127 util/list building b
locks for composing lists.
... 261 chapter 3: introduction to xul—how to build a more intuitive ui add-ons, extensions, firefox, xul learn about xul, the xml-based user-interface language, which is one of the building b
locks for extensions.
...And 2 more matches
2D maze game with device orientation - Game development
then, to load the level we'll parse the data and show the b
locks specific for that level.
...]; every array element holds a collection of b
locks with an x and y position and t value for each.
... after leveldata, but still in the initlevels function, we're adding the b
locks into an array in the for loop using some of the framework-specific methods: for(var i=0; i<this.maxlevels; i++) { var newlevel = this.add.group(); newlevel.enablebody = true; newlevel.physicsbodytype = phaser.physics.arcade; for(var e=0; e<this.leveldata[i].length; e++) { var item = this.leveldata[i][e]; newlevel.create(item.x, item.y, 'element-'+item.t); } newlevel.setall('body.immovable', true); newlevel.visible = false; this.levels.push(newlevel); } first, add.group() is used to create a new group of items.
...And 2 more matches
Graceful asynchronous programming with Promises - Learn web development
you could even do this, since the functions just pass their arguments directly, so there isn't any need for that extra layer of functions: choosetoppings().then(placeorder).then(collectorder).then(eatpizza).catch(failurecallback); this is not quite as easy to read, however, and this syntax might not be usable if your b
locks are more complex than what we've shown here.
... chaining the b
locks together this is a very longhand way of writing this out; we've deliberately done this to help you understand what is going on clearly.
... as shown earlier on in the article, you can chain together .then() b
locks (and also .catch() b
locks).
...And 2 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*/ /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define b
locksize 32 #define modb
locksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header ...
... int publicexponent, const char *noise, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[b
locksize + 1]; rv = generaterandom(randbuf, b
locksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, b
locksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe ...
... const char *encryptedfilename, const char *infilename) { secstatus rv; prfiledesc *headerfile = null; prfiledesc *encfile = null; prfiledesc *infile = null; certcertificate *cert = null; secitem data; unsigned char ptext[modb
locksize]; unsigned char encbuf[modb
locksize]; unsigned int ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (p...
...And 2 more matches
sample2
ror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define b
locksize 32 #define modb
locksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_header "-----begin wrapped enckey-----" #define enckey_trailer "-----end wrapped enckey-----" #define mackey_header "-----begin wrapped mackey-----" #define mackey_trailer "-----end wrapped mackey-----" #define iv_header "-----begin iv-----" #define iv_trailer "-----end iv-----" #define mac_hea...
...return rv; } /* * generate the private key */ seckeyprivatekey * generateprivatekey(keytype keytype, pk11slotinfo *slot, int size, int publicexponent, const char *noise, seckeypublickey **pubkeyp, const char *pqgfile, secupwdata *pwdata) { ck_mechanism_type mechanism; secoidtag algtag; pk11rsagenparams rsaparams; void *params; seckeyprivatekey *privkey = null; secstatus rv; unsigned char randbuf[b
locksize + 1]; rv = generaterandom(randbuf, b
locksize); if (rv != secsuccess) { fprintf(stderr, "error while generating the random numbers : %s\n", port_errortostring(rv)); goto cleanup; } pk11_randomupdate(randbuf, b
locksize); switch (keytype) { case rsakey: rsaparams.keysizeinbits = size; rsaparams.pe = publicexponent; mechanism = ckm_rsa_pkcs_key_pair_gen; algtag = sec_oid_pkcs1_md5_with_rsa_encrypt...
...*/ secstatus findkeyandencrypt(pk11slotinfo *slot, secupwdata *pwdata, const char *headerfilename, const char *encryptedfilename, const char *infilename) { secstatus rv; prfiledesc *headerfile = null; prfiledesc *encfile = null; prfiledesc *infile = null; certcertificate *cert = null; secitem data; unsigned char ptext[modb
locksize]; unsigned char encbuf[modb
locksize]; unsigned int ptextlen; int index; unsigned int nwritten; unsigned int pad[1]; secitem paditem; unsigned int paddinglength = 0; seckeypublickey *pubkey = null; /* if the intermediate encrypted file already exists, delete it*/ if (pr_access(encryptedfilename, pr_access_exists) == pr_success) { pr_delete(encryptedfilename); } /* read certificate from header f...
...And 2 more matches
AesCtrParams - Web APIs
aes is a block cipher, meaning that it splits the message into b
locks and encrypts it a block at a time.
... a given counter block value must never be used more than once with the same key: given a message n b
locks long, a different counter block must be used for every block.
... if the same key is used to encrypt more than one message, a different counter block must be used for all b
locks across all messages.
...And 2 more matches
Screen Wake Lock API - Web APIs
you acquire a wake
locksentinel object by calling the navigator.wakelock.request() promise based method that resolves if the platform allows it.
...it can also be released manually via the wake
locksentinel.release() method.
... wake
locksentinel provides a handle to the underlying platform wake lock and if referenced can be manually released and reacquired.
...And 2 more matches
Control flow and error handling - JavaScript
"standalone" b
locks in javascript can produce completely different results from what they would produce in c or java.
...the finally block executes after the try and catch b
locks execute but before the statements following the try...catch statement.
... the finally block the finally block contains statements to be executed after the try and catch b
locks execute.
...And 2 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
since different browsers sometimes use different apis for the same functionality, you can often find multiple if() else() b
locks throughout the code to differentiate between the browsers.
... the following code shows b
locks designated for internet explorer: .
... var elm; if (ns4) elm = document.layers["myid"]; else if (ie4) elm = document.all["myid"] the above code isn't extensible, so if you want it to support a new browser, you must update these b
locks throughout the web application.
...rather than multiple if() else() b
locks, you increase efficiency by taking common tasks and abstracting them out into their own functions.
Handling different text directions - Learn web development
previous overview: building b
locks next many of the properties and values that we have encountered so far in our css learning have been tied to the physical dimensions of our screen.
...b
locks are only displayed from the top to the bottom of the page if you are using a writing mode that displays text horizontally, such as english.
...so the block dimension is always the direction b
locks are displayed on the page in the writing mode in use.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Introducing asynchronous JavaScript - Learn web development
we've then got three further code b
locks chained onto the end of the fetch(): two then() b
locks.
...each .then() block returns another promise, meaning that you can chain multiple .then() b
locks onto each other, so multiple asynchronous operations can be made to run in order, one after another.
... the catch() block at the end runs if any of the .then() b
locks fail — in a similar way to synchronous try...catch b
locks, an error object is made available inside the catch(), which can be used to report the kind of error that has occurred.
... only once the fetch() block has completely finished running and delivering its result through the .then() b
locks will we finally see the second console.log() message (it worked :)) appear.
NSS API Guidelines
the library supports base-64 encoding/decoding, reader-writer
locks, the secitem data type, der encoding/decoding, error types and numbers, oid handling, and secure random number generation.
... utility for any layer lib/util base64.h, ciferfam.h, nssb64.h, nssb64t.h, nss
locks.h, nssrwlk.h, nssrwlkt.h, portreg.h, pqgutil.h, secasn1.h, secasn1t.h, seccomon.h, secder.h, secdert.h, secdig.h, secdigt.h, secitem.h, secoid.h, secoidt.h, secport.h, secrng.h, secrngt.h, secerr.h, watcomfx.h naming conventions this section describes the rules that (ideally) should be followed for naming and identifying new files, functions, and data types.
...global data which is changed rarely, should be protected by reader/writer
locks.
...this strategy is best when lists are short, or even better if lists are relatively read only (they don't change very often) and using reader/writer
locks.
Redis Tips
redis> del foo (integer) 1 redis> get foo (nil) redis> getset foo 3 (nil) redis> getset foo 4 "3" efficient multiple queries and transaction b
locks you'll often want to do several queries together.
... redis has a solution for this: transaction b
locks.
... some things to notice: the subscriber b
locks forever - not just for the first message.
... mutex
locks in the case where you need a mutex, here's a recipe for using the atomic getset and setnx to orchestrate locking: https://redis.io/commands/setnx (scroll down).
Using Objective-C from js-ctypes
while (objc_msgsend_bool(synth, isspeaking)) {} let release = sel_registername("release"); objc_msgsend(synth, release); objc_msgsend(text, release); lib.close(); creating objective-c b
locks objective-c api calls sometimes require you to pass in a block.
... reading the apple developer :: programming with objective-c - working with b
locks you can learn more about b
locks.
... * b
locks are regular objective-c objects in obj-c, and can be sent messages; * thus block instances need are creted using the core.wrapid() function.
... */ // apple docs :: working with b
locks - https://developer.apple.com/library/ios/documentation/cocoa/conceptual/programmingwithobjectivec/workingwithb
locks/workingwithb
locks.html var _nsconcreteglobalblock = ctypes.open(ctypes.libraryname('objc')).declare('_nsconcreteglobalblock', ctypes.voidptr_t); // //github.com/realityripple/uxp/blob/master/js/src/ctypes/library.cpp?offset=0#271 /** * the "block descriptor" is a static singleton struct.
Intensive JavaScript - Firefox Developer Tools
then there are three solid b
locks of orange, representing javascript execution, one for each time we pressed the button.
...instead of a single solid orange block, each button-press shows up as a long sequence of very short orange b
locks.
... the orange b
locks appear one frame apart, and each one represents one of the functions called from requestanimationframe().
... the function calls are interleaved with the pink b
locks from the css animation, and each function is short enough that the browser can handle it without the overall frame rate dropping.
LockManager - Web APIs
the lockmanager interface of the the web
locks api provides methods for requesting a new lock object and querying for an existing lock object.
... to get an instance of lockmanager, call navigator.
locks.
... lockmanager.query() returns a promise that resolves with a lockmanagersnapshot which contains information about held and pending
locks.
... specifications specification status comment web
locks apithe definition of 'lockmanager' in that specification.
block - JavaScript
combining statements into b
locks is a common practice in javascript.
... b
locks are commonly used in association with if...else and for statements.
... in non-strict code, function declarations inside b
locks behave strangely.
... in strict mode, starting with es2015, functions inside b
locks are scoped to that block.
Web video codec guide - Web media technologies
this happens when an algorithm that uses b
locks that span across a sharp boundary between an object and its background.
... contouring contouring or color banding is a specific form of posterization in which the color b
locks form bands or stripes in the image.
...these b
locks are normally of a fixed size, in a grid, but there are forms of motion compensation that allow for variable block sizes, and even for b
locks to overlap.
... supported bit rates varies by level supported frame rates varies by level; up to 300 fps is possible compression lossy dct-based algorithm, though it's possible to create lossless macrob
locks within the image supported frame sizes up to 8,192 x 4,320 pixels supported color modes some of the more common or interesting profiles: profile color depths chroma subsampling constrained baseline (cbp) 8 4:2:0 baseline (bp) 8 4:2:0 exten...
Codecs used by WebRTC - Web media technologies
max-dpb if specified and supported, max-dpb indicates the maximum decoded picture buffer size, given in units of 8/3 macrob
locks.
... max-fs if specified and supported by the software, max-fs specifies the maximum size of a single video frame, given as a number of macrob
locks.
... max-mbps if specified and supported by the software, this value is an integer specifying the maximum rate at which macrob
locks should be processed per second (in macrob
locks per second).
... max-smbps if specified and supported by the software, this specifies an integer stating the maximum static macroblock processing rate in static macrob
locks per second (using the hypothetical assumption that all macrob
locks are static macrob
locks).
Low-Level APIs - Archive of obsolete content
building b
locks for higher level modules, such as events and worker.
... content/loader provides one of the building b
locks for those modules that use content scripts to interact with web content, such as panel and page-mod.
... util/list building b
locks for composing lists.
Styling web forms - Learn web development
we already looked at some simple form styling in your first form, and the css building b
locks module contains some useful form styling essentials too.
...add all the code b
locks shown below inside the <style> element, one after another.
...if the fontsquirrel output was different to what we described above, you can find the correct @font-face b
locks inside your downloaded webfont kit, in the stylesheet.css file (you'll need to replace the below @font-face b
locks with them, and update the paths to the font files): @font-face { font-family: 'handwriting'; src: url('fonts/journal-webfont.woff2') format('woff2'), url('fonts/journal-webfont.woff') format('woff'); font-weight: normal; font-style: normal; } @font-face { font-family: 'typewriter'; src: url('fonts/veteran_typewriter-webfont.woff2') format('woff2'), url('fonts/veteran_typewriter-webfont.woff') form...
Making asynchronous programming easier with async and await - Learn web development
lse { 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() b
locks everywhere!
... you are probably already thinking "this is really cool!", and you are right — fewer .then() b
locks to wrap around code, and it mostly just looks like synchronous code, so it is really intuitive.
...the await keyword b
locks execution of all the code that follows until the promise fulfills, exactly as it would with a synchronous operation.
Build your own function - Learn web development
previous overview: building b
locks next with most of the essential theory dealt with in the previous article, this article provides practical experience.
... prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps, functions — reusable b
locks of code.
... previous overview: building b
locks next in this module making decisions in your code — conditionals looping code functions — reusable b
locks of code build your own function function return values introduction to events image gallery ...
Making decisions in your code — conditionals - Learn web development
overview: building b
locks next in any programming language, the code needs to make decisions and carry out actions accordingly depending on different inputs.
... as a final point, you may sometimes see if...else statements written without the curly braces, in the following shorthand style: if (condition) code to run if condition is true else run some other code instead this is perfectly valid code, but using it is not recommended — it is much easier to read the code and work out what is going on if you use the curly braces to delimit the b
locks of code, and use multiple lines and indentation.
...notice how all the conditions are tested in else if() {...} b
locks, except for the first one, which is tested in an if() {...} block.
A first splash into JavaScript - Learn web development
functions next, add the following below your previous javascript: function checkguess() { alert('i am a placeholder'); } functions are reusable b
locks of code that you can write once and run again and again, saving the need to keep repeating code all the time.
...— in response to which we can run b
locks of code.
... the constructs that listen out for the event happening are called event listeners, and the b
locks of code that run in response to the event firing are called event handlers.
Getting started with Vue - Learn web development
like most frameworks, vue lets you create reusable b
locks of markup via components.
...these components let you break a large application into discrete building b
locks that can be created and managed separately, and transfer data between each other as required.
... these small b
locks can help you reason about and test your code.
Introduction to NSPR
locks and monitors in general, a monitor is a conceptual entity composed of a mutex, one or more condition variables, and the monitored data.
...should another thread (or the same thread) already have the lock held, the calling thread b
locks, waiting for the situation to improve.
...the wait operation atomically exits the monitor and b
locks the calling thread in a waiting condition state.
An overview of NSS Internals
looking at the code level, nss deals with b
locks of raw data all the time.
...the implementation of arenas makes sure that all individual memory b
locks are tracked.
... once a task is done, regardless whether it completed or was aborted, the programmer simply needs to release the arena, and all individually allocated b
locks will be released automatically.
nss tech note5
if encrypting, outbuf len must be atleast (inbuflen + b
locksize).
...when all done with encrypt/decrypt ops, clean up</big> <big>pk11_freesymkey(symkey); secitem_freeitem(secparam, pr_true); pk11_freeslot(slot);</big> note: aes encryption, a fixed b
locksize of 16 bytes is used.
... the rijndael algorithm permits 3 b
locksizes (16, 24, 32 bytes), but the aes standard requires the b
locksize to be 16 bytes.
NSS functions
sionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_getchannelinfo mxr 3.4 and later ssl_getciphersuiteinfo mxr 3.4 and later ssl_getclientauthdatahook mxr 3.2 and later ssl_getmaxservercache
locks mxr 3.4 and later ssl_getsessionid mxr 3.2 and later ssl_getstatistics mxr 3.2 and later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ...
...esethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_revealcert mxr 3.2 and later ssl_revealpinarg mxr 3.2 and later ssl_revealurl mxr 3.2 and later ssl_securitystatus mxr 3.2 and later ssl_setmaxservercache
locks mxr 3.4 and later ssl_setpkcs11pinarg mxr 3.2 and later ssl_setsockpeerid mxr 3.2 and later ssl_seturl mxr 3.2 and later ssl_shutdownserversessionidcache mxr 3.7.4 and later deprecated ssl functions the following ssl functions have been replaced with newer versions.
... mxr 3.2 and later pk11_getallslotsforcert mxr 3.12 and later pk11_getbestkeylength mxr 3.2 and later pk11_getbestslot mxr 3.2 and later pk11_getbestslotmultiple mxr 3.2 and later pk11_getbestwrapmechanism mxr 3.2 and later pk11_getb
locksize mxr 3.2 and later pk11_getcertfromprivatekey mxr 3.9.3 and later pk11_getcurrentwrapindex mxr 3.2 and later pk11_getdefaultarray mxr 3.8 and later pk11_getdefaultflags mxr 3.8 and later pk11_getdisabledreason mxr 3.8 and later p...
JSVAL_LOCK
locks a js value to prevent garbage collection on it.
...jsval_lock
locks a js value, v, to prevent the value from being garbage collected.
...jsval_lock determines if v is an object, string, or double value, and if it is, it
locks the value.
JSVAL_UNLOCK
un
locks a js value, enabling garbage collection on it.
...jsval_unlock un
locks a previously locked js value, v, so it can be garbage collected.
...jsval_unlock determines if v is an object, string, or double value, and if it is, it un
locks the value.
imgIRequest
lockimage()
locks an image.
... if the image does not exist yet,
locks it once it becomes available.
...unlockimage() un
locks an image.
inIDOMUtils
.0 (firefox 22.0 / thunderbird 22.0 / seamonkey 2.19) implemented by: @mozilla.org/inspector/dom-utils;1 as a service: var inidomutils = components.classes["@mozilla.org/inspector/dom-utils;1"] .getservice(components.interfaces.inidomutils); method overview void addpseudoclasslock(in nsidomelement aelement, in domstring apseudoclass); void clearpseudoclass
locks(in nsidomelement aelement); [implicit_jscontext] jsval colornametorgb(in domstring acolorname); nsiarray getbindingurls(in nsidomelement aelement); nsidomnodelist getchildrenfornode(in nsidomnode anode, in boolean ashowinganonymouscontent); unsigned long long getcontentstate(in nsidomelement aelement); void getcsspropertynames([optional] in unsigned l...
... return value true if lock exists, false otherwise clearpseudoclass
locks() removes any pseudo-class
locks from the element.
... void clearpseudoclass
locks( in nsidomelement aelement ); parameters aelement the element to remove the pseudo-class
locks from.
Lock - Web APIs
the lock interface of the the web
locks api provides the name and mode of a previously requested lock, which is received in the callback to lockmanager.request().
...lockmanager is the object returned by navigator.
locks.
... navigator.
locks.request("net_db_sync", show_lock_properties); navigator.
locks.request("another_lock", {mode: "shared"}, show_lock_properties); function show_lock_properties(lock) { console.log(`the lock name is: ${lock.name}`); console.log(`the lock mode is: ${lock.mode}`); } specifications specification status comment web
locks apithe definition of 'lock' in that specification.
LockManager.query() - Web APIs
the query() method of the lockmanager interface returns a promise which resolves with an object containing information about held and pending
locks.
... held: an array of lock objects for held
locks.
... example const state = await navigator.
locks.query(); for (const lock of state.held) { console.log(`held lock: name ${lock.name}, mode ${lock.mode}`); } for (const request of state.pending) { console.log(`requested lock: name ${request.name}, mode ${request.mode}`); } specifications specification status comment web
locks apithe definition of 'query()' in that specification.
WakeLock.request() - Web APIs
the request() method of the wakelock interface returns a promise that resolves with a wake
locksentinel object, which allows control over screen dimming and locking.
... return value a promise that resolves with a wake
locksentinel object.
... examples the following asynchronous function requests a wake
locksentinel object.
Mastering margin collapsing - CSS: Cascading Style Sheets
the top and bottom margins of b
locks are sometimes combined (collapsed) into a single margin whose size is the largest of the individual margins (or just one of them, if they are equal), a behavior known as margin collapsing.
... no content separating parent and descendants if there is no border, padding, inline part, block formatting context created, or clearance to separate the margin-top of a block from the margin-top of one or more of its descendant b
locks; or no border, padding, inline content, height, min-height, or max-height to separate the margin-bottom of a block from the margin-bottom of one or more of its descendant b
locks, then those margins collapse.
... empty b
locks if there is no border, padding, inline content, height, or min-height to separate a block's margin-top from its margin-bottom, then its top and bottom margins collapse.
Flow Layout and Writing Modes - CSS: Cascading Style Sheets
if you want to change your page, or part of your page, to vertical-lr then you can set writing-mode: vertical-lr on the element and this will change the direction of the b
locks and therefore the inline direction as well.
...these values control the direction that b
locks flow on the page.
... the following example shows b
locks using horizontal-tb.
try...catch - JavaScript
conditional catch-b
locks you can create "conditional catch-b
locks" by combining try...catch b
locks with if...else if...else structures, like this: try { myroutine(); // may throw three types of exceptions } catch (e) { if (e instanceof typeerror) { // statements to handle typeerror exceptions } else if (e instanceof rangeerror) { // statements to handle rangeerror exceptions } else if (e instanceof eval...
... openmyfile(); try { // tie up a resource writemyfile(thedata); } finally { closemyfile(); // always close the resource } examples nested try-b
locks first, let's see what happens with this: try { try { throw new error('oops'); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.message); } // output: // "finally" // "outer" "oops" now, if we already caught the exception in the inner try-block by adding a catch-block try { try { throw new error('oops'); } catch (ex) { console.err...
... returning from a finally-block if the finally-block returns a value, this value becomes the return value of the entire try-catch-finally statement, regardless of any return statements in the try and catch-b
locks.
Table Reflow Internals - Archive of obsolete content
in each pass, row groups reflow rows which reflow cells which reflow cell b
locks.
... table paginated reflow the row group (continued) creates a continuation for the incomplete row (which also creates continuations for all of its cells and all of the cell b
locks) puts the continuation in its overflow frames property.
Backgrounds and borders - Learn web development
previous overview: building b
locks next in this lesson, we will take a look at some of the creative things you can do with css backgrounds and borders.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Cascade and inheritance - Learn web development
overview: building b
locks next the aim of this lesson is to develop your understanding of some of the most fundamental concepts of css — the cascade, specificity, and inheritance — which control how css is applied to html and how conflicts are resolved.
... overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Debugging CSS - Learn web development
previous overview: building b
locks next sometimes when writing css you will encounter an issue where your css doesn't seem to be doing what you expect.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Images, media, and form elements - Learn web development
previous overview: building b
locks next in this lesson we will take a look at how certain special elements are treated in css.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
Organizing your CSS - Learn web development
previous overview: building b
locks as you start to work on larger stylesheets and big projects you will discover that maintaining a huge css file can be challenging.
... previous overview: building b
locks in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing your css ...
Overflowing content - Learn web development
previous overview: building b
locks next overflow is what happens when there is too much content to fit in a container.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Attribute selectors - Learn web development
previous overview: building b
locks next as you know from your study of html, elements can have attributes that give further detail about the element being marked up.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Combinators - Learn web development
previous overview: building b
locks next the final selectors we will look at are called combinators, because they combine other selectors in a way that gives them a useful relationship to each other and the location of content in the document.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Pseudo-classes and pseudo-elements - Learn web development
previous overview: building b
locks next the next set of selectors we will look at are referred to as pseudo-classes and pseudo-elements.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Type, class, and ID selectors - Learn web development
previous overview: building b
locks next in this lesson we will take a look at the simplest selectors that are available, which you will probably use the most in your work.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
CSS selectors - Learn web development
previous overview: building b
locks next in css, selectors are used to target the html elements on our web pages that we want to style.
... previous overview: building b
locks next reference table of selectors the below table gives you an overview of the selectors you have available to use, along with links to the pages in this guide which will show you how to use each type of selector.
Sizing items in CSS - Learn web development
previous overview: building b
locks next in the various lessons so far you have come across a number of ways to size items on a web page using css.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Styling tables - Learn web development
previous overview: building b
locks next styling an html table isn't the most glamorous job in the world, but sometimes we all have to do it.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
The box model - Learn web development
previous overview: building b
locks next everything in css has a box around it, and understanding these boxes is key to being able to create layouts with css, or to align items with other items.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
CSS values and units - Learn web development
previous overview: building b
locks next every property used in css has a value or set of values that are allowed for that property, and taking a look at any property page on mdn will help you understand the values that are valid for any particular property.
... previous overview: building b
locks next in this module cascade and inheritance css selectors type, class, and id selectors attribute selectors pseudo-classes and pseudo-elements combinators the box model backgrounds and borders handling different text directions overflowing content values and units sizing items in css images, media, and form elements styling tables debugging css organizing you...
Web fonts - Learn web development
open up the stylesheet.css file and copy both the @font-face b
locks contained inside into your web-font-start.css file — you need to put them at the very top, before any of your css, as the fonts need to be imported before you can use them on your site.
...this is what one of the b
locks looks like: @font-face { font-family: 'ciclefina'; src: url('fonts/cicle_fina-webfont.eot'); src: url('fonts/cicle_fina-webfont.eot?#iefix') format('embedded-opentype'), url('fonts/cicle_fina-webfont.woff2') format('woff2'), url('fonts/cicle_fina-webfont.woff') format('woff'), url('fonts/cicle_fina-webfont.ttf') format('truetype'), url('fonts/cicle_fina-...
Front-end web developer - Learn web development
modules css first steps (10–15 hour read/exercises) css building b
locks (35–45 hour read/exercises) styling text (15–20 hour read/exercises) css layout (30–40 hour read/exercises) additional resources css layout cookbook interactivity with javascript time to complete: 135–185 hours prerequisites it is recommended that you have basic html knowledge before starting to learn javascript.
... modules javascript first steps (30–40 hour read/exercises) javascript building b
locks (25–35 hour read/exercises) introducing javascript objects (25–35 hour read/exercises) client-side web apis (30–40 hour read/exercises) asynchronous javascript (25–35 hour read/exercises) web forms — working with user data time to complete: 40–50 hours prerequisites forms require html, css, and javascript knowledge.
Image gallery - Learn web development
previous overview: building b
locks now that we've looked at the fundamental building b
locks of javascript, we'll test your knowledge of loops, functions, conditionals and events by getting you to build a fairly common item you'll see on a lot of websites — a javascript-powered image gallery.
... previous overview: building b
locks in this module making decisions in your code — conditionals looping code functions — reusable b
locks of code build your own function function return values introduction to events image gallery ...
Function return values - Learn web development
previous overview: building b
locks next there's one last essential concept about functions for us to discuss — return values.
... prerequisites: basic computer literacy, a basic understanding of html and css, javascript first steps, functions — reusable b
locks of code.
Drawing graphics - Learn web development
prerequisites: javascript basics (see first steps, building b
locks, javascript objects), the basics of client-side apis objective: to learn the basics of drawing on <canvas> elements using javascript.
... before we get to defining draw(), we'll add a couple of lights to the scene, to liven things up a bit; add the following b
locks next: let light = new three.ambientlight('rgb(255, 255, 255)'); // soft white light scene.add(light); let spotlight = new three.spotlight('rgb(255, 255, 255)'); spotlight.position.set( 100, 1000, 1000 ); spotlight.castshadow = true; scene.add(spotlight); an ambientlight object is a kind of soft light that lightens the whole scene a bit, like the sun when you are outside.
Fetching data from the server - Learn web development
prerequisites: javascript basics (see first steps, building b
locks, javascript objects), the basics of client-side apis objective: to learn how to fetch data from the server and use it to update the contents of a web page.
... it is also worth noting that you can directly chain multiple promise b
locks (.then() b
locks, but there are other types too) onto the end of one another, passing the result of each block to the next block as you travel down the chain.
What is JavaScript? - Learn web development
apis are ready-made sets of code building b
locks that allow a developer to implement programs that would otherwise be hard or impossible to implement.
...the updatename() code block (these types of reusable code b
locks are called "functions") asks the user for a new name, and then inserts that name into the paragraph to update the display.
JavaScript First Steps - Learn web development
after that, we discuss some key building b
locks in detail, such as variables, strings, numbers and arrays.
...in this article we will get down to the real basics, looking at how to work with the most basic building b
locks of javascript — variables.
Object prototypes - Learn web development
prerequisites: understanding javascript functions, familiarity with javascript basics (see first steps and building b
locks), and oojs basics (see introduction to objects).
...this makes the code easier to read, as the constructor only contains the property definitions, and the methods are split off into separate b
locks.
Vue conditional rendering: editing existing todos - Learn web development
it's important to note that v-else and v-else-if b
locks need to be the first sibling of a v-if/v-else-if block, otherwise vue will not recognize them.
... lastly, you can use a v-if + v-else at the root of your component to display only one block or another, since vue will only render one of these b
locks at a time.
Implementing feature detection - Learn web development
if you look at the latter, you'll see a couple of @supports b
locks, for example: @supports (flex-flow: row) and (flex: 1) { main { display: flex; } main div { padding-right: 4%; flex: 1; } main div:last-child { padding-right: 0; } } this at-rule block applies the css rule within only if the current browser supports both the flex-flow: row and flex: 1 declarations.
...go into modernizr-css.css, and replace the two @supports b
locks with the following: /* properties for browsers with modern flexbox */ .flexbox main { display: flex; } .flexbox main div { padding-right: 4%; flex: 1; } .flexbox main div:last-child { padding-right: 0; } /* fallbacks for browsers that don't support modern flexbox */ .no-flexbox main div { width: 22%; float: left; padding-right: 4%; } .no-flexbox main div:last-child { paddin...
Handling common HTML and CSS problems - Learn web development
note: the same is true for other css features like media queries, @font-face and @supports b
locks — if they are not supported, the browser just ignores them.
...you can find a detailed account of such practices in the building b
locks of responsive design.
Storage access policy: Block cookies from trackers
firefox includes a new storage access policy that b
locks cookies and other site data from third-party tracking resources.
... the storage access policy b
locks resources identified as trackers from accessing their cookies and other site storage when they are loaded in a third-party context.
Tracking Protection
when firefox b
locks content, it logs a message to the web console like this: the resource at "http://some/url" was blocked because tracking protection is enabled.
...when tracking protection is enabled, firefox b
locks content from sites in the list.
HTML parser threading
it also has another lazily initialized tokenizer/tree builder for speculatively scanning the tail of document.write() data when the parser b
locks without parsing the document.write() data to completion.
...the mutex acquisition only b
locks if the parser thread happens to be setting up a new speculation object at the same moment.
Condition Variables
for an introduction to nspr thread synchronization, including
locks and condition variables, see introduction to nspr.
... for reference information on nspr
locks, see
locks.
PRLock
syntax #include <prlock.h> typedef struct prlock prlock; description nspr represents a lock as an opaque entity to clients of the functions described in "
locks".
... functions that operate on
locks do not have timeouts and are not interruptible.
PR_JoinThread
b
locks the calling thread until a specified thread terminates.
...the function is synchronous in that it b
locks the calling thread until the target thread is in a joinable state.
PR_Lock
locks a specified lock object.
... description when pr_lock returns, the calling thread is "in the monitor," also called "holding the monitor's lock." any thread that attempts to acquire the same lock b
locks until the holder of the lock exits the monitor.
Threads
for api reference information related to thread synchronization, see
locks and condition variables.
... pr_jointhread b
locks the calling thread until a specified thread terminates.
NSPR API Reference
introduction to nspr nspr naming conventions nspr threads thread scheduling setting thread priorities preempting threads interrupting threads nspr thread synchronization
locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities contro...
...lling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization
locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o funct...
Python binding for NSS
iant_stream ssl.ssl_library_version_2 ssl.ssl_library_version_3_0 ssl.ssl_library_version_tls_1_0 ssl.ssl_library_version_tls_1_1 ssl.ssl_library_version_tls_1_2 ssl.ssl_library_version_tls_1_3 ssl.ssl2 ssl.ssl3 ssl.tls1.0 ssl.tls1.1 ssl.tls1.2 ssl.tls1.3 the following methods were missing thread
locks, this has been fixed.
...me() nss.nss.pkcs12_enable_all_ciphers() nss.nss.pkcs12_enable_cipher() nss.nss.pkcs12_export() nss.nss.pkcs12_map_cipher() nss.nss.pkcs12_set_nickname_collision_callback() nss.nss.pkcs12_set_preferred_cipher() nss.nss.token_exists() nss.ssl.config_mp_server_sid_cache() nss.ssl.config_server_session_id_cache_with_opt() nss.ssl.get_max_server_cache_
locks() nss.ssl.set_max_server_cache_
locks() nss.ssl.shutdown_server_session_id_cache() the following constants were added nss.nss.int.pk11_dis_could_not_init_token nss.nss.int.pk11_dis_none nss.nss.int.pk11_dis_token_not_present nss.nss.int.pk11_dis_token_verify_failed nss.nss.int.pk11_dis_user_selected nss.nss.int.pkcs12_des_56 nss.nss.int.
NSS environment variables
3.12 sslforce
locks boolean (1 to enable) forces nss to use
locks for protection.
... overrides the effect of ssl_no_
locks (see ssl.h).
SSL functions
sionidcache mxr 3.2 and later ssl_datapending mxr 3.2 and later ssl_forcehandshake mxr 3.2 and later ssl_forcehandshakewithtimeout mxr 3.11.4 and later ssl_getchannelinfo mxr 3.4 and later ssl_getciphersuiteinfo mxr 3.4 and later ssl_getclientauthdatahook mxr 3.2 and later ssl_getmaxservercache
locks mxr 3.4 and later ssl_getsessionid mxr 3.2 and later ssl_getstatistics mxr 3.2 and later ssl_handshakecallback mxr 3.2 and later ssl_importfd mxr 3.2 and later ssl_inheritmpserversidcache mxr 3.2 and later ssl_invalidatesession mxr 3.2 and later ssl_localcertificate mxr 3.4 and later ...
...esethandshake mxr 3.2 and later ssl_restarthandshakeaftercertreq mxr 3.2 and later ssl_restarthandshakeafterservercert mxr 3.2 and later ssl_revealcert mxr 3.2 and later ssl_revealpinarg mxr 3.2 and later ssl_revealurl mxr 3.2 and later ssl_securitystatus mxr 3.2 and later ssl_setmaxservercache
locks mxr 3.4 and later ssl_setpkcs11pinarg mxr 3.2 and later ssl_setsockpeerid mxr 3.2 and later ssl_seturl mxr 3.2 and later ssl_shutdownserversessionidcache mxr 3.7.4 and later ...
Bytecode Descriptions
location information for catch/finally b
locks is stored in a side table, script->trynotes().
...used to implement catch-b
locks, including the implicit ones generated as part of for-of iteration.
JSAPI User Guide
if the system runs out of memory in the middle of a script, we do not want finally b
locks to execute, because almost anything a script does requires at least a little memory, and we have none.
...the javascript stack is unwound in the normal way except that catch and finally b
locks are ignored.
TPS Tests
bookmarks passwords history tabs form data prefs test phases the phase b
locks are where the action happens!
...tps iterates through the phase b
locks in alphanumeric order, and for each phase, it does the following: launches firefox with the profile from the phases object that corresponds to this test phase.
Secure Development Guidelines
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 dead
locks 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 dead
locks and locking issues example func_a() { lock(locka); lock(lockb); ...
...t’s initialized in the try block if the try block throws before the variable is initialized, the catch block will operate on un-intialized data freeing un-initialized data example: int main(){ char *ptr; try { ptr = new char[-1]; // oom } catch(...) { delete ptr; } } freeing un-initialized data: prevention be careful when freeing data in catch b
locks make sure the try block can’t throw before data is initialized initialize variables when they’re declared; for example, set pointers to null memory leaks usually occur when memory is allocated in a try block after the allocation, something throws in the try block before memory is freed in the try block the catch block does not foresee this and doesn't free the memory freeing un-ini...
Index
it is meant for use by extension developers who have exception handler b
locks which want to "eat" an exception, but still want to report it to the console.
...to get access to the profile manager service: 841 nsiprofilelock interfaces, interfaces:scriptable, profiles, toolkit, xpcom interface reference un
locks the profile.
nsIPasswordManager
addreject() b
locks a hostname from having its passwords saved.
... removereject() unb
locks a hostname from having its passwords saved.
XPCOM tasks
p1 various threading issues, e.g., too many
locks.
... not enough
locks.
AudioWorkletProcessor.process - Web APIs
important: currently, audio data b
locks are always 128 frames long—that is, they contain 128 32-bit floating-point samples for each of the inputs' channels.
... however, plans are already in place to revise the specification to allow the size of the audio b
locks to be changed depending on circumstances (for example, if the audio hardware or cpu utilization is more efficient with larger block sizes).
IDBDatabaseSync - Web APIs
transaction() creates and returns a transaction, acquiring
locks on the given database objects, within the specified timeout duration, if possible.
... timeout the interval that this operation is allowed to take to acquire
locks on all the objects stores and indexes identified in storenames.
Navigator - Web APIs
navigator.
locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object navigator.mediacapabilities read only returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities.
... navigator.wakelock read only returns a wakelock interface you can use to request screen wake
locks and prevent screen from dimming, turning off, or showing a screen saver.
RTCInboundRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macrob
locks (in scan order) in the received media.
... syntax var slicount = rtcinboundrtpstreamstats.slicount; value an unsigned integer indicating the number of sli packets this receiver sent to the remote sender due to lost runs of macrob
locks.
RTCOutboundRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder (the sender) know that it's detected corruption of one or more consecutive macrob
locks, in scan order, in the received media.in general, what's usually of interest is that the higher this number is, the more the stream data is becoming corrupted between the sender and the receiver, causing the receiver to request retransmits or to drop frames entirely.
... syntax var slicount = rtcoutboundrtpstreamstats.slicount; value an unsigned integer indicating the number of sli packets the sender received from the receiver due to lost runs of macrob
locks.
RTCRtpStreamStats.sliCount - Web APIs
an sli packet is used by a decoder to let the encoder know that it's detected corruption of one or more consecutive macrob
locks in the received media.
... syntax var slicount = rtcrtpstreamstats.slicount; value an unsigned long integer indicating the number of sli packets the sender received from the receiver due to lost runs of macrob
locks.
ReadableStream - Web APIs
readablestream.getiterator() creates a readablestream async iterator instance and
locks the stream to it.
... readablestream.getreader() creates a reader and
locks the stream to it.
ResizeObserverEntry.borderBoxSize - Web APIs
each object in the array contains two properties: b
locksize the length of the observed element's border box in the block dimension.
... examples const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.borderboxsize && entry.borderboxsize.length > 0) { entry.target.style.borderradius = math.min(100, (entry.borderboxsize[0].inlinesize/10) + (entry.borderboxsize[0].b
locksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that sp...
ResizeObserverEntry.contentBoxSize - Web APIs
this object contains two properties: b
locksize the length of the observed element's content box in the block dimension.
... const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { entry.target.style.borderradius = math.min(100, (entry.contentboxsize.inlinesize/10) + (entry.contentboxsize.b
locksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that sp...
Screen.lockOrientation() - Web APIs
the lockorientation() method of the screen interface
locks the screen into a specified orientation.
... note: it's possible to set several
locks at the same time.
ScreenOrientation - Web APIs
methods screenorientation.lock()
locks the orientation of the containing document to its default orientation and returns a promise.
... screenorientation.unlock() un
locks the orientation of the containing document from its default orientation.
WakeLock - Web APIs
methods request requests a wake
locksentinel object, which returns a promise that resolves with a wake
locksentinel object.
... examples the following asynchronous function requests a wake
locksentinel object.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.clientwaitsync() b
locks and waits for a webglsync object to become signaled or a given timeout to be passed.
... webgl2renderingcontext.uniformblockbinding() assigns binding points for active uniform b
locks.
WebGLRenderingContext.getActiveUniform() - Web APIs
uniform struct { float foo; vec4 bar; } d[2]; will result in: d[0].foo d[0].bar d[1].foo d[1].bar uniform b
locks: one entry for each member.
...otherwise, it is 1 (this includes interface b
locks instanced with arrays).
WebGLRenderingContext.getParameter() - Web APIs
gl.max_3d_texture_size glint gl.max_array_texture_layers glint gl.max_client_wait_timeout_webgl glint64 gl.max_color_attachments glint gl.max_combined_fragment_uniform_components glint64 gl.max_combined_uniform_b
locks glint gl.max_combined_vertex_uniform_components glint64 gl.max_draw_buffers glint gl.max_element_index glint64 gl.max_elements_indices glint gl.max_elements_vertices glint gl.max_fragment_input_components glint gl.max_fragment_uniform_b
locks glint gl.max_fragment_uniform...
...eaved_components glint gl.max_transform_feedback_separate_attribs glint gl.max_transform_feedback_separate_components glint gl.max_uniform_block_size glint64 gl.max_uniform_buffer_bindings glint gl.max_varying_components glint gl.max_vertex_output_components glint gl.max_vertex_uniform_b
locks glint gl.max_vertex_uniform_components glint gl.min_program_texel_offset glint gl.pack_row_length glint see pixelstorei.
WebGLRenderingContext.getProgramParameter() - Web APIs
gl.active_uniform_b
locks: returns a glint indicating the number of uniform b
locks containing active uniforms.
... editor's draft adds new pname values: gl.transform_feedback_buffer_mode, gl.transform_feedback_varyings, gl.active_uniform_b
locks ...
WebGL constants - Web APIs
ab framebuffer_attachment_texture_layer 0x8cd4 framebuffer_incomplete_multisample 0x8d56 uniforms constant name value description uniform_buffer 0x8a11 uniform_buffer_binding 0x8a28 uniform_buffer_start 0x8a29 uniform_buffer_size 0x8a2a max_vertex_uniform_b
locks 0x8a2b max_fragment_uniform_b
locks 0x8a2d max_combined_uniform_b
locks 0x8a2e max_uniform_buffer_bindings 0x8a2f max_uniform_block_size 0x8a30 max_combined_vertex_uniform_components 0x8a31 max_combined_fragment_uniform_components 0x8a33 uniform_buffer_offset_alignment 0x8a34 ...
... active_uniform_b
locks 0x8a36 uniform_type 0x8a37 uniform_size 0x8a38 uniform_block_index 0x8a3a uniform_offset 0x8a3b uniform_array_stride 0x8a3c uniform_matrix_stride 0x8a3d uniform_is_row_major 0x8a3e uniform_block_binding 0x8a3f uniform_block_data_size 0x8a40 uniform_block_active_uniforms 0x8a42 uniform_block_active_uniform_indices 0x8a43 uniform_block_referenced_by_vertex_shader 0x8a44 uniform_block_referenced_by_fragment_shader 0x8a46 sync objects constant name value description object_type 0x9112 sy...
WebGL best practices - Web APIs
)) { console.error('link failed: ' + gl.getprograminfolog(prog)); console.error('vs info-log: ' + gl.getshaderinfolog(vs)); console.error('fs info-log: ' + gl.getshaderinfolog(fs)); } } khr_parallel_shader_compile for non-blocking compile/link status while we've described a pattern to allow browsers to compile and link in parallel, normally checking compile_status or link_status b
locks until the compile or link completes.
...t-accurate function: window.getdevicepixelsize = window.getdevicepixelsize || async function(elem) { await new promise(fn_resolve => { const observer = new resizeobserver(entries => { for (const cur of entries) { const dev_size = cur.devicepixelcontentboxsize; const ret = { width: dev_size[0].inlinesize, height: dev_size[0].b
locksize, }; fn_resolve(ret); observer.disconnect(); return; } throw 'device-pixel-content-box not observed for elem ' + elem; }); observer.observe(elem, {box: 'device-pixel-content-box'}); }); }; please refer to the specification for more details.
Web Video Text Tracks Format (WebVTT) - Web APIs
in this case, you insert your css rules into the file with each rule preceded by the string "style" all by itelf on a line of text, as shown below: webvtt style ::cue { background-image: linear-gradient(to bottom, dimgray, lightgray); color: papayawhip; } /* style b
locks cannot use blank lines nor "dash dash greater than" */ note comment b
locks can be used between style b
locks.
... note style b
locks cannot appear after the first cue.
-moz-image-rect - CSS: Cascading Style Sheets
examples this example loads an image and uses it in four segments to draw the firefox logo in four <div> b
locks.
... clicking on their container causes the four segments to rotate around by swapping the background-image property values among the four <div> b
locks.
CSS Box Alignment - CSS: Cascading Style Sheets
we were able to align text using text-align, center b
locks using auto margins, and in table or inline-block layouts using the vertical-align property.
...the block axis is the axis along which b
locks, such as paragraph elements, are laid out and it runs across the inline axis.
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
we need to be aware of how this will impact our flex layouts as writing mode changes the direction that b
locks are laid out in our document.
... the writing modes the writing modes specification defines the following values of the writing-mode property, which serve to change the direction that b
locks are laid out on the page, to match the direction that b
locks lay out when content is formatted in that particular writing mode.
scroll-margin-inline-end - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling b
locks, the second and third of which snap into place, near but not quite at the right of each block.
... html the html that represents the b
locks is very simple: <div class="scroller"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> css let's walk through the css.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling b
locks, the second and third of which snap into place, near but not quite at the left of each block.
... html the html that represents the b
locks is very simple: <div class="scroller"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> css let's walk through the css.
scroll-margin-inline - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling b
locks, the second and third of which snap into place, near but not quite at the right of each block.
... html the html that represents the b
locks is very simple: <div class="scroller"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> css let's walk through the css.
scroll-margin - CSS: Cascading Style Sheets
the aim here is to create four horizontally-scrolling b
locks, the second and third of which snap into place, near but not quite at the left of each block.
... html the html that represents the b
locks is very simple: <div class="scroller"> <div>1</div> <div>2</div> <div>3</div> <div>4</div> </div> css let's walk through the css.
Block formatting context - Developer guides
inline-b
locks (elements with display: inline-block).
... solid rebeccapurple; } .box[style] { background-color: aliceblue; border: 5px solid steelblue; } .float { float: left; overflow: hidden; /* required by resize:both */ resize: both; margin-right:25px; width: 200px; height: 100px; background-color: rgba(255, 255, 255, .75); border: 1px solid black; padding: 10px; } rather than inline-b
locks with width:<percentage>, in this case we don't have to specify the width of the right div.
Evolution of HTTP - HTTP
built over the existing tcp and ip protocols, it consisted of 4 building b
locks: a textual format to represent hypertext documents, the hypertext markup language (html).
... these four building b
locks were completed by the end of 1990, and the first servers were already running outside of cern by early 1991.
A typical HTTP session - HTTP
a client request consists of text directives, separated by crlf (carriage return, followed by line feed), divided into three b
locks: the first line contains a request method followed by its parameters: the path of the document, i.e.
...similar to a client request, a server response is formed of text directives, separated by crlf, though divided into three b
locks: the first line, the status line, consists of an acknowledgment of the http version used, followed by a status request (and its brief meaning in human-readable text).
A re-introduction to JavaScript (JS tutorial) - JavaScript
let's start off by looking at the building b
locks of any language: the types.
... an important difference between javascript and other languages like java is that in javascript, b
locks do not have scope; only functions have a scope.
Functions - JavaScript
oo() {} // function expression (function bar() {}) // function expression x = function hello() {} if (x) { // function expression function world() {} } // function declaration function a() { // function declaration function b() {} if (0) { // function expression function c() {} } } block-level functions in strict mode, starting with es2015, functions inside b
locks are now scoped to that block.
... in non-strict code, function declarations inside b
locks behave strangely.
break - JavaScript
function testbreak(x) { var i = 0; while (i < 6) { if (i == 3) { break; } i += 1; } return i * x; } break in labeled b
locks the following code uses break statements with labeled b
locks.
... outer_block: { inner_block: { console.log('1'); break outer_block; // breaks out of both inner_block and outer_block console.log(':-('); // skipped } console.log('2'); // skipped } break in labeled b
locks that throw the following code also uses break statements with labeled b
locks, but generates a syntaxerror because its break statement is within block_1 but references block_2.
for await...of - JavaScript
in such case for await...of throws when consuming rejected promise and doesn't call finally b
locks within that generator.
... console.log(num); } } catch (e) { console.log('catched', e) } })(); // 0 // 1 // 2 // catched 3 // compare with for-of loop: try { for (let numorpromise of generatorwithrejectedpromises()) { console.log(numorpromise); } } catch (e) { console.log('catched', e) } // 0 // 1 // promise { 2 } // promise { <rejected> 3 } // 4 // catched 5 // called finally to make finally b
locks of a sync generator to be always called use appropriate form of the loop, for await...of for the async generator and for...of for the sync one and await yielded promises explicitly inside the loop.
label - JavaScript
note: labeled loops or b
locks are very uncommon.
... var allpass = true; var i, j; top: for (i = 0; items.length; i++) for (j = 0; j < tests.length; i++) if (!tests[j].pass(items[i])) { allpass = false; break top; } using a labeled block with break you can use labels within simple b
locks, but only break statements can make use of non-loop labels.
Tutorials
css building b
locks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
... javascript building b
locks in this module, we continue our coverage of all javascript's key fundamental features, turning our attention to commonly-encountered types of code block such as conditional statements, loops, functions, and events.
Local Storage - Archive of obsolete content
note: we recommend that all exception catch b
locks include some logging at the error or warn levels, and in general you should use logging freely in order to have as much information as possible to fix bugs and know what is going on.
Images, Tables, and Mysterious Gaps - Archive of obsolete content
of course, documents authored in xhtml strict or html strict will trigger the "standards" rendering mode, so we're going to go through two basic ways to address the problem in strict documents, and a number of ways to call on these "fixes." setting images to be b
locks the first choice, and one that will work for most graphically-intense designs, is to convert the image from being an inline element to a block-level element.
No Proxy For configuration - Archive of obsolete content
limitations a domain, including sub-domains domain suffix "mozilla.org" does not block domains that end in the same string (amozilla.org) sub-domains domain suffix, starting with a dot ".mozilla.org" does not block the main domain (mozilla.org) a hostname (without domain) hostname-only (see problems below) "localhost" also b
locks any possible domains that start with the entry ("www.otherdomain.localhost") a hostname (with domain) domain name "www.mozilla.org" does not block hostnames or domains that end in the same string (other-www.mozilla.org) an ip address ip address "1.2.3.4" does not block hostnames that resolve to the ip address ("127.0.0.1" does not block "localhost") a ...
Layout System Overview - Archive of obsolete content
note that lines may contain only inline elements, whereas block may contain both inline elements and other b
locks.other layout models: xul in addition to managing css-defined formatting, the layout system provides a way to integrate other layout schemes into the presentation.
When To Use ifdefs - Archive of obsolete content
"ifdefs", or conditional instructions, are used to build different code what are ifdefs ifdefs are conditional directives to a text preprocessor which mark that certain b
locks of code are used only in certain conditions.
.htaccess ( hypertext access ) - Archive of obsolete content
deny from 146.0.74.205 # b
locks all access from 146.0.74.205 to the directory ssi or server side include : include external files to each file requested by the user without the need to write include statements in the file; you can have them automatically attached to all the files, whether at top or bottom, automatically through your .htaccess file.
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
:maxversion>2.0.0.*</em:maxversion> </description> </em:targetapplication> <!-- describe the sunbird versions we support --> <em:targetapplication> <description> <em:id> {718e30fb-e89b-41dd-9da7-e25a45638b28}</em:id> <em:minversion>0.2</em:minversion> <em:maxversion>0.4.*</em:maxversion> </description> </em:targetapplication> these two b
locks indicate that the extension supports thunderbird versions 1.5 through 2.0.0.x, sunbird versions 0.2 through 0.4.x.
CSS - Archive of obsolete content
-maxthe -ms-scroll-limit-y-max css property is a microsoft extension that specifies the maximum value for the element.scrolltop property.-ms-scroll-limit-y-minthe -ms-scroll-limit-y-min css property is a microsoft extension that specifies the minimum value for the element.scrolltop property.-ms-scroll-railsthe -ms-scroll-rails css property is a microsoft extension that specifies whether scrolling
locks to the primary axis of motion.-ms-scroll-snap-points-xthe -ms-scroll-snap-points-x css property is a microsoft extension that specifies where snap-points will be located along the x-axis.-ms-scroll-snap-points-ythe -ms-scroll-snap-points-y css property is a microsoft extension that specifies where snap-points will be located along the y-axis.-ms-scroll-snap-xthe -ms-scroll-snap-x css shorthand pr...
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
listing 4 - demonstration of server and client context <script runat="server"> function exposed() { return "exposed to the browser"; } function notexposed() { return "can't see me!"; } </script> <script runat="client"> alert( exposed() ); alert( notexposed() ); </script> there are two b
locks of scripts defined, one with runat set to server and the other set to client.
WebVR — Virtual Reality for the Web - Game development
there's also a markup framework called a-frame that offers simple building b
locks for webvr, so you can rapidly build and experiment with vr websites and games: read the building up a basic demo with a-frame tutorial for more details.
Extra lives - Game development
events you have probably noticed the add() and addonce() method calls in the above two code b
locks and wondered how they differ.
Visual-js game engine - Game development
add->new game object (form dialog for define type of new game object ) add->quick code (make your work faster - add usually code b
locks) resources - explorer view for images and audios , you can drag or edit also need to execute node build_resources for creating resources object for engine.
Ajax - MDN Web Docs Glossary: Definitions of Web-related terms
ajax also lets you work asynchronously, meaning your code continues to run while the targeted part of your web page is trying to reload (compared to synchronously, which b
locks your code from running until that part of your page is done reloading).
ICE - MDN Web Docs Glossary: Definitions of Web-related terms
th for connecting the two peers, trying these options in order: direct udp connection (in this case—and only this case—a stun server is used to find the network-facing address of a peer) direct tcp connection, via the http port direct tcp connection, via the https port indirect connection via a relay/turn server (if a direct connection fails, e.g., if one peer is behind a firewall that b
locks nat traversal) learn more general knowledge webrtc, the principal web-related protocol which uses ice webrtc protocols technical reference rfc 5245, the ietf specification for ice rtcicecandidate, the interface representing a ice candidate ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
some of the benefits from writing semantic markup are as follows: search engines will consider its contents as important keywords to influence the page's search rankings (see seo) screen readers can use it as a signpost to help visually impaired users navigate a page finding b
locks of meaningful code is significantly easier than searching though endless divs with or without semantic or namespaced classes suggests to the developer the type of data that will be populated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yourself, "what element(s) best describe/represent the data that i'm going to populate?" for exampl...
Accessible multimedia - Learn web development
next, our rewind and fast forward buttons — add the following b
locks to the bottom of your code: rwdbtn.onclick = function() { player.currenttime -= 3; }; fwdbtn.onclick = function() { player.currenttime += 3; if(player.currenttime >= player.duration || player.paused) { player.pause(); player.currenttime = 0; playpausebtn.textcontent = 'play'; } }; these are very simple, just adding or subtracting 3 seconds to the currenttime each time they ...
Floats - Learn web development
previous overview: css layout next originally for floating images inside b
locks of text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages.
Beginner's guide to media queries - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study css first steps and css building b
locks.) objective: to understand how to use media queries, and the most common approach for using them to create responsive designs.
Responsive design - Learn web development
prerequisites: html basics (study introduction to html), and an idea of how css works (study css first steps and css building b
locks.) objective: to understand the fundamental concepts and history of responsive design.
CSS layout - Learn web development
floats originally for floating images inside b
locks of text, the float property became one of the most commonly used tools for creating multiple column layouts on webpages.
CSS FAQ - Learn web development
use a class-specific style when you want to apply the styling rules to many b
locks and elements within the page, or when you currently only have element to style with that style, but you might want to add more later.
Learn to style HTML using CSS - Learn web development
css building b
locks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
Asynchronous JavaScript - Learn web development
get started prerequisites asynchronous javascript is a fairly advanced topic, and you are advised to work through javascript first steps and javascript building b
locks modules before attempting this.
Introduction to events - Learn web development
previous overview: building b
locks next events are actions or occurrences that happen in the system you are programming, which the system tells you about so you can respond to them in some way if desired.
Looping code - Learn web development
previous overview: building b
locks next programming languages are very useful for rapidly completing repetitive tasks, from multiple basic calculations to just about any other situation where you've got a lot of similar items of work to complete.
Client-side storage - Learn web development
prerequisites: javascript basics (see first steps, building b
locks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data.
Third-party APIs - Learn web development
prerequisites: javascript basics (see first steps, building b
locks, javascript objects), the basics of client-side apis objective: to learn how third-party apis work, and how to use them to enhance your websites.
Video and Audio APIs - Learn web development
prerequisites: javascript basics (see first steps, building b
locks, javascript objects), the basics of client-side apis objective: to learn how to use browser apis to control video and audio playback.
Client-side web APIs - Learn web development
get started prerequisites to get the most out of this module, you should have worked your way through the previous javascript modules in the series (first steps, building b
locks, and javascript objects).
Inheritance in JavaScript - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and building b
locks) and oojs basics (see introduction to objects).
Working with JSON - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and building b
locks) and oojs basics (see introduction to objects).
Object building practice - Learn web development
prerequisites: basic computer literacy, a basic understanding of html and css, familiarity with javascript basics (see first steps and building b
locks) and oojs basics (see introduction to objects).
Learning area release notes - Learn web development
march 2020 you'll now find "test your skills" assessments accompanying the articles in the following modules: css building b
locks javascript first steps javascript building b
locks introducing javascript objects january 2020 the html forms module has been significantly updated: it has been retitled web forms, and moved out of the html topic area to recognise that it covers more than just html form elements — it also covers styling, validation, the basics of how to send data and process it on the server, and more b...
Working with Svelte stores - Learn web development
dd the following reactive block beneath the block that starts with let filter = 'all': $: { if (filter === 'all') $alert = 'browsing all todos' else if (filter === 'active') $alert = 'browsing active todos' else if (filter === 'completed') $alert = 'browsing completed todos' } and finally for now, update the const checkalltodos and const removecompletedtodos b
locks as follows: const checkalltodos = (completed) => { todos = todos.map(t => ({...t, completed})) $alert = `${completed ?
Introduction to automated testing - Learn web development
in the next screen, type in the url of a page you want to test (use http://mdn.github.io/learning-area/javascript/building-b
locks/events/show-video-box-fixed.html, for example), then choose a browser/os combination you want to test by using the different buttons and lists.
Accessibility Features in Firefox
in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadb
locks in moving to firefox from internet explorer for screen reader users.
CSUN Firefox Materials
in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadb
locks in moving to firefox from internet explorer for screen reader users.
Embedding API for Accessibility
urn it off everywhere: user_pref("capability.policy.default.windowinternal.open","noaccess"); // override popping up new windows on target=anything user_pref("browser.block.target_new_window", true); // override popup windows at beginning of new page load (b
locks most popup advertisements) user_pref("dom.disable_open_during_load", true); moz 0.8 client side redirects setboolpref("browser.accept.redirects", acceptredirects); no content refreshes setboolpref("browser.accept.refreshes", acceptref...
Mozilla’s UAAG evaluation report
site1.com http://www.popupsite2.com"); user_pref("capability.policy.popupsites.windowinternal.open", "noaccess"); or turn it off everywhere: user_pref("capability.policy.default.windowinternal.open", "noaccess"); override popping up new windows on target=anything: user_pref("browser.target_new_blocked", true); override popup windows at beginning of new page load (b
locks most popup advertisements): user_pref("dom.disable_open_during_load", true); 5.4 selection and focus in viewport.
Accessibility and Mozilla
in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadb
locks in moving to firefox from internet explorer for screen reader users.
What to do and what not to do in Bugzilla
blocker b
locks development and/or testing work critical crashes, loss of data, severe memory leak major major loss of function normal regular issue, some loss of functionality under specific circumstances minor minor loss of function, or other problem where easy workaround is present trivial cosmetic problem like misspelled words or misaligned text ...
pymake
unlike gmake on windows, pymake is capable of doing parallel builds, so you can set a moz_make_flags=-jn in your .mozconfig without risk of dead
locks.
The Firefox codebase: CSS Guidelines
for new css, when possible try to privilege using the shared directory, instead of writing the same css for the 3 platform specific directories, especially for large b
locks of css.
Index
170 storage access policy: block cookies from trackers privacy, storage access policy, tracking protection firefox includes a new storage access policy that b
locks cookies and other site data from third-party tracking resources.
IPDL Tutorial
we call this synchronous semantics, as the sender b
locks until the receiver receives the message and sends back a reply.
Introduction to Layout in Mozilla
(tables, b
locks, xul boxes) reflow “global” reflows initial, resize, style-change processed immediately via presshell method incremental reflows targeted at a specific frame dirty, content-changed, style-changed, user-defined nshtmlreflowcommand object encapsulates info queued and processed asynchronously, nsipressshell::appendreflowcommand, processref...
Application Translation with Mercurial
gray parts indicate b
locks of texts which can't be found in that file, dark yellow represents changed lines and light yellow the parts of text in it which is different.
MathML3Testsuite
characters b
locks symbols variants entitynames numericrefs utf8 general clipboard genattribs math presentation css dynamicexpressions generallayout scriptsandlimits tablesandmatrices tokenelements topics accents bidi elementarymathexamples embellishedop largeop linebreak nesting stretchychars whitespace torturetests errorhandling original document information author(s): frédéric wang othe...
Mozilla Port Blocking
by default, mozilla now b
locks access to specific ports which are used by vulnerable services in order to prevent security vulnerabilites due to "cross-protocol scripting".
Mozilla Quirks Mode Behavior
maybe (firefox 3) when computing the minimum intrinsic width of an inline flow directly in a table cell (no b
locks in between), it is assumed that it is not possible to break before and after an image (when otherwise it would be).
Mozilla Style System Documentation
in mozilla, nscssdeclaration objects correspond to css declaration-b
locks.) due to the high similarity of these lists between elements in the content tree, mozilla stores the output of the selector matching process in a lexicographic tree, the rule tree.
mozilla::MutexAutoLock
this is because mutexautoun
locks can be nested within mutexauto
locks and vice versa, indefinitely deeply.
mozilla::MutexAutoUnlock
this is because mutexautoun
locks can be nested within mutexauto
locks and vice versa, indefinitely deeply.
Investigating leaks using DMD heap scan mode
firefox’s dmd heap scan mode tracks the set of all live b
locks of malloc-allocated memory and their allocation stacks, and allows you to log these b
locks, and the values stored in them, to a file.
Memory reporting
traversal-based reporters traverse one or more data structures and measure the size of all the allocated b
locks in the data structure.
Profiling with the Firefox Profiler
the change in stack height is useful to find patterns like long blocking calls (long flatlines) or very tall spiky b
locks (recursive calls and js).
TraceMalloc
because this log includes the contents of heap b
locks, leaksoup can analyze the graph of live objects and determine which allocations are roots (within that graph, of course -- stack allocations and global variables don't count).
Monitors
for an introduction to nspr thread synchronization, including
locks and condition variables, see introduction to nspr.
PRLinger
that is, if any data remains in the socket send buffer, pr_close b
locks until either all the data is sent and acknowledged by the peer or the interval specified by linger expires.
PRThreadType
syntax #include <prthread.h> typedef enum prthreadtype { pr_user_thread, pr_system_thread } prthreadtype; enumerators pr_user_thread pr_cleanup b
locks until the last thread of type pr_user_thread terminates.
RTCRtpStreamStats - Web APIs
slicount the number of times the receiver notified the sender that one or more consecutive (in scan order) encoded video macrob
locks have been lost or corrupted; this notification is sent by the receiver to the sender using a slice loss indication (sli) packet.
Reporting API - Web APIs
occurrence of user-agent interventions (when the browser b
locks something your code is trying to do because it is deemed a security risk for example, or just plain annoying, like auto-playing audio).
ResizeObserverEntry.target - Web APIs
const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { entry.target.style.borderradius = math.min(100, (entry.contentboxsize.inlinesize/10) + (entry.contentboxsize.b
locksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observerthe definition of 'target' in that sp...
Resize Observer API - Web APIs
the code will usually follow this kind of pattern (taken from resize-observer-border-radius.html): const resizeobserver = new resizeobserver(entries => { for (let entry of entries) { if(entry.contentboxsize) { entry.target.style.borderradius = math.min(100, (entry.contentboxsize.inlinesize/10) + (entry.contentboxsize.b
locksize/10)) + 'px'; } else { entry.target.style.borderradius = math.min(100, (entry.contentrect.width/10) + (entry.contentrect.height/10)) + 'px'; } } }); resizeobserver.observe(document.queryselector('div')); specifications specification status comment resize observer editor's draft initial definit...
Sensor - Web APIs
if a feature policy b
locks use of a feature it is because your code is inconsistent with the policies set on your server.
Sensor APIs - Web APIs
if a feature policy b
locks use of a feature it is because your code is inconsistent with the policies set on your server.
Using the Storage Access API - Web APIs
accessing a user's cookies in an embedded cross-origin iframe in this example we show how an embedded cross-origin <iframe> can access a user’s cookies under a storage access policy that b
locks third-party cookies.
Using readable streams - Web APIs
this is done using the readablestream.getreader() method: // fetch the original image fetch('./tortoise.png') // retrieve its body as readablestream .then(response => response.body) .then(body => { const reader = body.getreader(); invoking this method creates a reader and
locks it to the stream — no other reader may read this stream until this reader is released, e.g.
Basic concepts behind Web Audio API - Web APIs
audio data: what's in a sample when an audio signal is processed, sampling means the conversion of a continuous signal to a discrete signal; or put another way, a continuous sound wave, such as a band playing live, is converted to a sequence of samples (a discrete-time signal) that allow a computer to handle the audio in distinct b
locks.
Background audio processing using AudioWorklet - Web APIs
creating an audio processor worklet node to create an audio node that pumps b
locks of audio data through an audioworkletprocessor, you need to follow these simple steps: load and install the audio processor module create an audioworkletnode, specifying the audio processor module to use by its name connect inputs to the audioworkletnode and its outputs to appropriate destinations (either other nodes or to the audiocontext object's destination property.
WorkerNavigator - Web APIs
workernavigator.
locks read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
WritableStream.getWriter() - Web APIs
the getwriter() method of the writablestream interface returns a new instance of writablestreamdefaultwriter and
locks the stream to that instance.
WritableStream - Web APIs
writablestream.getwriter() returns a new instance of writablestreamdefaultwriter and
locks the stream to that instance.
WritableStreamDefaultWriter - Web APIs
the writablestreamdefaultwriter interface of the the streams api is the object returned by writablestream.getwriter() and once created
locks the writer to the writablestream ensuring that no other streams can write to the underlying sink.
Web APIs
deotrack videotracklist visualviewport w webgl_color_buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context wakelock wake
locksentinel waveshapernode webgl2renderingcontext webglactiveinfo webglbuffer webglcontextevent webglframebuffer webglprogram webglquery webglrenderbuffer webglrenderingcontext webglsampler webglshader webglshaderprecisionformat webglsync webgltexture webgltransformfeedback webgluniformlocation webglvertexarrayobject webkitcssmatrix websocket wheelevent window windowclient windoweventhandler...
ARIA: timer role - Accessibility
examples some prominent web timers include c
locks, stop watches and countdowns, such as ticketing websites, e-commerce sites, and event countdowns (see https://countingdownto.com/).
Operable - Accessibility
success criteria how to conform to the criteria practical resource 2.4.1 bypass b
locks (a) a mechanism should be provided that allows the user to skip straight to the main content or functionality available on the page, past the repeated features (such as the company logo or navigation).
CSS: Cascading Style Sheets
css building b
locks this module carries on where css first steps left off — now you've gained familiarity with the language and its syntax, and got some basic experience with using it, its time to dive a bit deeper.
User input and controls - Developer guides
locking the screen orientation is made possible by invoking the screen.lockorientation method, while the screen.unlockorientation method removes all the previous screen
locks that have been set.
<p>: The Paragraph element - HTML: Hypertext Markup Language
paragraphs are usually represented in visual media as b
locks of text separated from adjacent b
locks by blank lines and/or first-line indentation, but html paragraphs can be any structural grouping of related content, such as images or form fields.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
when a table is presented in a screen context (such as a window) which is not large enough to display the entire table, the user agent may let the user scroll the contents of the <thead>, <tbody>, <tfoot>, and <caption> b
locks separately from one another for the same parent table.
Using Feature Policy - HTTP
for example, this b
locks the <iframe> from using the camera and microphone: <iframe allow="camera 'none'; microphone 'none'"> inheritance of policy for embedded content scripts inherit the policy of their browsing context, regardless of their origin.
CSP: script-src - HTTP
content-security-policy: script-src 'unsafe-inline'; the above content security policy will allow inline <script> elements <script> var inline = 1; </script> you can use a nonce-source to only allow specific inline script b
locks: content-security-policy: script-src 'nonce-2726c7f26c' you will have to set the same nonce on the <script> element: <script nonce="2726c7f26c"> var inline = 1; </script> alternatively, you can create hashes from your inline scripts.
CSP: style-src - HTTP
content-security-policy: style-src 'unsafe-inline'; the above content security policy will allow inline styles like the <style> element, and the style attribute on any element: <style> #inline-style { background: red; } </style> <div style="display:none">foo</div> you can use a nonce-source to only allow specific inline style b
locks: content-security-policy: style-src 'nonce-2726c7f26c' you will have to set the same nonce on the <style> element: <style nonce="2726c7f26c"> #inline-style { background: red; } </style> alternatively, you can create hashes from your inline styles.
Cross-Origin-Resource-Policy - HTTP
the http cross-origin-resource-policy response header conveys a desire that the browser b
locks no-cors cross-origin/cross-site requests to the given resource.
X-Content-Type-Options - HTTP
header type response header forbidden header name no syntax x-content-type-options: nosniff directives nosniff b
locks a request if the request destination is of type: "style" and the mime type is not text/css, or "script" and the mime type is not a javascript mime type enables cross-origin read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension: */*+json text/xml, application/xml or any other type with an xm...
HTTP Index - HTTP
111 cross-origin-resource-policy http, http header, reference, response header, header the http cross-origin-resource-policy response header conveys a desire that the browser b
locks no-cors cross-origin/cross-site requests to the given resource.
Proxy Auto-Configuration (PAC) file - HTTP
return value format the javascript function returns a single string if the string is null, no proxies should be used the string can contain any number of the following building b
locks, separated by a semicolon: direct connections should be made directly, without any proxies proxy host:port the specified proxy should be used socks host:port the specified socks server should be used recent versions of firefox support as well: http host:port the specified proxy should be used https host:port the specified https proxy should be used socks4 host:port socks5 host:...
Array.prototype.reduce() - JavaScript
=> { resolve(a * 2) }) } // function 3 - will be wrapped in a resolved promise by .then() function f3(a) { return a * 3 } // promise function 4 function p4(a) { return new promise((resolve, reject) => { resolve(a * 4) }) } const promisearr = [p1, p2, f3, p4] runpromiseinsequence(promisearr, 10) .then(console.log) // 1200 function composition enabling piping // building-b
locks to use for composition const double = x => x + x const triple = x => 3 * x const quadruple = x => 4 * x // function composition enabling pipe functionality const pipe = (...functions) => input => functions.reduce( (acc, fn) => fn(acc), input ) // composed functions for multiplication of specific values const multiply6 = pipe(double, triple) const multiply9 = pipe(triple, triple) const m...
Atomics - JavaScript
atomics.islockfree(size) an optimization primitive that can be used to determine whether to use
locks or atomic operations.
for - JavaScript
for (let i = 0;; i++) { console.log(i); if (i > 3) break; // more statements } you can also omit all three b
locks.
let - JavaScript
examples scoping rules variables declared by let have their scope in the block for which they are defined, as well as in any contained sub-b
locks.
with - JavaScript
where performance is important, 'with' should only be used to encompass code b
locks that access members of the specified object.