Search completed in 1.31 seconds.
217 results for "102":
Your results are loading. Please wait...
nss tech note2
lt in debug builds. For optimized builds, NSS must be built with the variable DEBUG_PKCS11 set. Modes of Operation The logger has several modes of operation: 1. Only display the sequence of PKCS #11 calls. To enable this mode, set: NSPR_LOG_MODULES=nss_mod_log:1 NSPR_LOG_FILE=<logfile> The output format is: OSThreadID[NSPRThreadID]: C_XXX OSThreadID[NSPRThreadID]: rv = 0xYYYYYYYY For example, 1024[805ef10]: C_Initialize 1024[805ef10]: rv = 0x0 1024[805ef10]: C_GetInfo 1024[805ef10]: rv = 0x0 1024[805ef10]: C_GetSlotList 1024[805ef10]: rv = 0x0 2. Display the sequence of PKCS #11 calls, and the parameters given to them. To enable this mode, set: NSPR_LOG_MODULES=nss_mod_log:3 NSPR_LOG_FILE=<logfile> The output format is: OSThreadID[NSPRThreadID]: C_XXX OSThreadID[NSPRThreadID]: a...
...tList 1024[805ef10]: rv = 0x0 2. Display the sequence of PKCS #11 calls, and the parameters given to them. To enable this mode, set: NSPR_LOG_MODULES=nss_mod_log:3 NSPR_LOG_FILE=<logfile> The output format is: OSThreadID[NSPRThreadID]: C_XXX OSThreadID[NSPRThreadID]: arg1 = 0xAAAAAAAA ... ...
...0x0 2. Display the sequence of PKCS #11 calls, and the parameters given to them. To enable this mode, set: NSPR_LOG_MODULES=nss_mod_log:3 NSPR_LOG_FILE=<logfile> The output format is: OSThreadID[NSPRThreadID]: C_XXX OSThreadID[NSPRThreadID]: arg1 = 0xAAAAAAAA ... ...
...And 18 more matches
Index - Web APIs
Web › API › Index
g return Attr types. 100 Attr.localName API, DOM, Property, Reference The Attr.localName read-only property returns the local part of the qualified name of an element. 101 Attr.namespaceURI API, DOM, Property, Reference The Attr.namespaceURI read-only property returns the namespace URI of the attribute, or null if the element is not in a namespace. 102 Attr.prefix API, DOM, Property, Reference The Attr.prefix read-only property returns the namespace prefix of the specified attribute, or null if no prefix is specified. 103 AudioBuffer API, AudioBuffer, Interface, Reference, Web Audio API The AudioBuffer interface represents a short audio asset residing in memory, created from an audio file using the AudioContex...
...ransitionEvent, Web, transitionrun The transitionrun event is fired when a CSS transition is first created, i.e. before any transition-delay has begun. 1019 Document: transitionstart event DOM, Document, Event, Reference, Web, transitionstart The transitionstart event is fired when a CSS transition has actually started, i.e., after any transition-delay has ended. ...
...ce, Web, transitionstart The transitionstart event is fired when a CSS transition has actually started, i.e., after any transition-delay has ended. 1020 Document: visibilitychange API, Event, Reference, Visibility, Web, events, visibilitychange The visibilitychange event is fired at the document when the content of its tab have become visible or have been hidden. 1021 Document: wheel event API, Document, Reference, events, wheel The wheel event fires when the user rotates a wheel button on a pointing device (typically a mouse). ...
...And 14 more matches
Index
Mozilla › Tech › XPCOM › Index
Deprecated, Guide, NeedsMarkupWork, XPCOM This guide is about Gecko, and about creating XPCOM components for Gecko-based applications. 101 An Overview of XPCOM XPCOM This is a book about XPCOM. The book is presented as a tutorial about creating XPCOM components, but it covers all major aspects, concepts, and terminology of the XPCOM component model along the way. 102 Building the WebLock UI XPCOM Up until now, we've been building a component that can be installed in any Gecko application. The XPCOM interfaces and tools you've used have been general, cross-platform, and available in the Gecko Runtime Environment or in any Gecko-based application after Mozilla 1.2 (when the GRE began to be used). 103 Component Internals Obsolete, XP...
...criptable, Profiles, Toolkit, XPCOM Interface Reference Creates a new profile. 1018 nsITraceableChannel HTTP, Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference The typical way to use this interface is as follows: 1019 nsITransaction Interfaces, Interfaces:Scriptable, XPCOM, XPCOM Interface Reference Executes the transaction. ...
... Executes the transaction. 1020 nsITransactionList Interfaces, Interfaces:Scriptable, NeedsHelp, XPCOM, XPCOM Interface Reference Returns the list of children associated with the item at aIndex. Implementations may return null if there are no children, or an empty list. The list returned is AddRef'd so it is up to the caller to Release the transaction when it is done. 1021 nsITransactionListener Interfaces, Interfaces:Scriptable, NeedsContent, XPCOM Interface Reference Called after a nsITransactionManager begins a batch. 1022 nsITransactionManager Interfaces, Interfaces:Scriptable, XPCOM, XPCOM API Reference, XPCOM Interface Reference Adds a listener to the transaction manager's notification list. Listeners are notified whenever ...
...And 7 more matches
Index - Archive of obsolete content
98 places/history Access the user's browsing history. 99 platform/xpcom Implement XPCOM objects, factories, and services. 100 preferences/event-target Add-on SDK Listen to changes to the Preferences system in Firefox. 101 preferences/service Add-on SDK, Jetpack, SDK Access the Preferences system in Firefox. 102 remote/child Module, Reference, SDK Enables an SDK module loaded into a child process to access web content in the child process and communicate with modules in the main process. 103 remote/parent Reference, SDK Enables you to load modules, and privileged parts of your add-on in general, into child processes. 104 stylesheet/style Modify sty...
... iterations is greater than 2 all times are displayed in [], faster time is displayed in the output column, and the 95% confidence interval is calculated. The 95% confidence interval is the calculated percentage of the mean value to fall within 95% of the measured results. For example if the mean is 100 and the 95% confidence interval is 2%, 95% of the expected values should fall between 98 and 102. To compare two vms against each other export AVM2=<path to 2nd vm> or use --avm2=<path to 2nd vm>. The percentage difference is calculated between the two vms. See the --help usage for more details about performance tests. 657 Cmdline tests The cmdline testsuite is located in test/cmdline. The testsuite allows more flexibility by coding scripts in python allowing any ex...
...t XUL Attributes, XUL Reference No summary! 1015 popup.position XUL Attributes, XUL Reference No summary! 1016 popup.top XUL Attributes, XUL Reference No summary! 1017 popupalign No summary! 1018 popupanchor No summary! 1019 position XUL Attributes, XUL Reference No summary! ...
...And 6 more matches
Index - Archive of obsolete content
Archive › Mozilla › XUL › Index
tribute, XUL Reference No summary! 97 disableclose XUL Attributes, XUL Reference No summary! 98 disabled XUL Attributes, XUL Reference No summary! 99 disablefastfind XUL, XUL Attribute, XUL Reference No summary! 100 disableglobalhistory No summary! 101 disablehistory No summary! 102 disablesecurity XUL Attributes, XUL Reference No summary! 103 dlgtype XUL Attributes, XUL Reference No summary! 104 dragging XUL Attributes, XUL Reference No summary! 105 drawintitlebar No summary! 106 droppedLinkHandler XUL Attributes, XUL Reference No summary! 107 editable XUL Attri...
... is an operation which may be invoked. 1018 Content Panels Tutorials, XUL, XUL_Tutorial In this section, we'll look at how to add panels that can display HTML pages or other XUL files. 1019 Creating Dialogs Tutorials, XUL, XUL_Tutorial A XUL application will often require dialogs to be displayed. This section describes how one might construct them. ...
... or other XUL files. 1019 Creating Dialogs Tutorials, XUL, XUL_Tutorial A XUL application will often require dialogs to be displayed. This section describes how one might construct them. 1020 Creating a Skin Tutorials, XUL, XUL_Tutorial This section describes how to create a simple skin. For simplicity, we'll only apply it to the find files dialog. 1021 Creating a Window Tutorials, XUL, XUL_Tutorial We're going to be creating a simple find files utility throughout this tutorial. ...
...And 6 more matches
Localization and Plurals
2 is 3-10 or 13-19: 3, 4, 5, 6, 7, 8, 9, 10, 13, 14, 15, 16, 17, 18, 19 everything else: 0, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, ... Plural rule #5 (3 forms) Families: Romanic (Romanian) is 1: 1 is 0 or ends in 01-19, excluding 1: 0, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 101, 102, 103, 104, 105, 106, 107, 108, 109, 110, 111, 112, 113, 114, 115, 116, 117, 118, 119, 201, 202, 203, 204, 205, 206, 207, 208, 209, 210, 211, 212, ... everything else: 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, 54, 55, 56, 57, 58, 59, 60, 61, 62, 63, 64, 65, 66, 67, 68, 69, ... Plural rule #6 (3 forms) ...
... 63, 64, 65, 66, 67, 68, 69, 72, 73, ... Plural rule #7 (3 forms) Families: Belarusian, Russian, Ukrainian ends in 1, excluding 11: 1, 21, 31, 41, 51, 61, 71, 81, 91, 101, 121, 131, 141, 151, 161, 171, 181, 191, 201, 221, 231, 241, 251, 261, 271, 281, 291, ... ends in 2-4, excluding 12-14: 2, 3, 4, 22, 23, 24, 32, 33, 34, 42, 43, 44, 52, 53, 54, 62, 63, 64, 72, 73, 74, 82, 83, 84, 92, 93, 94, 102, 103, 104, 122, 123, 124, 132, 133, 134, 142, 143, 144, 152, 153, 154, 162, 163, 164, 172, 173, 174, 182, 183, ... everything else: 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 25, 26, 27, 28, 29, 30, 35, 36, 37, 38, 39, 40, 45, 46, 47, 48, 49, 50, 55, 56, 57, 58, 59, 60, 65, 66, 67, 68, 69, 70, 75, 76, 77, ..., 112, 113, ..., 212, 213, ... Plural rule #8 (3 forms) Families: S...
...se: 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51, 52, 53, ... Plural rule #9 (3 forms) Families: Slavic (Polish) is 1: 1 ends in 2-4, excluding 12-14: 2, 3, 4, 22, 23, 24, 32, 33, 34, 42, 43, 44, 52, 53, 54, 62, 63, 64, 72, 73, 74, 82, 83, 84, 92, 93, 94, 102, 103, 104, 122, 123, 124, 132, 133, 134, 142, 143, 144, 152, 153, 154, 162, 163, 164, 172, 173, 174, 182, 183, ... everything else: 0, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 25, 26, 27, 28, 29, 30, 31, 35, 36, 37, 38, 39, 40, 41, 45, 46, 47, 48, 49, 50, 51, 55, 56, 57, 58, 59, 60, 61, 65, 66, 67, 68, ... Plural rule #10 (4 forms) Families: Slavic (Slovenian, Sorbian) e...
...And 5 more matches
sslfnc.html
If zero, the cipher is disabled. ...
...If zero, the cipher is disabled. Returns The function returns...
...2 and 12 SSL3/TLS cipher suites are enabled. However, this does not necessarily mean that they are all permitted. The SSL_CipherPrefSetDefault function cannot override cipher suite policy settings that are not permitted; see SSL Export Policy Functions for details. Your application must call one of the export policy functions before it can perform any cryptographic operations. The TLS_RSA_EXPORT1024_WITH_DES_CBC_SHA and TLS_RSA_EXPORT1024_WITH_RC4_56_SHA cipher suites are defined in RFC 2246. They work with both SSL3 and TLS. They use symmetric ciphers with an effective key size of 56 bits. The so-called 56-bit export browsers and servers use these cipher suites. The cipher suite numbers for the SSL_RSA_FIPS_WITH_3DES_EDE_CBC_SHA and SSL_RSA_FIPS_WITH_DES_CBC_SHA cipher suites have been c...
...And 4 more matches
SubtleCrypto.unwrapKey() - Web APIs
Bytes = [180,253,62,216,47,35,90,55,218,233,103,10,172,143,161,177]; /* IV that is to be used in decrypting the key to unwrap. This must the the same IV that was originally used to encrypt the key. */ const ivBytes = [212,187,26,247,172,51,37,151,27,177,249,142]; /* The wrapped key itself. ...
... /* IV that is to be used in decrypting the key to unwrap. This must the the same IV that was originally used to encrypt the key. */ const ivBytes = [212,187,26,247,172,51,37,151,27,177,249,142]; /* The wrapped key itself. ...
...0,244,152,214,150,83,2,138,128,11,251,227,213,72,100,158,10,162,40,195, 60,248,77,37,156,34,10,213,171,67,147,73,231,31,63,80,176,103,206,187,164, 214,250,49,223,185,5,48,241,17,1,253,59,185,181,209,255,42,223,175,90,159, 174,169,205,156,120,195,1,135,165,226,46,119,27,97,183,23,197,227,85,138, 235,79,158,167,59,62,194,34,210,214,240,215,101,233,63,138,53,87,253,189, 27,66,150,76,242,76,102,174,179,163,184,205,11,161,224,19,110,34,175,192, 101,117,169,86,66,56,241,128,13,156,165,125,139,110,138,50,108,129,251,137, 26,186,110,117,113,207,179,59,213,18,175,14,203,192,2,97,131,125,167,227, 182,87,72,123,54,156,60,195,88,224,96,46,126,245,251,247,147,110,147,173, 82,106,93,210,55,71,127,133,41,37,181,17,106,16,158,220,136,43,75,133,96, 240,151,116,40,44,254,2,32,74,226,193,172...
...And 4 more matches
Drawing graphics - Learn web development
track of the position the sprite is to be drawn on the screen, and the sprite number we want to display. let sprite = 0; let posX = 0; Let's explain the spritesheet image (which we have respectfully borrowed from Mike Thomas' Create a sprite sheet walk cycle using CSS animation). The image looks like this: It contains six sprites that make up the whole walking sequence -- each one is 102 pixels wide and 148 pixels high. To display each sprite cleanly we will have to use drawImage() to chop out a single sprite image from the spritesheet and display only that part, like we did above with the Firefox logo. The X coordinate of the slice will have to be a multiple of 102, and the Y coordinate will always be 0. The slice size will always be 102 by 148 pixels. Now let's insert an ...
...the canvas to prepare for drawing each frame. Notice that we have to specify the top-left corner of the rectangle as -(width/2), -(height/2) because we specified the origin position as width/2, height/2 earlier on. ctx.fillRect(-(width/2), -(height/2), width, height); Next, we'll draw our image using drawImage -- the 9-parameter version. ...
...s to prepare for drawing each frame. Notice that we have to specify the top-left corner of the rectangle as -(width/2), -(height/2) because we specified the origin position as width/2, height/2 earlier on. ctx.fillRect(-(width/2), -(height/2), width, height); Next, we'll draw our image using drawImage -- the 9-parameter version. ...
...And 3 more matches
How to embed the JavaScript engine
CROS // #include <stdint.h> #include "jsapi.h" /* The class of the global object. */ static JSClass global_class = { "global", JSCLASS_GLOBAL_FLAGS, JS_PropertyStub, JS_DeletePropertyStub, JS_PropertyStub, JS_StrictPropertyStub, JS_EnumerateStub, JS_ResolveStub, JS_ConvertStub, }; int main(int argc, const char *argv[]) { JSRuntime *rt = JS_NewRuntime(8L * 1024 * 1024, JS_USE_HELPER_THREADS); if (!rt) return 1; JSContext *cx = JS_NewContext(rt, 8192); if (!cx) return 1; { // Scope for our various stack objects (JSAutoRequest, RootedObject), so they all go // out of scope before we JS_DestroyContext. JSAutoRequest ar(cx); // In practice, you would want to exit this any // time yo...
... JSAutoRequest ar(cx); // In practice, you would want to exit this any // time yo...
... JSAutoRequest ar(cx); // In practice, you would want to exit this any // time you're sp...
...And 3 more matches
Key Values - Web APIs
an exit, cancel, or "escape this operation" button. Historically, the Escape character was used to signal the start of a special control sequence of characters called an "escape sequence." VK_ESCAPE (0x1B) kVK_Escape (0x35) GDK_KEY_Escape (0xFF1B) Qt::Key_Escape (0x01000000) KEYCODE_ESCAPE (111) "Execute" The Execute key. VK_EXECUTE (0x2B) Qt::Key_Execute (0x01020003) "Find" The Find key. Opens an interface (typically a dialog box) for performing a find/search operation. APPCOMMAND_FIND GDK_KEY_Find (0xFF68) "Finish" [5] The Finish key. VK_OEM_FINISH (0xF1) "Help" The Help key. Opens or toggles the display of help information. VK_HELP (0x2F) APPCOMMAND_HELP kVK_Help (0x72) G...
...GDK_KEY_Break (0xFF6B) Qt::Key_Pause (0x01000008) KEYCODE_BREAK (121) "Play" The Play key. Resumes a previously paused application, if applicable. Note: This shouldn't be confused with the "MediaPlay" key value, which is used for media controllers, rather than to control applications and processes. VK_PLAY (0xFA) GDK_KEY_3270_Play (0xFD16) Qt::Key_Play (0x01020005) "Props" The Props (Properties) key. "Select" The Select key. VK_SELECT (0x29) GDK_KEY_Select (0xFF60) KEYCODE_BUTTON_SELECT (109) "ZoomIn" [6] The ZoomIn key. GDK_KEY_ZoomIn (0x1008FF8B) Qt::Key_ZoomIn (0x010000F6) KEYCODE_ZOOM_IN (168) "ZoomOut" [6] The ZoomOut key. GDK_KEY_ZoomOut ...
... "Standby" [1] The Standby key. (Also known as Suspend or Sleep.) This turns off the display and puts the computer in a low power consumption mode, without completely powering off. VK_SLEEP (0x5F) GDK_KEY_Standby (0x1008FF10) GDK_KEY_Suspend (0x1008FFA7) GDK_KEY_Sleep (0x1008FF2F) Qt::Key_Standby (0x01000093) Qt::Key_Suspend (0x0100010C) Qt::Key_Sleep (0x01020004) KEYCODE_SLEEP (223) "WakeUp" [2] The WakeUp key. Used to wake the computer from the hibernation or standby modes. GDK_KEY_WakeUp (0x1008FF2B) Qt::Key_WakeUp (0x010000B8) KEYCODE_WAKEUP (224) [1] The Standby key is not supported by Internet Explorer (tested on release 9 and 11) and Firefox 36 and earlier, so it is reported as "Unidentified". [2] Prior ...
...And 3 more matches
SharedArrayBuffer - JavaScript
ases, the SharedArrayBuffer object is transmitted to the receiver resulting in a new, private SharedArrayBuffer object in the receiving agent (just as for ArrayBuffer). However, the shared data block referenced by the two SharedArrayBuffer objects is the same data block, and a side effect to the block in one agent will eventually become visible in the other agent. var sab = new SharedArrayBuffer(1024); worker.postMessage(sab); Updating and synchronizing shared memory with atomic operations Shared memory can be created and updated simultaneously in workers or the main thread. Depending on the system (the CPU, the OS, the Browser) it can take a while until the change is propagated to all contexts. To synchronize, atomic operations are needed. APIs which use SharedArrayBuffer objects Web...
... // Do something else } See also Planned changes to shared memory which is starting to roll out to browsers (Firefox 79, for example.) Always use the new operator to create a SharedArrayBuffer SharedArrayBuffer constructors are required to be constructed with a new operator. Calling a SharedArrayBuffer constructor as a function without new will throw a TypeError. var sab = SharedArrayBuffer(1024); // TypeError: calling a builtin SharedArrayBuffer constructor // without new is forbidden var sab = new SharedArrayBuffer(1024); Constructor SharedArrayBuffer() Creates a new SharedArrayBuffer object. Instance properties SharedArrayBuffer.prototype.byteLength The size, in bytes, of the array. This is established when the array is constructed and cannot be changed. Read only. Inst...
...nstance methods SharedArrayBuffer.prototype.slice(begin, end) Returns a new SharedArrayBuffer whose contents are a copy of this SharedArrayBuffer's bytes from begin, inclusive, up to end, exclusive. If either begin or end is negative, it refers to an index from the end of the array, as opposed to from the beginning. ...
...And 2 more matches
reftest opportunities files - Archive of obsolete content
nunit http://dbaron.org/css/test/implied http://dbaron.org/css/test/formelem http://dbaron.org/css/test/sec010303 http://dbaron.org/css/test/sec0302 http://dbaron.org/css/test/sec0302_xml http://dbaron.org/css/test/parsing http://dbaron.org/css/test/parsing2 http://dbaron.org/css/test/parsing4 http://dbaron.org/css/test/parsing5 http://dbaron.org/css/test/parsing6 http://dbaron.org/css/test/sec040102 http://dbaron.org/css/test/casesens http://dbaron.org/css/test/xmltypesel http://dbaron.org/css/test/unitless http://dbaron.org/css/test/exunit http://dbaron.org/css/test/emunit http://dbaron.org/css/test/sec040310 http://dbaron.org/css/test/parsing3 http://dbaron.org/css/test/selector_confusion http://dbaron.org/css/test/univsel http://dbaron.org/css/test/childsel http://dbaron.org/css/test/sibs...
...ss1 http://dbaron.org/css/test/noncss2 http://dbaron.org/css/test/shortbox http://dbaron.org/css/test/shortbox2 http://dbaron.org/css/test/rootbox http://dbaron.org/css/test/listbox http://dbaron.org/css/test/margtest http://dbaron.org/css/test/shortborder http://dbaron.org/css/test/shortborder2 http://dbaron.org/css/test/sec0805 http://dbaron.org/css/test/dborder http://dbaron.org/css/test/sec090102 http://dbaron.org/css/test/sec090201 http://dbaron.org/css/test/sec090203 http://dbaron.org/css/test/sec090204 http://dbaron.org/css/test/sec090205 http://dbaron.org/css/test/sec090301 http://dbaron.org/css/test/sec090302a http://dbaron.org/css/test/sec090302b http://dbaron.org/css/test/sec090302c http://dbaron.org/css/test/sec090302d http://dbaron.org/css/test/sec0905 http://dbaron.org/css/test/...
...http://dbaron.org/css/test/sec100604 http://dbaron.org/css/test/sec1007 http://dbaron.org/css/test/sec1007b http://dbaron.org/css/test/abspos_inherit http://dbaron.org/css/test/linebox1 http://dbaron.org/css/test/linebox2 http://dbaron.org/css/test/linebox3 http://dbaron.org/css/test/linebox4 http://dbaron.org/css/test/inlinetest http://dbaron.org/css/test/sec1101 http://dbaron.org/css/test/sec110102 http://dbaron.org/css/test/sec110102b http://dbaron.org/css/test/sec1102a http://dbaron.org/css/test/sec1102b http://dbaron.org/css/test/sec1201 http://dbaron.org/css/test/sec1202 http://dbaron.org/css/test/sec140201image http://dbaron.org/css/test/sec150203c http://dbaron.org/css/test/sec150203d http://dbaron.org/css/test/shadow http://dbaron.org/css/test/sec1702 http://dbaron.org/css/test/sec17...
...ml parser/htmlparser/tests/html/184029.html parser/htmlparser/tests/html/183711.html parser/htmlparser/tests/html/18308.html parser/htmlparser/tests/html/17003.html parser/htmlparser/tests/html/15204.html parser/htmlparser/tests/html/149877.html parser/htmlparser/tests/html/142965_1.html parser/htmlparser/tests/html/142965.html parser/htmlparser/tests/html/124788.html parser/htmlparser/tests/html/102370.html parser/htmlparser/tests/html/100466.html parser/htmlparser/tests/html/100397.html layout/mathml/tests/test.html layout/mathml/tests/symbol.html ...
NSS 3.16.3 release notes
changes as listed below, and fixes an issue with a recently added utility function. New Functions in cert.h CERT_GetGeneralNameTypeFromString - An utlity function to lookup a value of type CERTGeneralNameType given a human readable string. This function was already added in NSS 3.16.2, however, it wasn't declared in a public header file. ...
... CN = QuoVadis Root CA 3 G3 SHA1 Fingerprint: 48:12:BD:92:3C:A8:C4:39:06:E7:30:6D:27:96:E6:A4:CF:22:2E:7D The Trust Bits were changed for the following CA certificates OU = Class 3 Public Primary Certification Authority SHA1 Fingerprint: A1:DB:63:93:91:6F:17:E4:18:55:09:40:04:15:C7:02:40:B0:AE:6B Turned off websites and code signing trust bits (1024-bit root) OU = Class 3 Public Primary Certification Authority SHA1 Fingerprint: 74:2C:31:92:E6:07:E4:24:EB:45:49:54:2B:E1:BB:C5:3E:61:74:E2 Turned off websites and code signing trust bits (1024-bit root) OU = Class 2 Public Primary Certification Authority - G2 SHA1 Fingerprint: B3:EA:C4:47:76:C9:C8:1C:EA:F2:9D:95:B6:CC:A0:08:1B:67:EC:9D Turne...
...d by CA) CN = AC Raiz Certicamara S.A. ...
...tLock Uzleti (Class B) Tanusitvanykiado SHA1 Fingerprint: 87:9F:4B:EE:05:DF:98:58:3B:E3:60:D6:33:E7:0D:3F:FE:98:71:AF Turned off websites and code signing trust bits (1024-bit root) CN = NetLock Expressz (Class C) Tanusitvanykiado SHA1 Fingerprint: E3:92:51:2F:0A:CF:F5:05:DF:F6:DE:06:7F:75:37:E1:65:EA:57:4B Turned off websites and code signing trust bits (1024-bit root) Bugs fixed in NSS 3.16.3 This Bugzilla query returns all the bugs fixed in NSS 3.16.3: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.16.3 ...
Secure Development Guidelines
ed char 0 - +255 16 signed short -32768 - +32767 unsigned short 0 - +65535 32 signed int -2147483648 - +2147483647 unsigned int 0 - +4294967295 64 signed long long -9223372036854775808 - +9223372036854775807 unsigned long long 0 - +18446744073709551615 int vuln_funct(int size) { char buf[1024]; if (size > sizeof(buf) - 1) return -1; } Signedness Issues: Don't mix signed and unsigned integers Use unsigned integers for sizes, offsets, and indexes Casting and Truncation Example: void vuln_funct() { u_int32_t size1 = 0xffffffff; u_int16_t size2 = size1; void *ptr = malloc(size2); if (!ptr) exit(EXIT_FAILURE); memcpy(ptr, user_data, size1); } ...
...main(int argc, char **argv) { foo(argv[1]); } BBV: Stack Overflow Before the stack overflow BBV: Stack Overflow After the stack overflow BBV: Heap Overflow Dynamic memory malloc() calloc() HeapAlloc() mmap() Not on the stack segment! Most memory allocators use a linked list or binary tree BBV: Off-by-One The array index starts at 0 not at 1 char array[1024]; array[0] = first element! array[1023] = last element! array[1024] = 1 element outside the array! BBV: Array Indexing Issues Always ensure that the index is within the bounds of the array Never use signed integers as index buf[strlen(buf) - 1] = '\0'; strlen() could return 0; resulting in a negative index! BBV: Array Indexing Issues Always ensure that the index is wi...
...afe and well-designed API When using integers as array indexes, use caution Format String Bugs Example: int main(int argc, char *argv[]) { if (argc > 1) printf(argv[1]); } Format String Bugs: Prevention Easy to fix: Always use a format string specifier: int main(int argc, char *argv[]) { if (argc > 1) printf("%s", argv[1]); } Double Free Example: void* ptr = malloc(1024); if (error) { free(ptr); } free(ptr); Double Free: Prevention Set a pointer to NULL when it's freed Valgrind or malloc debugging can help detect those bugs Use After Free Accessing data after a free() or delete can lead to undefined behavior Some debug tools might be able catch some cases Un-initialized Data Example: int main() { char *uninitialized_ptr; prin...
...ail and result in return value -1 tmp = realloc(tmp, size) -- realloc could fail and leak tmp Writing Secure Code: Exception Handling Double Freeing Pointers Double frees can occur in exception handling They free data in try block and then free it again in the catch block This is a common issue Double Freeing Pointers char *ptr1 = NULL, *ptr2 = NULL; try { ptr1 = new char[1024]; do_something(); delete ptr1; do_something_else(); ptr2 = new char[-1] // OOM } catch (...) { delete ptr1; delete ptr2; } New will throw an exception -- ptr1 is already freed in the try block then freed again in the catch block Freeing Un-initialized Data Free data in the catch block Assumption is that it's initialized in the try block If the try block ...
nsIAccessibleProvider
:browser> and <xul:editor>. ...
... XUL Controls Constants Constant Value Description XULAlert 0x00001001 XULButton 0x00001002 XULCheckbox 0x00001003 XULColorPicker 0x00001004 XULColorPickerTile 0x00001005 XULCombobox 0x00001006 XULDropmarker 0x00001007 XULGroupbox 0x00001008 XULImage 0x00001009 XULLink 0x0000100A XULListbox 0x0000100B XULListCell 0x00001026 XULListHead 0x00001024 XULListHeader 0x00001025 XULListitem 0x0000100C XULMenubar 0x0000100D XULMenuitem 0x0000100E XULMenupopup 0x0000100F XULMenuSeparator 0x00001010 XULPane 0x00001011 XULProgressMeter 0x00001012 XULScale 0x00001013 XULStatusBar 0x00001014 XULRadioButton 0x00001015 XULRadioGroup 0x00001016 XULTab 0x00001017 The single tab in a dialog or tabbrowser/...
...n a dialog or tabbrowser/editor interface. XULTabBox 0x00001018 A combination of a tabs object and a tabpanels object. XULTabs 0x00001019 The collection of tab objects, usable in the TabBox and independent of as well. XULText 0x0000101A XULTextBox 0x0000101B XULThumb 0x0000101C XULTree 0x0000101D XULTreeColumns 0x0000101E XULTreeColumnItem 0x0000101F XULToolbar 0x00001020 XULToolbarSeparator 0x00001021 XULTooltip 0x00001022 XULToolbarButton 0x00001023 XForms elements Constants Constant Value Description XFormsContainer 0x00002000 Used for xforms elements that provide accessible object for itself as well for anonymous content. This property is used for upload, input[type="xsd:gDay"] and input[type="xsd:gMonth"] XFormsLabel 0x00002001 Used f...
...select1 elements represented by radio group. XFormsSelectCombobox 0x00002014 Used for xforms select1 element that is represented by combobox. XFormsItemCombobox 0x00002015 Used for xforms item element that is used inside xforms select1 elements represented by combobox. XFormsDropmarkerWidget 0x00002101 Used for dropmarker widget that is used by xforms elements. XFormsCalendarWidget 0x00002102 Used for calendar widget that is used by xforms elements. XFormsComboboxPopupWidget 0x00002103 Used for popup widget that is used by xforms minimal select1 elements. ...
nsIScriptableIO
es are desired, specify an empty string. text: Read Unicode-converted text. The default character set is UTF-8; to read text in another character set, set the aCharSet argument to the desired character set. buffered: A stream that uses a buffer to hold a block of the next piece of the data to be read. This mode is generally used as a wrapper for other streams. By default, the buffer size is 1024 bytes; however, the size may be changed by specifying the aBufferSize parameter. If the text mode is specified, a buffer is always used, regardless of whether or not it is specifically requested. block: When this mode is specified, reading from a transport such as a socket when no data is available will block until data is available before returning. If this mode isn't specified, an exception ...
...h the text or buffered modes. aCharSet The character set to use for interpreting the text data being read. Used only in conjunction with the text input mode. By default, streams are interpreted in UTF-8. aReplaceChar The character used to replace unknown characters in the input stream. aBufferSize The size of the buffer to use. By default, the buffer is 1024 bytes long. Return value Returns an nsIInputStream object to use for reading the stream. If the multi mode was specified, this object also implements the nsIMultiplexInputStream interface. Exceptions thrown NS_ERROR_INVALID_ARG aBase was null. newOutputStream() Retrieves a stream to which data can be written. nsISupports newOutputStream( in nsIVariant aBase, in AString aM...
...ream is accessed. If none of these modes are desired, specify an empty string. text: Write Unicode-converted text. The default character set is UTF-8; to write text in another character set, set the aCharSet argument to the desired character set. buffered: A stream that buffers the data being written. This mode is generally used as a wrapper for other streams. By default, the buffer size is 1024 bytes; however, the size may be changed by specifying the aBufferSize parameter. If the text mode is specified, a buffer is always used, regardless of whether or not it is specifically requested. append: When writing to files, indicates to append to the file rather than overwrite the existing file. The write position will be set to the end of the file before each write. If used in conjuction w...
...e data is properly saved. aCharSet The character set to use for interpreting the text data being written. Used only in conjunction with the text input mode. By default, streams are interpreted in UTF-8. aReplaceChar The character used to replace unknown characters in the output stream. aBufferSize The size of the buffer to use. By default, the buffer is 1024 bytes long. aPermissions The permissions to use on a newly created file, if applicable. Typically you will use an actual octal permissions value for this parameter. By default, the value 0664 is used. Return value Returns an nsIOutputStream object to use for writing the stream. Exceptions thrown NS_ERROR_INVALID_ARG aBase was null. Example: Writing to a file var js...
Drawing shapes with canvas - Web APIs
vas" width="150" height="150"></canvas> </body> </html> function draw() { var canvas = document.getElementById('canvas'); if (canvas.getContext) { var ctx = canvas.getContext('2d'); // Cubic curves example ctx.beginPath(); ctx.moveTo(75, 40); ctx.bezierCurveTo(75, 37, 70, 25, 50, 25); ctx.bezierCurveTo(20, 25, 20, 62.5, 20, 62.5); ctx.bezierCurveTo(20, 80, 40, 102, 75, 120); ctx.bezierCurveTo(110, 102, 130, 80, 130, 62.5); ctx.bezierCurveTo(130, 62.5, 130, 25, 100, 25); ctx.bezierCurveTo(85, 25, 75, 37, 75, 40); ctx.fill(); } } ScreenshotLive sample Rectangles In addition to the three methods we saw in Drawing rectangles, which draw rectangular shapes directly to the canvas, there's also the rect() method, which adds a rectangular pat...
...c(37, 37, 13, Math.PI / 7, -Math.PI / 7, false); ctx.lineTo(31, 37); ctx.fill(); for (var i = 0; i < 8; i++) { ctx.fillRect(51 + i * 16, 35, 4, 4); } for (i = 0; i < 6; i++) { ctx.fillRect(115, 51 + i * 16, 4, 4); } for (i = 0; i < 8; i++) { ctx.fillRect(51 + i * 16, 99, 4, 4); } ctx.beginPath(); ctx.moveTo(83, 116); ctx.lineTo(83, 102); ctx.bezierCurveTo(83, 94, 89, 88, 97, 88); ctx.bezierCurveTo(105, 88, 111, 94, 111, 102); ctx.lineTo(111, 116); ctx.lineTo(106.333, 111.333); ctx.lineTo(101.666, 116); ctx.lineTo(97, 111.333); ctx.lineTo(92.333, 116); ctx.lineTo(87.666, 111.333); ctx.lineTo(83, 116); ctx.fill(); ctx.fillStyle = 'white'; ctx.beginPath(); ctx.moveTo(91, 96); ...
... function roundedRect(ctx, x, y, width, height, radius) { ctx.beginPath(); ctx.moveTo(x, y + radius); ctx.lineTo(x, y + height - radius); ctx.arcTo(x, y + height, x + radius, y + height, radiu...
... function roundedRect(ctx, x, y, width, height, radius) { ctx.beginPath(); ctx.moveTo(x, y + radius); ctx.lineTo(x, y + height - radius); ctx.arcTo(x, y + height, x + radius, y + height, radius); ctx.lineTo(x + width - radius, y + height); ctx.arcTo(x + width, y + height, ...
Enumerator.atEnd - Archive of obsolete content
ired myEnum reference is any Enumerator object. The atEnd method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined. Otherwise, it returns false. ...
...Enum reference is any Enumerator object. The atEnd method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined. Otherwise, it returns false. ...
...ference is any Enumerator object. The atEnd method returns true if the current item is the last one in the collection, the collection is empty, or the current item is undefined. Otherwise, it returns false. ...
Enumerator.item - Archive of obsolete content
is only supported in Internet Explorer. The Enumerator.item method returns the current item in the collection. Syntax enumObj.item() Remarks The required enumObj reference is any Enumerator object. The item method returns the current item. If the collection is empty or the current item is undefined, it returns undefined. ...
... supported in Internet Explorer. The Enumerator.item method returns the current item in the collection. Syntax enumObj.item() Remarks The required enumObj reference is any Enumerator object. The item method returns the current item. If the collection is empty or the current item is undefined, it returns undefined. ...
...ted in Internet Explorer. The Enumerator.item method returns the current item in the collection. Syntax enumObj.item() Remarks The required enumObj reference is any Enumerator object. The item method returns the current item. If the collection is empty or the current item is undefined, it returns undefined. ...
Enumerator.moveFirst - Archive of obsolete content
ion to the first item. Syntax enumObj.moveFirst( ) Remarks The required enumObj reference is any Enumerator object. If there are no items in the collection, the current item is set to undefined. ...
...the first item. Syntax enumObj.moveFirst( ) Remarks The required enumObj reference is any Enumerator object. If there are no items in the collection, the current item is set to undefined. ...
...st item. Syntax enumObj.moveFirst( ) Remarks The required enumObj reference is any Enumerator object. If there are no items in the collection, the current item is set to undefined. ...
Enumerator.moveNext - Archive of obsolete content
collection. Syntax enumObj.moveNext( ) Remarks The required enumObj reference is any Enumerator object. If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined. ...
...tion. Syntax enumObj.moveNext( ) Remarks The required enumObj reference is any Enumerator object. If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined. ...
...Syntax enumObj.moveNext( ) Remarks The required enumObj reference is any Enumerator object. If the enumerator is at the end of the collection or the collection is empty, the current item is set to undefined. ...
Enumerator - Archive of obsolete content
on are not directly accessible. Instead of using indexes, as you would with arrays, you can move the current item pointer only to the first or next element of a collection. The Enumerator object provides a way to access any member of a collection and behaves similarly to the For...Each statement in VBScript. ...
...not directly accessible. Instead of using indexes, as you would with arrays, you can move the current item pointer only to the first or next element of a collection. The Enumerator object provides a way to access any member of a collection and behaves similarly to the For...Each statement in VBScript. ...
...ectly accessible. Instead of using indexes, as you would with arrays, you can move the current item pointer only to the first or next element of a collection. The Enumerator object provides a way to access any member of a collection and behaves similarly to the For...Each statement in VBScript. ...
Creating a Language Pack
Happy testing! ...
...Happy testing! ...
...Happy testing! ...
Index
100 NSS 3.29.2 release notes Network Security Services (NSS) 3.29.2 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.2 are described in the "Bugs Fixed" section below. 101 NSS 3.29.3 release notes Network Security Services (NSS) 3.29.3 is a patch release for NSS 3.29. The bug fixes in NSS 3.29.3 are described in the "Bugs Fixed" section below. 102 NSS 3.29.5 release notes Network Security Services (NSS) 3.29.5 is a security patch release for NSS 3.29. The bug fixes in NSS 3.29.5 are described in the "Bugs Fixed" section below. 103 NSS 3.30 release notes The Network Security Services (NSS) team has released NSS 3.30, which is a minor release. 104 NSS 3.30.1 release notes Network Sec...
... to sign objects, it behaves like an object-signing certificate. When it is imported into browser software such as Communicator, it behaves like an object-signing CA and cannot be used to sign objects. The -G option is available in Netscape Signing Tool 1.0 and later versions only. By default, it produces only RSA certificates with 1024-byte keys in the internal token. However, you can use the -s option specify the required key size and the -t option to specify the token. For more information about the use of the -G option, see "Generating Test Object-Signing Certificates""Generating Test Object-Signing Certificates" on page 1241. -l Lists signing certificat...
...assword to include in a certificate or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent unauthorized access to this file. -g keysize Set a key size to use when generating new public and private key pairs. The minimum is 512 bits and the maximum is 8192 bits. The default is 1024 bits. Any size between the minimum and maximum is allowed. -h tokenname Specify the name of a token to use or act on. Unless specified otherwise the default token is an internal slot (specifically, internal slot 2). This slot can also be explicitly named with the string "internal". An internal slots is a virtual slot maintained ...
NSS_3.12_release_notes.html
Bug 391291: Shared Database Integrity checks not yet implemented. Bug 391292: Shared Database implementation slow Bug 391294: Shared Database implementation really slow on network file systems Bug 392521: Automatic shared db update fails if user opens database R/W but n...
...s to deal with multiple token sources of certs. Bug 217538: softoken databases cannot be shared between multiple processes Bug 294531: Design new interfaces for certificate path building and verification for libPKIX Bug 326482: NSS ECC performance problems (intel) Bug 391296: Need an update helper for Shared Databases Bug 395090: remove duplication of pkcs7 code from pkix_pl_httpcertstore.c Bug 401026: Need to provide a way to modify and create new PKCS #11 objects. Bug 403680: CERT_PKIXVerifyCert fails if CRLs are missing, implement cert_pi_revocationFlags Bug 427706: NSS_3_12_RC1 crashes in passwordmgr tests Bug 426245: Assertion failure went undetected by tinderbox Bug 158242: PK11_PutCRL is very memory inefficient Bug 287563: Please make cert_CompareNameWithConstraints a non-static functi...
...y/lib/jar Bug 118830: NSS public header files should be C++ safe Bug 123996: certutil -H doesn't document certutil -C -a Bug 178894: Quick decoder updates for lib/certdb and lib/certhigh Bug 220115: CKM_INVALID_MECHANISM should be an unsigned long constant. ...
NSS 3.16.4 release notes
NSPR 4.10.6 or newer. NSS 3.16.4 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_16_4_RTM/src/ New in NSS 3.16.4 This release consists primarily of CA certificate changes as listed below, and includes a small number of bug fixes. Notable Changes in NSS 3.16.4 The following 1024-bit root CA certificate was restored to allow more time to develop a better transition strategy for affected sites. It was removed in NSS 3.16.3, but discussion in the mozilla.dev.security.policy forum led to the decision to keep this root included longer in order to give website administrators more time to update their web servers. CN = GTE CyberTrust Global Root SHA1 Fingerprin...
... for affected sites. It was removed in NSS 3.16.3, but discussion in the mozilla.dev.security.policy forum led to the decision to keep this root included longer in order to give website administrators more time to update their web servers. ...
...F:79:44:31:36:7E:F4:74 In NSS 3.16.3, the 1024-bit "Entrust.net Secure Server Certification Authority" root CA certificate (SHA1 Fingerprint: 99:A6:9B:E6:1A:FE:88:6B:4D:2B:82:00:7C:B8:54:FC:31:7E:15:39) was removed. In NSS 3.16.4, a 2048-bit intermediate CA certificate has been included, without explicit trust. The intention is to mitigate the effects of the previous removal of the 1024-bit Entrust.net root certificate, because many public Internet sites still use the "USERTrust Legacy Secure Server CA" intermediate certificate that is signed by the 1024-bit Entrust.net root certificate. The inclusion of the intermediate certificate is a temporary measure to allow those sites to function, by allowing them to find a trust path to another 2048-bit root CA certificate. The tempora...
NSS 3.19.1 release notes
er. NSS 3.19.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_19_1_RTM/src/ Security Fixes in NSS 3.19.1 Bug 1138554 / CVE-2015-4000 - The minimum strength of keys that libssl will accept for finite field algorithms (RSA, Diffie-Hellman, and DSA) have been increased to 1023 bits. New in NSS 3.19.1 New Functionality No new functionality is introduced in this release. This patch release includes a fix for the recently published logjam attack. Notable Changes in NSS 3.19.1 NSS reports the bit length of keys more accurately. Thus, the SECKEY_PublicKeyStrength and SECKEY_PublicKeyStrengthInBits functions could report smaller values for values that have leading ...
...ublicKeyStrength and SECKEY_PublicKeyStrengthInBits functions could report smaller values for values that have leading zero values. This affects the key strength values that are reported by SSL_GetChannelInfo. ...
...eport smaller values for values that have leading zero values. This affects the key strength values that are reported by SSL_GetChannelInfo. ...
NSS Sample Code sample2
* This code uses the simplest of the Init functions, which does not * require a NSS database to exist */ rv = NSS_NoDB_Init("."); if (rv != SECSuccess) { fprintf(stderr, "NSS initializ...
... * This code uses the simplest of the Init functions, which does not * require a NSS database to exist */ rv = NSS_NoDB_Init("."); if (rv != SECSuccess) { fprintf(stderr, "NSS initialization failed...
... * This code uses the simplest of the Init functions, which does not * require a NSS database to exist */ rv = NSS_NoDB_Init("."); if (rv != SECSuccess) { fprintf(stderr, "NSS initialization failed (err %d)\n"...
LocalFileSystem - Web APIs
r the user removes it, but the user must grant you permission before you can use it. In contrast, temporary storage is automatically granted without any user permission, but it can be expunged by the browser at any time. To use PERSISTENT storage with the File System API, Chrome exposes a requestQuota API. So to request storage, you need to do something like the following: var requestedBytes = 1024*1024*10; // 10MB navigator.webkitPersistentStorage.requestQuota ( requestedBytes, function(grantedBytes) { window.requestFileSystem(PERSISTENT, grantedBytes, onInitFs, errorHandler); }, function(e) { console.log('Error', e); } ); Your user must grant your app permission to store data locally before your app can use persistent storage. Once your user grants it, you don't need ...
...rowser-specific prefix window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; // The first parameter defines the type of storage: persistent or temporary // Next, set the size of space needed (in bytes) // initFs is the success callback // And the last one is the error callback // for denial of access and other errors. ...
...r-specific prefix window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; // The first parameter defines the type of storage: persistent or temporary // Next, set the size of space needed (in bytes) // initFs is the success callback // And the last one is the error callback // for denial of access and other errors. ...
Realizing common layouts using CSS Grid Layout - CSS: Cascading Style Sheets
g in a three-column layout for wider screens. I am going to create this layout using the named template areas that we learned about in the guide Grid template areas. My mark-up is a container with elements inside for a header, footer, main content, navigation, sidebar, and a block into which I am intending to place advertising. ...
... frameworks or grid systems you may be accustomed to laying out your site on a 12- or 16-column flexible grid. We can create this type of system using CSS Grid Layout. As a simple example, I am creating a 12-column flexible grid that has 12 1fr-unit column tracks, they all have a start line named col-start. This means that we will have twelve grid lines named col-start. .wrapper { max-width: 1024px; margin: 0 auto; font: 1.2em Helvetica, arial, sans-serif; } .wrapper > * { border: 2px solid #f08c00; background-color: #ffec99; border-radius: 5px; padding: 10px; } .wrapper { display: grid; grid-template-columns: repeat(12, [col-start] 1fr); grid-gap: 20px; } To demonstrate how this grid system works I have four child elements inside my wrapper. <div class="wrapper">...
...ecify the start and end line for the item. Building a layout using the 12-column system To see how this layout method works in practice, we can create the same layout that we created with grid-template-areas, this time using the 12-column grid system. I am starting with the same markup as used for the grid template areas example. ...
requiredFeatures - SVG: Scalable Vector Graphics
//www.w3.org/TR/SVG11/feature#SVG-static" /> <text x="20" y="77">http://www.w3.org/TR/SVG11/feature#SVG-static</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#SVGDOM-static --> <rect class="ko" x="10" y="85" height="25" width="430" /> <rect class="ok" x="10" y="85" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#SVGDOM-static" /> <text x="20" y="102">http://www.w3.org/TR/SVG11/feature#SVGDOM-static</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#SVG-animation --> <rect class="ko" x="10" y="110" height="25" width="430" /> <rect class="ok" x="10" y="110" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#SVG-animation" /> <text x="20" y="127">http://www.w3.org/TR/SVG11/feature#SVG-animation</text...
...G11/feature#ExternalResourcesRequired" /> <text x="20" y="1002">http://www.w3.org/TR/SVG11/feature#ExternalResourcesRequired</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#View --> <rect class="ko" x="10" y="1010" height="25" width="430" /> <rect class="ok" x="10" y="1010" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#View" /> <text x="20" y="1027">http://www.w3.org/TR/SVG11/feature#View</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#Script --> <rect class="ko" x="10" y="1035" height="25" width="430" /> <rect class="ok" x="10" y="1035" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Script" /> <text x="20" y="1052">http://www.w3.org/TR/SVG11/feature#Script</text> <!-- Testing : http:/...
...atures="http://www.w3.org/TR/SVG11/feature#Animation" /> <text x="20" y="1077">http://www.w3.org/TR/SVG11/feature#Animation</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#Font --> <rect class="ko" x="10" y="1085" height="25" width="430" /> <rect class="ok" x="10" y="1085" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#Font" /> <text x="20" y="1102">http://www.w3.org/TR/SVG11/feature#Font</text> <!-- Testing : http://www.w3.org/TR/SVG11/feature#BasicFont --> <rect class="ko" x="10" y="1110" height="25" width="430" /> <rect class="ok" x="10" y="1110" height="25" width="430" requiredFeatures="http://www.w3.org/TR/SVG11/feature#BasicFont" /> <text x="20" y="1127">http://www.w3.org/TR/SVG11/feature#BasicFont</text> <!-- Testing ...
StringView - Archive of obsolete content
1 : 2; }; /* Array of bytes to base64 string decoding */ StringView.b64ToUint6 = function (nChr) { return nChr > 64 && nChr < 91 ? nChr - 65 : nChr > 96 && nChr < 123 ? nChr - 71 : nChr > 47 && nChr < 58 ? nChr + 4 : nChr === 43 ? 62 : nChr === ...
...* * [...] * * CONSTRUCTOR CODE HERE! **/ } /* A "replace" method for StringView... */ StringView.prototype.replace = function (oCLikeRegExp, sWith) { /** * [...] * * METHOD CODE HERE! **/ }; If you want to create a stringView inside a bigger empty buffer, like in the following C line /* myBuffer: 12 character followed by 1012 NULLs... */ char myBuffer[1024] = "Hello world!"; you should do something like this: var myBuffer = new StringView(1024); /* myBuffer: 12 character followed by 1012 NULLs... */ var myContent = new StringView("Hello world!"); myBuffer.rawData.set(myContent.rawData, myContent.rawData.length); StringView is a constructor and a collection of methods whose aim is to work strictly on arrays of numbers, rather than on creati...
JavaScript crypto - Archive of obsolete content
*/ var authenticator = "server_magic"; var keyTransportCert = null; var crmfObject = null; var form = document.forms[0]; function validate() { // generate keys for nsm. ...
... own internal module to supply these functions. These flags override that preference. ...
Monitoring downloads - Archive of obsolete content
= document.createElement('listcell'); var sourceStr = statement.getString(0); row.setAttribute("tooltiptext", sourceStr); sourceStr = sourceStr.slice(sourceStr.lastIndexOf("/")+1); cell.setAttribute("label", sourceStr); // Source row.appendChild(cell); cell = document.createElement('listcell'); cell.setAttribute("label", (statement.getInt64(1) / 1024).toFixed(1) + "KB"); // Size cell.setAttribute("style", "text-align:right"); row.appendChild(cell); var theDate = new Date(statement.getInt64(2) / 1000); // Start time cell = document.createElement('listcell'); var dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.appendChild(cell); theDate = new Date(...
...var dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.appendChild(cell); theDate = new Date(statement.getInt64(3)); // End time cell = document.createElement('listcell'); dateStr = theDate.toLocaleString(); cell.setAttribute("label", dateStr); row.appendChild(cell); var speed = statement.getDouble(4) / 1024.0; cell = document.createElement('listcell'); cell.setAttribute("label", speed.toFixed(1) + "KB/sec"); cell.setAttribute("style", "text-align:right"); row.appendChild(cell); var status = statement.getInt32(5); var style = "color:black"; cell = document.createElement('listcell'); var statusStr; switch(status) { case 0: ...
Reading textual data - Archive of obsolete content
7. Usage: var charset = /* Need to find out what the character encoding is. Using UTF-8 for this example: */ "UTF-8"; const replacementChar = Components.interfaces.nsIConverterInputStream.DEFAULT_REPLACEMENT_CHARACTER; var is = Components.classes["@mozilla.org/intl/converter-input-stream;1"] .createInstance(Components.interfaces.nsIConverterInputStream); is.init(fis, charset, 1024, replacementChar); Now you can read string from is: var str = {}; var numChars = is.readString(4096, str); if (numChars != 0 /* EOF */) var read_string = str.value; To read the entire stream and do something with the data: var str = {}; while (is.readString(4096, str) != 0) { processData(str.value); } Don't forget to close the stream when you're done with it (is.close()). Not doing s...
...16 and UTF-32). It can be used like this: var charset = /* Need to find out what the character encoding is. Using UTF-8 for this example: */ "UTF-8"; var is = Components.classes["@mozilla.org/intl/converter-input-stream;1"] .createInstance(Components.interfaces.nsIConverterInputStream); // This assumes that fis is the nsIInputStream you want to read from is.init(fis, charset, 1024, 0xFFFD); is.QueryInterface(Components.interfaces.nsIUnicharLineInputStream); if (is instanceof Components.interfaces.nsIUnicharLineInputStream) { var line = {}; var cont; do { cont = is.readLine(line); // Now you can do something with line.value } while (cont); } The above example reads an entire stream until EOF. See nsIConverterInputStream for nsIConverterInputStream.init(...
accessibleType - Archive of obsolete content
XULColorPicker 1004 XULColorPickerTile 1005 XULCombobox 1006 XULDropmarker 1007 XULGroupbox 1008 XULImage 1009 XULLink 100A XULListbox 100B XULListCell 1026 XULListHead 1024 XULListHeader 1025 XULListitem 100C XULMenubar 100D XULMenuitem 100E XULMenupopup 100F XULMenuSeparator 1010 XULPane 1011 ...
... XULTabBox 1018 XULTabs 1019 XULText 101A XULTextBox 101B XULThumb 101C XULTree 101D XULTreeColumns 101E XULTreeColumnItem 101F XULToolbar 1020 XULToolbarSeparator 1021 XULTooltip 1022 XULToolbarButton 1023 ...
Encryption and Decryption - Archive of obsolete content
ribed in terms of the size or length of the keys used to perform the encryption: in general, longer keys provide stronger encryption. Key length is measured in bits. For example, 128-bit keys for use with the RC4 symmetric-key cipher supported by SSL provide significantly better cryptographic protection than 40-bit keys for use with the same cipher. Roughly speaking, 128-bit RC4 encryption is 3 x 1026 times stronger than 40-bit RC4 encryption. (For more information about RC4 and other ciphers used with SSL, see "Introduction to SSL.") An encryption key is considered full strength if the best known attack to break the key is no faster than a brute force attempt to test every key possibility. Different ciphers may require different key lengths to achieve the same level of encryption strength. ...
... possible values for a key of a given length, due to the nature of the mathematical problem on which it is based. Other ciphers, such as those used for symmetric key encryption, can use all possible values for a key of a given length, rather than a subset of those values. Because it is relatively trivial to break an RSA key, an RSA public-key encryption cipher must have a very long key, at least 1024 bits, to be considered cryptographically strong. On the other hand, symmetric-key ciphers can achieve approximately the same level of strength with an 80-bit key for most algorithms. Original Document Information Author(s): Ella Deon Lackey Last Updated Date: 2012 Copyright Information: (C) 2012 Red Hat, Inc. Link: Red Hat Certificate System Common Criteria Certification 8.1: Deploymen...
SSL and TLS - Archive of obsolete content
ryptography (ECC) govern the way the server and client determine the symmetric keys to use during an SSL session. The most common SSL cipher suites use RSA key exchange, while TLS supports ECC cipher suites as well as RSA. Note: Longer RSA keys are required to provide security as computing capabilities increase. The recommended RSA key-length is 2048 bits. Though many web servers continue to use 1024-bit keys, web servers should migrate to at least 2048 bits. For 64-bit machines, consider using stronger keys. All CAs should use at least 2048-bit keys, and stronger keys (such as 3072 or 4096 bits) if possible. As PKIs using RSA keys and certificates transition to other cryptographic systems like ECC, servers should continue to support RSA. Supported Cipher Suites for RSA Cipher suites with...
...shorter key lengths than RSA, which makes it faster and more efficient to implement. ECC has several advantages over RSA, since it is faster and requires shorter key lengths for stronger keys. The drawback to using ECC is that it is not as widely supported as RSA. Bits of Security RSA Key Length ECC Key Length Table 1: Comparison of RSA and ECC Cipher Strength 80 1024 160-223 112 2048 224-255 128 3072 256-383 192 7860 384-511 256 15360 512+ The information in this table is from the National Institute of Standards and Technology (NIST). For more information, see http://csrc.nist.gov/publications/nistpubs/800-57/SP800-57-Part1.pdf. For more information on ECC, see RFC 4492, Section 5.6.1, Ta...
Index - MDN Web Docs Glossary: Definitions of Web-related terms
network (corporate or private) and the outside untrusted world -- usually the Internet. 101 DNS DNS, Domain Name System, Glossary, Infrastructure DNS (Domain Name System) is a hierarchical and decentralized naming system for Internet connected resources. DNS maintains a list of domain names along with the resources, such as IP addresses, that are associated with them. 102 DOM (Document Object Model) CodingScripting, DOM, Glossary The DOM (Document Object Model) is an API that represents and interacts with any HTML or XML document. The DOM is a document model loaded in the browser and representing the document as a node tree, where each node represents part of the document (e.g. an element, text string, or comment). 103 DTLS (Datagram Trans...
...e data types. For example, integers, floats, and doubles are implicitly polymorphic: regardless of their different types, they can all be added, subtracted, multiplied, and so on. 326 Port Glossary, Intro, Security, computer network, port For a computer connected to a network with an IP address, a port is a communication endpoint. Ports are designated by numbers, and below 1024 each port is associated by default with a specific protocol. 327 Prefetch Glossary, Prefetch, Reference, Web Performance Prefetching is when content is downloaded in the background, this is based on the assumption that the content will likely be requested, enabling the content to load instantly if and when the user requests it. The content is downloaded and cached for antici...
HTML table basics - Learn web development
Learn › HTML › Tables › Basics
is rigid. Information is easily interpreted by making visual associations between row and column headers. Look at the table below for example and find a Jovian gas giant with 62 moons. You can find the answer by associating the relevant row and column headers. Data about the planets of our solar system (Planetary facts taken from Nasa's Planetary Fact Sheet - Metric. ...
... When done correctly, even blind people can interpret tabular data in an HTML table -- a successful HTML table should enhance the experience of sighted and visually...
Localization Use Cases
ox OS ulegl awarii Boot2Gecko uleglo awarii Isolation Let's look at how the Settings app formats sizes. ...
...legl awarii Boot2Gecko uleglo awarii Isolation Let's look at how the Settings app formats sizes. ...
JSS Provider Notes
oken(tokenA); KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("RSA", "Mozilla-JSS"); // Create a DSA KeyPairGenerator using TokenB manager.setThreadToken(tokenB); KeyPairGenerator dsaKpg = KeyPairGenerator.getInstance("DSA", "Mozilla-JSS"); // Generate an RSA KeyPair. This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. ...
...yPairGenerator.getInstance("DSA", "Mozilla-JSS"); // Generate an RSA KeyPair. This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. rsaKpg.initialize(1024); KeyPair rsaPair = rsaKpg.generateKeyPair(); // Generate a DSA KeyPair. This will happen on TokenB because TokenB // was the per-thread default token when dsaKpg was created. ...
Mozilla-JSS JCA Provider notes
oken(tokenA); KeyPairGenerator rsaKpg = KeyPairGenerator.getInstance("Mozilla-JSS", "RSA"); // Create a DSA KeyPairGenerator using TokenB manager.setThreadToken(tokenB); KeyPairGenerator dsaKpg = KeyPairGenerator.getInstance("Mozilla-JSS", "DSA"); // Generate an RSA KeyPair. This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. ...
...yPairGenerator.getInstance("Mozilla-JSS", "DSA"); // Generate an RSA KeyPair. This will happen on TokenA because TokenA // was the per-thread default token when rsaKpg was created. rsaKpg.initialize(1024); KeyPair rsaPair = rsaKpg.generateKeyPair(); // Generate a DSA KeyPair. This will happen on TokenB because TokenB // was the per-thread default token when dsaKpg was created. ...
Hacking Tips
nerator function of the LIR instruction, add a command to generate a static breakpoint in the generated code. $ gdb --args js [...] (gdb) b js::ion::CodeGenerator::visitStart (gdb) command >call masm.breakpoint() >continue >end (gdb) r js> function f(a, b) { return a + b; } js> for (var i = 0; i < 100000; i++) f(i, i + 1); Breakpoint 1, js::ion::CodeGenerator::visitStart (this=0x101ed20, lir=0x10234e0) at /home/nicolas/mozilla/ionmonkey/js/src/ion/CodeGenerator.cpp:609 609 } Program received signal SIGTRAP, Trace/breakpoint trap. 0x00007ffff7fb165a in ?? () (gdb) Once you hit the generated breakpoint, you can replace it by a gdb breakpoint to make it conditional, the procedure is to first replace the generated breakpoint by a nop instruction, and to set a breakpoint at the addr...
...the mask, and 39/40 for the negate-mask. $ cgset -r cpu.shares=1 /benchmarks/mask $ cgset -r cpu.shares=39 /benchmarks/negate-mask Then we limit the memory available, to what would be available on the phone. For example an Unagi you want to limit this to 512 MB. As there is no swap, on this device, we set the memsw (Memory+Swap) to the same value. $ cgset -r memory.limit_in_bytes=$((512*1024*1024)) /benchmarks/mask $ cgset -r memory.memsw.limit_in_bytes=$((512*1024*1024)) /benchmarks/mask And finally, we run the program that we want to benchmark after the one which is consuming resources. In case of the JS Shell we might also want to set the amount of memory available to change the GC settings as if we were running on a Firefox OS device. $ cgexec -g 'cpuset,cpu,memory:/bench...
nsIWebBrowserPersist
IONS 64 Don't modify or add base tags. PERSIST_FLAGS_FIXUP_ORIGINAL_DOM 128 Make changes to original DOM rather than cloning nodes. PERSIST_FLAGS_FIXUP_LINKS_TO_DESTINATION 256 Fix links relative to destination location (not origin) PERSIST_FLAGS_DONT_FIXUP_LINKS 512 Do not make any adjustments to links. PERSIST_FLAGS_SERIALIZE_OUTPUT 1024 Force serialization of output (one file at a time; not concurrent) PERSIST_FLAGS_DONT_CHANGE_FILENAMES 2048 Don't make any adjustments to filenames. PERSIST_FLAGS_FAIL_ON_BROKEN_LINKS 4096 Fail on broken in-line links. PERSIST_FLAGS_CLEANUP_ON_FAILURE 8192 Automatically cleanup after a failed or cancelled operation, deleting all created files and d...
...s is a catch-all flag for documents with mixed contents. Beware of interoperability issues. See below for other flags which might likely do what you want. ENCODE_FLAGS_CR_LINEBREAKS 512 Output with carriage return line breaks. May also be combined with ENCODE_FLAGS_LF_LINEBREAKS and if neither is specified, the platform default format is used. ENCODE_FLAGS_LF_LINEBREAKS 1024 Output with linefeed line breaks. May also be combined with ENCODE_FLAGS_CR_LINEBREAKS and if neither is specified, the platform default format is used. ENCODE_FLAGS_NOSCRIPT_CONTENT 2048 For plain text output. Output the content of noscript elements. ENCODE_FLAGS_NOFRAMES_CONTENT 4096 For plain text output. Output the content of noframes elements. ENCOD...
Working with ArrayBuffers
).ptr).contents; // myImgDat.data.length is imgWidth * imgHeight * 4 because per pixel there is r, g, b, a numbers casted.toString(); // "ctypes.uint8_t.array(640000)([45, 66, 135, 255, 99, 86, 55, 255, .......... ])" myImgDat.data.set(casted); The ctypes.cast takes a couple of milliseconds, however, the myImgDat.data.set takes up to 800ms for a size of 52,428,800 (which is image size of 1280 x 1024 pixels). So, for the size of 640,000 it takes about 98ms. Method 2: Manually Handled Another strategy is to handle it manually, as illustrated by the following code example: var casted = ctypes.cast(pixelBuffer.address(), ctypes.uint8_t.array(myImgData.data.length).ptr).contents; // myImgDat.data.length is imgWidth * imgHeight *4 because per pixel there is r, g, b, a numbers /** METHOD A **/...
....data.set(normalArr); The preceding example, however, does not take advantage of Method 1, but instead manually goes through the array and sets the ImageData array. The cast takes a couple of milliseconds, roughly the same as Method 1. However, the manual Method A, in the preceding example, takes ~1300 ms. Method B takes ~1400 ms, for an array length of 52,428,800 (which is image size of 1280 x 1024 pixels). Method 3: Transfer byte array by calling memcpy This is the recommended method, as it only takes a couple of milliseconds, even for large arrays. Notice that the following example does not cast the pixelBuffer. Passing an ArrayBuffer object to pointer type will pass the pointer to buffer (Based on //github.com/RealityRipple/UXP/blob/master/js/src/ctypes/CTypes.cpp#3080). Further, it r...
Network request list - Firefox Developer Tools
02] cause Shows resources matching a specific cause type. The types can be found in the description of the cause column. cause:js cause:stylesheet cause:img transferred Shows resources having a specific transferred size or a transferred size close to the one specified. k can be used as suffix for kilobytes and m for megabytes, e.g. the value 1k is equivalent to 1024. transferred:1k size Shows resources having a specific size (after decompression) or a size close to the one specified. k can be used as suffix for kilobytes and m for megabytes, e.g. the value 1k is equivalent to 1024. size:2m larger-than Shows resources that are larger than the specified size in bytes. k can be used as suffix for kilobytes and m for megabytes, e.g...
... larger-than:2000 -larger-than:4k mime-type Shows resources that match the specified MIME type. ...
AudioContext.createJavaScriptNode() - Web APIs
is used for directly manipulating audio data with JavaScript. Important: This method is obsolete, and has been renamed to AudioContext.createScriptProcessor(). See also ScriptProcessorNode. Syntax var jsNode = audioCtx.createJavaScriptNode(bufferSize, numInputChannels, numOutputChannels); Parameters bufferSize The buffer size must be in units of sample frames, i.e., one of: 256, 512, 1024, 2048, 4096, 8192, or 16384. It controls the frequency of callbacks asking for a buffer refill. Smaller sizes allow for lower latency and higher for better overall quality. numInputChannels The number of input channels in the audio stream. numOutputChannels The number of output channels in the audio stream. Example The following script illustrates the use of createJavaScriptNode(): var S...
... overall quality. numInputChannels The number of input channels in the audio stream. numOutputChannels The number of output channels in the audio stream. ...
Applying styles and colors - Web APIs
rcles on top of each other, I've drawn small rectangles with increasing opacity. Using rgba() gives you a little more control and flexibility because we can set the fill and stroke style individually. ...
...2, 50, 30); radgrad.addColorStop(0, '#A7D30C'); radgrad.addColorStop(0.9, '#019F62'); radgrad.addColorStop(1, 'rgba(1, 159, 98, 0)'); var radgrad2 = ctx.createRadialGradient(105, 105, 20, 112, 120, 50); radgrad2.addColorStop(0, '#FF5F98'); radgrad2.addColorStop(0.75, '#FF0188'); radgrad2.addColorStop(1, 'rgba(255, 1, 136, 0)'); var radgrad3 = ctx.createRadialGradient(95, 15, 15, 102, 20, 40); radgrad3.addColorStop(0, '#00C9FF'); radgrad3.addColorStop(0.8, '#00B5E2'); radgrad3.addColorStop(1, 'rgba(0, 201, 255, 0)'); var radgrad4 = ctx.createRadialGradient(0, 150, 50, 0, 140, 90); radgrad4.addColorStop(0, '#F4F201'); radgrad4.addColorStop(0.8, '#E4C700'); radgrad4.addColorStop(1, 'rgba(228, 199, 0, 0)'); // draw shapes ctx.fillStyle = radgrad4; ctx.fillR...
Pixel manipulation with canvas - Web APIs
h index values ranging from 0 to (heightxwidthx4)-1. ...
... = colorIndices[0]; var greenIndex = colorIndices[1]; var blueIndex = colorIndices[2]; var alphaIndex = colorIndices[3]; var redForCoord = imageData.data[redIndex]; var greenForCoord = imageData.data[greenIndex]; var blueForCoord = imageData.data[blueIndex]; var alphaForCoord = imageData.data[alphaIndex]; Or, if ES2015 is appropriate: const xCoord = 50; const yCoord = 100; const canvasWidth = 1024; const getColorIndicesForCoord = (x, y, width) => { const red = y * (width * 4) + x * 4; return [red, red + 1, red + 2, red + 3]; }; const colorIndices = getColorIndicesForCoord(xCoord, yCoord, canvasWidth); const [redIndex, greenIndex, blueIndex, alphaIndex] = colorIndices; You may also access the size of the pixel array in bytes by reading the Uint8ClampedArray.length attribute: var ...
Example and tutorial: Simple synth keyboard - Web APIs
]["D"] = 73.416191979351890; noteFreq[2]["D#"] = 77.781745930520227; noteFreq[2]["E"] = 82.406889228217482; noteFreq[2]["F"] = 87.307057858250971; noteFreq[2]["F#"] = 92.498605677908599; noteFreq[2]["G"] = 97.998858995437323; noteFreq[2]["G#"] = 103.826174394986284; noteFreq[2]["A"] = 110.000000000000000; noteFreq[2]["A#"] = 116.540940379522479; noteFreq[2]["B"] = 123.470825314031027; noteFreq[3]["C"] = 130.812782650299317; noteFreq[3]["C#"] = 138.591315488436048; noteFreq[3]["D"] = 146.832383958703780; noteFreq[3]["D#"] = 155.563491861040455; noteFreq[3]["E"] = 164.813778456434964; noteFreq[3]["F"] = 174.614115716501942; noteFreq[3]["F#"] = 184.997211355817199; noteFreq[3]["G"] = 195.997717990874647; noteFreq[3]["G#"] = 207.652348789972569; noteFreq[3][...
..."G"] = 783.990871963498588; noteFreq[5]["G#"] = 830.609395159890277; noteFreq[5]["A"] = 880.000000000000000; noteFreq[5]["A#"] = 932.327523036179832; noteFreq[5]["B"] = 987.766602512248223; noteFreq[6]["C"] = 1046.502261202394538; noteFreq[6]["C#"] = 1108.730523907488384; noteFreq[6]["D"] = 1174.659071669630241; noteFreq[6]["D#"] = 1244.507934888323642; noteFreq[6]["E"] = 1318.510227651479718; noteFreq[6]["F"] = 1396.912925732015537; noteFreq[6]["F#"] = 1479.977690846537595; noteFreq[6]["G"] = 1567.981743926997176; noteFreq[6]["G#"] = 1661.218790319780554; noteFreq[6]["A"] = 1760.000000000000000; noteFreq[6]["A#"] = 1864.655046072359665; noteFreq[6]["B"] = 1975.533205024496447; noteFreq[7]["C"] = 2093.004522404789077; noteFreq[7]["C#"] = 2217.4610478149...
Creating a cross-browser video player - Developer guides
src="video/tears-of-steel-battle-clip-medium.mp4" type="video/mp4"> <source src="video/tears-of-steel-battle-clip-medium.webm" type="video/webm"> <source src="video/tears-of-steel-battle-clip-medium.ogg" type="video/ogg"> <!-- Flash fallback --> <object type="application/x-shockwave-flash" data="flash-player.swf?videoUrl=video/tears-of-steel-battle-clip-medium.mp4" width="1024" height="576"> <param name="movie" value="flash-player.swf?videoUrl=video/tears-of-steel-battle-clip-medium.mp4" /> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent" /> <param name="flashvars" value="controlbar=over&amp;image=img/poster.jpg&amp;file=flash-player.swf?videoUrl=video/tears-of-steel-battle-clip-medium.mp4" /> ...
...oUrl=video/tears-of-steel-battle-clip-medium.mp4" /> <param name="allowfullscreen" value="true" /> <param name="wmode" value="transparent" /> <param name="flashvars" value="controlbar=over&amp;image=img/poster.jpg&amp;file=flash-player.swf?videoUrl=video/tears-of-steel-battle-clip-medium.mp4" /> <img alt="Tears of Steel poster image" src="img/poster.jpg" width="1024" height="428" title="No video playback possible, please download the video from the link below" /> </object> <!-- Offer download --> <a href="video/tears-of-steel-battle-clip-medium.mp4">Download MP4</a> </video> <figcaption>&copy; Blender Foundation | <a href="http://mango.blender.org">mango.blender.org</a></figcaption> </figure> Even though this player will define its ...
<input type="file"> - HTML: Hypertext Markup Language
Web › HTML › Element › input › file
image/jpeg", "image/pjpeg", "image/png", "image/svg+xml", "image/tiff", "image/webp", "image/x-icon" ]; function validFileType(file) { return fileTypes.includes(file.type); } The returnFileSize() function takes a number (of bytes, taken from the current file's size property), and turns it into a nicely formatted size in bytes/KB/MB. ...
...ml", "image/tiff", "image/webp", "image/x-icon" ]; function validFileType(file) { return fileTypes.includes(file.type); } The returnFileSize() function takes a number (of bytes, taken from the current file's size property), and turns it into a nicely formatted size in bytes/KB/MB. function returnFileSize(number) { if(number < 1024) { return number + 'bytes'; } else if(number >= 1024 && number < 1048576) { return (number/1024).toFixed(1) + 'KB'; } else if(number >= 1048576) { return (number/1048576).toFixed(1) + 'MB'; } } The example looks like this; have a play: Specifications Specification Status Comment HTML Living StandardThe definition of '<input type="file">' in that specification. Living Standard Initial definition ...
Atomics - JavaScript
her "ok", "not-equal", or "timed-out". If waiting is not allowed in the calling agent then it throws an Error exception. (Most browsers will not allow wait() on the browser's main thread.) Atomics.xor() Computes a bitwise XOR on the value at the specified index of the array with the provided value. Returns the old value at that index. ...
...As long as that is true, it will not go on. However, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123). Atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 A writing thread stores a new value and not...
Forms related code snippets - Archive of obsolete content
es declared with the let statement, constants declared with const will be block-scoped. We used it only for didactic purpose. If you want a full browser compatibility of this library, please replace all the const statements with the var statements. ...
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
var stream = Components.classes["@mozilla.org/network/file-input-stream;1"]. createInstance(Components.interfaces.nsIFileInputStream); stream.init(aFile, 0x01, 0, 0); var cvstream = Components.classes["@mozilla.org/intl/converter-input-stream;1"]. ...
Creating a hybrid CD - Archive of obsolete content
d. I used version 1.8.1a03 although you'll probably want to get a newer one. Here's what I did to create the CD for the second anniversary party. mkhybrid -o ~/party.iso -r -J -hfs -V mozilla.party -map ~/HFSmapping ~/party/ cdrecord -v speed=2 dev=0,6,0 ~/party.iso Its also handy to be able to mount an image file to test it. mount ~/party.iso /mnt/cdrom -t iso9660 -o loop=/dev/loop3,blocksize=1024 umount /mnt/cdrom Here is the HFS mapping that I used. The Creator "MOSS" is for Netscape 4.x and "MOZZ" is used for Mozilla. It is used as the creator type for README and other text files because it can handle Unix and Windows linebreaks, but teachtext cannot. # Example filename mapping file used by mkhybrid for hfs # # EXTN XLate CREATOR TYPE Comment .hqx Ascii 'SITx' 'TEX...
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
="#AsyncOpen" shape="poly"> <area alt="(5) Open()" coords="311,306,432,371" href="#Open"> <area alt="(4)" coords="90,384,127,417" href="#openURI-innards"> <area alt="(0) RegisterContentListener()" coords="37,474,346,474,346,505,88,505,88,535,37,535" href="#RegisterContentListener" shape="poly"> <area alt="(3) openURI() (nsURILoader)" coords="5,207,312,269" href="#openURI"> <area alt="(2)" coords="102,114,139,148" href="#InternalLoad"> <area alt="(1) loadURI/onLinkClick" coords="77,5,449,59" href="#loadURI"> <area alt="nsIExternalHelperAppService" coords="527,305,839,339" href="#nsIExternalHelperAppService"> <area alt="Category Manager" coords="683,467,807,527" href="#nsCategoryManager"> <area alt="nsDocumentOpenInfo" coords="371,71,635,185" href="#nsDocumentOpenInfo"> <area alt="Necko" coords...
LIR - Archive of obsolete content
the back-ends cannot generate code for it.It's used in TraceMonkey briefly but is always demoted to a LIR_modl or converted to a function call before Nanojit has to do anything serious with it. 105 cmovi integer con...
New Skin Notes - Archive of obsolete content
hat they were different, honestly. I'll take a look. --dria Ok, the difference on the cavendish theme is negligible (to the point where I never noticed). Direct external links have icons to differentiate them from internal links, so I think we'll just leave the internal/external links colours the same. ==dria You've got to be kidding me, the colors are clearly different (rgb(0,51,153) vs rgb(51,102,187)). --Nickolay 09:19, 25 Aug 2005 (PDT) (moving this to a new item) On the contrary, the list of categories current page belongs to, should be near the footer (see MDC:Policies_and_guidelines page) (dria: fix catlinks style) The arrows that appear if you select "Enhanced recent changes" in your preferences have an ugly border around them. --Nickolay 04:43, 25 Aug 2005 (PDT) The radio ...
Actionscript Acceptance Tests - Archive of obsolete content
stern Daylight Time = ('EST','EDT') # Write timezones as tuples, one to each line. ('EST', 'EDT') ('CST', 'CDT') ('MST', 'MDT') ('PST', 'PDT') testname.err This file is used when the test throws an uncatchable error. The first line must contain the expected error (without the extra debugger information). The exitcode is optional, but must be defined in this file if non-zero. VerifyError: Error #1021 exitcode: 1 testname.exitcode File that specifies the expected exitcode. Should just be an integer with nothing else. (Note that if a .err file is defined, the .exitcode file will be ignored). In this example the .as test runs out of memory and so the expected exitcode is: 128 testname.out File that specifies expected output. This should only be used when it is not possible to generate the...
Actionscript Performance Tests - Archive of obsolete content
iterations is greater than 2 all times are displayed in [], faster time is displayed in the output column, and the 95% confidence interval is calculated. The 95% confidence interval is the calculated percentage of the mean value to fall within 95% of the measured results. For example if the mean is 100 and the 95% confidence interval is 2%, 95% of the expected values should fall between 98 and 102. To compare two vms against each other export AVM2=<path to 2nd vm> or use --avm2=<path to 2nd vm>. The percentage difference is calculated between the two vms. See the --help usage for more details about performance tests. # to run a group of tests (e.g. sunspider) $ ./runtests.py sunspider/*.as sunspider/as3/*.as test avm metric sunspider/ac...
XML in Mozilla - Archive of obsolete content
in arbitrary XML documents, not even if the XHTML namespace is used. The public identifiers that are recognized are: -//W3C//DTD XHTML 1.0 Transitional//EN -//W3C//DTD XHTML 1.1//EN -//W3C//DTD XHTML 1.0 Strict//EN -//W3C//DTD XHTML 1.0 Frameset//EN -//W3C//DTD XHTML Basic 1.0//EN -//W3C//DTD XHTML 1.1 plus MathML 2.0//EN -//W3C//DTD XHTML 1.1 plus MathML 2.0 plus SVG 1.1//EN -//W3C//DTD SVG 20001102//EN -//WAPFORUM//DTD XHTML Mobile 1.0//EN XML Linking and Pointing XML Linking support includes XML Base and simple XLinks. You can make any XML element into an XLink by using the XLink namespace http://www.w3.org/1999/xlink. You can also use the linking elements from the XHTML namespace. See the Testing and QA section for samples. For pointing into resources in XML documents Mozilla also suppor...
Install script template - Archive of obsolete content
s. * * @param dirPath directory path from getFolder * @param spaceRequired required space in kilobytes * **/ function verifyDiskSpace(dirPath, spaceRequired) { var spaceAvailable; // Get the available disk space on the given path spaceAvailable = fileGetDiskSpaceAvailable(dirPath); // Convert the available disk space into kilobytes spaceAvailable = parseInt(spaceAvailable / 1024); // do the verification if(spaceAvailable < spaceRequired) { logComment("Insufficient disk space: " + dirPath); logComment(" required : " + spaceRequired + " K"); logComment(" available: " + spaceAvailable + " K"); return(false); } return(true); } /** * Function for writing keys to the Win32 System Registry. * You should not stop the install process because the f...
Windows Install - Archive of obsolete content
error checking before either performInstall or cancelInstall is called. ...
Installer Script - Archive of obsolete content
// do the verification 10. ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
ition of the main installation block that starts at line 24). // this function verifies disk space in kilobytes function verifyDiskSpace(dirPath, spaceRequired) { var spaceAvailable; // Get the available disk space on the given path spaceAvailable = fileGetDiskSpaceAvailable(dirPath); // Convert the available disk space into kilobytes spaceAvailable = parseInt(spaceAvailable / 1024); // do the verification if(spaceAvailable < spaceRequired) { logComment("Insufficient disk space: " + dirPath); logComment(" required : " + spaceRequired + " K"); logComment(" available: " + spaceAvailable + " K"); return(false); } return(true); } In the verifyDiskSpace block, fileGetDiskSpaceAvailable is called with dirPath as its expected input. Thi...
preference - Archive of obsolete content
boolean Gets and sets the value of the disabled attribute. hasUserValue Type: boolean True if the preference has been changed from its default value. instantApply (readonly boolean) Whether to use instant apply for this preference. This is true if either the element has an instantApply attribute set to true, or the <prefwindow>'s instantApply property is true. (But note bug 451025.) inverted Type: boolean Gets and sets the value of the inverted attribute. locked Type: boolean If true, the preference has been locked and disabled in the system configuration, preventing the value from being changed. This property is read-only. name Type: string The name of the preference to change. For example, the browser's hom...
Building XULRunner - Archive of obsolete content
To find out how those Firefox tags and XULRunner version maps, check out the file mozilla/config/milestone.txt . You can also check the User Agent string in Firefox Help/About menu to get the mapping from a certain binary Firefox version to the corresponding XULRunner version. For instance, in Firefox 2.0.0.9 you will get : Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.9) Gecko/20071025 Firefox/2.0.0.9 Therefore the XULRunner version for this Firefox version is : 1.8.1.9 Fetching Sources from Mercurial As with all other Mozilla products, one would fetch recent sources from Mercurial. For example, to build XULRunner with the top of the tree: hg clone http://hg.mozilla.org/mozilla-central/ src cd src echo ". \$topsrcdir/xulrunner/config/mozconfig" > .mozconfig make -f client...
application/http-index-format specification - Archive of obsolete content
e parsers should ignore this data. This data is not intended for display to the end user and is only meant as a comment to make the file format clear to a human interpreter. 101 Pre formatted human readable information line. This data is intended for the end user of the file format data if there is one. This data should be presented to the user when they are viewing data drawn from the file. 102 A human readable information line in HTML format. This data is intended for the end user of the file format data if there is one. This data should be presented to the user when they are viewing data drawn from the file. This data should be parsed as HTML. 200 Defines the field names for the 201 file index code. A valid 200 line consists of one or more white space separated tokens that describ...
Mozilla.dev.apps.firefox-2006-09-29 - Archive of obsolete content
p the http requests. There have been no responses so far. Can't view Keith Olbermann Videos A user inability to launch videos, worked fine for others, ended up being a Flash version problem. Firefox 2 on Windows Vista Discussion about the "state of affairs" of Firefox 2 on Windows Vista RC1 - update for RC1 listed in Update History as 'Install Pending' right-click "Copy email address" - bug 353102 A proposed Bug Fix to the 'Copy email address' bug how to use the RSS feeds discovery & parsing tool in another open source project? A user looking to be pointed in the right direction of how to use the RSS feeds discovery & parsing tool. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Summary List ...
2006-09-29 - Archive of obsolete content
p the http requests. There have been no responses so far. Can't view Keith Olbermann Videos A user inability to launch videos, worked fine for others, ended up being a Flash version problem. Firefox 2 on Windows Vista Discussion about the "state of affairs" of Firefox 2 on Windows Vista RC1 - update for RC1 listed in Update History as 'Install Pending' right-click "Copy email address" - bug 353102 A proposed Bug Fix to the 'Copy email address' bug how to use the RSS feeds discovery & parsing tool in another open source project? A user looking to be pointed in the right direction of how to use the RSS feeds discovery & parsing tool. Meetings None this week. Authors Sara Minchella (sara) Dave Manley (seneManley) Back to Summary List ...
2006-11-24 - Archive of obsolete content
Summary: mozilla.dev.apps.firefox - November 17, 2006 - November 24, 2006 Announcements None this week. Discussions Microsummary w/ Script A user created patch that will allow script to run in a sandbox during the update of a microsummary. They would like to discuss the use of it in bug 361026 rich results for searches A proposal for a search tool that gives users a quicker path to specific information they are looking for. Trunk builds + WinXP update = broken? A User questions if there is something broken in a nightly build since the user keeps getting this error from the trunk: "firefox.exe - Application Error: The application failed to initialize properly." Removal of false positives in Firefox 2 Phishing A user inquires how to remove false positives from the F...
New in JavaScript 1.7 - Archive of obsolete content
The following features added with JavaScript 1.7 were not part of an ECMA-262 standard at the time. In more recent Firefox versions, the implementation is updated to work with semantics as specified in ECMAScript Edition 6. Please see the reference pages for differences. Iterators and generators Array comprehensions let statement (support for let expression was dropped in Gecko 41, see bug 1023609). const statement Destructuring assignment (support for JS1.7 style destructuring for-in was dropped in Gecko 40, see bug 1083498). ...
Port - MDN Web Docs Glossary: Definitions of Web-related terms
For example, the default port for the HTTP protocol is 80 and the default port for the HTTPS protocol is 443, so a HTTP server waits for requests on those ports. ...
CSS values and units - Learn web development
a look at some of the types of value and unit you may frequently encounter, with examples so that you can try out different possible values. Numbers, lengths, and percentages There are various numeric data types that you might find yourself using in CSS. The following are all classed as numeric: Data type Description <integer> An <integer> is a whole number such as 1024 or -55. <number> A <number> represents a decimal number -- it may or may not have a decimal point with a fractional component, for example 0.255, 128, or -1.2. <dimension> A <dimension> is a <number> with a unit attached to it, for example 45deg, 5s, or 10px. <dimension> is an umbrella category that includes the <length>, <angle>, <time>, and <resolution> types. ...
Using data attributes - Learn web development
not support dataset. To support IE 10 and under you need to access data attributes with getAttribute() instead. Also, the performance of reading data-attributes compared to storing this data in a regular JS object is poor. That said, though, for custom element-associated metadata, they are a great solution. In Firefox 49.0.2 (and perhaps earlier/later versions), the data attributes that exceed 1022 characters will not be read by Javascript (EcmaScript 4). ...
From object to iframe — other embedding technologies - Learn web development
lse { textarea.value = userEntry; solution.value = 'Show solution'; } updateCode(); }); const htmlSolution = '<iframe width="420" height="315" src="https://www.youtube.com/embed/QH2-TGUlwu4" frameborder="0" allowfullscreen>\n</iframe>\n\n<iframe src="https://www.google.com/maps/embed?pb=!1m18!1m12!1m3!1d37995.65748333395!2d-2.273568166412784!3d53.473310471916975!2m3!1f0!2f0!3f0!3m2!1i1024!2i768!4f13.1!3m3!1m2!1s0x487bae6c05743d3d%3A0xf82fddd1e49fc0a1!2sThe+Lowry!5e0!3m2!1sen!2suk!4v1518171785211" width="600" height="450" frameborder="0" style="border:0" allowfullscreen>\n</iframe>'; let solutionEntry = htmlSolution; textarea.addEventListener('input', updateCode); window.addEventListener('load', updateCode); // stop tab key tabbing out of textarea and // make it write a tab at t...
Index - Learn web development
alues articles. 100 Test your skills: Loops Beginner, JavaScript, Learn, Loops This aim of this skill test is to assess whether you've understood our Looping code article. 101 Solve common problems in your JavaScript code Beginner, JavaScript, Learn The following links point to solutions to common problems you may encounter when writing JavaScript. 102 Learn to style HTML using CSS Beginner, CSS, CodingScripting, Debugging, Landing, Style, Topic, length, specificity Cascading Stylesheets -- or CSS -- is the first technology you should start learning after HTML. While HTML is used to define the structure and semantics of your content, CSS is used to style it and lay it out. For example, you can use CSS to alter the font, color, siz...
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
ate at which the sprite cycles its frames using the following code: if (posX % 13 === 0) { if (sprite === 5) { sprite = 0; } else { sprite++; } } So the code only cycles the sprite once every 13 animation frames. ...Actually, it's about every 6.5 frames, as we update posX (character's position on the screen) by two each frame: if (posX > width/2) { newStartPos = -( (width/2) + 102 ); posX = Math.ceil(newStartPos / 13) * 13; console.log(posX); } else { posX += 2; } This is the code that calculates how to update the position in each animation frame. The method you use to throttle your animation will depend on your particular code. For instance, in the earlier spinner example, you could make it appear to move slower by only increasing rotateCount by one on each frame,...
Setting up your own test automation environment - Learn web development
: Inside your project directory, create a new file called bstack_google_test.js. Give it the following contents: const webdriver = require('selenium-webdriver'), By = webdriver.By, until = webdriver.until; // Input capabilities let capabilities = { 'browserName' : 'Firefox', 'browser_version' : '56.0 beta', 'os' : 'OS X', 'os_version' : 'Sierra', 'resolution' : '1280x1024', 'browserstack.user' : 'YOUR-USER-NAME', 'browserstack.key' : 'YOUR-ACCESS-KEY', 'browserstack.debug' : 'true', 'build' : 'First build' }; let driver = new webdriver.Builder(). usingServer('http://hub-cloud.browserstack.com/wd/hub'). withCapabilities(capabilities). build(); driver.get('http://www.google.com'); driver.findElement(By.name('q')).sendKeys('webdriver'); driver.s...
Debugging Frame Reflow
500,UC c=1500,UC cnt=879 where the previous information is used. The block has been required to compute the max. element size only once and it reports now: block 02D7BCF8 d=1410,300 The block shows the same address as the previous one. Frames with children that overflow the parent have the NS_FRAME_OUTSIDE_CHILDREN flag set. For these frames the overflow area is displayed as block 025ED8F0 d=8940,1020 o=(0,0) 9180 x 1020. The overflow area is specified as (x,y) origin and width x height. The reflow finishes at the same level where it started. Advanced reflow debugging The previously described technique dumps the data for every frame. Sometimes the log is clearer if only the main frames are shown. The entries in the reflow log can be controlled on a frame level. For instance adding text 0 to t...
Old Thunderbird build
). Try asking in mozilla.dev.builds - include details of what is in your mozconfig, and what the actual error is. Check if your mozilla/ is a symlink. A symlink there is not supported. Check for @TOPSRCDIR@ or relative paths in your mozconfig. Those have caused several problems historically and tend to be poorly tested when the build system changes. If on Windows you get link errors like "LNK1102: out of memory" or "LNK1318: Unexpected PDB error; OK (0)", try deleting the largest .PDB files before rushing out the door to buy more RAM. Clobbering (see below) will also remove those files. Try with a clean obj-dir. You can clean out previous build artefacts using ./mozilla/mach clobber References General Build Documentation comm-central Using the Mozilla symbol server ...
Simple Thunderbird build
). Try asking in mozilla.dev.builds - include details of what is in your mozconfig, and what the actual error is. Check if your mozilla/ is a symlink. A symlink there is not supported. Check for @TOPSRCDIR@ or relative paths in your mozconfig. Those have caused several problems historically and tend to be poorly tested when the build system changes. If on Windows you get link errors like "LNK1102: out of memory" or "LNK1318: Unexpected PDB error; OK (0)", try deleting the largest .PDB files before rushing out the door to buy more RAM. Clobbering (see below) will also remove those files. Try with a clean obj-dir. You can clean out previous build artefacts using ./mach clobber References General Build Documentation comm-central Using the Mozilla symbol server ...
pymake
make.py (and the pymake modules that support it) are an implementation of the make tool which are mostly compatible with makefiles written for GNU make. Prerequisites If running Windows, you need to have a Windows build environment installed for using pymake to build Mozilla. On other operating systems (Linux, OS X, etc), pymake itself only requires Python 2.6 or higher (but not Python 3). Please note that Python 2.7 is strongly recommended. Usage If you use mach for everything, you don't have to worry about gmake and pymake: mach will run whatever is best for the current machine. ...
HTMLIFrameElement.sendMouseEvent()
utton has been pressed on the mouse: 0 (Left button), 1 (middle button), or 2 (right button). clickCount The number of clicks that should be performed. modifiers A number representing a key pressed at the same time the mouse button was clicked: 1 : Alt 2 : Ctrl 4 : Shift 8 : Meta 16 : Alt Gr 32 : Caps Lock 64 : Fn 128 : Num Lock 256 : Scroll 512 : Symbol Lock 1024 : Win Note: You can specify multiple key modifiers separated by a pipe symbol, for example 1 | 1014. Examples var browser = document.querySelector('iframe'); browser.sendMouseEvent("mousemove", x, y, 0, 0, 0); browser.sendMouseEvent("mousedown", x, y, 0, 1, 0); browser.sendMouseEvent("mouseup", x, y, 0, 1, 0); Specification Not part of any specification. ...
HTMLIFrameElement.sendTouchEvent()
degrees. forces An array of numbers representing the intensity of each touch in the range 0-1. count The number of touches that should be performed. modifiers A number representing a key pressed at the same time the mouse button was clicked: 1 : Alt 2 : Ctrl 4 : Shift 8 : Meta 16 : Alt Gr 32 : Caps Lock 64 : Fn 128 : Num Lock 256 : Scroll 512 : Symbol Lock 1024 : Win Note: You can specify multiple key modifiers separated by a pipe symbol, for example 1 | 1014. Examples var browser = document.querySelector('iframe'); browser.sendTouchEvent("touchstart", [1], [x], [y], [2], [2], [20], [0.5], 1, 0); Specification Not part of any specification. ...
Uplifting a localization from Central to Aurora
added 22 changesets with 23 changes to 46 files (+1 heads) (run 'hg heads' to see heads, 'hg merge' to merge) OK, let's make sure we're not talking relbranches: hg heads --template '{node} {branches}\n' This is printing something like 5131e147fa50c28ec858c7d9fd1ba201ea2a433b 4da525ed77699794c56081791bd46cc85983f6f8 9bc7e6c58fc091c8cd0e8d9e1dbc7e6f592772a7 GECKO20b12_2011022218_RELBRANCH 230e99fada602842d9630e673077ef9f1ab34247 GECKO20b12pre_20110216_RELBRANCH 41a4357884d7bcc50e69c71014124d3af2482afe COMM20b11_20110203_RELBRANCH 2ec6ad14e7168ebeb999b1e8ae10632ae4c9df23 GECKO20b11_2011020209_RELBRANCH d68e647ac3c0fee709c13abb0f03fac24a1a5d29 GECKO20b11pre_20110126_RELBRANCH 7ff37dc6837669363a51ad3fd2874ac845d312d5 GECKO20b10_2011012115_RELBRANCH 6c31fe9bc...
Creating localizable web applications
t adding plural support here is not necessary because, for instance, the number of daily users in the example above will always be greater than 1, i.e. will always require the use of the plural form. While this is true for English, it should be noted that some languages require different forms of strings for numbers greater than 1 as well. For example, all numbers ending in 2, 3 or 4 (be it 21 or 1021) might require a special plural form. Read more about plurals in gettext and about plural rules for different languages. Don't use text as decoration This needs more work. <?printf("<a href=\"%s\">" . _("Step 3: Testing your Persona Images") . "</a> &raquo;", $locale_conf->url('/demo_create_3'));?> <?printf("<a href=\"%s\">" . _("Step 2: Creating a Persona Footer Image") . "</a> &raquo;", $...
Fonts for Mozilla's MathML engine
he font" button from the window that opens. If desired, you may also do the same for the other font files. Note: A deprecated version of STIX is preinstalled starting with OS X Lion and should ensure relatively good MathML rendering. Enhancement requests have been submitted to Apple to ship OpenType MATH fonts in the default installation. If you have a developer account, these are problems 16841023 and 17021145. Linux Install the Latin Modern Math, STIX or XITS fonts, which are generally available from your package manager. On Debian/Ubuntu/Mint and other Debian-based distributions, use the following command: sudo apt-get install fonts-lmodern fonts-stix On Fedora and other Fedora-based distributions, use the following command (stix-math-fonts is often already installed): sudo dnf i...
Mozilla Port Blocking
daytime 15 netstat 17 qotd 19 chargen 20 ftp data 21 ftp control 22 ssh 23 telnet 25 smtp 37 time 42 name 43 nicname 53 domain 77 priv-rjs 79 finger 87 ttylink 95 supdup 101 hostriame 102 iso-tsap 103 gppitnp 104 acr-nema 109 POP2 110 POP3 111 sunrpc 113 auth 115 sftp 117 uucp-path 119 NNTP 123 NTP 135 loc-srv / epmap 139 netbios 143 IMAP2 179 BGP 389 LDAP 465 SMTP+SSL 512 prin...
Mozilla Quirks Mode Behavior
leQuirkColorRule, re-describe, and figure out when it changed.] Obsolete since Gecko 37 The empty-cells property defaulted to hide in quirks mode but show (according to CSS2.1) in standards mode (see bug 33244) (though the correct fix would be to specify it on the HTML TABLE element in quirk.css). This quirk has been removed in Firefox 37 and empty-cells also defaults to show in quirks mode (bug 1020400). In quirks mode floated tables never move to the next "line" if they don't fit next to other floats, they just keep widening the page (see bug 43086). To correspond, their width is computed as though only the remaining available space is the containing block width (bug 99461). In quirks mode colspan="0" and rowspan="0" are intentionally not handled as described in HTML4 (bug 9879). hspac...
powermetrics
0.00 Google Chrome Helper 67304 55.23 64.83 0.03 0.00 9.43 4.33 19.17 Google Chrome 67301 63.77 68.09 29.46 0.13 76.11 22.26 0.00 Google Chrome Helper 67320 38.30 66.70 17.83 0.00 45.78 19.29 0.00 com.apple.WindowServer 68 102.58 112.36 43.15 80.52 WindowServer 141 103.03 58.19 60.48 6.40 112.36 43.15 80.53 com.apple.Safari 499 267.19 110.53 46.05 1.69 com.apple.WebKit.WebContent 67372 190.15 79.34 2.02 0.14 129.28...
PR_NETDB_BUF_SIZE
Recommended size to use when specifying a scratch buffer for PR_GetHostByName, PR_GetHostByAddr, PR_GetProtoByName, or PR_GetProtoByNumber. Syntax #include <prnetdb.h> #if defined(AIX) || defined(OSF1) #define PR_NETDB_BUF_SIZE sizeof(struct protoent_data) #else #define PR_NETDB_BUF_SIZE 1024 #endif ...
JSS FAQ
Mozilla › Projects › NSS › JSS › JSS FAQ
one is linked with the NT version of NSPR and the other is linked with the Windows version of NSPR. The NT fiber problem affects applications that call blocking system calls from the primordial thread. Either use the WIN 95 version of NSPR/NSS/JSS components (essentially all non-fiber builds) or set the environment variable NSPR_NATIVE_THREADS_ONLY=1. ...
NSS_3.12.2_release_notes.html
ug 447563: modutil -add prints no error explanation on failure Bug 448431: PK11_CreateMergeLog() declaration causes gcc warning when compiling with -Wstrict-prototypes Bug 449334: pk12util has duplicate options letters Bug 449725: signver is still using static libraries. ...
NSS 3.18 release notes
t a callback function that implements this function interface. Notable Changes in NSS 3.18 The highest TLS protocol version enabled by default has been increased from TLS 1.0 to TLS 1.2. Similarly, the highest DTLS protocol version enabled by default has been increased from DTLS 1.0 to DTLS 1.2. The default key size used by certutil when creating an RSA key pair has been increased from 1024 bits to 2048 bits. On Mac OS X, by default the softokn shared library will link with the sqlite library installed by the operating system, if it is version 3.5 or newer. The following CA certificates had the Websites and Code Signing trust bits turned off OU = Equifax Secure Certificate Authority SHA1 Fingerprint: D2:32:09:AD:23:D3:14:23:21:74:E4:0D:7F:9D:62:13:97:86:63:3A ...
NSS 3.19.2 release notes
NSS_3_19_2_RTM/src/ New in NSS 3.19.2 New Functionality No new functionality is introduced in this release. Notable Changes in NSS 3.19.2 Bug 1172128 - In NSS 3.19.1, the minimum key sizes that the freebl cryptographic implementation (part of the softoken cryptographic module used by default by NSS) was willing to generate or use was increased - for RSA keys, to 512 bits, and for DH keys, 1023 bits. This was done as part of a security fix for Bug 1138554 / CVE-2015-4000. Applications that requested or attempted to use keys smaller then the minimum size would fail. However, this change in behaviour unintentionally broke existing NSS applications that need to generate or use such keys, via APIs such as SECKEY_CreateRSAPrivateKey or SECKEY_CreateDHPrivateKey. In NSS 3.19.2, this cha...
NSS 3.35 release notes
The Websites (TLS/SSL) trust bit was turned off for the following CA certificates: CN = Chambers of Commerce Root SHA-256 Fingerprint: 0C:25:8A:12:A5:67:4A:EF:25:F2:8B:A7:DC:FA:EC:EE:A3:48:E5:41:E6:F5:CC:4E:E6:3B:71:B3:61:60:6A:C3 CN = Global Chambersign Root SHA-256 Fingerprint: EF:3C:B4:17:FC:8E:BF:6F:97:87:6C:9E:...
NSS 3.41 release notes
ollowing ciphersuites by default: TLS_ECDHE_ECDSA_WITH_AES_256_GCM_SHA384 TLS_ECDHE_RSA_WITH_AES_256_GCM_SHA384 TLS_DHE_RSA_WITH_AES_256_GCM_SHA384 TLS_RSA_WITH_AES_256_GCM_SHA384 New Functions none Notable Changes in NSS 3.41 The following CA certificates were Added: CN = Certigna Root CA SHA-256 Fingerprint: D48D3D23EEDB50A459E55197601C27774B9D7B18C94D5A059511A10250B93168 CN = GTS Root R1 SHA-256 Fingerprint: 2A575471E31340BC21581CBD2CF13E158463203ECE94BCF9D3CC196BF09A5472 CN = GTS Root R2 SHA-256 Fingerprint: C45D7BB08E6D67E62E4235110B564E5F78FD92EF058C840AEA4E6455D7585C60 CN = GTS Root R3 SHA-256 Fingerprint: 15D5B8774619EA7D54CE1CA6D0B0C403E037A917F131E8A04E1E6B7A71BABCE5 CN = GTS Root R4 SHA-256 F...
NSS 3.43 release notes
This Bugzilla query returns all the bugs fixed in NSS 3.43: https://bugzilla.mozilla.org/buglist.cgi?resolution=FIXED&classification=Components&query_format=advanced&product=NSS&target_milestone=3.43 Compatibility NSS 3.43 shared libraries are backward compatible with all older NSS 3.x shared libraries. A program linked with older NSS 3.x s...
NSS 3.47 release notes
ickname for EC keys Bug 1586456 - Unnecessary conditional in pki3hack, pk11load and stanpcertdb Bug 1576307 - Check mechanism param and param length before casting to mechanism-specific structs Bug 1577953 - Support longer (up to RFC maximum) HKDF outputs Bug 1508776 - Remove refcounting from sftk_FreeSession (CVE-2019-11756) Bug 1494063 - Support TLS Exporter in tstclnt and selfserv Bug 1581024 - Heap overflow in NSS utility "derdump" Bug 1582343 - Soft token MAC verification not constant time Bug 1578238 - Handle invald tag sizes for CKM_AES_GCM Bug 1576295 - Check all bounds when encrypting with SEED_CBC Bug 1580286 - NSS rejects TLS 1.2 records with large padding with SHA384 HMAC Bug 1577448 - Create additional nested S/MIME test messages for Thunderbird Bug 1399095 - Allow ns...
NSS 3.51.1 release notes
5 or newer. NSS 3.51.1 source distributions are available on ftp.mozilla.org for secure HTTPS download: Source tarballs: https://ftp.mozilla.org/pub/mozilla.org/security/nss/releases/NSS_3_51_1_RTM/src/ Other releases are available in NSS Releases. Notable Changes in NSS 3.51.1 Bug 1617968 - Update Delegated Credentials implementation to draft-07. Bugs fixed in NSS 3.51.1 Bug 1619102 - Add workaround option to include both DTLS and TLS versions in DTLS supported_versions. Bug 1619056 - Update README: TLS 1.3 is not experimental anymore. Bug 1618739 - Don't assert fuzzer behavior in SSL_ParseSessionTicket. Bug 1618915 - Fix UBSAN issue in ssl_ParseSessionTicket. Bug 1608245 - Consistently handle NULL slot/session. Bug 1608250 - broken fipstest handling of KI_len. Bug 161...
NSS 3.52 release notes
TION_LIST structs to be packed. Bug 1624377 - Fix clang warning for unknown argument '-msse4'. Bug 1623374 - Support new PKCS #11 v3.0 Message Interface for AES-GCM and ChaChaPoly. Bug 1623184 - Fix freebl_cpuid for querying Extended Features. Bug 1622555 - Fix argument parsing in lowhashtest. Bug 1620799 - Introduce NSS_DISABLE_GCM_ARM32_NEON to build on arm32 without NEON support. Bug 1619102 - Add workaround option to include both DTLS and TLS versions in DTLS supported_versions. Bug 1619056 - Update README: TLS 1.3 is not experimental anymore. Bug 1618915 - Fix UBSAN issue in ssl_ParseSessionTicket. Bug 1618739 - Don't assert fuzzer behavior in SSL_ParseSessionTicket. Bug 1617968 - Update Delegated Credentials implementation to draft-07. Bug 1617533 - Update HACL* dependencies ...
NSS Config Options
NSS Config Options Format The specified ciphers will be allowed by policy, but an application may allow more by policy explicitly: config="allow=curve1:curve2:hash1:hash2:rsa-1024..." Only the specified hashes and curves will be allowed: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1" Only the specified hashes and curves will be allowed, and RSA keys of 2048 or more will be accepted, and DH key exchange with 1024-bit primes or more: config="disallow=all allow=sha1:sha256:secp256r1:secp384r1:min-rsa=2048:min-dh=1024" A policy that enables the AES ciphersuites and the SECP256/384 curves: config="allow=aes128-cbc:aes128-gcm::HMAC-SHA1:SHA1:SHA256:SHA384:RSA:ECDHE-RSA:SECP256R1:SECP384R1" Turn off md5 config="disallow=MD5" Turn off md5 and sha1 only for SSL con...
Enc Dec MAC Output Public Key as CSR
de #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 BLOCKSIZE 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 MACKEY-----" #define IV_HEADER "-----BEGI...
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 BLOCKSIZE 32 #define MODBLOCKSIZE 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_HE...
NSS Sample Code Sample1
EYPrivateKey *prvKey = 0; SECKEYPublicKey *pubKey = 0; PK11SlotInfo *slot = 0; PK11RSAGenParams rsaParams; SECStatus s; // See if there is already a private key with this name. // If there is one, no further action is required. rv = getPrivateKey(&prvKey); if (rv == 0 && prvKey) goto done; rv = 0; // These could be parameters to the Init function rsaParams.keySizeInBits = 1024; rsaParams.pe = 65537; slot = PK11_GetInternalKeySlot(); if (!slot) { rv = 1; goto done; } prvKey = PK11_GenerateKeyPair(slot, CKM_RSA_PKCS_KEY_PAIR_GEN, &rsaParams, &pubKey, PR_TRUE, PR_TRUE, 0); if (!prvKey) { rv = 1; goto done; } // Set the nickname on the private key so that it // can be found later. s = PK11_SetPrivateKeyNickname(prvKey, mServerName); if ...
sample2
s.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 BLOCKSIZE 32 #define MODBLOCKSIZE 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_HEADER "-----BEGIN MAC-----" #define MAC_TRAILER "-----END MAC-...
nss tech note7
ures, that is, they should only be created by some NSS functions and you always pass pointers to these data types to NSS functions and never examine the members of these structures. The strength of an RSA key pair is measured by the size of its modulus because given the modulus and public exponent, the best known algorithm for computing the private exponent is to factor the modulus. At present 1024 bit and 2048 bit RSA keys are the most common and recommended. To prevent denial-of-service attacks with huge public keys, NSS disallows modulus size greater than 8192 bits. How are these keys created in NSS? There are a few possibilities. RSA key pairs may be generated inside a crypto module (also known as a token). Use PK11_GenerateKeyPair() to generate a key pair in a crypto module. Key...
Python binding for NSS
lly it is the same as release 0.14.0 Fix bug in ssl_example.py and test_client_server.py where complete data was not read from socket. The Beast CVE fix in NSS causes only one octet to be sent in the first socket packet and then the remaining data is sent normally, this is known as 1/n-1 record splitting. The example and test SSL code sent short messages and then did a sock.recv(1024). We had always received the entire message in one sock.recv() call because it was so short. But sock.recv() does not guarantee how much data will be received, thus this was a coding mistake. The solution is straight forward, use newlines as a record separator and call sock.readline() instead of sock.recv(). sock.readline() calls sock.recv() internally until a complete line is read or the socket...
sslerr.html
cy password. SEC_ERROR_PKCS12_CERT_COLLISION -8106 Unable to import. Same nickname already exists in database. SEC_ERROR_USER_CANCELLED -8105 The user clicked cancel. SEC_ERROR_PKCS12_DUPLICATE_DATA -8104 Not imported, already in database. SEC_ERROR_MESSAGE_SEND_ABORTED -8103 Message not sent. SEC_ERROR_INADEQUATE_KEY_USAGE -8102 Certificate key usage inadequate for attempted operation. SEC_ERROR_INADEQUATE_CERT_TYPE -8101 Certificate type not approved for application. SEC_ERROR_CERT_ADDR_MISMATCH -8100 Address in signing certificate does not match address in message headers. SEC_ERROR_PKCS12_UNABLE_TO_IMPORT_KEY -8099 Unable to import. Error attempting to import private key...
NSS Tools certutil
file that will automatically supply the password to include in a certificate or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent unauthorized access to this file. -g keysize Set a key size to use when generating new public and private key pairs. The minimum is 512 bits and the maximum is 8192 bits. The default is 1024 bits. Any size that is a multiple of 8 between the minimum and maximum is allowed. -h tokenname Specify the name of a token to use or act on. Unless specified otherwise the default token is an internal slot (specifically, internal slot 2). This slot can also be explicitly named with the string "internal". An internal slots is a virtual slot maintained in software, r...
certutil
assword to include in a certificate or to access a certificate database. This is a plain-text file containing one password. Be sure to prevent unauthorized access to this file. -g keysize Set a key size to use when generating new public and private key pairs. The minimum is 512 bits and the maximum is 8192 bits. The default is 1024 bits. Any size between the minimum and maximum is allowed. -h tokenname Specify the name of a token to use or act on. Unless specified otherwise the default token is an internal slot (specifically, internal slot 2). This slot can also be explicitly named with the string "internal". An internal slots is a virtual slot maintained ...
NSS tools : signtool
to sign objects, it behaves like an object-signing certificate. When it is imported into browser software such as Communicator, it behaves like an object-signing CA and cannot be used to sign objects. The -G option is available in Netscape Signing Tool 1.0 and later versions only. By default, it produces only RSA certificates with 1024-byte keys in the internal token. However, you can use the -s option specify the required key size and the -t option to specify the token. For more information about the use of the -G option, see "Generating Test Object-Signing Certificates""Generating Test Object-Signing Certificates" on page 1241. -l Lists signing certificat...
Index
JSExnType JSAPI Reference, Reference, Reference(2), SpiderMonkey These types are part of a JSErrorFormatString structure. They define which error to throw in case of a runtime error. JSEXN_NONE marks an unthrowable error. 101 JSExtendedClass JSAPI Reference, Obsolete, SpiderMonkey To implement a custom class that uses any of the JSExtendedClass callbacks: 102 JSExtendedClass.outerObject JSAPI Reference, Obsolete, SpiderMonkey See split objects. 103 JSExtendedClass.wrappedObject JSAPI Reference, Obsolete, SpiderMonkey If a class has the JSCLASS_IS_EXTENDED bit set in its JSClass.flags and has a non-null JSExtendedClass.wrappedObject, then objects of that class may be wrappers. In a few cases the JavaScript engine will...
JSAPI User Guide
// Array. if (!JS_InitStandardClasses(cx, global)) return 1; // Your application code here. This may include JSAPI calls to create your // own custom JS objects and run scripts. return 0; } int main(int argc, const char *argv[]) { // Initialize the JS engine. if (!JS_Init()) return 1; // Create a JS runtime. JSRuntime *rt = JS_NewRuntime(8L * 1024L * 1024L); if (!rt) return 1; // Create a context. JSContext *cx = JS_NewContext(rt, 8192); if (!cx) return 1; JS_SetErrorReporter(rt, reportError); int status = run(cx); // Shut everything down. JS_DestroyContext(cx); JS_DestroyRuntime(rt); JS_ShutDown(); return status; } Each JSNative has the same signature, regardless of what arg...
JSClass.flags
de that needs custom marking. SpiderMonkey reserves a few other flags for its internal use. They are JSCLASS_IS_ANONYMOUS, JSCLASS_IS_GLOBAL, JSCLASS_IS_PROXY, and JSCLASS_HAS_CACHED_PROTO. JSAPI applications should not use these flags. ...
JS_GetGCParameter
See Also MXR ID Search for JS_GetGCParameter MXR ID Search for JS_SetGCParameter bug 474801 JSGC_BYTES JSGC_NUMBER bug 474497 JSGC_MAX_CODE_CACHE_BYTES This option no-longer exists JS_GetGCParameterForThread JS_SetGCParameterForThread bug 624229 JSGC_MODE bug 631733 JSGC_UNUSED_CHUNKS bug 674480 JSGC_TOTAL_CHUNKS bug 641025 JSGC_SLICE_TIME_BUDGET bug 673551 JSGC_MARK_STACK_LIMIT bug 765435 JSGC_HIGH_FREQUENCY_TIME_LIMIT JSGC_HIGH_FREQUENCY_LOW_LIMIT JSGC_HIGH_FREQUENCY_HIGH_LIMIT JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MAX JSGC_HIGH_FREQUENCY_HEAP_GROWTH_MIN JSGC_LOW_FREQUENCY_HEAP_GROWTH JSGC_DYNAMIC_HEAP_GROWTH JSGC_DYNAMIC_MARK_SLICE bug 800063 JSGC_ALLOCATI...
JS_IdArrayGet
Name Type Description cx JSContext * A context. ida JSIdArray * The JSIdArray to get the length. index unsigned The index of the id in the JSIdArray. Description JS_IdArrayGet gets the item in the specified index of the ID array pointed to by ida. See Also MXR ID Search for JS_IdArrayGet JSIdArray JS_IdArrayLength bug 641027 ...
JS_IdArrayLength
ngth of a JSIdArray. ...
nsACString (External)
Class Declaration <map id="classes" name="classes"><area alt="" coords="1005,6,1096,54" href="http://developer.mozilla.org/en/nsACString_(External)" shape="rect" title="nsACString_(External)"> <area alt="" coords="980,102,1121,150" href="http://developer.mozilla.org/en/nsCStringContainer_(External)" shape="rect" title="nsCStringContainer_(External)"> <area alt="" coords="571,198,707,246" href="http://developer.mozilla.org/en/nsCString_external" shape="rect" title="nsCString_external"> <area alt="" coords="731,198,955,246" href="http://developer.mozilla.org/en/nsDependentCSubstring_external" shape="rect" title="nsDependentCSubstring_external"> <area alt="" coords="979,198,1123,246" href="http://developer.mozilla.org/en/PromiseFlatCString_(External)" shape="rect" title="PromiseFlatCStri...
nsAString (External)
Class Declaration This header provides wrapper classes around the frozen string API which are roughly equivalent to the internal string classes. ...
mozIRepresentativeColorCallback
be called when color analysis finishes. void onComplete( in boolean success, [optional] in unsigned long color ); Parameters success True if analysis was successful, false otherwise. Analysis can fail if the image is transparent, imageURI doesn't resolve to a valid image, or the image is too big. color The representative color as an integer in RGB form. e.g. 0xFF0102 == rgb(255,1,2). If success is false, color is not provided. ...
nsIAccessibleEvent
C EVENT_CONTEXTHELPEND 0x000D EVENT_DRAGDROPSTART 0x000E EVENT_DRAGDROPEND 0x000F EVENT_DIALOGSTART 0x0010 EVENT_DIALOGEND 0x0011 EVENT_SCROLLINGSTART 0x0012 EVENT_SCROLLINGEND 0x0013 EVENT_MINIMIZESTART 0x0016 EVENT_MINIMIZEEND 0x0017 EVENT_ATK_PROPERTY_CHANGE 0x0100 EVENT_ATK_SELECTION_CHANGE 0x0101 EVENT_ATK_TEXT_CHANGE 0x0102 EVENT_ATK_TEXT_SELECTION_CHANGE 0x0103 EVENT_ATK_TEXT_CARET_MOVE 0x0104 EVENT_ATK_VISIBLE_DATA_CHANGE 0x0105 EVENT_ATK_TABLE_MODEL_CHANGE 0x0110 EVENT_ATK_TABLE_ROW_INSERT 0x0111 EVENT_ATK_TABLE_ROW_DELETE 0x0112 EVENT_ATK_TABLE_ROW_REORDER 0x0113 EVENT_ATK_TABLE_COLUMN_INSERT 0x0114 EVENT_ATK_TABLE_COLUMN_DELETE 0x0115 EVENT_ATK_TABLE_C...
nsIAccessibleRole
OLE_HEADER. ROLE_PARAGRAPH 98 A paragraph of text. ROLE_RULER 99 A ruler such as those used in word processors. ROLE_AUTOCOMPLETE 100 A text entry having dialog or list containing items for insertion into an entry widget, for instance a list of words for completion of a text entry. It is used for xul:textbox@autocomplete. ROLE_EDITBAR 101 An editable text object in a toolbar. ROLE_ENTRY 102 An control whose textual content may be entered or modified by the user. ROLE_CAPTION 103 A caption describing another object. ROLE_DOCUMENT_FRAME 104 A visual frame or container which contains a view of document content. Document frames may occur within another Document instance, in which case the second document may be said to be embedded in the containing instance. HTML frames are often RO...
nsIEditor
// t...
nsIPromptService
d its button is unintentionally activated. Constant Value Description BUTTON_DELAY_ENABLE 67108864 Standard Buttons flags Constant Value Description STD_OK_CANCEL_BUTTONS 513 selects the standard set of OK/Cancel buttons. (BUTTON_TITLE_OK *BUTTON_POS_0) +(BUTTON_TITLE_CANCEL * BUTTON_POS_1) STD_YES_NO_BUTTONS 1027 selects the standard set of Yes/No buttons. (BUTTON_TITLE_YES *BUTTON_POS_0) +(BUTTON_TITLE_NO * BUTTON_POS_1) Methods alert() alert shows an alert dialog with an OK button. It works the same way as window.alert, but accepts a title for the dialog. You should use this method instead of window.alert in chrome code. void alert( in nsIDOMWindow aParent, in wstring aDialogTitle...
nsIWebBrowserChrome
CHROME_TOOLBAR 32 Value for the chromeFlags attribute. CHROME_LOCATIONBAR 64 Value for the chromeFlags attribute. CHROME_STATUSBAR 128 Value for the chromeFlags attribute. CHROME_PERSONAL_TOOLBAR 256 Value for the chromeFlags attribute. CHROME_SCROLLBARS 512 Value for the chromeFlags attribute. CHROME_TITLEBAR 1024 Value for the chromeFlags attribute. CHROME_EXTRA 2048 Value for the chromeFlags attribute. CHROME_WITH_SIZE 4096 Specifically for use with nsIWindowCreator. CHROME_WITH_POSITION 8192 Specifically for use with nsIWindowCreator. CHROME_WINDOW_MIN 16384 Represent special cases. CHROME_WINDOW_POPUP 32768 Represent special...
nsIWebNavigation
LOAD_FLAGS_BYPASS_CACHE 256 This flag specifies that the local web cache should be bypassed, but an intermediate proxy cache could still be used to satisfy the load. LOAD_FLAGS_BYPASS_PROXY 512 This flag specifies that any intermediate proxy caches should be bypassed (That is, that the content should be loaded from the origin server). LOAD_FLAGS_CHARSET_CHANGE 1024 This flag specifies that a reload was triggered as a result of detecting an incorrect character encoding while parsing a previously loaded document. LOAD_FLAGS_STOP_CONTENT 2048 If this flag is set, Stop() will be called before the load starts and will stop both content and network activity (the default is to only stop network activity). Effectively, this passes the ST...
Index
ample XUL overlay file: 101 Create Custom Column thunderbird The article "Creating a Custom Column" will get you well on the road to creating your own columns and populating them with custom data. The customDBHeaders Preference article provides information on a preference setting that exposes custom header data for use in a custom column within Thunderbird's main view. 102 Detect Opening Folder thunderbird Some actions require execution every time you open a folder (for example, registering a custom column handler. To do this you need to capture the select event of the folder [[XUL:tree|tree]] whose id is (conveniently) folderTree like so: 103 Filter Incoming Mail filter, incoming, mails, thunderbird To filter incoming mail, the f...
MailNews fakeserver
otal of four objects need to be set up in a fakeserver test on top of other testing. The outline of a test looks like this: var daemon = setupDaemon(); // Check with your local fakeserver docs var handlers = [ /* Some set of handlers */ ]; for (var handler in handlers) { // This sets up the fake server var server = new nsMailServer(new handler(daemon)); // Port to use. I tend to like using 1024 + default port number myself. // Probably best to include as a constant somewhere. Also, use something // larger than 1024 for best results. server.start(port); // Set up a nsIMsgIncomingServer locally localserver.someActionRequiringConnection(); server.performTest(); // Nothing will be executed until the connection is closed // localserver.closeCachedConnections() is generally ...
Use SQLite
nection) { for(var name in this.dbSchema.tables) aDBConnection.createTable(name, this.dbSchema.tables[name]); }, }; window.addEventListener("load", function(e) { tbirdsqlite.onLoad(e); }, false); This is another practical sample on how to handle openDatabase and SQL queries on the Client Side, using in-memory (BLOB) storage of 2Mb: var db = openDatabase('mydb', '1.0', 'Test DB', 2 * 1024 * 1024); var msg; db.transaction(function (tx) { tx.executeSql('CREATE TABLE IF NOT EXISTS LOGS (id unique, log)'); tx.executeSql('INSERT INTO LOGS (id, log) VALUES (1, "foobar")'); tx.executeSql('INSERT INTO LOGS (id, log) VALUES (2, "logmsg")'); msg = '<p>Log message created and row inserted.</p>'; document.querySelector('#status').innerHTML = msg; }); db.transaction(function (tx) ...
Using the Debugger map scopes feature - Firefox Developer Tools
he generated scopes (e.g., a bundle file with all concatenated module files). Let's take a look at how this works. If you want to follow along, use this example. Open the example page and then open the debugger using Tools > Web Developer > Debugger (or press Ctrl + I and then select the debugger). Select the "bundle.js" file in the Sources panel on the left and then set a breakpoint at line 102 in the increment function. When you click the increment button on the page and hit the breakpoint, an additional section is added to the right-hand panel below the Call stack to display variables mapped from the original scope, like this: As useful as this is, it would be even nicer if you could view the original code (before it was packages into the "bundle.js" file. Right-click on the s...
Index - Firefox Developer Tools
ce of Firefox doing the debugging is called the debugger. 101 Responsive Design Mode Design, Dev Tools, Firefox, Guide, Responsive Design, Tools, Web Development, l10n:priority Responsive design is the practice of designing a website so it looks and works properly on a range of different devices -- particularly mobile phones and tablets as well as desktops and laptops. 102 Rulers DevTools, Firefox, Rulers, Tools You can overlay horizontal and vertical rulers on a web page: 103 Settings Beginning with Firefox 62, the icon to open Developer Tools settings has been moved into a menu accessed by clicking/touching ... (the elipsis) on the right of the tab. 104 Shader Editor The Shader Editor enables you to see an...
Allocations - Firefox Developer Tools
were taken in this function (also shown as a percentage of the total) Self Bytes: the total number of bytes allocated in the allocation-samples in this function (also shown as a percentage of the total) Rows are sorted by the "Self Bytes" column. So in the example above: 8904 samples were taken in signalLater(), which is 28.57% of the total number of samples taken those samples allocated 1102888 bytes, which is 30.01% of the total memory allocated in all samples Next to each function name is a disclosure arrow. Click this to see the places this function was called from: Here you can see that signalLater() was called from two places: removeInner() and setSelectionInner(). In this way you can walk back up the call stack, and understand better the context for these allocations. Sel...
Web Console remoting - Firefox Developer Tools
nt for this purpose. ...
AnalyserNode.fftSize - Web APIs
FT) to get frequency domain data. Syntax var curValue = analyserNode.fftSize; analyserNode.fftSize = newValue; Value An unsigned integer, representing the window size of the FFT, given in number of samples. A higher value will result in more details in the frequency domain but fewer details in the time domain. Must be a power of 2 between 252^5 and 2152^15, so one of: 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, 16384, and 32768. Defaults to 2048. Note: If its value is not a power of 2, or it is outside the specified range, a DOMException with the name IndexSizeError is thrown. Example The following example shows basic usage of an AudioContext to create an AnalyserNode, then requestAnimationFrame and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" o...
AnalyserNode.frequencyBinCount - Web APIs
th = analyserNode.frequencyBinCount; Value An unsigned integer, equal to the number of values that AnalyserNode.getByteFrequencyData() and AnalyserNode.getFloatFrequencyData() copy into the provided TypedArray. For technical reasons related to how the Fast Fourier transform is defined, it is always half the value of AnalyserNode.fftSize. Therefore, it will be one of 16, 32, 64, 128, 256, 512, 1024, 2048, 4096, 8192, and 16384. Example The following example shows basic usage of an AudioContext to create an AnalyserNode, then requestAnimationFrame and <canvas> to collect frequency data repeatedly and draw a "winamp bargraph style" output of the current audio input. For more complete applied examples/information, check out our Voice-change-O-matic demo (see app.js lines 128-205 for relevan...
AnalyserNode.getFloatTimeDomainData() - Web APIs
ationFrame and <canvas> to collect time domain data repeatedly and draw an "oscilloscope style" output of the current audio input. For more complete applied examples/information, check out our Voice-change-O-matic-float-data demo (see the source code too). var audioCtx = new (window.AudioContext || window.webkitAudioContext)(); var analyser = audioCtx.createAnalyser(); ... ...
BaseAudioContext.createScriptProcessor() - Web APIs
b Audio API spec publication, this feature has been marked as deprecated, and was replaced by AudioWorklet (see AudioWorkletNode). Syntax var scriptProcessor = audioCtx.createScriptProcessor(bufferSize, numberOfInputChannels, numberOfOutputChannels); Parameters bufferSize The buffer size in units of sample-frames. If specified, the bufferSize must be one of the following values: 256, 512, 1024, 2048, 4096, 8192, 16384. If it's not passed in, or if the value is 0, then the implementation will choose the best buffer size for the given environment, which will be a constant power of 2 throughout the lifetime of the node. This value controls how frequently the audioprocess event is dispatched and how many sample-frames need to be processed each call. Lower values for bufferSize will resul...
DirectoryReaderSync - Web APIs
f (entry.isDirectory) { getAllEntries(entry.createReader()); } } } // Forward the error to main app. function onError(e) { postMessage('ERROR: ' + e.toString()); } self.onmessage = function(e) { var data = e.data; // Ignore everything else except our 'list' command. if (!data.cmd || data.cmd != 'list') { return; } try { var fs = requestFileSystemSync(TEMPORARY, 1024*1024 /*1MB*/); getAllEntries(fs.root.createReader()); self.postMessage({entries: paths}); } catch (e) { onError(e); } }; Method overview EntrySync readEntries () raises (FileException); Method readEntries() Returns a lost of entries from a specific directory. Call this method until an empty array is returned. EntrySync readEntries ( ) raises (FileException...
Document.createNodeIterator() - Web APIs
or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the fi...
Document.createTreeWalker() - Web APIs
tion or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the fi...
Using files from web applications - Web APIs
ize() { let nBytes = 0, oFiles = this.files, nFiles = oFiles.length; for (let nFileId = 0; nFileId < nFiles; nFileId++) { nBytes += oFiles[nFileId].size; } let sOutput = nBytes + " bytes"; // optional code for multiples approximation const aMultiples = ["KiB", "MiB", "GiB", "TiB", "PiB", "EiB", "ZiB", "YiB"]; for (nMultiple = 0, nApprox = nBytes / 1024; nApprox > 1; nApprox /= 1024, nMultiple++) { sOutput = nApprox.toFixed(3) + " " + aMultiples[nMultiple] + " (" + nBytes + " bytes)"; } // end of optional code document.getElementById("fileNum").innerHTML = nFiles; document.getElementById("fileSize").innerHTML = sOutput; } document.getElementById("uploadInput").addEventListener("change", updateSize, false); </script>...
FileSystemDirectoryEntry - Web APIs
ebkitDirectoryEntry; ... function onFs(fs){ fs.root.getDirectory('Documents', {create:true}, function(directoryEntry){ //directoryEntry.isFile === false //directoryEntry.isDirectory === true //directoryEntry.name === 'Documents' //directoryEntry.fullPath === '/Documents' }, onError); } // Opening a file system with temporary storage window.requestFileSystem(TEMPORARY, 1024*1024 /*1MB*/, onFs, onError); Properties This interface has no properties of its own, but inherits properties from its parent interface, FileSystemEntry. Methods This interface inherits methods from its parent interface, FileSystemEntry. createReader() Creates a FileSystemDirectoryReader object which can be used to read the entries in this directory. getDirectory() Returns a FileSystem...
FileSystemEntry - Web APIs
stored the origin of your app. Example To see an example of how toURL() works, see the method description. The snippet below shows you how you can remove a file by name. // Taking care of the browser-specific prefixes. window.requestFileSystem = window.requestFileSystem || window.webkitRequestFileSystem; ... // Opening a file system with temporary storage window.requestFileSystem(TEMPORARY, 1024*1024 /*1MB*/, function(fs) { fs.root.getFile('log.txt', {}, function(fileEntry) { fileEntry.remove(function() { console.log('File removed.'); }, onError); }, onError); }, onError); Properties This interface provides the following properties. filesystem Read only A FileSystem object representing the file system in which the entry is located. fullPath Read only A USV...
FileSystemFileEntry - Web APIs
console.log('Write completed.'); }; fileWriter.onerror = function(e) { console.log('Write failed: ' + e.toString()); }; // Create a new Blob and write it to log.txt. var bb = new BlobBuilder(); bb.append('Meow'); fileWriter.write(bb.getBlob('text/plain')); }, errorHandler); }, errorHandler); } window.requestFileSystem(window.TEMPORARY, 1024*1024, onInitFs, errorHandler); Specifications Specification Status Comment File and Directory Entries APIThe definition of 'FileSystemFileEntry' in that specification. Draft Draft of proposed API Browser compatibility The compatibility table on this page is generated from structured data. If you'd like to contribute to the data, please check out https:...
GeolocationCoordinates.longitude - Web APIs
location on Earth described by the Coordinates object, in decimal degrees. The value is defined by the World Geodetic System 1984 specification (WGS 84). Note: The zero meridian (also known as the prime meridian or the reference meridian) is not precisely the same as the Greenwhich meridian that most people think of. It is, instead, the IERS Reference Meridian, which is located 5.3 arcseconds (102 meters / 335 feet) east of the Greenwich meridian. This is the same standard used by the Global Positioning System (GPS). Examples In this simple example, we fetch the user's location and display the resulting coordinates once they're returned. JavaScript The JavaScript code below creates an event listener so that when the user clicks on a button, the location information is retrieved and di...
HTMLImageElement.srcset - Web APIs
following are valid image candidate strings: "images/team-photo.jpg 1x, images/team-photo-retina.jpg 2x, images/team-photo-full 2048w" This string provides versions of an image to be used at the standard pixel density (1x) as well as double that pixel density (2x). Also available is a version of the image for use at a width of 2048 pixels (2048w). "header640.png 640w, header960.png 960w, header1024.png 1024w, header.png" This string provides versions of a header image to use when the user agent's renderer needs an image of width 640px, 960px, or 1024px. An additional, fallback image candidate is provided without any condition at all, to be used for any other width. "icon32px.png 32w, icon64px.png 64w, icon-retina.png 2x icon-ultra.png 3x icon.svg" Here, options are provided for an icon ...
HTMLMediaElement - Web APIs
ess to the fragment end time if the media element has a fragment URI for currentSrc, otherwise it is equal to the media duration. HTMLMediaElement.mozFrameBufferLength Is a unsigned long that indicates the number of samples that will be returned in the framebuffer of each MozAudioAvailable event. This number is a total for all channels, and by default is set to be the number of channels * 1024 (e.g., 2 channels * 1024 samples = 2048 total). The mozFrameBufferLength property can be set to a new value for lower latency, larger amounts of data, etc. The size given must be a number between 512 and 16384. Using any other size results in an exception being thrown. The best time to set a new length is after the loadedmetadata event fires, when the audio info is known, but before the audio ...
Ajax navigation example - Web APIs
stMark = /\?$/, oLoadingBox = document.createElement("div"), oCover = document.createElement("div"), oLoadingImg = new Image(), oPageInfo = { title: null, url: location.href }, oHTTPStatus = /* http://www.iana.org/assignments/http-status-codes/http-status-codes.xml */ { 100: "Continue", 101: "Switching Protocols", 102: "Processing", 200: "OK", 201: "Created", 202: "Accepted", 203: "Non-Authoritative Information", 204: "No Content", 205: "Reset Content", 206: "Partial Content", 207: "Multi-Status", 208: "Already Reported", 226: "IM Used", 300: "Multiple Choices", 301: "...
LocalFileSystemSync - Web APIs
cific prefix window.requestFileSystemSync = window.requestFileSystemSync || window.webkitRequestFileSystemSync; // The first parameter defines the type of storage: persistent or temporary // Next, set the size of space needed (in bytes) // initFs is the success callback // And the last one is the error callback // for denial of access and other errors. var fs = requestFileSystemSync(TEMPORARY, 1024*1024 /*1MB*/); Because you are using a synchronous API, you don't need success and error callbacks. Method overview FileSystemSync requestFileSystemSync (in unsigned short type, in long long size) raises FileException; EntrySync resolveLocalFileSystemSyncURL (in DOMString url) raises FileException; Constants Constant Value Description TEM...
MediaDevices.getUserMedia() - Web APIs
If no camera exists with this resolution or higher, then the returned promise will be rejected with OverconstrainedError, and the user will not be prompted. The reason for the difference in behaviour is that the keywords min, max, and exact are inherently mandatory. Whereas plain values and a keyword called ideal are not. Here's a full example: { audio: true, video: { width: { min: 1024, ideal: 1280, max: 1920 }, height: { min: 576, ideal: 720, max: 1080 } } } An ideal value, when used, has gravity, which means that the browser will try to find the setting (and camera, if you have more than one), with the smallest fitness distance from the ideal values given. Plain values are inherently ideal, which means that the first of our resolution examples above could have been...
Navigator.deviceMemory - Web APIs
It is then clamped within lower and upper bounds to protect the privacy of owners of very low- or high-memory devices. ...
Navigator - Web APIs
Web › API › Navigator
avigator.credentials Returns the CredentialsContainer interface which exposes methods to request credentials and notify the user agent when interesting events occur such as successful sign in or sign out. Navigator.deviceMemory Read only Returns the amount of device memory in gigabytes. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024. Navigator.doNotTrack Reports the value of the user's do-not-track preference. When this value is "yes", your web site or application should not track the user. Navigator.mediaDevices Returns a reference to a MediaDevices object which can then be used to get information about available media devices (MediaDevices.enumerateDevices()), find out what constrainable properties are supported f...
NodeIterator.whatToShow - Web APIs
sition of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a NodeIterator or TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the fi...
NodeIterator - Web APIs
tion or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a NodeIterator with an Entity node as its root; in this case, it means that the Entity node will appear in the ...
NotifyAudioAvailableEvent - Web APIs
audio elements when the audio buffer is full. Properties frameBuffer Read only A Float32Array containing the raw 32-bit floating-point audio data obtained from decoding the audio (e.g., the raw data being sent to the audio hardware vs. encoded audio). The data is a series of audio samples, each sample containing one 32-bit value per audio channel. All audio frames are normalized to contain 1024 samples by default, but could be any length between 512 and 16384 samples if the user has set a different length using the mozFrameBufferLength attribute. time A floating-point value indicating the time in seconds at which the first sample in the frameBuffer occurs, relative to the start of the audio track. ...
Screen.width - Web APIs
Web › API › Screen › width
When other widgets occupy space that cannot be used by the window object, there is a difference in window.screen.width and window.screen.availWidth. See also screen.height. Internet Explorer will take into account the zoom setting when reporting the screen width. ...
ScriptProcessorNode - Web APIs
ontains new data, and the event handler terminates when it has filled the output buffer with data. The size of the input and output buffer are defined at the creation time, when the AudioContext.createScriptProcessor() method is called (both are defined by AudioContext.createScriptProcessor()'s bufferSize parameter). The buffer size must be a power of 2 between 256 and 16384, that is 256, 512, 1024, 2048, 4096, 8192 or 16384. Small numbers lower the latency, but large number may be necessary to avoid audio breakup and glitches. If the buffer size is not defined, which is recommended, the browser will pick one that its heuristic deems appropriate. Number of inputs 1 Number of outputs 1 Channel count mode "max" Channel count 2 (not used in th...
TreeWalker.whatToShow - Web APIs
sition of the iteration or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the first position of ...
TreeWalker - Web APIs
tion or traversal. Since attributes are never children of other nodes, they do not appear when traversing over the document tree. NodeFilter.SHOW_CDATA_SECTION 8 Shows CDATASection nodes. NodeFilter.SHOW_COMMENT 128 Shows Comment nodes. NodeFilter.SHOW_DOCUMENT 256 Shows Document nodes. NodeFilter.SHOW_DOCUMENT_FRAGMENT 1024 Shows DocumentFragment nodes. NodeFilter.SHOW_DOCUMENT_TYPE 512 Shows DocumentType nodes. NodeFilter.SHOW_ELEMENT 1 Shows Element nodes. NodeFilter.SHOW_ENTITY 32 Shows Entity nodes. This is meaningful only when creating a TreeWalker with an Entity node as its root; in this case, it means that the Entity node will appear in the fi...
WebGLRenderingContext.bufferData() - Web APIs
te a data store with the given size. A gl.INVALID_VALUE error is thrown if size is negative. A gl.INVALID_ENUM error is thrown if target or usage are not one of the allowed enums. Examples Using bufferData var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var buffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buffer); gl.bufferData(gl.ARRAY_BUFFER, 1024, gl.STATIC_DRAW); Getting buffer information To check the current buffer usage and buffer size, use the WebGLRenderingContext.getBufferParameter() method. gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_SIZE); gl.getBufferParameter(gl.ARRAY_BUFFER, gl.BUFFER_USAGE); Getting size of a typed array To calculate size parameter for a typed array. var dataArray = new Float32Array([1, 2, 3, 4]...
WebGLRenderingContext.bufferSubData() - Web APIs
ID_VALUE error is thrown if the data would be written past the end of the buffer or if data is null. A gl.INVALID_ENUM error is thrown if target is not one of the allowed enums. Examples Using bufferSubData var canvas = document.getElementById('canvas'); var gl = canvas.getContext('webgl'); var buffer = gl.createBuffer(); gl.bindBuffer(gl.ARRAY_BUFFER, buffer); gl.bufferData(gl.ARRAY_BUFFER, 1024, gl.STATIC_DRAW); gl.bufferSubData(gl.ARRAY_BUFFER, 512, data); Specifications Specification Status Comment WebGL 1.0The definition of 'bufferSubData' in that specification. Recommendation Initial definition for WebGL. OpenGL ES 2.0The definition of 'glBufferSubData' in that specification. Standard Man page of the OpenGL ES 2 API. OpenGL E...
WebGL constants - Web APIs
0x0901 Passed to frontFace to specify the front face of a polygon is drawn in the counter clockwise direction Hints Constants passed to WebGLRenderingContext.hint() Constant name Value Description DONT_CARE 0x1100 There is no preference for this behavior. FASTEST 0x1101 The most efficient behavior should be used. NICEST 0x1102 The most correct or the highest quality option should be used. GENERATE_MIPMAP_HINT 0x8192 Hint for the quality of filtering when generating mipmap images with WebGLRenderingContext.generateMipmap(). Data types Constant name Value Description BYTE 0x1400 UNSIGNED_BYTE 0x1401 SHORT 0x1402 UNSIG...
WebGL: 2D and 3D graphics for the web - Web APIs
Web › API › WebGL API
of plug-ins. WebGL does so by introducing an API that closely conforms to OpenGL ES 2.0 that can be used in HTML5 <canvas> elements. This conformance makes it possible for the API to take advantage of hardware graphics acceleration provided by the user's device. Support for WebGL is present in Firefox 4+, Google Chrome 9+, Opera 12+, Safari 5.1+, Internet Explorer 11+, and Microsoft Edge build 10240+; however, the user's device must also have hardware that supports these features. The WebGL 2 API introduces support for much of the OpenGL ES 3.0 feature set; it's provided through the WebGL2RenderingContext interface. The <canvas> element is also used by the Canvas API to do 2D graphics on web pages. Reference Standard interfaces WebGLRenderingContext WebGL2RenderingContext WebGLAc...
Migrating from webkitAudioContext - Web APIs
eateDelay. createJavaScriptNode() has been renamed to createScriptProcessor. These are simple renames that were made in order to improve the consistency of these method names on AudioContext. If your code uses either of these names, like in the example below : // Old method names var gain = context.createGainNode(); var delay = context.createDelayNode(); var js = context.createJavascriptNode(1024); you can simply rename the methods to look like this: // New method names var gain = context.createGain(); var delay = context.createDelay(); var js = context.createScriptProcessor(1024); The semantics of these methods remain the same in the renamed versions. Changes to starting and stopping nodes In webkitAudioContext, there are two ways to start and stop AudioBufferSourceNode and Oscil...
Using Web Workers - Web APIs
on' from the calling context is no longer available once transferred. Its ownership is transferred to the new context. For example, when transferring an ArrayBuffer from your main app to a worker script, the original ArrayBuffer is cleared and no longer usable. Its content is (quite literally) transferred to the worker context. // Create a 32MB "file" and fill it. var uInt8Array = new Uint8Array(1024 * 1024 * 32); // 32MB for (var i = 0; i < uInt8Array.length; ++i) { uInt8Array[i] = i; } worker.postMessage(uInt8Array.buffer, [uInt8Array.buffer]); Note: For more information on transferable objects, performance, and feature-detection for this method, read Transferable Objects: Lightning Fast! on HTML5 Rocks. Embedded workers There is not an "official" way to embed the code of a worker...
Window.navigator - Web APIs
Web › API › Window › navigator
Samsung Internet"; // "Mozilla/5.0 (Linux; Android 9; SAMSUNG SM-G955F Build/PPR1.180610.011) AppleWebKit/537.36 (KHTML, like Gecko) SamsungBrowser/9.4 Chrome/67.0.3396.87 Mobile Safari/537.36 } else if (sUsrAg.indexOf("Opera") > -1 || sUsrAg.indexOf("OPR") > -1) { sBrowser = "Opera"; // "Mozilla/5.0 (Macintosh; Intel Mac OS X 10_14_0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/70.0.3538.102 Safari/537.36 OPR/57.0.3098.106" } else if (sUsrAg.indexOf("Trident") > -1) { sBrowser = "Microsoft Internet Explorer"; // "Mozilla/5.0 (Windows NT 10.0; WOW64; Trident/7.0; .NET4.0C; .NET4.0E; Zoom 3.6.0; wbx 1.0.0; rv:11.0) like Gecko" } else if (sUsrAg.indexOf("Edge") > -1) { sBrowser = "Microsoft Edge"; // "Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Geck...
HTML in XMLHttpRequest - Web APIs
rted and false as the only argument if HTML parsing is not supported. View on JSFiddle Character encoding If the character encoding is declared in the HTTP Content-Type header, that character encoding is used. Failing that, if there is a byte order mark, the encoding indicated by the byte order mark is used. Failing that, if there is a <meta> element that declares the encoding within the first 1024 bytes of the file, that encoding is used. Otherwise, the file is decoded as UTF-8. Handling HTML on older browsers XMLHttpRequest originally supported only XML parsing. HTML parsing support is a recent addition. For older browsers, you can even use the XMLHttpRequest.responseText property in association with regular expressions in order to get, for example, the source code of an HTML element g...
Accessibility documentation index - Accessibility
your web content so that it conforms to the success criteria outlined in the Robust principle of the Web Content Accessibility Guidelines (WCAG) 2.0 and 2.1. Robust states that content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies. This can generally be achieved by following web standards and testing rigorously. 102 Text labels and names Accessibility, WCAG, text labels There are many situations in which a control, dialog, or other website feature should be given a descriptive name or label to allow users of assistive technologies to understand what its purpose is and to be able to understand and operate it correctly. 103 Understandable Accessibility, HELP, Language, Navigation,...
CSS values and units - CSS: Cascading Style Sheets
exammple.com/images/my-background.png"); } The parameter for url() can be either quoted or unquoted. If unquoted, it is parsed as a <url-token>, which has extra requirements including the escaping of certain characters. See <url> for more information. Numeric data types <integer> <number> <dimension> <percentage> Integers An integer is one or more decimal digits, 0 through 9, such as 1024 or -55. An integer may be preceded by a + or - symbol, with no space between the symbol and the integer. Numbers A <number> represents a real number, which may or may not have a decimal point with a fractional component, for example 0.255, 128 or -1.2. Numbers may also be preceded by a + or - symbol. Dimensions A <dimension> is a <number> with a unit attached to it, for example 45deg, 100ms,...
background-color - CSS: Cascading Style Sheets
Though technically removing the transparent keyword, this doesn't change anything as it has been incorp...
element() - CSS: Cascading Style Sheets
Web › CSS › element
hidden <div> as a background. The background element uses a gradient, but also includes text that is rendered as part of the background. <div style="width:400px; height:400px; background:-moz-element(#myBackground1) no-repeat;"> <p>This box uses the element with the #myBackground1 ID as its background!</p> </div> <div style="overflow:hidden; height:0;"> <div id="myBackground1" style="width:1024px; height:1024px; background-image: linear-gradient(to right, red, orange, yellow, white);"> <p style="transform-origin:0 0; transform: rotate(45deg); color:white;">This text is part of the background. Cool, huh?</p> </div> </div> The <div> element with the ID "myBackground1" is used as the background for the content including the paragraph "This box uses the element with the #myBackground1...
Video player styling basics - Developer guides
) / this.offsetWidth; video.currentTime = pos * video.duration; }); Fullscreen The FullScreen implemention hasn't changed. Responsive styling Now that the player has its basic look and feel taken care of, some other styling changes -- involving media queries -- need to be made in order to make it responsive. The player currently works fairly well until displayed on a "medium" screen (e.g. 1024px/64em) or smaller. In this case, the margins and padding on the <figure> element need to be removed so that all the available space is taken advantage of, and the buttons are a bit too small so this needs to be altered by setting a new height on the element that has the .controls class set on it: @media screen and (max-width:64em) { figure { padding-left:0; padding-right:0; ...
Constraint validation - Developer guides
The JavaScript reads the file selected, uses the File.size() method to get its size, compares it to the (hard coded) limit, and calls the Constraint API to inform the browser if there is a violation: function checkFileSize() { var FS = document.getElementById("FS"); var files = FS.files; // If there is (at least) one file selected if (files.length > 0) { if (files[0].size > 75 * 1024) { // Check the constraint FS.setCustomValidity("The selected file must not be larger than 75 kB"); return; } } // No custom constraint violation FS.setCustomValidity(""); } Finally we hook the method with the correct event: window.onload = function () { document.getElementById("FS").onchange = checkFileSize; } You can see a live example of the File size constraint ...
<keygen> - HTML: Hypertext Markup Language
Web › HTML › Element › keygen
required for DSA and EC key generation and ignored for RSA key generation. PQG is a synonym for keyparams. That is, you may specify keyparams="pqg-params" or pqg="pqg-params". For RSA keys, the keyparams parameter is not used (ignored if present). The user may be given a choice of RSA key strengths. Currently, the user is given a choice between "high" strength (2048 bits) and "medium" strength (1024 bits). For DSA keys, the keyparams parameter specifies the DSA PQG parameters which are to be used in the keygen process. The value of the pqg parameter is the the BASE64 encoded, DER encoded Dss-Parms as specified in IETF RFC 3279. The user may be given a choice of DSA key sizes, allowing the user to choose one of the sizes defined in the DSA standard. For EC keys, the keyparams parameter spe...
<video>: The Video Embed element - HTML: Hypertext Markup Language
Web › HTML › Element › video
wser. <!-- Using multiple sources as fallbacks for a video tag --> <!-- 'Elephants Dream' by Orange Open Movie Project Studio, licensed under CC-3.0, hosted by archive.org --> <!-- Poster hosted by Wikimedia --> <video width="620" controls poster="https://upload.wikimedia.org/wikipedia/commons/e/e8/Elephants_Dream_s5_both.jpg" > <source src="https://archive.org/download/ElephantsDream/ed_1024_512kb.mp4" type="video/mp4"> <source src="https://archive.org/download/ElephantsDream/ed_hd.ogv" type="video/ogg"> <source src="https://archive.org/download/ElephantsDream/ed_hd.avi" type="video/avi"> Your browser doesn't support HTML5 video tag. </video> First WebM is tried. If that can't be played, then MP4 is tried. Finally, Ogg is tried. A fallback message is dis...
HTML documentation index - HTML: Hypertext Markup Language
Web › HTML › Index
st of the contents of its parent <figure> element. 101 <figure>: The Figure with Optional Caption element Element, HTML, HTML grouping content, Information, Presentation, Reference, figure The HTML <figure> (Figure With Optional Caption) element represents self-contained content, potentially with an optional caption, which is specified using the (<figcaption>) element. 102 <font> Element, HTML, Obsolete, Reference, Web The HTML Font Element (<font>) defines the font size, color and face for its content. 103 <footer> Element, HTML, HTML sections, Reference The HTML <footer> element represents a footer for its nearest sectioning content or sectioning root element. A footer typically contains information about the author of the secti...
Resource URLs - HTTP
s, which could be a serious security and privacy issue. For example, a script on Browserleaks highlights what Firefox reveals when queried by a simple script running on the site (you can find the code in https://browserleaks.com/firefox#more). The file firefox.js passes preference names and values to the pref() function. For example: http://searchfox.org/mozilla-central/rev/48ea452803907f2575d81021e8678634e8067fc2/browser/app/profile/firefox.js#575 Web sites can easily collect Firefox default preferences by overriding this pref() function and using the script resource:///defaults/preferences/firefox.js. Furthermore, some default values of preferences differ between build configurations, such as platform and locale, which means web sites could identify individual users using this informat...
Content negotiation - HTTP
er. The Device-Memory value is in Chrome 61 or later. The experimental Accept-CH lists configuration data that can be used by the server to select an appropriate response. Valid values are: Value Meaning Device-Memory Indicates the approximate amount of device RAM. This value is an approximation given by rounding to the nearest power of 2 and dividing that number by 1024. For example, 512 megabytes will be reported as 0.5. DPR Indicates the client's device pixel ratio. Viewport-Width Indicates the layout viewport width in CSS pixels. Width Indicates the resource width in physical pixels (in other words the intrinsic size of an image). The Accept-Charset header The Accept-Charset header indicates to the server what kind...
Index - HTTP
Web › HTTP › Headers › Index
kies, HTTP, Reference, Response, header The Set-Cookie HTTP response header is used to send cookies from the server to the user agent. 101 Set-Cookie2 Cookies, HTTP, Obsolete, Reference, header The obsolete Set-Cookie2 HTTP response header used to send cookies from the server to the user agent, but has been deprecated by the specification. Use Set-Cookie instead. 102 SourceMap HTTP, HTTP Header, Reference, Response Header, header The SourceMap HTTP response header links generated code to a source map, enabling the browser to reconstruct the original source and present the reconstructed original in the debugger. 103 Strict-Transport-Security HSTS, HTTP, HTTPS, Security, header The HTTP Strict-Transport-Security response heade...
Save-Data - HTTP
dicates no. Examples The Vary header ensures that the content is cached properly (for instance ensuring that the user is not served a lower-quality image from the cache when Save-Data header is no longer present [e.g. after having switched from cellular to Wi-Fi]). ...
HTTP Index - HTTP
Web › HTTP › Index
ty-Policy (CSP) script-src-elem directive specifies valid sources for JavaScript <script> elements, but not inline script event handlers like onclick. 101 CSP: style-src CSP, Content, Content-Security-Policy, Directive, HTTP, Reference, Security, Style, source, style-src The HTTP Content-Security-Policy (CSP) style-src directive specifies valid sources for stylesheets. 102 CSP: style-src-attr CSP, Content, Content-Security-Policy, Directive, HTTP, Reference, Security, Style, source, style-src, style-src-attr The HTTP Content-Security-Policy (CSP) style-src-attr directive specifies valid sources for inline styles applied to individual DOM elements. 103 CSP: style-src-elem CSP, Content, Content-Security-Policy, Directive, HTTP, Reference,...
HTTP range requests - HTTP
ver If the server supports range requests, you can issue such a request by using the Range header. It indicates the part(s) of a document that the server should return. Single part ranges We can request a single range from a resource. Again, we can test a request by using cURL. The "-H" option will append a header line to the request, which in this case is the Range header requesting the first 1024 bytes. curl http://i.imgur.com/z4d4kWk.jpg -i -H "Range: bytes=0-1023" The issued request looks like this: GET /z4d4kWk.jpg HTTP/1.1 Host: i.imgur.com Range: bytes=0-1023 The server responses with the 206 Partial Content status: HTTP/1.1 206 Partial Content Content-Range: bytes 0-1023/146515 Content-Length: 1024 ... (binary content) The Content-Length header now indicates the size of the ...
HTTP response status codes - HTTP
Web › HTTP › Status
custom to the server's software. Information responses 100 Continue This interim response indicates that everything so far is OK and that the client should continue the request, or ignore the response if the request is already finished. 101 Switching Protocol This code is sent in response to an Upgrade request header from the client, and indicates the protocol the server is switching to. 102 Processing (WebDAV) This code indicates that the server has received and is processing the request, but no response is available yet. 103 Early Hints This status code is primarily intended to be used with the Link header, letting the user agent start preloading resources while the server prepares a response. Successful responses 200 OK The request has succeeded. The meaning of the succes...
Numbers and dates - JavaScript
h and perform calculations using numbers and dates in JavaScript. This includes using numbers written in various bases including decimal, binary, and hexadecimal, as well as the use of the global Math object to perform a wide variety of mathematical operations on numbers. Numbers In JavaScript, numbers are implemented in double-precision 64-bit binary format IEEE 754 (i.e., a number between +-2-1022 and +-2+1023, or about +-10-308 to +-10+308, with a numeric precision of 53 bits). Integer values up to +-253 - 1 can be represented exactly. In addition to being able to represent floating-point numbers, the number type has three symbolic values: +Infinity, -Infinity, and NaN (not-a-number). A more recent addition to JavaScript is BigInt which lets you represent integers that may be very larg...
Atomics.add() - JavaScript
Array, or BigUint64Array. index The position in the typedArray to add a value to. value The number to add. Return value The old value at the given position (typedArray[index]). Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using add() const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); Atomics.add(ta, 0, 12); // returns 0, the old value Atomics.load(ta, 0); // 12 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.add' in that specification. ...
Atomics.and() - JavaScript
ption The bitwise AND operation only yields 1, if both a and b are 1. The truth table for the AND operation is: a b a & b 0 0 0 0 1 0 1 0 0 1 1 1 For example, a bitwise AND of 5 & 1 results in 0001 which is 1 in decimal. 5 0101 1 0001 ---- 1 0001 Examples Using and() const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0] = 5; Atomics.and(ta, 0, 1); // returns 0, the old value Atomics.load(ta, 0); // 1 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.and' in that specification. ...
Atomics.compareExchange() - JavaScript
value. expectedValue The value to check for equality. replacementValue The number to exchange. Return value The old value at the given position (typedArray[index]). Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using compareExchange() const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0] = 7; Atomics.compareExchange(ta, 0, 7, 12); // returns 7, the old value Atomics.load(ta, 0); // 12 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.compareExchange' in that specification. ...
Atomics.exchange() - JavaScript
gUint64Array. index The position in the typedArray to exchange a value. value The number to exchange. Return value The old value at the given position (typedArray[index]). Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using exchange() const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); Atomics.exchange(ta, 0, 12); // returns 0, the old value Atomics.load(ta, 0); // 12 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.exchange' in that specification. ...
Atomics.load() - JavaScript
ay, Int32Array, Uint32Array, BigInt64Array, or BigUint64Array. index The position in the typedArray to load from. Return value The value at the given position (typedArray[index]). Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using load const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); Atomics.add(ta, 0, 12); Atomics.load(ta, 0); // 12 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.load' in that specification. ...
Atomics.notify() - JavaScript
number of sleeping agents to notify. Defaults to +Infinity. Return value Returns the number of woken up agents. Returns 0, if a non-shared ArrayBuffer object is used. Exceptions Throws a TypeError, if typedArray is not a Int32Array. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using notify Given a shared Int32Array: const sab = new SharedArrayBuffer(1024); const int32 = new Int32Array(sab); A reading thread is sleeping and waiting on location 0 which is expected to be 0. As long as that is true, it will not go on. However, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123). Atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 A writing thread stores a new value and not...
Atomics.or() - JavaScript
Description The bitwise OR operation yields 1, if either a or b are 1. The truth table for the OR operation is: a b a | b 0 0 0 0 1 1 1 0 1 1 1 1 For example, a bitwise OR of 5 & 1 results in 0101 which is 5 in decimal. 5 0101 1 0001 ---- 5 0101 Examples Using or const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0] = 2; Atomics.or(ta, 0, 1); // returns 2, the old value Atomics.load(ta, 0); // 3 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.or' in that specification. ...
Atomics.store() - JavaScript
Uint32Array, BigInt64Array, or BigUint64Array. index The position in the typedArray to store a value in. value The number to store. Return value The value that has been stored. Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using store() var sab = new SharedArrayBuffer(1024); var ta = new Uint8Array(sab); Atomics.store(ta, 0, 12); // 12 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.store' in that specification. ...
Atomics.sub() - JavaScript
BigUint64Array. index The position in the typedArray to subtract a value from. value The number to subtract. Return value The old value at the given position (typedArray[index]). Exceptions Throws a TypeError, if typedArray is not one of the allowed integer types. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using sub const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0] = 48; Atomics.sub(ta, 0, 12); // returns 48, the old value Atomics.load(ta, 0); // 36 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.sub' in that specification. ...
Atomics.wait() - JavaScript
to test. timeout Optional Time to wait in milliseconds. Infinity, if no time is provided. Return value A String which is either "ok", "not-equal", or "timed-out". Exceptions Throws a TypeError, if typedArray is not a shared Int32Array. Throws a RangeError, if index is out of bounds in the typedArray. Examples Using wait() Given a shared Int32Array: const sab = new SharedArrayBuffer(1024); const int32 = new Int32Array(sab); A reading thread is sleeping and waiting on location 0 which is expected to be 0. As long as that is true, it will not go on. However, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123). Atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 A writing thread stores a new value and not...
Atomics.xor() - JavaScript
cription The bitwise XOR operation yields 1, if a and b are different. The truth table for the XOR operation is: a b a ^ b 0 0 0 0 1 1 1 0 1 1 1 0 For example, a bitwise XOR of 5 ^ 1 results in 0100 which is 4 in decimal. 5 0101 1 0001 ---- 4 0100 Examples Using xor const sab = new SharedArrayBuffer(1024); const ta = new Uint8Array(sab); ta[0] = 5; Atomics.xor(ta, 0, 1); // returns 5, the old value Atomics.load(ta, 0); // 4 Specifications Specification ECMAScript (ECMA-262)The definition of 'Atomics.xor' in that specification. ...
Math.log10() - JavaScript
s less than 0, the return value is always NaN. Because log10() is a static method of Math, you always use it as Math.log10(), rather than as a method of a Math object you created (Math is not a constructor). This function is the equivalent of Math.log(x) / Math.log(10). For log10(e) use the constant Math.LOG10E which is 1 / Math.LN10. Examples Using Math.log10() Math.log10(2); // 0.3010299956639812 Math.log10(1); // 0 Math.log10(0); // -Infinity Math.log10(-2); // NaN Math.log10(100000); // 5 Polyfill This can be emulated with the following function: Math.log10 = Math.log10 || function(x) { return Math.log(x) * Math.LOG10E; }; Specifications Specification ECMAScript (ECMA-262)The definition of 'Math.log10' in that specification. ...
Math.log1p() - JavaScript
00 and therefore exactly 1.0 in that arithmetic, because digits past 15 are rounded off. When you calculate log(1 + x), you should get an answer very close to x, if x is small (that's why these are called 'natural' logarithms). If you calculate Math.log(1 + 1.1111111111e-15) you should get an answer close to 1.1111111111e-15. Instead, you will end up taking the logarithm of 1.00000000000000111022 (the roundoff is in binary so sometimes it gets ugly), so you get the answer 1.11022...e-15, with only 3 correct digits. If, instead, you calculate Math.log1p(1.1111111111e-15) you will get a much more accurate answer 1.1111111110999995e-15 with 15 correct digits of precision (actually 16 in this case). If the value of x is less than -1, the return value is always NaN. Because log1p() is a s...
Math.log2() - JavaScript
he Math.log2 function. Note that it returns imprecise values on some inputs (like 1 << 29), wrap into Math.round() if working with bit masks. if (!Math.log2) Math.log2 = function(x) { return Math.log(x) * Math.LOG2E; }; Examples Using Math.log2() Math.log2(3); // 1.584962500721156 Math.log2(2); // 1 Math.log2(1); // 0 Math.log2(0); // -Infinity Math.log2(-2); // NaN Math.log2(1024); // 10 Specifications Specification ECMAScript (ECMA-262)The definition of 'Math.log2' in that specification. ...
Math.pow() - JavaScript
base and the exponent are in decimal numeral system. Because pow() is a static method of Math, you always use it as Math.pow(), rather than as a method of a Math object you created (Math has no constructor). If the base is negative and the exponent is not an integer, the result is NaN. ...
Number.MAX_VALUE - JavaScript
ike to contribute to the interactive examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Property attributes of Number.MAX_VALUE Writable no Enumerable no Configurable no Description The MAX_VALUE property has a value of approximately 1.79E+308, or 21024. Values larger than MAX_VALUE are represented as Infinity. Because MAX_VALUE is a static property of Number, you always use it as Number.MAX_VALUE, rather than as a property of a Number object you created. Examples Using MAX_VALUE The following code multiplies two numeric values. If the result is less than or equal to MAX_VALUE, the func1 function is called; otherwise, the func2 function is...
Object.defineProperty() - JavaScript
If the old descriptor had its configurable attribute set ...
SharedArrayBuffer() constructor - JavaScript
rray buffer to create. Return value A new SharedArrayBuffer object of the specified size. Its contents are initialized to 0. Examples Always use the new operator to create a SharedArrayBuffer SharedArrayBuffer constructors are required to be constructed with a new operator. Calling a SharedArrayBuffer constructor as a function without new will throw a TypeError. var sab = SharedArrayBuffer(1024); // TypeError: calling a builtin SharedArrayBuffer constructor // without new is forbidden var sab = new SharedArrayBuffer(1024); Specifications Specification ECMAScript (ECMA-262)The definition of 'SharedArrayBuffer constructor' in that specification. ...
SharedArrayBuffer.prototype.byteLength - JavaScript
examples project, please clone https://github.com/mdn/interactive-examples and send us a pull request. Description The byteLength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property. The value is established when the shared array is constructed and cannot be changed. Examples Using byteLength var sab = new SharedArrayBuffer(1024); sab.byteLength; // 1024 Specifications Specification ECMAScript (ECMA-262)The definition of 'SharedArrayBuffer.prototype.byteLength' in that specification. ...
SharedArrayBuffer.prototype.slice() - JavaScript
2, and 3). A negative index can be used, indicating an offset from the end of the sequence. slice(2,-1) extracts the third element through the second-to-last element in the sequence. If end is omitted, slice extracts through the end of the sequence (sab.byteLength). Return value A new SharedArrayBuffer containing the extracted elements. Examples Using slice var sab = new SharedArrayBuffer(1024); sab.slice(); // SharedArrayBuffer { byteLength: 1024 } sab.slice(2); // SharedArrayBuffer { byteLength: 1022 } sab.slice(-2); // SharedArrayBuffer { byteLength: 2 } sab.slice(0, 1); // SharedArrayBuffer { byteLength: 1 } Specifications Specification ECMAScript (ECMA-262)The definition of 'SharedArrayBuffer.prototype.slice' in that specification. ...
WebAssembly.Memory.prototype.grow() - JavaScript
in size). Return value The previous size of the memory, in units of WebAssembly pages. Examples Using grow The following example creates a new WebAssembly Memory instance with an initial size of 1 page (64KiB), and a maximum size of 10 pages (640KiB). var memory = new WebAssembly.Memory({initial:1, maximum:10}); We can then grow the instance by one page like so: const bytesPerPage = 64 * 1024; console.log(memory.buffer.byteLength / bytesPerPage); // "1" console.log(memory.grow(1)); // "1" console.log(memory.buffer.byteLength / bytesPerPage); // "2" Note the return value of grow() here is the previous number of WebAssembly pages. Specifications Specification WebAssembly JavaScript InterfaceThe definition of 'grow()' in that specifi...
parseInt() - JavaScript
base 16), A through F are used. If parseInt encounters a character that is not a numeral in the specified radix, it ignores it and all succeeding characters and returns the integer value parsed up to that point. parseInt truncates numbers to integer values. Leading and trailing spaces are allowed. Because some numbers use the e character in their string representation (e.g. 6.022e23 for 6.022 x 1023), using parseInt to truncate numbers will produce unexpected results when used on very large or very small numbers. parseInt should not be used as a substitute for Math.floor(). parseInt understands exactly two signs: + for positive, and - for negative (since ECMAScript 1). It is done as an initial step in the parsing after whitespace is removed. If no signs are found, the algorithm moves to th...
Web video codec guide - Web media technologies
he nearly-lossless encoding you get with this compression is vastly faster at about the same overall quality level. Recording video Given the constraints on how close to lossless you can get, you might consider using AVC or AV1. For example, if you're using the MediaStream Recording API to record video, you might use code like the following when creating your MediaRecorder object: const kbps = 1024; const Mbps = kbps*kbps; const options = { mimeType: 'video/webm; codecs="av01.2.19H.12.0.000.09.16.09.1, flac"', bitsPerSecond: 800*Mbps, }; let recorder = new MediaRecorder(sourceStream, options); This example creates a MediaRecorder configured to record AV1 video using BT.2100 HDR in 12-bit color with 4:4:4 chroma subsampling and FLAC for lossless audio. The resulting file will use a b...
OpenSearch description format
e]" value="[parameter value]"/> </Url> <Url type="application/x-suggestions+json" template="[suggestionURL]"/> <moz:SearchForm>[https://example.com/search]</moz:SearchForm> </OpenSearchDescription> ShortName A short name for the search engine. It must be 16 or fewer characters of plain text, with no HTML or other markup. Description A brief description of the search engine. It must be 1024 or fewer characters of plain text, with no HTML or other markup. InputEncoding The character encoding to use when submitting input to the search engine. Image URI of an icon for the search engine. When possible, include a 16x16 image of type image/x-icon (such as /favicon.ico) and a 64x64 image of type image/jpeg or image/png. The URI may also use the data: URI scheme. (You can generate ...
The building blocks of responsive design - Progressive web apps (PWAs)
In our example, we have a desktop layout, as we've already seen. This is created using the CSS rules included at the top of the stylesheet, before any media queries are encountered. Mid-width layout We also have a mid-width layout, which is aimed at working well on tablets and narrow laptop screens. This is created by all of the CSS inside the first media query: @media all and (max-width: 1024px) { x-card:nth-child(1), x-card:nth-child(2) { width: 50%; } x-card:nth-child(3) { width: 100%; clear: left; } x-card:nth-child(3) img { width: 20%; } } So here we're altering the widths of the columns and removing the float of the third column (and adding clearing to guard against any float funny business). We've also altered the width of the images inside the th...
fill-rule - SVG: Scalable Vector Graphics
.w3.org/2000/svg"> <!-- Default value for fill-rule --> <polygon fill-rule="nonzero" stroke="red" points="50,0 21,90 98,35 2,35 79,90"/> <!-- The center of the shape has two path segments (shown by the red stroke) between it and infinity. It is therefore considered outside the shape, and not filled. ...
unicode - SVG: Scalable Vector Graphics
Web › SVG › Attribute › unicode
code="ffl", then the given glyph will be used to render the sequence of characters "f", "f", and "l". It is often useful to refer to characters using XML character references expressed in hexadecimal notation or decimal notation. For example, unicode="ffl" could be expressed as XML character references in hexadecimal notation as unicode="&#x66;&#x66;&#x6c;" or in decimal notation as unicode="&#102;&#102;&#108;". The unicode attribute contributes to the process for deciding which glyph(s) are used to represent which character(s). If the attribute is not provided for a given <glyph>, then the only way to use this glyph is via an <altGlyph> reference. Only one element is using this attribute: <glyph> Context notes Value <string> Default value None Animat...
SVG documentation index - SVG: Scalable Vector Graphics
Web › SVG › Index
e hanging baseline alignment for horizontally oriented glyph layouts. 100 height SVG, SVG Attribute The height attribute defines the vertical length of an element in the user coordinate system. 101 horiz-adv-x Deprecated, SVG, SVG Attribute The horiz-adv-x attribute indicates the horizontal advance after rendering a glyph in horizontal orientation. 102 horiz-origin-x Deprecated, SVG, SVG Attribute The horiz-origin-x attribute indicates the x-coordinate in the font coordinate system of the origin of a glyph to be used when drawing horizontally oriented text. 103 horiz-origin-y Deprecated, SVG, SVG Attribute The horiz-origin-y attribute indicates the y-coordinate in the font coordinate system of the origin of a ...