Search completed in 1.19 seconds.
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
the
readablestreamdefault
reader() constructor creates and returns a
readablestreamdefault
reader object instance.
... note: you generally wouldn't use this constructor manually; instead, you'd use the
readablestream.get
reader() method.
... syntax var
readablestreamdefault
reader = new
readablestreamdefault
reader(stream); parameters stream the
readablestream to be
read.
...And 6 more matches
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
the
readablestreambyob
reader() constructor creates and returns a
readablestreambyob
reader object instance.
... note: you generally wouldn't use this constructor manually; instead, you'd use the
readablestream.get
reader() method.
... syntax var
readablestreambyob
reader = new
readablestreambyob
reader(stream); parameters stream the
readablestream to be
read.
...And 3 more matches
ReadableStreamDefaultReader.read() - Web APIs
the
read() method of the
readablestreamdefault
reader interface returns a promise providing access to the next chunk in the stream's internal queue.
... syntax var promise =
readablestreamdefault
reader.
read(); parameters none.
... exceptions typeerror the source object is not a
readablestreamdefault
reader, or the stream has no owner.
...And 8 more matches
ReadableStreamBYOBReader.read() - Web APIs
the
read() method of the
readablestreambyob
reader interface returns a promise providing access to the next chunk in the byte stream's internal queue.
... syntax var promise =
readablestreambyob
reader.
read(view); parameters view the view to be
read into.
... exceptions typeerror the source object is not a
readablestreambyob
reader, the stream has no owner, the view is not an object or has become detached, or the view's length is 0.
... specifications specification status comment streamsthe definition of '
read()' in that specification.
ReadableStream.ReadableStream() - Web APIs
the
readablestream() constructor creates and returns a
readable stream object from the given handlers.
... syntax var
readablestream = new
readablestream(underlyingsource[, queuingstrategy]); parameters underlyingsource an object containing methods and properties that define how the constructed stream instance will behave.
...the controller parameter passed to this method is a
readablestreamdefaultcontroller or a
readablebytestreamcontroller, depending on the value of the type property.
...And 12 more matches
ReadableStreamDefaultReader.cancel() - Web APIs
the cancel() method of the
readablestreamdefault
reader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be
read.
... that data is lost after cancel is called, and the stream is not
readable any more.
...And 10 more matches
FileSystemDirectoryReader.readEntries() - Web APIs
the filesystemdirectory
reader interface's
readentries() method retrieves the directory entries within the directory being
read and delivers them in an array to a provided callback function.
... syntax
readentries(successcallback[, errorcallback]); parameters successcallback a function which is called when the directory's contents have been retrieved.
...if there are no files left, or you've al
ready called
readentries() on this filesystemdirectory
reader, the array is empty.
...And 9 more matches
ReadableStream.getReader() - Web APIs
the get
reader() method of the
readablestream interface creates a
reader and locks the stream to it.
... while the stream is locked, no other
reader can be acquired until this one is released.
... syntax var
reader =
readablestream.get
reader({mode}); parameters {mode} optional an object containing a property mode, which takes as its value a domstring specifying the type of
reader to create.
...And 9 more matches
FileReader.readyState - Web APIs
the file
reader
readystate property provides the current state of the
reading operation a file
reader is in.
... a file
reader exists in one of the following states: value state description 0 empty
reader has been created.
... none of the
read methods called yet.
...And 8 more matches
ReadableStreamDefaultReader - Web APIs
the
readablestreamdefault
reader interface of the streams api represents a default
reader that can be used to
read stream data supplied from a network (e.g.
... constructor
readablestreamdefault
reader() creates and returns a
readablestreamdefault
reader object instance.
... properties
readablestreamdefault
reader.closed
read only allows you to write code that responds to an end to the streaming process.
...And 7 more matches
ReadableStreamBYOBReader - Web APIs
the
readablestreambyob
reader interface of the streams api represents a byob ("bring your own buffer")
reader that can be used to
read stream data supplied by the developer (e.g.
... a custom
readablestream() constructor).
... constructor
readablestreambyob
reader() creates and returns a
readablestreambyob
reader object instance.
...And 6 more matches
FileReaderSync.readAsBinaryString() - Web APIs
note: this method is deprecated in favor of
readasarraybuffer().
... the
readasbinarystring() method of the file
readersync interface allows to
read file or blob objects in a synchronous way into an domstring.
... syntax
readasbinarystring(file);
readasbinarystring(blob); parameters blob the dom file or blob to
read.
...And 4 more matches
ReadableStreamDefaultReader.releaseLock() - Web APIs
the releaselock() method of the
readablestreamdefault
reader interface releases the
reader's lock on the stream.
... if the associated stream is errored when the lock is released, the
reader will appear errored in that same way subsequently; otherwise, the
reader will appear closed.
... a
reader’s lock cannot be released while it still has a pending
read request, i.e., if a promise returned by the
reader’s
readablestreamdefault
reader.
read() method has not finished.
...And 4 more matches
FileReader.readAsDataURL() - Web APIs
the
readasdataurl method is used to
read the contents of the specified blob or file.
... when the
read operation is finished, the
readystate becomes done, and the loadend is triggered.
... syntax instanceoffile
reader.
readasdataurl(blob); parameters blob the blob or file from which to
read.
...And 3 more matches
FileReaderSync.readAsArrayBuffer() - Web APIs
the
readasarraybuffer() method of the file
readersync interface allows to
read file or blob objects in a synchronous way into an arraybuffer.
... syntax arraybuffer
readasarraybuffer( in blob blob ); parameters blob the dom file or blob to
read into the file or arraybuffer.
... securityerror is raised when one of the following problematic situation is detected: the resource has been modified by a third party; too many
read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
...And 3 more matches
FileReaderSync.readAsDataURL() - Web APIs
the
readasdataurl() method of the file
readersync interface allows to
read file or blob objects in a synchronous way into an domstring representing a data url.
... syntax
readasdataurl(file);
readasdataurl(blob); parameters blob the dom file or blob to
read.
... securityerror is raised when one of the following problematic situation is detected: the resource has been modified by a third party; too many
read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
...And 3 more matches
FileReaderSync.readAsText() - Web APIs
the
readastext() method of the file
readersync interface allows to
read file or blob objects in a synchronous way into an domstring.
... syntax
readastext(file);
readastext(blob);
readastext(file, encoding);
readastext(blob, encoding); parameters blob the dom file or blob to
read.
... securityerror is raised when one of the following problematic situation is detected: the resource has been modified by a third party; too many
read are performed simultaneously; the file pointed by the resource is unsafe for a use from the web (like it is a system file).
...And 3 more matches
ReadableStreamBYOBReader.releaseLock() - Web APIs
the releaselock() method of the
readablestreambyob
reader interface releases the
reader's lock on the stream.
... after the lock is released, the
reader is no longer active.
... if the associated stream is errored when the lock is released, the
reader will appear errored in that same way subsequently; otherwise, the
reader will appear closed.
...And 3 more matches
FileReader.readAsArrayBuffer() - Web APIs
the file
reader interface's
readasarraybuffer() method is used to start
reading the contents of a specified blob or file.
... when the
read operation is finished, the
readystate becomes done, and the loadend is triggered.
... newer api available the blob.arraybuffer() method is a newer promise-based api to
read a file as an array buffer.
...And 2 more matches
FileReader.readAsBinaryString() - Web APIs
the
readasbinarystring method is used to start
reading the contents of the specified blob or file.
... when the
read operation is finished, the
readystate becomes done, and the loadend is triggered.
... using file
reader.
readasarraybuffer() is recommended.
...And 2 more matches
FileReader.readAsText() - Web APIs
the
readastext() method is used to
read the contents of the specified blob or file.
... when the
read operation is complete, the
readystate is changed to done, the loadend event is triggered, and the result property contains the contents of the file as a text string.
... newer api avaliable the blob.text() method is a newer promise-based api to
read a file as text.
...And 2 more matches
ReadableStreamBYOBReader.cancel() - Web APIs
the cancel() method of the
readablestreambyob
reader interface cancels the stream, signaling a loss of interest in the stream by a consumer.
... note: if the
reader is active, the cancel() method behaves the same as that for the associated stream (
readablestream.cancel()).
... syntax var promise =
readablestreambyob
reader.cancel(reason); parameters reason a domstring providing a human-
readable reason for the cancellation.
... exceptions typeerror the source object is not a
readablestreambyob
reader, or the stream has no owner.
ReadableStreamDefaultReader.closed - Web APIs
the closed
read-only property of the
readablestreamdefault
reader interface returns a promise that fulfills if the stream becomes closed or the
reader's lock is released, or rejects if the stream errors.
... syntax var closed =
readablestreamdefault
reader.closed; value a promise.
... examples in this snippet, a previously-created
reader is queried to see if the stream has been closed.
...
reader.closed.then(() => { console.log('
reader closed'); }) specifications specification status comment streamsthe definition of 'closed' in that specification.
NDEFReader.onreading - Web APIs
the on
reading property of ndef
reader interface of the web nfc api is called whenever a new
reading is available from compatible nfc devices, e.g.
... nfc tags supporting ndef, when these devices are within the
reader's magnetic induction field.
... specifications specification status comment web nfc, ndef
reader.on
readig draft initial definition.
ReadableStreamBYOBReader.closed - Web APIs
the closed
read-only property of the
readablestreambyob
reader interface returns a promise that fulfills if the stream becomes closed or the
reader's lock is released, or rejects if the stream errors.
... syntax var closed =
readablestreambyob
reader.closed; value a promise.
Reading from Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...
reading data from a file involves getting a reference to a file and then creating an input stream to
read from it.
...And 66 more matches
HTML parser threading
html parser th
reading the html parser parses data received from the network off the main th
read.
... (there's currently one parser th
read serving all parser instances.) data received from document.write() is parsed on the main th
read.
...the nsistreamlistener methods (onstartrequest, ondataavailable and onstoprequest) are called on the main th
read.
...And 53 more matches
Using readable streams - Web APIs
as a javascript developer, programmatically
reading and manipulating streams of data received over the network, chunk by chunk, is very useful!
... but how do you use the streams api’s
readable stream functionality?
... note: this article assumes that you understand the use cases of
readable streams, and are aware of the high-level concepts.
...And 49 more matches
OS.File for the main thread
this page details how to use file i/o from the main th
read.
... using os.file from a jsm to import os.file into your chrome code, add the following line at the start of your script: components.utils.import("resource://gre/modules/osfile.jsm") promises before using os.file from the main th
read, you need some understanding of the promise library.
... example:
read the contents of a file as text the following snippet opens a file "file.txt" and
read its contents as a string, using the default encoding (utf-8).
...And 43 more matches
FileReader - Web APIs
the file
reader object lets web applications asynchronously
read the contents of files (or raw data buffers) stored on the user's computer, using file or blob objects to specify the file or data to
read.
... important note: file
reader is used to
read file content from the user's (remote) system in secure ways only.
... it cannot be used to simply
read a file by pathname from a file system.
...And 33 more matches
JS_THREADSAFE
note: js_th
readsafe is now permanently on.
... js_th
readsafe was a compile-time option that enables support for running multiple th
reads of javascript code concurrently as long as no objects or strings are shared between them.
...until recently, sharing objects among th
reads would mostly work, although scripts could easily make it crash.
...And 30 more matches
Threads
nspr provides an execution environment that promotes the use of lightweight th
reads.
... each th
read is an execution entity that is scheduled independently from other th
reads in the same process.
... this chapter describes the basic nspr th
reading api.
...And 28 more matches
NSPR's Position On Abrupt Thread Termination
this memo describes my position on a facility that is currently under discussion for inclusion in the netscape portable runtime (nspr); the ability of a th
read to abruptly exit.
... th
reads are not processes.
...in that environment, exit() may be called and any time, and results in the calling th
read's immediate termination.
...And 22 more matches
nsIZipReader
modules/libjar/nsizip
reader.idlscriptable this interface provides methods for
reading compressed (zip) files.
... inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: @mozilla.org/libjar/zip-
reader;1.
... to create an instance, use: var zip
reader = components.classes["@mozilla.org/libjar/zip-
reader;1"] .createinstance(components.interfaces.nsizip
reader); about character sets and code pages note: nsizip
reader has a code page problem; that is, in the zip specification, filenames are supposed to use 7-bit ascii; however, most modern filesystems use 8 bit code pages, such as utf-8.
...And 21 more matches
DOMMatrixReadOnly - Web APIs
the dommatrix
readonly interface represents a
read-only 4×4 matrix, suitable for 2d and 3d operations.
... the dommatrix interrface—which is based upon dommatrix
readonly—adds mutability, allowing you to alter the matrix after creating it.
... is2d
read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix.
...And 21 more matches
Multithreading in Necko
necko's primary interfaces are not th
read safe.
... there has not yet been a need to make necko entirely th
read safe as most of mozilla (and especially most of gecko) run only on the main/primordial th
read.
... in the future, necko may be made th
read safe to support changes to gecko that would put some other processing work on background th
reads (eg.
...And 20 more matches
nsIThread
this interface provides a high-level abstraction for an operating system th
read.
... th
reads have a built-in event queue, and a th
read is an event target that can receive nsirunnable objects (events) to be processed on the th
read.
... to create a th
read, use the nsith
readmanager interface.
...And 19 more matches
JS_ClearContextThread
transfer a jscontext from one th
read to another.
... syntax jsword js_clearcontextth
read(jscontext *cx); jsword js_setcontextth
read(jscontext *cx); name type description cx jscontext * the context to transfer from one th
read to another.
... description an application that creates or uses a jscontext in one th
read, then uses or destroys it in another th
read, must use js_clearcontextth
read and js_setcontextth
read to transfer the jscontext safely from one th
read to the other.
...And 17 more matches
nsIThreadObserver
the nsith
readobserver interface may be implemented to let an observer implement a layered event queue.
... the implementation of this interface must be th
read safe.
... xpcom/th
reads/nsith
readinternal.idlscriptable please add a summary to this article.
...And 17 more matches
SpiderMonkey Internals: Thread Safety
note: starting in gecko 12.0, jsruntime is single-th
readed.
... you must only use it from one th
read.
...see js_th
readsafe for a gentler introduction to using spidermonkey in a multi-th
readed application.
...And 16 more matches
nsIThreadManager
the nsith
readmanager interface lets applications and extensions create and manage th
reads, each of which is represented by an nsith
read.
... xpcom/th
reads/nsith
readmanager.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nsith
read getth
readfromprth
read(in prth
read prth
read); native code only!
...And 16 more matches
HTML attribute: readonly - HTML: Hypertext Markup Language
the boolean
readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
... if the
readonly attribute is specified on an input element, because the user can not edit the input, the element does not participate in constraint validation.
... the
readonly attribute is supported by text, search, url, tel, email, password, date, month, week, time, datetime-local, and number<input> types and the <textarea> form control elements.
...And 16 more matches
Spread syntax (...) - JavaScript
sp
read syntax (...) allows an iterable such as an array expression or string to be expanded in places where zero or more arguments (for function calls) or elements (for array literals) are expected, or an object expression to be expanded in places where zero or more key-value pairs (for object literals) are expected.
... syntax for function calls: myfunction(...iterableobj); for array literals or strings: [...iterableobj, '4', 'five', 6]; for object literals (new in ecmascript 2018): let objclone = { ...obj }; rest syntax (parameters) rest syntax looks exactly like sp
read syntax.
... in a way, rest syntax is the opposite of sp
read syntax.
...And 15 more matches
nsIThreadPool
xpcom/th
reads/nsith
readpool.idlscriptable the nsith
readpool interface provides support for th
read pools.
... 1.0 66 introduced gecko 1.9 inherits from: nsieventtarget last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) a th
read pool provides a convenient way to process events off the main th
read.
... when you send events to the th
read pool, the pool creates a new th
read to process the event, up to the number of th
reads specified by the th
readlimit attribute.
...And 14 more matches
PR_CreateThread
creates a new th
read.
... syntax #include <prth
read.h> prth
read* pr_createth
read( prth
readtype type, void (*start)(void *arg), void *arg, prth
readpriority priority, prth
readscope scope, prth
readstate state, pruint32 stacksize); parameters pr_createth
read has the following parameters: type specifies that the th
read is either a user th
read (pr_user_th
read) or a system th
read (pr_system_th
read).
... start a pointer to the th
read's root function, which is called as the root of the new th
read.
...And 13 more matches
ReadableStream - Web APIs
the
readablestream interface of the streams api represents a
readable stream of byte data.
... the fetch api offers a concrete instance of a
readablestream through the body property of a response object.
... constructor
readablestream() creates and returns a
readable stream object from the given handlers.
...And 13 more matches
Reading textual data - Archive of obsolete content
this article describes how to
read textual data from streams, files and sockets.
... in order to
read textual data, you need to know which character encoding the data is in.
...you can fallback to the default character encoding stored in preferences (intl.charset.default, a localized pref value) when
reading from a file, the question is harder to answer.
...And 12 more matches
Making cross-thread calls using runnables
in the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main th
read.
... however, it may be useful for c++ code in the mozilla platform to run tasks on another th
read.
... typically, th
read activities are triggered and managed using an xpcom event-passing framework that uses the nsirunnable interface.
...And 12 more matches
ReadableStream.pipeThrough() - Web APIs
the pipethrough() method of the
readablestream interface provides a chainable way of piping the current stream through a transform stream or any other writable/
readable pair.
... piping a stream will generally lock it for the duration of the pipe, preventing other
readers from locking it.
... syntax var transformedstream =
readablestream.pipethrough(transformstream[, options]); parameters transformstream a transformstream (or an object with the structure {writable,
readable}) consisting of a
readable stream and a writable stream working together to transform some data from one form to another.
...And 11 more matches
URLUtilsReadOnly - Web APIs
the obsolete urlutils
readonly interface previously defined utility methods for working with urls.
...urlutils
readonly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces.
... urlutils
readonly.href
read only is a domstring containing the whole url.
...And 11 more matches
PR_AttachThread
associates a prth
read object with an existing native th
read.
... syntax #include <pprth
read.h> prth
read* pr_attachth
read( prth
readtype type, prth
readpriority priority, prth
readstack *stack); parameters pr_attachth
read has the following parameters: type specifies that the th
read is either a user th
read (pr_user_th
read) or a system th
read (pr_system_th
read).
... priority the priority to assign to the th
read being attached.
...And 10 more matches
PRThreadState
a th
read's th
read state is either joinable or unjoinable.
... syntax #include <prth
read.h> typedef enum prth
readstate { pr_joinable_th
read, pr_unjoinable_th
read } prth
readstate; enumerators pr_unjoinable_th
read th
read termination happens implicitly when the th
read returns from the root function.
... the time of release of the resources assigned to the th
read cannot be determined in advance.
...And 9 more matches
PR_JoinThread
blocks the calling th
read until a specified th
read terminates.
... syntax #include <prth
read.h> prstatus pr_jointh
read(prth
read *th
read); parameter pr_jointh
read has the following parameter: th
read a valid identifier for the th
read that is to be joined.
... returns the function returns one of the following values: if successful, pr_success if unsuccessful--for example, if no joinable th
read can be found that corresponds to the specified target th
read, or if the target th
read is unjoinable--pr_failure.
...And 9 more matches
nsIZipReaderCache
modules/libjar/nsizip
reader.idlscriptable please add a summary to this article.
... inherits from: nsisupports last changed in gecko 10.0 (firefox 10.0 / thunderbird 10.0 / seamonkey 2.7) implemented by: @mozilla.org/libjar/zip-
reader-cache;1.
... to create an instance, use: var zip
readercache = components.classes["@mozilla.org/libjar/zip-
reader-cache;1"] .createinstance(components.interfaces.nsizip
readercache); method overview nsizip
reader getinnerzip(in nsifile zipfile, in autf8string zipentry); nsizip
reader getinnerzip(in nsifile zipfile, in string zipentry); obsolete since gecko 10 nsizip
reader getzip(in nsifile zipfile); void init(in unsigned long cachesize); methods getinnerzip() returns a (possibly shared) cached nsizip
reader for a zip inside another zip.
...And 9 more matches
FileReaderSync - Web APIs
the file
readersync interface allows to
read file or blob objects synchronously.
... methods file
readersync.
readasarraybuffer() this method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
... file
readersync.
readasbinarystring() this method converts a specified blob or a file into a domstring representing the input data as a binary string.
...And 9 more matches
ReadableStreamDefaultController - Web APIs
the
readablestreamdefaultcontroller interface of the streams api represents a controller allowing control of a
readablestream's state and internal queue.
...
readablestreamdefaultcontroller instances are created automatically during
readablestream construction.
... properties
readablestreamdefaultcontroller.desiredsize
read only returns the desired size required to fill the stream's internal queue.
...And 9 more matches
PRThreadScope
the scope of an nspr th
read, specified as a parameter to pr_createth
read or returned by pr_getth
readscope.
... syntax #include <prth
read.h> typedef enum prth
readscope { pr_local_th
read, pr_global_th
read pr_global_bound_th
read } prth
readscope; enumerators pr_local_th
read a local th
read, scheduled locally by nspr within the process.
... pr_global_th
read a global th
read, scheduled by the host os.
...And 8 more matches
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off th
read for execution.
... syntax bool js::cancompileoffth
read(jscontext *cx, const js::
readonlycompileoptions &options, size_t length); bool js::compileoffth
read(jscontext *cx, const js::
readonlycompileoptions &options, const char16_t *chars, size_t length, js::offth
readcompilecallback callback, void *callbackdata); jsscript * js::finishoffth
readscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offth
readcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...And 8 more matches
nsIMsgThread
the nsimsgfolder interface is used to interact with th
reads in thunderbird.
... inherits from: nsisupports method overview void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean th
readinth
read, in nsidbchangeannouncer announcer); nsimsgdbhdr getchildat(in long index); nsmsgkey getchildkeyat(in long index); nsimsgdbhdr getchild(in nsmsgkey msgkey); nsimsgdbhdr getchildhdrat(in long index); nsimsgdbhdr getroothdr(out long index); void removechildat(in long index); void removechildhdr(in nsimsgdbhdr child, in nsidbchangeannouncer announcer); void markchild
read(in boolean b
read); nsimsgdbhdr getfirstun
readchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); attributes attribute type description th
readkey nsm...
...sgkey unsigned long key designating this th
read.
...And 8 more matches
The Thread Manager
the th
read manager, introduced in firefox 3, offers an easy to use mechanism for creating th
reads and dispatching events to them for processing.
... only c++ code may use the th
read manager and xpcom th
read.
... application/extension javascript should consider using a chromeworker instead.") interfaces there are several interfaces that provide th
reading support: nsith
readmanager the th
read manager itself lets you create th
reads.
...And 8 more matches
DOMPointReadOnly - Web APIs
the dompoint
readonly interface specifies the coordinate and perspective fields used by dompoint to define a 2d or 3d point in a coordinate system.
... there are two ways to create a new dompoint
readonly instance.
... first, you can use its constructor, passing in the values of the parameters for each dimension and, optionally, the perspective: /* 2d */ const point = new dompoint
readonly(50, 50); /* 3d */ const point = new dompoint
readonly(50, 50, 25); /* 3d with perspective */ const point = new dompoint
readonly(100, 100, 100, 1.0); the other option is to use the static dompoint
readonly.frompoint() method: const point = dompoint
readonly.frompoint({x: 100, y: 100, z: 50; w: 1.0}); constructor dompoint
readonly() creates a new dompoint
readonly object given the values of its coordinates and perspective.
...And 8 more matches
DOMRectReadOnly - Web APIs
the domrect
readonly interface specifies the standard properties used by domrect to define a rectangle whose properties are immutable.
... constructor domrect
readonly() defined to create a new domrect
readonly object.
... properties domrect
readonly.x
read only the x coordinate of the domrect's origin.
...And 8 more matches
FileReader.result - Web APIs
the file
reader result property returns the file's contents.
... this property is only valid after the
read operation is complete, and the format of the data depends on which of the methods was used to initiate the
read operation.
... syntax var file = instanceoffile
reader.result value an appropiate string or arraybuffer based on which of the
reading methods was used to initiate the
read operation.
...And 8 more matches
nsIThreadInternal
the nsith
readinternal interface is implemented by the xpcom th
read object to let consumers observe dispatch activity on a th
read.
... xpcom/th
reads/nsith
readinternal.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsith
read method overview void popeventqueue(); void pusheventqueue(in nsith
readeventfilter filter); attributes attribute type description observer nsith
readobserver get/set the current th
read observer; set to null to disable observing.
...And 7 more matches
Clipboard.read() - Web APIs
the
read() method of the clipboard interface requests a copy of the clipboard's contents, delivering the data to the returned promise when the promise is resolved.
... unlike
readtext(), the
read() method can return arbitrary data, such as images.
... to
read from the clipboard, you must first have the "clipboard-
read" permission.
...And 7 more matches
DirectoryReaderSync - Web APIs
the directory
readersync interface of the file system api lets you
read the entries in a directory.
... basic concepts before you call the only method in this interface,
readentries(), create the directoryentrysync object.
... but directoryentrysync (as well as fileentrysync) is not a data type that you can pass between a calling app and web worker th
read.
...And 7 more matches
ReadableStream.tee() - Web APIs
the tee() method of the
readablestream interface tees the current
readable stream, returning a two-element array containing the two resulting branches as new
readablestream instances.
... this is useful for allowing two
readers to
read a stream simultaneously, perhaps at different speeds.
...teeing a stream will generally lock it for the duration, preventing other
readers from locking it.
...And 7 more matches
StylePropertyMapReadOnly - Web APIs
the stylepropertymap
readonly interface of the the css typed object model api provides a
read-only representation of a css declaration block that is an alternative to cssstyledeclaration.
... properties stylepropertymap
readonly.size returns an unsinged long integer containing the size of the stylepropertymap
readonly object.
... methods stylepropertymap
readonly.entries() returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
...And 7 more matches
Symbol.isConcatSpreadable - JavaScript
the symbol.isconcatsp
readable well-known symbol is used to configure if an object should be flattened to its array elements when using the array.prototype.concat() method.
... description the @@isconcatsp
readable symbol (symbol.isconcatsp
readable) can be defined as an own or inherited property and its value is a boolean.
... it can control behavior for arrays and array-like objects: for array objects, the default behavior is to sp
read (flatten) elements.
...And 7 more matches
spreadMethod - SVG: Scalable Vector Graphics
the sp
readmethod attribute determines how a shape is filled beyond the defined edges of a gradient.
... examples of sp
readmethod with linear gradients svg <svg width="220" height="150" xmlns="http://www.w3.org/2000/svg"> <defs> <lineargradient id="padgradient" x1="33%" x2="67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="reflectgradient" sp
readmethod="reflect" x1="33%" x2=...
..."67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="repeatgradient" sp
readmethod="repeat" x1="33%" x2="67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> </defs> <rect fill="url(#padgradient)" x="10" y="0" width="200" height="40"/> <rect fill="url(#reflectgradient)" x="10" y="50" width="200" height="40"/> <rect fill="url(#repeatgradient)" x="10" y="100" width="200" height="40"/> </svg> result notice that the middle third of each gradient is the same.
...And 7 more matches
PRThreadPriority
a th
read's priority setting.
... syntax #include <prth
read.h> typedef enum prth
readpriority { pr_priority_first = 0, pr_priority_low = 0, pr_priority_normal = 1, pr_priority_high = 2, pr_priority_urgent = 3, pr_priority_last = 3 } prth
readpriority; enumerators pr_priority_first placeholder.
...this priority is appropriate for th
reads that are expected to perform intensive computation.
...And 6 more matches
PR_DetachThread
disassociates a prth
read object from a native th
read.
... syntax #include <pprth
read.h> void pr_detachth
read(void); parameters pr_detachth
read has no parameters.
... description this function detaches the nspr th
read from the currently executing native th
read.
...And 6 more matches
PR_NewThreadPrivateIndex
returns a new index for a per-th
read private data table and optionally associates a destructor with the data that will be assigned to the index.
... syntax #include <prth
read.h> prstatus pr_newth
readprivateindex( pruintn *newindex, prth
readprivatedtor destructor); parameters pr_newth
readprivateindex has the following parameters: newindex on output, an index that is valid for all th
reads in the process.
... you use this index with pr_setth
readprivate and pr_getth
readprivate.
...And 6 more matches
Thread Sanitizer
what is th
read sanitizer?
... th
read sanitizer (tsan) is a fast data race detector for c/c++ programs.
...more information on how tsan works can be found on the th
read sanitizer wiki.
...And 6 more matches
nsIThreadPoolListener
the nsith
readpoollistener interface represents objects that listen to notifications generated by the nsith
readpool.
... xpcom/th
reads/nsith
readpool.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void onth
readcreated(); void onth
readshuttingdown(); methods onth
readcreated() called when a new th
read is created by the th
read pool.
...And 6 more matches
FileSystemDirectoryEntry.createReader() - Web APIs
the filesystemdirectoryentry interface's method create
reader() returns a filesystemdirectory
reader object which can be used to
read the entries in the directory.
... syntax directory
reader = filesystemdirectoryentry.create
reader(); parameters none.
... return value a filesystemdirectory
reader object which can be used to
read the directory's entries.
...And 6 more matches
NDEFReader - Web APIs
the ndef
reader interface of the web nfc api is an abstract interface used to
read data from compatible nfc devices, e.g.
... nfc tags supporting ndef, when these devices are within the
reader's magnetic induction field.
... constructor ndef
reader.ndef
reader() returns an ndef
reader with configuration specified in the parameters or default ones if no parameters are specified.
...And 6 more matches
ReadableStream.cancel() - Web APIs
the cancel() method of the
readablestream interface cancels the associated stream.
... cancel is used when you've completely finished with the stream and don't need any more data from it, even if there are chunks enqueued waiting to be
read.
... that data is lost after cancel is called, and the stream is not
readable any more.
...And 6 more matches
ReadableStream.pipeTo() - Web APIs
the pipeto() method of the
readablestream interface pipes the current
readablestream to a given writablestream and returns a promise that fulfills when the piping process completes successfully, or rejects if any errors were encountered.
... piping a stream will generally lock it for the duration of the pipe, preventing other
readers from locking it.
... syntax var promise =
readablestream.pipeto(destination[, options]); parameters destination a writablestream that acts as the final destination for the
readablestream.
...And 6 more matches
ReadableStreamDefaultController.close() - Web APIs
the close() method of the
readablestreamdefaultcontroller interface closes the associated stream.
...
readers will still be able to
read any previously-enqueued chunks from the stream, but once those are
read, the stream will become closed.
... if you want to completely get rid of the stream and discard any enqueued chunks, you'd use
readablestream.cancel() or
readablestreamdefault
reader.cancel().
...And 6 more matches
WebGLRenderingContext.readPixels() - Web APIs
the webglrenderingcontext.
readpixels() method of the webgl api
reads a block of pixels from a specified rectangle of the current color framebuffer into an arraybufferview object.
... syntax // webgl1: void gl.
readpixels(x, y, width, height, format, type, pixels); // webgl2: void gl.
readpixels(x, y, width, height, format, type, glintptr offset); void gl.
readpixels(x, y, width, height, format, type, arraybufferview pixels, gluint dstoffset); parameters x a glint specifying the first horizontal pixel that is
read from the lower left corner of a rectangular block of pixels.
... y a glint specifying the first vertical pixel that is
read from the lower left corner of a rectangular block of pixels.
...And 6 more matches
:read-only - CSS: Cascading Style Sheets
the :
read-only css pseudo-class represents an element (such as input or textarea) that is not editable by the user.
... input:
read-only, textarea:
read-only { background-color: #ccc; } p:
read-only { background-color: #ccc; } syntax :
read-only examples confirming form information in
read-only/
read-write controls one use of
readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
... the :
read-only pseudo-class is used to remove all the styling that makes the inputs look like clickable fields, making them look more like
read-only paragraphs.the :
read-write pseudo-class on the other hand is used to provide some nicer styling to the editable <textarea>.
...And 6 more matches
:read-write - CSS: Cascading Style Sheets
the :
read-write css pseudo-class represents an element (such as input or textarea) that is editable by the user.
... input:
read-write, textarea:
read-write { background-color: #bbf; } p:
read-write { background-color: #bbf; } syntax :
read-write examples confirming form information in
read-only/
read-write controls one use of
readonly form controls is to allow the user to check and verify information that they may have entered in an earlier form (for example, shipping details), while still being able to submit the information along with the rest of the form.
... the :
read-only pseudo-class is used to remove all the styling that makes the inputs look like clickable fields, making them look more like
read-only paragraphs.the :
read-write pseudo-class on the other hand is used to provide some nicer styling to the editable <textarea>.
...And 6 more matches
NPN_PluginThreadAsyncCall - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary th
read safe way to request that the browser calls a plug-in function on the browser or plugin th
read (the th
read on which the plug-in was initiated).
... syntax #include <npapi.h> void npn_pluginth
readasynccall(npp plugin, void (*func)(void *), void *userdata); parameters the function has the following parameters: plugin pointer to the current plug-in instance.
... func pointer to the function to call on the correct th
read.
...And 5 more matches
NPN_RequestRead - Archive of obsolete content
this initiates a
read operation; the actual data is received through subsequent calls to npp_write
ready() and npp_write().
... syntax #include <npapi.h> nperror npn_request
read(npstream* stream, npbyterange* rangelist); parameters the function has the following parameters: stream stream of type np_seek from which to
read bytes.
...the plug-in calls npn_request
read() to request data from a seekable stream.
...And 5 more matches
Screen reader - MDN Web Docs Glossary: Definitions of Web-related terms
screen
readers are software applications that attempt to convey what is seen on a screen display in a non-visual way, usually as text to speech, but also into braille or sound icons.
... screen
readers are essential to people who are blind, as well as useful to people who are visually impaired, illiterate, or have a learning disability.
... there are some browser extension screen
readers, but most screen
readers operate system-wide for all user applications, not just the browser.
...And 5 more matches
Thread - MDN Web Docs Glossary: Definitions of Web-related terms
th
read in computer science is the execution of running multiple tasks or programs at the same time.
... each unit capable of executing code is called a th
read.
... the main th
read is the one used by the browser to handle user events, render and paint the display, and to run the majority of the code that comprises a typical web page or app.
...And 5 more matches
JS_AlreadyHasOwnProperty
this article covers features introduced in spidermonkey 1.8 determine whether a property is al
ready physically present on a jsobject.
... syntax boo js_al
readyhasownproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); boo js_al
readyhasownucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *foundp); boo js_al
readyhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_al
readyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...And 5 more matches
Document.readyState - Web APIs
the document.
readystate property describes the loading state of the document.
... when the value of this property changes, a
readystatechange event fires on the document object.
... syntax var string = document.
readystate; values the
readystate of a document can be one of following: loading the document is still loading.
...And 5 more matches
ReadableByteStreamController - Web APIs
the
readablebytestreamcontroller interface of the streams api represents a controller allowing control of a
readablestream's state and internal queue.
...
readablebytestreamcontroller instances are created automatically during
readablestream construction.
... properties
readablebytestreamcontroller.byobrequest
read only returns the current byob pull request.
...And 5 more matches
PRThreadType
the type of an nspr th
read, specified as a parameter to pr_createth
read.
... syntax #include <prth
read.h> typedef enum prth
readtype { pr_user_th
read, pr_system_th
read } prth
readtype; enumerators pr_user_th
read pr_cleanup blocks until the last th
read of type pr_user_th
read terminates.
... pr_system_th
read nspr ignores th
reads of type pr_system_th
read when determining when a call to pr_cleanup should return.
...And 4 more matches
PR_AcceptRead
syntax #include <prio.h> print32 pr_accept
read( prfiledesc *listensock, prfiledesc **acceptedsock, prnetaddr **peeraddr, void *buf, print32 amount, printervaltime timeout); parameters the function has the following parameters: listensock a pointer to a prfiledesc object representing a socket descriptor that has been called with the pr_listen function, also known as the rendezvous socket.
...if 0, no data will be
read from the peer.
... timeout the timeout interval only applies to the
read portion of the operation.
...And 4 more matches
JS_GetContextThread
returns the id of the associated th
read for a context.
... syntax int js_getcontextth
read(jscontext *cx); name type description cx jscontext * the context to examine.
... description js_getcontextth
read returns the id of the th
read currently associated with this context.
...And 4 more matches
DOMPointReadOnly.fromPoint() - Web APIs
the static dompoint
readonly method frompoint() creates and returns a new dompoint
readonly object given a source point.
... the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompoint
readonly.
... you can also create a new dompoint
readonly object using the new dompoint
readonly() constructor.
...And 4 more matches
IDBRequest.readyState - Web APIs
the
readystate
read-only property of the idbrequest interface returns the state of the request.
... syntax var current
readystate = request.
readystate; value the idbrequest
readystate of the request, which takes one of the following two values: value meaning pending the request is pending.
...the
readystate of the 2nd request is logged to the developer console.
...And 4 more matches
ReadableStreamDefaultController.enqueue() - Web APIs
the enqueue() method of the
readablestreamdefaultcontroller interface enqueues a given chunk in the associated stream.
... syntax
readablestreamdefaultcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
... exceptions typeerror the source object is not a
readablestreamdefaultcontroller.
...And 4 more matches
WebGL2RenderingContext.readBuffer() - Web APIs
the webgl2renderingcontext.
readbuffer() method of the webgl 2 api selects a color buffer as the source for pixels for subsequent calls to copyteximage2d, copytexsubimage2d, copytexsubimage3d or
readpixels.
... syntax void gl.
readbuffer(src); parameters src a glenum specifying a color buffer.
... possible values: gl.back:
reads from the back color buffer.
...And 4 more matches
WritableStreamDefaultWriter.ready - Web APIs
the
ready
read-only property of the writablestreamdefaultwriter interface returns a promise that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
... syntax var promise = writablestreamdefaultwriter.
ready; value a promise.
... example the following example shows two uses of the
ready property.
...And 4 more matches
updateready - Archive of obsolete content
the update
ready event is fired when the resources listed in the application cache manifest have been newly redownloaded, and the script can use swapcache() to switch to the new cache.
...
read only.
...
read only.
...And 3 more matches
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
consequently, implementing th
reads, with their implication of a unique stack for each th
read, requires that the nspr copy the stacks during th
read context switches.
...what is a hardship is that addresses of dynamic variables, those allocated on the call stack, in a function's local frame, are not valid across th
read boundaries.
... the simplest demonstration of the problem is as follows: typedef struct shareddata { prlock *ml; prcondvar *cv; print32 counter; } shareddata; static void forkedth
read(void *arg) { shareddata *shared = (shareddata*)arg; while (--shared->counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedth
read */ printn main(printn argc, char **argv) { prth
read *th
read; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.counter = 10; th
read = pr_createth
read( pr_user_th
read, forkedth
read, &shared, pr_priority_normal, pr_local_th
read, pr_joinable_th
read, 0); do { pr_sleep(pr_secondstointerval(1)); pr_lock(shared.ml); if (0 == shared...
...And 3 more matches
DOMRectReadOnly() - Web APIs
the domrect
readonly() constructor creates a new domrect
readonly object.
... syntax const mydomrect
readonly = new domrect
readonly(x, y, width, height) parameters x the x coordinate of the domrect
readonly's origin.
... y the y coordinate of the domrect
readonly's origin.
...And 3 more matches
ReadableStreamBYOBRequest - Web APIs
the
readablestreambyobrequest interface of the streams api represents a pull request into a
readablebytestreamcontroller view.
... a view, as mentioned below, refers to a typed array representing the destination region to which the associated
readablebytestreamcontroller controller can write generated data.
...
readablestreambyobrequest instance is created automatically by
readablebytestreamcontroller as needed.
...And 3 more matches
TypeError: "x" is read-only - JavaScript
the javascript strict mode-only exception "is
read-only" occurs when a global variable or object property that was assigned to is a
read-only property.
... message typeerror: assignment to
read-only properties is not allowed in strict mode (edge) typeerror: "x" is
read-only (firefox) typeerror: 0 is
read-only (firefox) typeerror: cannot assign to
read only property 'x' of #<object> (chrome) typeerror: cannot assign to
read only property '0' of [object array] (chrome) error type typeerror what went wrong?
... the global variable or object property that was assigned to is a
read-only property.
...And 3 more matches
Main thread - MDN Web Docs Glossary: Definitions of Web-related terms
the main th
read is where a browser processes user events and paints.
... by default, the browser uses a single th
read to run all the javascript in your page, as well as to perform layout, reflows, and garbage collection.
... this means that long-running javascript functions can block the th
read, leading to an unresponsive page and a bad user experience.
...And 2 more matches
PRThread
an nspr th
read.
... syntax #include <prth
read.h> typedef struct prth
read prth
read; description in nspr, a th
read is represented by a pointer to an opaque structure of type prth
read.
... this pointer is a required parameter for most of the functions that operate on th
reads.
...And 2 more matches
PR_GetThreadPrivate
recovers the per-th
read private data for the current th
read.
... syntax #include <prth
read.h> void* pr_getth
readprivate(pruintn index); parameter pr_getth
readprivate has the following parameters: index the index into the per-th
read private data table.
... description pr_getth
readprivate may be called at any time during a th
read's execution.
...And 2 more matches
PR_Read
reads bytes from a file or socket.
... syntax #include <prio.h> print32 pr_
read(prfiledesc *fd, void *buf, print32 amount); parameters the function has the following parameters: fd a pointer to a prfiledesc object for the file or socket.
... buf a pointer to a buffer to hold the data
read in.
...And 2 more matches
PR_SetThreadPriority
sets the priority of a specified th
read.
... syntax #include <prth
read.h> void pr_setth
readpriority( prth
read *th
read, prth
readpriority priority); parameters pr_setth
readpriority has the following parameters: th
read a valid identifier for the th
read whose priority you want to set.
... description modifying the priority of a th
read other than the calling th
read is risky.
...And 2 more matches
PR_SetThreadPrivate
sets per-th
read private data.
... syntax #include <prth
read.h> prstatus pr_setth
readprivate(pruintn index, void *priv); parameters pr_setth
readprivate has the following parameters: index an index into the per-th
read private data table.
... priv the per-th
read private data, or more likely, a pointer to the data.
...And 2 more matches
Thread Pools
this chapter describes the nspr api th
read pools.
... th
read pools create and manage th
reads to provide support for scheduling work (jobs) onto one or more th
reads.
... nspr's th
read pool is modeled on the th
read pools described by david r.
...And 2 more matches
nsIDOMFileReader
the nsidomfile
reader interface provides a way to
read data from a file specified by an nsidomfile.
... content/base/public/nsidomfile
reader.idlscriptable please add a summary to this article.
... last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports implemented by: @mozilla.org/files/file
reader;1.
...And 2 more matches
already_AddRefed
« xpcom api reference al
ready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.
... you may want to use this as a return type from a function that has al
ready produced an addrefed pointer as a result.
... in fact, it is preferred to use al
ready_addrefed in this case over returning a raw pointer or nscomptr (see the nscomptr user manual).
...And 2 more matches
Animation.ready - Web APIs
the
read-only animation.
ready property of the web animations api returns a promise which resolves when the animation is
ready to play.
... a new promise is created every time the animation enters the "pending" play state as well as when the animation is canceled, since in both of those scenarios, the animation is
ready to be started again.
... syntax var
readypromise = animation.
ready; value a promise which resolves when the animation is
ready to be played.
...And 2 more matches
Clipboard.readText() - Web APIs
the clipboard interface's
readtext() method returns a promise which resolves with a copy of the textual contents of the system clipboard..
... the "clipboard-
read" permission of the permissions api must be granted before you can
read data from the clipboard.
... syntax var promise = navigator.clipboard.
readtext() parameters none.
...And 2 more matches
FileSystemDirectoryReader - Web APIs
the filesystemdirectory
reader interface of the file and directory entries api lets you access the fileentry-based objects (generally filesystemfileentry or filesystemdirectoryentry) representing each entry in a directory.
... methods
readentries() returns an array containing some number of the directory's entries.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetfilesystemdirectory
reader deprecatednon-standardchrome full support 8alternate name full support 8alternate name alternate name uses the non-standard name: directory
readeredge full support ≤18alternate name full support ≤18alternate name...
...And 2 more matches
LockedFile.readAsArrayBuffer() - Web APIs
summary the
readasarraybuffer method is used to
read the content of the lockedfile object and provide the result of that
reading as an arraybuffer.
... in many ways, it performs like the file
reader.
readasarraybuffer() method.
... the
reading operation starts at the position given by the lockedfile.location property.
...And 2 more matches
LockedFile.readAsText() - Web APIs
summary the
readastext method is used to
read the content of the lockedfile object and provide the result of that
reading as a string.
... in many ways, it performs like the file
reader.
readastext() method.
... the
reading operation starts at the position given by the lockedfile.location property.
...And 2 more matches
MediaSource.readyState - Web APIs
the
readystate
read-only property of the mediasource interface returns an enum representing the state of the current mediasource.
... open: the source is attached to a media element and
ready to receive sourcebuffer objects.
... syntax var my
readystate = mediasource.
readystate; value a domstring.
...And 2 more matches
NDEFReader() - Web APIs
the ndef
reader() constructor of the web nfc api returns a newly constructed ndef
reader object used to
read ndef messages from compatiable nfc devices, e.g.
... ndef tags, within the
reader's magnetic induction field.
... syntax writer = new ndef
reader(); parameters none.
...And 2 more matches
NDEFReadingEvent - Web APIs
the ndef
readingevent interface represents events despatched on new nfc
readings obtained by ndef
reader.
... constructor ndef
readingevent.ndef
readingevent() creates an ndef
readingevent event with the given parameters.
... ndef
readingevent.serialnumber
read only represents the serial number of the device used for anti-collision and identification, or empty string in case none is available.
...And 2 more matches
ReadableStreamDefaultController.error() - Web APIs
the error() method of the
readablestreamdefaultcontroller interface causes any future interactions with the associated stream to error.
... note: the error() method can be called more than once, and can be called when the stream is not
readable.
... syntax
readablestreamdefaultcontroller.error(e); parameters e the error you want future interactions to fail with.
...And 2 more matches
XMLHttpRequest.onreadystatechange - Web APIs
an eventhandler that is called whenever the
readystate attribute changes.
... the callback is called from the user interface th
read.
... the xmlhttprequest.on
readystatechange property contains the event handler to be called when the
readystatechange event is fired, that is every time the
readystate property of the xmlhttprequest changes.
...And 2 more matches
reader.parse-on-load.force-enabled
the preference
reader.parse-on-load.force-enabled controls if the
reader mode used in firefox mobile should be enabled independent of the memory available in the device.
... by default, the
reader mode in firefox mobile is only enabled if the memory is greater than 384mb.
... type:boolean default value: false exists by default: yes application support:firefox mobile 23.0 status: active; last updated 2013-05-11 introduction: pushed to nightly on 2013-05-06 bugs: bug 867875 values true
reader mode is enabled independent of memory available.
... false (default)
reader mode is only enabled if memory available exceeds a threshold (currenlty 384mb).
PR_AttachThread
the opaque prth
readstack structure is only used in the third argument "prth
readstack *stack" to the pr_attachth
read function.
... the 'stack' argument is now obsolete and ignored by pr_attachth
read.
... you should pass null as the 'stack' argument to pr_attachth
read.
... syntax #include <prth
read.h> typedef struct prth
readstack prth
readstack; ...
PR_CreateThreadPool
syntax #include <prtpool.h> nspr_api(prth
readpool *) pr_createth
readpool( print32 initial_th
reads, print32 max_th
reads, pruint32 stacksize ); parameters the function has the following parameters: initial_th
reads the number of th
reads to be created within this th
read pool.
... max_th
reads the limit on the number of th
reads that will be created to server the th
read pool.
... stacksize size of the stack allocated to each th
read in the th
read.
... returns pointer to a prth
readpool structure or null on error.
PR_GetCurrentThread
returns the current th
read object for the currently running code.
... syntax #include <prth
read.h> prth
read* pr_getcurrentth
read(void); returns always returns a valid reference to the calling th
read--a self-identity.
... description the currently running th
read may discover its own identity by calling pr_getcurrentth
read.
... note: this is the only safe way to establish the identity of a th
read.
PR_ReadDir
syntax #include <prio.h> prdirentry* pr_
readdir( prdir *dir, prdirflags flags); parameters the function has the following parameters: dir a pointer to a prdir object that designates an open directory.
... description pr_
readdir returns a pointer to a directory entry structure: struct prdirentry { const char *name; }; typedef struct prdirentry prdirentry; the structure has the following field: name name of entry, relative to directory name.
...moreover, the prdirentry structure returned by each pr_
readdir call is valid only until the next pr_
readdir or pr_closedir call on the same prdir object.
... if the end of the directory is reached, pr_
readdir returns null, and pr_geterror returns pr_no_more_files_error.
JS_SetThreadStackLimit
syntax void js_setth
readstacklimit(jscontext *cx, jsuword limitaddr) name type description cx jscontext * the context to configure.
... description js_setth
readstacklimit sets the maximum (if stack grows upward) or minimum (downward) legal stack byte address in limitaddr for the th
read or process stack used by cx.
...in a js_th
readsafe build, after passing a jscontext from one th
read to another, call js_setth
readstacklimit(cx, 0) after calling js_setcontextth
read.
... (see also js_setcontextth
read and js_clearcontextth
read.) see also mxr id search for js_setth
readstacklimit js_setnativestackquota bug 723021 ...
EndReading
« xpcom api reference summary the end
reading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
... const char_type* end
reading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated.
... example code see begin
reading for an example.
... see also begin
reading, ns_cstringgetdata, nsacstring ...
EndReading
« xpcom api reference summary the end
reading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
... const char_type* end
reading() const; remarks it is generally illegal to dereference the returned pointer, unless it is known that the string's internal buffer is null-terminated.
... example code see begin
reading for an example.
... see also begin
reading, ns_cstringgetdata, nsastring ...
nsIThreadEventFilter
the nsith
readeventfilter interface may be implemented to determine whether or not an event may be accepted by a nested event queue; see nsith
readinternal.pusheventqueue() for more information.
... xpcom/th
reads/nsith
readinternal.idlscriptable please add a summary to this article.
...(see nsith
readinternal.pusheventqueue()) warning: this method must not make any calls on the th
read object.
... see also the th
read manager nsith
readmanager nsith
read nsith
readpool nsith
readobserver nsith
readinternal ...
Debug worker threads - Firefox Developer Tools
the debugger shows the source code for all running worker th
reads — web workers, service workers, etc.
...you can open the javascript file for the worker process and set breakpoints and logpoints just as you can with javascript code running on the main th
read.
... inspecting worker code for example, see the selected item worker.js below — it is listed in a separate th
read in the sources list, but appears in the source pane in the same way as main th
read code when selected.
... you can set a breakpoint (or logpoint) on any active worker th
read: when execution is paused in a worker th
read, the context of the debugger is updated to show the correct breakpoints, call stack, etc., just as you'd expect.
readValue() - Web APIs
the bluetoothremotegattdescriptor.
readvalue() method returns a promise that resolves to an arraybuffer holding a duplicate of the value property if it is available and supported.
... syntax bluetoothremotegattdescriptor.
readvalue().then(function(value[]) { ...
... specifications specification status comment web bluetooththe definition of '
readvalue()' in that specification.
... desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internet
readvalue experimentalchrome full support 57notes full support 57notes notes macos only.
DOMPointReadOnly() - Web APIs
the dompoint
readonly() constructor returns a new dompoint
readonly object representing a point in 2d or 3d space, optionally with perspective, whose values cannot be altered by script code.
... syntax point = new dompoint
readonly(x, y, z, w); parameters x optional the value of the horizontal coordinate, x, as a floating point number.
... return value a new dompoint
readonly object representing the specified location in space.
... var point2d = new dompoint
readonly(50, 25); var point3d = new dompoint
readonly(50, 0, 10); var perspectivepoint3d = new dompoint
readonly(50, 50, 25, 0.5); specifications specification status comment geometry interfaces module level 1the definition of 'dompoint
readonly' in that specification.
DOMPointReadOnly.toJSON() - Web APIs
the dompoint
readonly method tojson() returns a dompointinit object giving the json form of the point object.
... syntax pointjson = dompoint
readonly.tojson(); parameters none.
... return value a new dompointinit object whose properties are set to the values in the dompoint or dompoint
readonly on which the method was called.
... var topleft = new dompoint(window.screenx, window.screeny); var pointjson = topleft.tojson(); specifications specification status comment geometry interfaces module level 1the definition of 'dompoint
readonly.tojson()' in that specification.
EventSource.readyState - Web APIs
the
readystate
read-only property of the eventsource interface returns a number representing the state of the connection.
... syntax var my
readystate = eventsource.
readystate; value a number representing the state of the connection.
... possible values are: 0 — connecting 1 — open 2 — closed examples var evtsource = new eventsource('sse.php'); console.log(evtsource.
readystate); note: you can find a full example on github — see simple sse demo using php.
... specifications specification status comment html living standardthe definition of '
readystate' in that specification.
FileReader() - Web APIs
the file
reader() constructor creates a new file
reader.
... for details about how to use file
reader, see using files from web applications.
... syntax var
reader = new file
reader(); parameters none.
... example the following code snippet shows creation of a file
reader object using the file
reader() constructor and subsequent usage of the object: function printfile(file) { var
reader = new file
reader();
reader.onload = function(evt) { console.log(evt.target.result); };
reader.
readastext(file); } specifications specification status comment file api working draft initial definition ...
FileReader: abort event - Web APIs
the abort event is fired when a
read has been aborted: for instance because the program called file
reader.abort().
... bubbles no cancelable no interface progressevent event handler property file
reader.onabort examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .exa...
...review log"; } .file-select { grid-area: select; } .preview { grid-area: preview; } .event-log { grid-area: log; } .event-log>label { display: block; } .event-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event-log-contents'); const
reader = new file
reader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src =
reader.result; } } function addlisteners(
reader) {
reader.addeventlistener('loadstart', handleevent);
reader.addeventlistener('load', handleevent);
reader.addeventlisten...
...er('loadend', handleevent);
reader.addeventlistener('progress', handleevent);
reader.addeventlistener('error', handleevent);
reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(
reader);
reader.
readasdataurl(selectedfile); }
reader.abort(); } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: load event - Web APIs
the load event is fired when a file has been
read successfully.
... bubbles no cancelable no interface progressevent event handler property file
reader.onload examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .exam...
...review log"; } .file-select { grid-area: select; } .preview { grid-area: preview; } .event-log { grid-area: log; } .event-log>label { display: block; } .event-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event-log-contents'); const
reader = new file
reader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src =
reader.result; } } function addlisteners(
reader) {
reader.addeventlistener('loadstart', handleevent);
reader.addeventlistener('load', handleevent);
reader.addeventlisten...
...er('loadend', handleevent);
reader.addeventlistener('progress', handleevent);
reader.addeventlistener('error', handleevent);
reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(
reader);
reader.
readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadend event - Web APIs
the loadend event is fired when a file
read has completed, successfully or not.
... bubbles no cancelable no interface progressevent event handler property file
reader.onloadend examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .e...
...review log"; } .file-select { grid-area: select; } .preview { grid-area: preview; } .event-log { grid-area: log; } .event-log>label { display: block; } .event-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event-log-contents'); const
reader = new file
reader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src =
reader.result; } } function addlisteners(
reader) {
reader.addeventlistener('loadstart', handleevent);
reader.addeventlistener('load', handleevent);
reader.addeventlisten...
...er('loadend', handleevent);
reader.addeventlistener('progress', handleevent);
reader.addeventlistener('error', handleevent);
reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(
reader);
reader.
readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: loadstart event - Web APIs
the loadstart event is fired when a file
read operation has begun.
... bubbles no cancelable no interface progressevent event handler property file
reader.onloadstart examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } ...
...review log"; } .file-select { grid-area: select; } .preview { grid-area: preview; } .event-log { grid-area: log; } .event-log>label { display: block; } .event-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event-log-contents'); const
reader = new file
reader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src =
reader.result; } } function addlisteners(
reader) {
reader.addeventlistener('loadstart', handleevent);
reader.addeventlistener('load', handleevent);
reader.addeventlisten...
...er('loadend', handleevent);
reader.addeventlistener('progress', handleevent);
reader.addeventlistener('error', handleevent);
reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(
reader);
reader.
readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
FileReader: progress event - Web APIs
the progress event is fired periodically as the file
reader
reads data.
... bubbles no cancelable no interface progressevent event handler property file
reader.onprogress examples live example html <div class="example"> <div class="file-select"> <label for="avatar">choose a profile picture:</label> <input type="file" id="avatar" name="avatar" accept="image/png, image/jpeg"> </div> <img src="" class="preview" height="200" alt="image preview..."> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents"></textarea> </div> </div> css img.preview { margin: 1rem 0; } .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .
...review log"; } .file-select { grid-area: select; } .preview { grid-area: preview; } .event-log { grid-area: log; } .event-log>label { display: block; } .event-log-contents { resize: none; } js const fileinput = document.queryselector('input[type="file"]'); const preview = document.queryselector('img.preview'); const eventlog = document.queryselector('.event-log-contents'); const
reader = new file
reader(); function handleevent(event) { eventlog.textcontent = eventlog.textcontent + `${event.type}: ${event.loaded} bytes transferred\n`; if (event.type === "load") { preview.src =
reader.result; } } function addlisteners(
reader) {
reader.addeventlistener('loadstart', handleevent);
reader.addeventlistener('load', handleevent);
reader.addeventlisten...
...er('loadend', handleevent);
reader.addeventlistener('progress', handleevent);
reader.addeventlistener('error', handleevent);
reader.addeventlistener('abort', handleevent); } function handleselected(e) { eventlog.textcontent = ''; const selectedfile = fileinput.files[0]; if (selectedfile) { addlisteners(
reader);
reader.
readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); result specifications specification status file api working draft ...
HTMLMediaElement.readyState - Web APIs
the htmlmediaelement.
readystate property indicates the
readiness state of the media.
... syntax var
readystate = audioorvideo.
readystate; value an unsigned short.
... <audio id="example" preload="auto"> <source src="sound.ogg" type="audio/ogg" /> </audio> var obj = document.getelementbyid('example'); obj.addeventlistener('loadeddata', function() { if(obj.
readystate >= 2) { obj.play(); } }); specifications specification status comment html living standardthe definition of 'htmlmediaelement.
readystate' in that specification.
... living standard html5the definition of 'htmlmediaelement.
readystate' in that specification.
RTCDataChannel.readyState - Web APIs
the
read-only rtcdatachannel property
readystate returns an enum of type rtcdatachannelstate which indicates the state of the data channel's underlying data connection.
... syntax var state = adatachannel.
readystate; values a string which is one of the values in the rtcdatachannelstate enum, indicating the current state of the underlying data transport.
... example var datachannel = peerconnection.createdatachannel("file transfer"); var sendqueue = []; function sendmessage(msg) { switch(datachannel.
readystate) { case "connecting": console.log("connection not open; queueing: " + msg); sendqueue.push(msg); break; case "open": sendqueue.foreach((msg) => datachannel.send(msg)); break; case "closing": console.log("attempted to send message while closing: " + msg); break; case "closed": console.log("error!
... attempt to send while connection closed."); break; } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.
readystate' in that specification.
ReadableByteStreamController.close() - Web APIs
the close() method of the
readablebytestreamcontroller interface closes the associated stream.
... note:
readers will still be able to
read any previously-enqueued chunks from the stream, but once those are
read, the stream will become closed.
... syntax
readablebytestreamcontroller.close(); parameters none.
... exceptions typeerror the source object is not a
readablebytestreamcontroller, or the stream is not
readable for some other reason.
ReadableStream.locked - Web APIs
the locked
read-only property of the
readablestream interface returns whether or not the
readable stream is locked to a
reader.
... syntax var locked =
readablestream.locked; value a boolean indicating whether or not the
readable stream is locked.
... examples const stream = new
readablestream({ ...
... }); const
reader = stream.get
reader(); stream.locked // should return true, as the stream has been locked to a
reader specifications specification status comment streamsthe definition of 'locked' in that specification.
Sensor.onreading - Web APIs
the on
reading eventhandler is called when a
reading is taken on one of the child interfaces of the sensor interface.
... syntax sensorinstance.on
reading = function sensorinstance.addeventlistener('
reading', function() { ...
... }) because sensor is a base class, on
reading may only be used on one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'on
reading' in that specification.
StylePropertyMapReadOnly.get() - Web APIs
the get() method of the stylepropertymap
readonly interface returns a cssstylevalue object for the first value of the specified property.
... syntax var declarationblock = stylepropertymap
readonly.get(property) parameters property the name of the property to retrieve the value of.
... a paragraph in our html, and adding a definition list which we will populate with javascript: <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> we add a bit of css, including a custom property and an inhertable property: p { font-weight: bold; } a { --colour: red; color: var(--colour); } we use the element's computedstylemap() to return a stylepropertymap
readonly object.
... we create an array of properties of interest and use the stylepropertymap
readonly's get() method to get only those values.
WebSocket.readyState - Web APIs
the websocket.
readystate
read-only property returns the current state of the websocket connection.
... syntax var
readystate = awebsocket.
readystate; value one of the following unsigned short values: value state description 0 connecting socket has been created.
... 1 open the connection is open and
ready to communicate.
... specifications specification status comment html living standardthe definition of 'websocket:
readystate' in that specification.
NPP_WriteReady - Archive of obsolete content
syntax #include <npapi.h> int32 npp_write
ready(npp instance, npstream* stream); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... description the browser calls npp_write
ready before each call to npp_write to determine whether a plug-in can receive data and how many bytes it can receive.
...the npp_write function may pass a larger buffer, but the plug-in is required to consume only the amount of data returned by npp_write
ready.
PRThreadPrivateDTOR
the destructor function passed to pr_newth
readprivateindex that is associated with the resulting th
read private index.
... syntax #include <prth
read.h> typedef void (pr_callback *prth
readprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setth
readprivate, the value of the data is null.
... if the data associated with the index is not null, nspr passes a reference to the data to the destructor function when the th
read terminates.
BeginReading
« xpcom api reference summary the begin
reading function returns a const pointer to the first element of the string's internal buffer.
... const char_type* begin
reading() const; remarks the resulting character array is not necessarily null-terminated.
... example code // count the number of times a particular character appears in the string pruint32 countchar(const nsacstring& str, char c) { const char* start = str.begin
reading(); const char* end = str.end
reading(); pruint32 count = 0; while (start != end) { if (*start++ == c) ++count; } return count; } see also length, end
reading ...
BeginReading
« xpcom api reference summary the begin
reading function returns a const pointer to the first element of the string's internal buffer.
... const char_type* begin
reading() const; remarks the resulting character array is not necessarily null-terminated.
... example code // count the number of times a particular character appears in the string pruint32 countchar(const nsastring& str, prunichar c) { const prunichar* start = str.begin
reading(); const prunichar* end = str.end
reading(); pruint32 count = 0; while (start != end) { if (*start++ == c) ++count; } return count; } see also length ...
BluetoothCharacteristicProperties.read - Web APIs
the
read read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the
reading of the characteristic value is permitted.
... syntax var aboolean = bluetoothcharacteristicproperties.
read; value a boolean.
... specifications specification status comment web bluetooththe definition of '
read' in that specification.
BluetoothRemoteGATTCharacteristic.readValue() - Web APIs
the bluetoothremotegattcharacteristic.
readvalue() method returns a promise that resolves to a dataview holding a duplicate of the value property if it is available and supported.
... syntax bluetoothremotegattcharacteristic.
readvalue().then(function(dataview) { ...
... specifications specification status comment web bluetooththe definition of '
readvalue()' in that specification.
DOMMatrixReadOnly() - Web APIs
the dommatrix
readonly constructor creates a new dommatrix
readonly object which represents 4x4 matrices, suitable for 2d and 3d operations.
... syntax var dommatrix
readonly = new dommatrix
readonly([init]) parameters init optional either a string containing a sequence of numbers or an array of integers specifying the matrix you want to create.
... specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix
readonly' in that specification.
DOMMatrixReadOnly.scale() - Web APIs
the scale() method of the dommatrix
readonly interface creates a new matrix being the result of the original matrix with a scale transform applied.
... const matrix = new dommatrix
readonly(); const scaledmatrix = matrix.scale(0.5); let scaledmatrixwithorigin = matrix.scale(0.5, 25, 25); // if the browser has interpreted these parameters as scalex, scaley, scalez, the resulting matrix is 3d const browserexpectssixparamscale = !scaledmatrixwithorigin.is2d; if (browserexpectssixparamscale) { scaledmatrixwithorigin = matrix.scale(0.5, 0.5, 1, 25, 25, 0); } document.queryselect...
...or('#transformed').setattribute('transform', scaledmatrix.tostring()); document.queryselector('#transformedorigin').setattribute('transform', scaledmatrixwithorigin.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix
readonly.scale()' in that specification.
DOMPointReadOnly.x - Web APIs
the dompoint
readonly interface's x property holds the horizontal coordinate, x, for a
read-only point in space.
... this property cannot be changed by javascript code in this
read-only version of the dompoint object.
... syntax const xpos = somedompoint
readonly.x; value a double-precision floating-point value indicating the x coordinate's value for the point.
Document: readystatechange event - Web APIs
the
readystatechange event is fired when the
readystate attribute of a document has changed.
... bubbles no cancelable no interface event event handler property on
readystatechange examples live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.query...
...selector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('
readystatechange', (event) => { log.textcontent = log.textcontent + `
readystate: ${document.
readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of '
readystatechange' in that specification.
FileReader.abort() - Web APIs
the abort method aborts the
read operation.
... upon return, the
readystate will be done.
... syntax instanceoffile
reader.abort(); exceptions dom_file_abort_err thrown when abort is called while no
read operation is in progress (that is, the state isn't loading).
FileReader.error - Web APIs
the file
reader error property returns the error that occurred while
reading the file.
... syntax var error = instanceoffile
reader.error value a domerror containing the relevant error.
... specifications specification status comment file apithe definition of 'file
reader: error' in that specification.
FileReader.onabort - Web APIs
the file
reader.onabort property contains an event handler executed when the abort event is fired, i.e.
... when the process of
reading the file is aborted.
... syntax
reader.onabort = function() { ...
MediaStreamTrack.readyState - Web APIs
the mediastreamtrack.
readystate
read-only property returns an enumerated value giving the status of the track.
... syntax const state = track.
readystate value it takes one of the following values: "live" which indicates that an input is connected and does its best-effort in providing real-time data.
... specifications specification status comment media capture and streamsthe definition of 'mediastreamtrack.
readystate' in that specification.
NDEFReader.onerror - Web APIs
the onerror property of ndef
reader interface of the web nfc api is called whenever an error occurs during
reading of nfc tags, e.g.
... when tags leave the
reader's magnetic induction field.
... specifications specification status comment web nfc, ndef
reader.onerror draft initial definition.
NDEFReader.scan() - Web APIs
the scan() method of ndef
reader interface
reads ndef records from compatible nfc devices, e.g., ndef nfc tags.
... syntax var
readerpromise = ndef
reader.scan(options); parameters options optional id -- the match pattern for matching each ndefrecord.id.
... return value a promise that resolves with undefined immediatelly after scheduling
read operations for the nfc adapter.
RTCIceCandidatePairStats.readable - Web APIs
the obsolete rtcicecandidatepairstats property
readable reports whether or not the connection described by the candidate pair has received at least one valid incoming ice request.
... syntax is
readable = rtcicecandidatepairstats.
readable; value a boolean value which is true if the connection described by this candidate pair has received at least one valid ice request, and is therefore
ready to be
read from.
... note: this property was removed from the specification in early 2017 because you can determine whether or not the connection is
readable by checking to see if requestsreceived is greater than 0: if (icpstats.requestsreceived > 0) { /* at least one ice request has been received */ } ...
ReadableByteStreamController.enqueue() - Web APIs
the enqueue() method of the
readablebytestreamcontroller interface enqueues a given chunk in the associated stream.
... syntax
readablebytestreamcontroller.enqueue(chunk); parameters chunk the chunk to enqueue.
... exceptions typeerror the source object is not a
readablebytestreamcontroller, or the stream cannot be
read for some other reason, or the chunk is not an object, or the chunk's internal array buffer is non-existant or detached.
ReadableByteStreamController.error() - Web APIs
the error() method of the
readablebytestreamcontroller interface causes any future interactions with the associated stream to error.
... syntax
readablebytestreamcontroller.error(e); parameters e the error you want future interactions to fail with.
... exceptions typeerror the source object is not a
readablebytestreamcontroller, or the stream is not
readable for some other reason.
ReadableStreamDefaultController.desiredSize - Web APIs
the desiredsize
read-only property of the
readablestreamdefaultcontroller interface returns the desired size required to fill the stream's internal queue.
... syntax var desiredsize =
readablestreamdefaultcontroller.desiredsize; value an integer.
... examples the a
readable stream with an underlying push source and backpressure support example in the spec provides a good example of using desiredsize to manually detect when the stream is full and apply backpressure, and also of using
readablestreamdefaultcontroller.error() to manually trigger a stream error if another part of the system it relies on fails.
Sensor.hasReading - Web APIs
the has
reading
read-only property of the sensor interface returns a boolean indicating whether the sensor has a
reading.
... syntax var boolean = sensorinstance.has
reading because sensor is a base class, has
reading may only be
read from one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'has
reading' in that specification.
ServiceWorkerContainer.ready - Web APIs
the
ready
read-only property of the serviceworkercontainer interface provides a way of delaying code execution until a service worker is active.
... syntax navigator.serviceworker.
ready.then(function(serviceworkerregistration) { ...
... example if ('serviceworker' in navigator) { navigator.serviceworker.
ready .then(function(registration) { console.log('a service worker is active:', registration.active); // at this point, you can call methods that require an active // service worker, like registration.pushmanager.subscribe() }); } else { console.log('service workers are not supported.'); } specifications specification status comment service workersthe definition of 'serviceworkerregistration.
ready' in that specification.
StylePropertyMapReadOnly.entries() - Web APIs
the stylepropertymap
readonly.entries() method returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
... syntax stylepropertymap
readonly.entries() parameters none.
... return value an array of the given stylepropertymap
readonly object's own enumerable property [key, value] pairs.
StylePropertyMapReadOnly.forEach() - Web APIs
the stylepropertymap
readonly.foreach() method executes a provided function once for each element of stylepropertymap
readonly.
... syntax stylepropertymap
readonly.foreach(function callback(currentvalue[, index[, array]]) { //your code }[, thisarg]); parameters callback the function to execute for each element, taking three arguments: currentvalue the value of the current element being processed.
... arrayoptional the stylepropertymap
readonly thatforeach() is being called on.
URLUtilsReadOnly.toString() - Web APIs
the urlutils
readonly.tostring() stringifier method returns a domstring containing the whole url.
... it is a synonym for urlutils
readonly.href.
... syntax string = object.tostring(); examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutils
readonly.href' browser compatibility the compatibility table in this page is generated from structured data.
XMLHttpRequest.readyState - Web APIs
the xmlhttprequest.
readystate property returns the state an xmlhttprequest client is in.
...instead of unsent, opened, headers_received, loading and done, the names
readystate_uninitialized (0),
readystate_loading (1),
readystate_loaded (2),
readystate_interactive (3) and
readystate_complete (4) are used.
... example var xhr = new xmlhttprequest(); console.log('unsent', xhr.
readystate); //
readystate will be 0 xhr.open('get', '/api', true); console.log('opened', xhr.
readystate); //
readystate will be 1 xhr.onprogress = function () { console.log('loading', xhr.
readystate); //
readystate will be 3 }; xhr.onload = function () { console.log('done', xhr.
readystate); //
readystate will be 4 }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
unread - Archive of obsolete content
« xul reference home un
read type: boolean this attribute is set to true if the tab is un
read; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
... this attribute is not present if the tab is not un
read.
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a b
readcrumb, or b
readcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page, in the order visited.
... a location b
readcrumb for this document might look something like this: mdn > glossary > b
readcrumb b
readcrumb trails enable users to be aware of their location within a website.
PR_GetThreadPriority
returns the priority of a specified th
read.
... syntax #include <prth
read.h> prth
readpriority pr_getth
readpriority(prth
read *th
read); parameter pr_getth
readpriority has the following parameter: th
read a valid identifier for the th
read whose priority you want to know.
PR_GetThreadScope
gets the scoping of the current th
read.
... syntax #include <prth
read.h> prth
readscope pr_getth
readscope(void); returns a value of type prth
readscope indicating whether the th
read is local or global.
PR_JoinThreadPool
waits for all th
reads in a th
read pool to complete, then releases resources allocated to the th
read pool.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_jointh
readpool( prth
readpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_QueueJob_Read
causes a job to be queued when a socket becomes
readable.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_
read( prth
readpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_ShutdownThreadPool
notifies all th
reads in a th
read pool to terminate.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_shutdownth
readpool( prth
readpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
XPCOM Thread Synchronization
xpcom th
read synchronization primitives have the same semantics as those in nspr, and each method of these synchronization objects (e.g.
...for a higher-level introduction to th
read synchronization, see introduction_to_nspr.
DOMMatrixReadOnly.flipX() - Web APIs
the flipx() method of the dommatrix
readonly interface creates a new matrix being the result of the original matrix flipped about the x-axis.
... const flipped = document.getelementbyid('flipped'); const matrix = new dommatrix
readonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix
readonly.flipx()' in that specification.
DOMMatrixReadOnly.translate() - Web APIs
the translate() method of the dommatrix
readonly interface creates a new matrix being the result of the original matrix with a translation applied.
... const matrix = new dommatrix
readonly().translate(25, 25); document.queryselector('#transformed').setattribute('transform', matrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrix
readonly.translate()' in that specification.
DOMPointReadOnly.w - Web APIs
the dompoint
readonly interface's w property holds the point's perspective value, w, for a
read-only point in space.
... syntax const perspective = somedompoint
readonly.w value a double-precision floating-point value indicating the w perspective value for the point.
DOMPointReadOnly.y - Web APIs
the dompoint
readonly interface's y property holds the vertical coordinate, y, for a
read-only point in space.
... syntax const ypos = somedompoint
readonly.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
DOMPointReadOnly.z - Web APIs
the dompoint
readonly interface's z property holds the depth coordinate, z, for a
read-only point in space.
... syntax const zpos = somedompoint
readonly.z; value a double-precision floating-point value indicating the z coordinate's value for the point.
DOMRectReadOnly.fromRect() - Web APIs
the fromrect() property of the domrect
readonly interface creates a new domrect
readonly object with a given location and dimensions.
... syntax var domrect = domrect
readonly.fromrect(rectangle) parameters rectangle optional an object specifying the location and dimensions of a rectangle.
FileReader: error event - Web APIs
the error event is fired when the
read failed due to an error (for example, because the file was not found or not
readable).
... bubbles no cancelable no interface progressevent event handler property file
reader.onerror examples const fileinput = document.queryselector('input[type="file"]'); const
reader = new file
reader(); function handleselected(e) { const selectedfile = fileinput.files[0]; if (selectedfile) {
reader.addeventlistener('error', () => { console.error(`error occurred
reading file: ${selectedfile.name}`); });
reader.addeventlistener('load', () => { console.error(`file: ${selectedfile.name}
read successfully`); });
reader.
readasdataurl(selectedfile); } } fileinput.addeventlistener('change', handleselected); specifications specification status ...
FileReader.onload - Web APIs
the file
reader.onload property contains an event handler executed when the load event is fired, when content
read with
readasarraybuffer,
readasbinarystring,
readasdataurl or
readastext is available.
... example // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var
reader = new file
reader();
reader.onload = function(e) { // the file's text will be printed here console.log(e.target.result) };
reader.
readastext(file); } ...
FontFaceSet.ready - Web APIs
the
ready
readonly property of the fontfaceset interface returns a promise that resolves to the given fontfaceset.
... syntax fontfaceset.
ready.then(function(fontfaceset) { // ...
ReadableByteStreamController.byobRequest - Web APIs
the byobrequest
read-only property of the
readablebytestreamcontroller interface returns the current byob pull request, or undefined if there are no pending requests.
... syntax var request =
readablebytestreamcontroller.byobrequest; value a
readablestreambyobrequest object instance, or undefined.
ReadableByteStreamController.desiredSize - Web APIs
the desiredsize
read-only property of the
readablebytestreamcontroller interface returns the desired size required to fill the stream's internal queue.
... syntax var desiredsize =
readablebytestreamcontroller.desiredsize; value an integer.
ReadableStreamBYOBRequest.respond() - Web APIs
the error() method of the
readablestreambyobrequest interface xxx syntax
readablestreambyobrequestinstance.respond(byteswritten); parameters byteswritten xxx return value void.
... exceptions typeerror the source object is not a
readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is detached.
ReadableStreamBYOBRequest.respondWithNewView() - Web APIs
the respondwithnewview() method of the
readablestreambyobrequest interface xxx syntax
readablestreambyobrequestinstance.respondwithnewview(view); parameters view xxx return value void.
... exceptions typeerror the source object is not a
readablestreambyobrequest, or there is no associated controller, or the associated internal array buffer is non-existant or detached.
ReadableStreamBYOBRequest.view - Web APIs
the view getter property of the
readablestreambyobrequest interface returns the current view.
... syntax var view =
readablestreambyobrequestinstance.view; value a typed array representing the destination region to which the controller can write generated data.
StylePropertyMapReadOnly.getAll() - Web APIs
the getall() method of the stylepropertymap
readonly interface returns an array of cssstylevalue objects containing the values for the provided property.
... syntax var cssstylevalues[] = stylepropertymap
readonly.getall(property) parameters property the name of the property to retrieve all values of.
StylePropertyMapReadOnly.has() - Web APIs
the has() method of the stylepropertymap
readonly interface indicates whether the specified property is in the stylepropertymap
readonly object.
... syntax var boolean = stylepropertymap
readonly.has(property) parameters property the name of a property.
StylePropertyMapReadOnly.size - Web APIs
the size
read-only property of the stylepropertymap
readonly interface returns an unsinged long integer containing the size of the stylepropertymap
readonly object.
... syntax var size = stylepropertymap
readonly.size value an unsigned long integer.
StylePropertyMapReadOnly.values() - Web APIs
the stylepropertymap
readonly.values() method returns a new array iterator containing the values for each index in the stylepropertymap
readonly object.
... syntax stylepropertymap
readonly.values() parameters none.
URLUtilsReadOnly.hash - Web APIs
the urlutils
readonly.hash
read-only property returns a domstring containing a '#' followed by the fragment identifier of the url.
... syntax string = object.hash; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutils
readonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutils
readonly.hash' in that specification.
URLUtilsReadOnly.host - Web APIs
the urlutils
readonly.host
read-only property returns a domstring containing the host, that is the hostname, a ':', and the port of the url.
... syntax string = object.host; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutils
readonly.host' in that specification.
URLUtilsReadOnly.hostname - Web APIs
the urlutils
readonly.hostname
read-only property returns a domstring containing the domain of the url.
... syntax string = object.hostname; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutils
readonly.hostname' in that specification.
URLUtilsReadOnly.href - Web APIs
the urlutils
readonly.href
read-only property is a stringifier that returns a domstring containing the whole url.
... syntax string = object.href; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutils
readonly.href' specifications specification status comment urlthe definition of 'urlutils
readonly.href' in that specification.
URLUtilsReadOnly.origin - Web APIs
the urlutils
readonly.origin
read-only property is a domstring containing the unicode serialization of the origin of the represented url, that is, for http and https, the scheme followed by '://', followed by the domain, followed by ':', followed by the port (the default port, 80 and 443 respectively, if explicitely specified).
... syntax string = object.origin; examples // on this page, returns the origin var result = self.location.origin; // returns:'https://developer.mozilla.org:443' specifications specification status comment urlthe definition of 'urlutils
readonly.origin' in that specification.
URLUtilsReadOnly.pathname - Web APIs
the urlutils
readonly.pathname
read-only property returns a domstring containing an initial '/' followed by the path of the url.
... syntax string = object.pathname; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.pathname var result = window.self.pathname; // returns:'/urlutils
readonly.pathname' specifications specification status comment urlthe definition of 'urlutils
readonly.pathname' in that specification.
URLUtilsReadOnly.port - Web APIs
the urlutils
readonly.port
read-only property returns a domstring containing the port number of the url.
... syntax string = object.port; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.port var result = window.self.port; // returns:'80' specifications specification status comment urlthe definition of 'urlutils
readonly.port' in that specification.
URLUtilsReadOnly.protocol - Web APIs
the urlutils
readonly.protocol
read-only property returns a domstring containing the protocol scheme of the url, including the final ':'.
... syntax string = object.protocol; examples // in a web worker, on the page https://developer.mozilla.org/urlutils
readonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutils
readonly.protocol' in that specification.
URLUtilsReadOnly.search - Web APIs
the urlutils
readonly.search
read-only property returns a domstring containing a '?' followed by the parameters of the url.
... syntax string = object.search; examples // in a web worker, on the page https://developer.mozilla.org/docs/urlutils
readonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutils
readonly.search' in that specification.
StylePropertyMapReadOnly.keys() - Web APIs
the stylepropertymap
readonly.keys() method returns a new array iterator containing the keys for each item in stylepropertymap
readonly syntax stylepropertymap
readonly.keys() parameters none.
Index - Web APIs
9 abortcontroller.signal api, abortcontroller, experimental, fetch, property, reference, signal the signal
read-only property of the abortcontroller interface returns an abortsignal object instance, which can be used to communicate with/abort a dom request as desired.
... 11 abortsignal.aborted api, abortsignal, experimental, property, reference, aborted the aborted
read-only property returns a boolean that indicates whether the dom request(s) the signal is communicating with is/are aborted (true) or not (false).
... 12 abortsignal.onabort api, abortsignal, event handler, experimental, fetch, property, reference, onabort the onabort
read-only property of the fetchsignal interface is an event handler invoked when an abort event fires, i.e.
...And 1322 more matches
ARIA Test Cases - Accessibility
however, the information might still be useful for some
readers.
...however, where things don't work we may test with nightly builds if they are available, in order to show what is al
ready fixed in upcoming releases.
... we can add more screen
readers if people are willing to step up and provide test results for them.
...And 84 more matches
Index
to this end, there exist xpcom interfaces to
read and write registry data.
... 6 creating a python xpcom component guide, needshelp, pyxpcom, xpcom, xpcom:language bindings creating applications with mozilla al
ready provides a tutorial for making a simple javascript or c++ component (implementing the nsisimple interface).
... 20 components.classes xpcom:language bindings, xpconnect components.classes is a
read-only object whose properties are classes indexed by contractid.
...And 83 more matches
Introduction to NSPR
the netscape portable runtime (nspr) api allows compliant applications to use system facilities such as th
reads, th
read synchronization, i/o, interval timing, atomic operations, and several other low-level services in a platform-independent manner.
... nspr naming conventions naming of nspr types, functions, and macros follows the following conventions: types exported by nspr begin with pr and are followed by intercap-style declarations, like this: print, prfiledesc function definitions begin with pr_ and are followed by intercap-style declarations, like this: pr_
read, pr_jointh
read preprocessor macros begin with the letters pr and are followed by all uppercase characters separated with the underscore character (_), like this: pr_bytes_per_short, pr_extern nspr th
reads nspr provides an execution environment that promotes the use of lightweight th
reads.
... each th
read is an execution entity that is scheduled independently from other th
reads in the same process.
...And 81 more matches
Window - Web APIs
staticrange
read only returns a staticrange() constructor which creates a staticrange object.
... window.closed
read only this property indicates whether the current window is closed or not.
... window.console
read only returns a reference to the console object which provides access to the browser's debugging console.
...And 56 more matches
Handling common accessibility problems - Learn web development
when we say accessibility in the context of web technology, most people immediately think of making sure websites/apps are usable by people with disabilities, for example: visually impaired people using screen
readers or magnification/zoom to access text people with motor function impairments using the keyboard (or other non-mouse features) to activate website functionality.
...we've al
ready talked about other spheres such as responsive design and performance in other places in the module.
...
read accessibility guidelines and the law for more information.
...And 55 more matches
WAI-ARIA basics - Learn web development
the initial solution was to add one or more hidden links at the top of the page to link to the navigation (or whatever else), for example: <a href="#hidden" class="hidden">skip to navigation</a> but this is still not very precise, and can only be used when the screen
reader is
reading from the top of the page.
... the problem here is that visually they work, but screen
readers can't make any sense of what they are at all, and their users just get told that they can see a jumble of elements with no semantics to describe what they mean.
... states — special properties that define the current conditions of elements, such as aria-disabled="true", which specifies to a screen
reader that a form input is currently disabled.
...And 53 more matches
Index - Archive of obsolete content
87 io/byte-streams provides streams for
reading and writing bytes.
... 89 io/text-streams provides streams for
reading and writing text.
... 135 cfx to jpm cfx, jpm, sdk, add-on a guide to working with jpm if you're al
ready familiar with cfx.
...And 49 more matches
Building accessible custom components in XUL - Archive of obsolete content
firefox 1.5 is the first browser to support dhtml accessibility; it maps the declarations within the html page to the underlying accessibility architecture so that assistive technologies can "
read" a web page and know how to present these complex controls to the end user.
...a super-simple sp
readsheet download stage-1.zip install stage-1.xpi to build our xul sp
readsheet, we'll use three built-in xul controls: a single grid element to contain the other elements and position them in rows and columns.
...label elements for each cell in the sp
readsheet.
...And 45 more matches
sslfnc.html
nss_init nss_init
readwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache ssl_configmpserversidcache ssl_inheritmpserversidcache nss_init sets up configuration files and performs other tasks required to run network security services.
... database files are opened
read-only.
... nss_init opens the database files
read-only.
...And 44 more matches
Web Replay
debugger integration allows the js debugger to
read the information it needs from a replaying process and control the process's execution (resume/rewind).
... this non-determinism originates from two sources: intra-th
read and inter-th
read.
... intra-th
read non-deterministic behaviors are non-deterministic even in the absence of actions by other th
reads, and inter-th
read non-deterministic behaviors are those affected by interleaving execution with other th
reads, and which always behave the same given the same interleaving.
...And 43 more matches
HTML: A good basis for accessibility - Learn web development
html and accessibility as you learn more about html —
read more resources, look at more examples, etc.
... note: it is a good idea to have a screen
reader set up on your local computer so that you can do some testing of the examples shown below.
... see our screen
readers guide for more details.
...And 41 more matches
HTML: A good basis for accessibility - Learn web development
html and accessibility as you learn more about html —
read more resources, look at more examples, etc.
... note: it is a good idea to have a screen
reader set up on your local computer so that you can do some testing of the examples shown below.
... see our screen
readers guide for more details.
...And 41 more matches
Document - Web APIs
document.anchors
read only returns a list of all of the anchors in the document.
... document.characterset
read only returns the character set being used by the document.
... document.compatmode
read only indicates whether the document is rendered in quirks or strict mode.
...And 41 more matches
nsIBinaryInputStream
this might be used, for example, to implement network protocols or to
read from architecture-neutral disk files, that is ones that can be
read and written by both big-endian and little-endian platforms.
... inherits from: nsiinputstream last changed in gecko 1.7 method overview pruint8
read8(); pruint16
read16(); pruint32
read32(); pruint64
read64(); unsigned long
readarraybuffer(in pruint32 alength, in jsval aarraybuffer); prbool
readboolean(); void
readbytearray(in pruint32 alength, [array, size_is(alength), retval] out pruint8 abytes); void
readbytes(in pruint32 alength, [size_is(alength), retval] out string astring); acstring
readcstring(); double
readdouble(); float
readfloat(); astring
readstring(); void setinputstream(in nsiinputstream ainputstream); methods
read8()
reads from the stream.
... pruint8
read8(); parameters none.
...And 37 more matches
Using IndexedDB - Web APIs
if you are not familiar with indexeddb, you should first
read basic concepts about indexeddb.
...// moreover, you may need references to some window.idb* objects: window.idbtransaction = window.idbtransaction || window.webkitidbtransaction || window.msidbtransaction || {
read_write: "
readwrite"}; // this line should only be needed if it is needed to support the object's constants for older browsers window.idbkeyrange = window.idbkeyrange || window.webkitidbkeyrange || window.msidbkeyrange; // (mozilla has never prefixed these objects, so we don't need window.mozidb*) beware that implementations that use a prefix may be buggy, or incomplete, or following an old versio...
...if the database doesn't al
ready exist, it is created by the open operation, then an onupgradeneeded event is triggered and you create the database schema in the handler for this event.
...And 37 more matches
Optimizing Applications For NSPR
multiplatform do not call any blocking system call from a local th
read.
... the only exception to this rule is the <tt>select()</tt> and <tt>poll()</tt> system calls on unix, both of which nspr has overridden to make sure they are aware of the nspr local th
reads.
... in the combined (mxn) model, which includes nt, irix (sprocs), and pth
reads-user, the primordial th
read is always a local th
read.
...And 33 more matches
Addon
ason, in string appversion, in string platformversion) overview of optional methods void uninstall() void canceluninstall() boolean hasresource(in string path) nsiuri getresourceuri(in string path) void getdatadirectory(in datadirectorycallback callback) required properties attribute type description appdisabled
read only boolean true if this add-on cannot be used in the application based on version compatibility, dependencies, and blocklisting.
... blockliststate
read only integer the current blocklist state of this add-on; see nsiblocklistservice for possible values.
... creator
read only addonauthor the creator of the add-on.
...And 32 more matches
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
if you're interested in more about gecko's msaa implementation,
read gecko info for windows accessibility vendors to learn how msaa clients can utilize gecko's msaa support.
... third party assistive technology, such as screen
readers, screen magnifiers and voice input software, want to track what's happening inside mozilla.
...using this information, a screen
reader will speak out loud important changes to the document or ui, and allow the user to track where they navigate.
...And 31 more matches
HTTP Cache
the cache api is completely th
read-safe and non-blocking.
...accessible as a service only, fully th
read-safe, scriptable.
...a particular app cache version in a group) in hands, this storage will provide
read and write access to entries in that application cache; when the app cache is not specified, this storage will operate over all existing app caches the service also provides methods to clear the whole disk and memory cache content or purge any intermediate memory structures: clear – after it returns, all entries are no longer accessible through the cache apis; the method...
...And 30 more matches
Streams - Plugins
the browser calls the plug-in methods npp_newstream, npp_write
ready, npp_write, and npp_destroystream to, respectively, create a stream, find out how much data the plug-in can handle, push data into the stream, and delete it.
... random-access mode: the plug-in calls the npn_request
read method to "pull" stream data.
... the plug-in can set the output parameter type to one of these transmission modes: np_normal: (default): the plug-in can process the data progressively as it arrives from the network or file system through a series of calls to npp_write
ready and npp_write.
...And 30 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
40 b
readcrumb accessibility, glossary, navigation, search, site map, b
readcrumb a b
readcrumb, or b
readcrumb trail, is a navigational aid that is typically placed between a site's header and the main content, displaying either a hierarchy of the current page in relation to the the site's structure, from top level to current page, or a list of the links the user followed to get to the current page...
... 45 cdn glossary, infrastructure a cdn (content delivery network) is a group of servers sp
read out over many locations.
... 52 crud glossary, infrastructure crud (create,
read, update, delete) is an acronym for ways one can operate on stored data.
...And 28 more matches
nsIMsgFolder
ndow amsgwindow, in nsiurllistener alistener); void rename(in astring name, in nsimsgwindow msgwindow); void renamesubfolders( in nsimsgwindow msgwindow, in nsimsgfolder oldfolder); astring generateuniquesubfoldername(in astring prefix,in nsimsgfolder otherfolder); void updatesummarytotals(in boolean force); void summarychanged(); long getnumun
read(in boolean deep); long gettotalmessages(in boolean deep); void clearnewmessages(); void clearrequirescleanup(); void setflag(in unsigned long flag); void clearflag(in unsigned long flag); boolean getflag(in unsigned long flag); void toggleflag(in unsigned long flag); void onflagchange(in unsigned long flag); void set...
...er alistener); void writetofoldercache(in nsimsgfoldercache foldercache, in boolean deep); long getnumnewmessages(in boolean deep); void setnumnewmessages(in long numnewmessages); acstring generatemessageuri(in nsmsgkey msgkey); void addmessagedispositionstate(in nsimsgdbhdr amessage,in nsmsgdispositionstate adispositionflag); void markmessages
read(in nsisupportsarray messages, in boolean mark
read); void markallmessages
read(); void markmessagesflagged(in nsisupportsarray messages, in boolean markflagged); void markth
readread(in nsimsgth
read th
read); void setlabelformessages(in nsisupportsarray messages, in nsmsglabelvalue label); nsimsgdatabase getmsgdatabase(in nsimsgwindow msgwindow); ...
...msgkey akeystofetch, in unsigned long anumkeys, in boolean alocalonly, in nsiurllistener aurllistener); void addkeywordstomessages(in nsisupportsarray amessages, in acstring akeywords); void removekeywordsfrommessages(in nsisupportsarray amessages, in acstring akeywords); autf8string getmsgtextfromstream(in nsimsgdbhdr amsghdr, in nsiinputstream astream, in long abytesto
read, in long amaxoutputlen, in boolean acompressquotes); attributes attribute type description supportsoffline boolean
readonly offlinestoreoutputstream nsioutputstream
readonly offlinestoreinputstream nsiinputstream
readonly retentionsettings nsimsgretentionsettings downloadsettings nsimsgdownloadsettings...
...And 28 more matches
WebIDL bindings
dosomethingelse(optional long maybenumber); [throws] void dosomethingelse(myinterface otherinstance); void dotheother(any something); void doyetanotherthing(optional boolean actuallydoit = false); static void staticoperation(any arg); }; will require these method declarations: class myclass { void dosomething(int32_t anumber); double dosomething(myclass* aotherinstance); al
ready_addrefed<myinterface> dosomethingelse(optional<int32_t> amaybenumber, errorresult& rv); void dosomethingelse(myclass& aotherinstance, errorresult& rv); void dotheother(jscontext* cx, js::value asomething); void doyetanotherthing(bool aactuallydoit); static void staticoperation(const globalobject& aglobal, js::value asomething); } c++ r...
...a
readonly attribute only has a getter and no setter.
... for example, this idl: [constructor, constructor(unsigned long somenumber)] interface myinterface { }; will require the following declarations in myclass: class myclass { // various nsisupports stuff or whatnot static al
ready_addrefed<myclass> constructor(const globalobject& aglobal, errorresult& rv); static al
ready_addrefed<myclass> constructor(const globalobject& aglobal, uint32_t asomenumber, errorresult& rv); }; c++ reflections of webidl types the exact c++ representation for webidl types...
...And 28 more matches
Index
in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multith
readed programming.
...a trust anchor is just another x.509 certificate that is al
ready known and has been deliberately marked as trusted by a software vendor, administrators inside an organizational infrastructure, or the software user.
...nss will usually create an in-memory (ram) presentation of certificates, once a certificate has been received from the network,
read from disk, or looked up from the database, and prepare in-memory data structures that contain the certificate's properties, as well as providing a handle for the programmer to use.
...And 27 more matches
PromiseWorker.jsm
javascript files imported into the worker scope and main th
read scope which allows posting to the worker and receiving in the form of a promise.
... the promiseworker object is used to deliver all of the os.file functionality to the main th
read.
... promiseworker.jsm path: resource://gre/modules/promiseworker.jsm a javascript code module used by the main th
read to create a worker th
read and communicate with it.
...And 26 more matches
mozIStorageConnection
method overview void asyncclose([optional] in mozistoragecompletioncallback acallback); void begintransaction(); void begintransactionas(in print32 transactiontype); mozistoragestatement clone([optional] in boolean a
readonly); void close(); void committransaction(); void createaggregatefunction(in autf8string afunctionname, in long anumarguments, in mozistorageaggregatefunction afunction); mozistorageasyncstatement createasyncstatement(in autf8string asqlstatement); void createfunction(in autf8string afunctionname, in long anumarguments, in mozistoragefunction afun...
...resshandler(); void rollbacktransaction(); void setgrowthincrement(in print32 aincrement, in autf8string adatabasename); mozistorageprogresshandler setprogresshandler(in print32 agranularity, in mozistorageprogresshandler ahandler); boolean tableexists(in autf8string atablename); attributes attribute type description connection
ready boolean indicates if the connection is open and
ready to use.
...
read only.
...And 26 more matches
nsIFile
in nsifile infile); boolean exists(); acstring getrelativedescriptor(in nsifile fromfile); void initwithfile(in nsifile afile); void initwithnativepath(in acstring filepath); void initwithpath(in astring filepath); boolean isdirectory(); boolean isexecutable(); boolean isfile(); boolean ishidden(); boolean is
readable(); boolean isspecial(); boolean issymlink(); boolean iswritable(); void launch(); prlibrarystar load(); void moveto(in nsifile newparentdir, in astring newname); void movetonative(in nsifile newparentdir, in acstring newname); native code only!
...
read only.
...
read only.
...And 26 more matches
Gecko info for Windows accessibility vendors
this faq explains how makers of windows screen
readers, voice dictation packages and magnification software can support gecko-based software.
... the base of our support for these products is msaa (microsoft active accessibility), external
readonly dom support, and the keyboard api/user interface.
...if you seriously need to understand msaa, you'll need to
read the docs on msdn and play with the sample apps and code that come with msaa sdk 1.3.
...And 25 more matches
Navigator - Web APIs
a navigator object can be retrieved using the
read-only window.navigator property.
... standard navigatorid.appcodename
read only returns the internal "code" name of the current browser.
... navigatorid.appname
read only returns a domstring with the official name of the browser.
...And 25 more matches
Index - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all
readers might use your creations on the web.
... 7 html: a good basis for accessibility at, accessibility, article, beginner, buttons, codingscripting, forms, html, learn, links, a11y, assistive technology, keyboard, screen
reader, semantics you should now be well-versed in writing accessible html for most occasions.
... 8 mobile accessibility accessibility, article, beginner, codingscripting, learn, mobile, responsive, screen
reader, touch in this article, we have provided you with some details about common mobile accessibility-specific issues and how to overcome them.
...And 24 more matches
Streams API concepts - Web APIs
readable streams a
readable stream is a data source represented in javascript by a
readablestream object that flows from an underlying source — this is a resource somewhere on the network or elsewhere on your domain that you want to get data from.
... the data is
read sequentially in small pieces called chunks.
... the chunks placed in a stream are said to be enqueued — this means they are waiting in a queue
ready to be
read.
...And 24 more matches
Gecko Profiler FAQ
overview of the changes in the last (year?) to cleopatra/etc faster, hopefully more reliable has a timeline tab lets you hide th
reads with a context menu supports symbolication for local builds on windows if you run “mach buildsymbols” first profiling non-nsth
reads?
... the current setup requires each th
read that you want to profile to notify the profiler about its existence.
... we have this hooked up for nsth
reads, and as of very recently also for rayon th
reads (used in stylo).
...And 23 more matches
Bytecode Descriptions
val must al
ready be a numeric value, such as the result of jsop::tonumeric.
...this instruction is used when an array literal contains a sp
readelement.
...format: jof_argc, jof_invoke, jof_typeset, jof_ic sp
readcall stack: callee, this, args ⇒ rval like jsop::call, but the arguments are provided in an array rather than a span of stack slots.
...And 23 more matches
Accessing the Windows Registry Using XPCOM
to this end, there exist xpcom interfaces to
read and write registry data.
...if you are writing an extension that only needs to support firefox 1.5 or newer, then you only need to
read this section.
... a simple example here's a simple example showing how to
read your windows productid: var wrk = components.classes["@mozilla.org/windows-registry-key;1"] .createinstance(components.interfaces.nsiwindowsregkey); wrk.open(wrk.root_key_local_machine, "software\\microsoft\\windows\\currentversion", wrk.access_
read); var id = wrk.
readstringvalue("productid"); wrk.close(); this example, while simple, shows several important things about using the interface.
...And 23 more matches
Using Web Workers - Web APIs
web workers are a simple means for web content to run scripts in background th
reads.
... the worker th
read can perform tasks without interfering with the user interface.
...worker()) that runs a named javascript file — this file contains the code that will run in the worker th
read; workers run in another global context that is different from the current window.
...And 23 more matches
tabs - Archive of obsolete content
tabs.on('
ready', function(tab) { console.log('tab is loaded', tab.title, tab.url); }); access tabs the module itself can be used as a list of all opened tabs across all windows.
... in particular, you can enumerate it: var tabs = require('sdk/tabs'); for (let tab of tabs) console.log(tab.title); you can also access individual tabs by index: var tabs = require('sdk/tabs'); tabs.on('
ready', function () { console.log('first: ' + tabs[0].title); console.log('last: ' + tabs[tabs.length-1].title); }); you can access the currently active tab: var tabs = require('sdk/tabs'); tabs.on('activate', function () { console.log('active: ' + tabs.activetab.url); }); track a single tab given a tab, you can register event listeners to be notified when the tab is closed, activated or deactivated, or when the page hosted by the tab is loaded or retrieved from the "back-forward cache": var tabs = require("sdk/tabs"); function onopen(tab) { console.log(tab.url + " is open"...
...ole.log(tab.url + " is activated"); } function logdeactivate(tab) { console.log(tab.url + " is deactivated"); } function logclose(tab) { console.log(tab.url + " is closed"); } tabs.on('open', onopen); manipulate a tab you can get and set various properties of tabs (but note that properties relating to the tab's content, such as the url, will not contain valid values until after the tab's
ready event fires).
...And 22 more matches
Profiling with the Firefox Profiler
below the tracing markers are rows corresponding with activity on a variety of th
reads.
... tip: th
reads that are annotated with "[default]" are in the parent (aka "ui", aka "browser chrome", aka "main") process and those annotated with "[tab]" are in the web content (aka "child") processes.
... ranges ranges of time can be zoomed in on by clicking and dragging anywhere in the tracing marker or th
read areas.
...And 22 more matches
Python binding for NSS
programmers al
ready familiar with nss/nspr will be quite comfortable with python-nss.
... support th
reading.
...this allows other python th
reads to execute during the time a nss/nspr function is progress in another th
read.
...And 22 more matches
Index
it can be
read as something like an "ideal future state" for the engine.
... 33 js::compileoffth
read jsapi reference, reference, référence(2), spidermonkey js::compileoffth
read compiles a script, chars for execution.
... 137 jsobjectops.getrequiredslot jsapi reference, obsolete, spidermonkey get and set a required slot, one that should al
ready have been allocated.
...And 22 more matches
Shell global objects
read('bar.js')
reads the file named by the first argument, returning the content of the file as string.
...
readline()
read a single line from stdin.
...
readlinebuf([ buf ]) emulate
readline() on the specified string.
...And 22 more matches
Starting WebLock
we have al
ready created a module that implements most of the generic component functionality (e.g.
...this process is similar to using createinstance from the nsicomponentmanager, but there is no aggregation parameter since the object has al
ready been constructed.
... there are two startup notifications, both of which create the observer if it isn't al
ready created.
...And 22 more matches
Encrypt Decrypt_MAC_Using Token
*/ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_
readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_
readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not
read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key.
...encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* *
read cryptographic parameters from the header file.
... */ secstatus
readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "failed to open %s\n", filename); return secfailure; } switch (type) { case symkey: strcpy(header, enckey_header); strcpy(trailer, enckey_trailer); break; case mackey: strcpy(header, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcp...
...And 21 more matches
nsIDocShell
read only.
...
read only.
...
read only.
...And 21 more matches
MouseEvent - Web APIs
mouseevent.altkey
read only returns true if the alt key was down when the mouse event was fired.
... mouseevent.button
read only the button number that was pressed (if applicable) when the mouse event was fired.
... mouseevent.buttons
read only the buttons being depressed (if any) when the mouse event was fired.
...And 21 more matches
nsIInputStream
xpcom/io/nsiinputstream.idlscriptable this interface represents a
readable stream of data.
...a blocking input stream may suspend the calling th
read in order to satisfy a call to close(), available(),
read(), or
readsegments().
... a non-blocking input stream, on the other hand, must not block the calling th
read of execution.
...And 20 more matches
Element - Web APIs
element.attributes
read only returns a namednodemap object containing the assigned attributes of the corresponding html element.
... element.classlist
read only returns a domtokenlist containing the list of class attributes.
... element.clientheight
read only returns a number representing the inner height of the element.
...And 20 more matches
HTMLMediaElement - Web APIs
htmlmediaelement.buffered
read only returns a timeranges object that indicates the ranges of the media source that the browser has buffered (if any) at the moment the buffered property is accessed.
... htmlmediaelement.controlslist
read only returns a domtokenlist that helps the user agent select what controls to show on the media element whenever the user agent shows its own set of controls.
... htmlmediaelement.currentsrc
read only returns a domstring with the absolute url of the chosen media resource.
...And 20 more matches
HTML text fundamentals - Learn web development
the basics: headings and paragraphs most structured text consists of headings and paragraphs, whether you are
reading a story, a newspaper, a college textbook, a magazine, etc.
... structured content makes the
reading experience easier and more enjoyable.
...on such occasions, it is advisable to sp
read the content over multiple pages if possible.
...And 19 more matches
Enc Dec MAC Output Public Key as CSR
encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* *
read cryptographic parameters from the header file */ secstatus
readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char *header; char *trailer; prfiledesc *file = null; out...
... break; case pad: header = pad_header; trailer = pad_trailer; break; case lab: header = lab_header; trailer = lab_trailer; break; default: pr_close(file); return secfailure; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to
read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ char *trail = null; if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file ...
...infilename, prbool ascii) { certsigneddata signeddata; secitem reqder; certcertificaterequest *certreq = null; secstatus rv = secsuccess; prarenapool *arena = null; seckeypublickey *publickey = null; arena = port_newarena(der_default_chunksize); if (arena == null) { rv = secfailure; goto cleanup; } rv =
readderfromfile(&reqder, infilename, ascii); if (rv) { rv = secfailure; goto cleanup; } certreq = (certcertificaterequest*) port_arenazalloc (arena, sizeof(certcertificaterequest)); if (!certreq) { rv = secfailure; goto cleanup; } certreq->arena = arena; /* since cert request is a signed data, must decode to get the inner ...
...And 19 more matches
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
*/ /* nspr headers */ #include <prth
read.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 */ #defin...
...); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for
reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for
reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign using private key */ sgn = sgn_newcontext(sec_oid_pkcs1_md5_with_rsa_encryption, pk); if (!sgn) { pr_fprintf(pr_stderr, "unable to c...
...reate context for signing\n"); rv = secfailure; goto cleanup; } rv = sgn_begin(sgn); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_begin\n"); goto cleanup; } while ((nb = pr_
read(infile, ibuf, sizeof(ibuf))) > 0) { rv = sgn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature ...
...And 19 more matches
Necko walkthrough
nsdocshell as an example client of the nsihttpchannel api nsdocshell::loaduri(string) create nsiuri from string nsdocshell::loaduri(nsiuri) creates 2 nsiinputstream for
read response from; passes them with uri to ...
... receive response get a callback to each of these: nsistreamlistener::onstartrequest (header info) nsistreamlistener::ondataavailable (data in single or multiple chunks) nsistreamlistener::onstoprequest (no more data from http) this all happens on the main th
read, in a non-blocking fashion: make your request on the main th
read, then carry on and get the async response later, also on the main th
read.
... there is an option to receive ondataavailable specifically on a non-main th
read, but all other calls happen on the main th
read.
...And 19 more matches
XPCOM Stream Guide
it is not that sequence of characters, though: the characters may not all be available when you
read from the stream.
...streams simply provide a way to
read or write data to some object.
...ream.newinputstream(); string (8-bit characters) nsstringstream @mozilla.org/io/string-input-stream;1 nsistringinputstream stream.setdata(data, length); file nsfileinputstream @mozilla.org/network/file-input-stream;1 nsifileinputstream stream.init(file, ioflags, perm, behaviorflags); zip nsjarinputstream n/a nsiinputstream zip
reader.getinputstream(zipentry); similarly, each of these implements nsioutputstream.
...And 19 more matches
nsIMsgDBHdr
in clear, if you want to do a persistent change to a message header, such as marking it as
read, or replied to, or whatever, you must do it through its corresponding nsimsgfolder (msghdr.folder) or nsimsgdatabase (msghdr.folder.msgdatabase).
...opertyname); void setproperty(in string propertyname, in astring propertystr); void setstringproperty(in string propertyname, in string propertyvalue); string getstringproperty(in string propertyname); unsigned long getuint32property(in string propertyname); void setuint32property(in string propertyname, in unsigned long propertyval); void mark
read(in boolean
read); void markflagged(in boolean flagged); void markhasattachments(in boolean hasattachments); void setprioritystring(in string priority); unsigned long orflags(in unsigned long flags); unsigned long andflags(in unsigned long flags); void setreferences(in string references); acstring getstringreference(in long refnum); ...
...s,in unsigned long numaddresses);new in thunderbird 3.1 [noscript] void getauthorcollationkey(out octetptr key, out unsigned long len); [noscript] void getsubjectcollationkey(out octetptr key, out unsigned long len); [noscript] void getrecipientscollationkey(out octetptr key, out unsigned long len); attributes attribute type description is
read boolean
readonly: indicates whether or not the message is
read.
...And 19 more matches
nsIMsgDBView
the nsimsgdbview interface handles the display of mail in the th
readpane and preview pane of thunderbird and other xpcom based mail cients.
...available in the mozilla codebase are types "quicksearch", "th
readswithun
read", "watchedth
readswithun
read", "xfvf" (virtual folders), "search", "group", and "th
readed" each with their own implementation of nsimsgdbview that provides a different sorting/view of the data.
...value command); void docommandwithfolder(in nsmsgviewcommandtypevalue command, in nsimsgfolder destfolder); void getcommandstatus(in nsmsgviewcommandtypevalue command, out boolean selectable_p, out nsmsgviewcommandcheckstatevalue selected_p); void viewnavigate(in nsmsgnavigationtypevalue motion, out nsmsgkey resultid, out nsmsgviewindex resultindex, out nsmsgviewindex th
readindex, in boolean wrap); boolean navigatestatus(in nsmsgnavigationtypevalue motion); nsmsgkey getkeyat(in nsmsgviewindex index); nsimsgdbhdr getmsghdrat(in nsmsgviewindex index); nsimsgfolder getfolderforviewindex(in nsmsgviewindex index); acstring geturiforviewindex(in nsmsgviewindex index); nsimsgdbview clonedbview(in nsimessenger amessengeri...
...And 19 more matches
nsIMsgIncomingServer
tring name, in long value); void setintvalue(in string attr, in long value); void setunicharattribute(in string name, in astring value); void setunicharvalue(in string attr, in astring value); void shutdown(); void storepassword(); astring tostring(); void writetofoldercache(in nsimsgfoldercache foldercache); attributes attribute type description accountmanagerchrome astring
read only.
... biffminutes long biffstate unsigned long canbedefaultserver boolean
read only.
... cancompactfoldersonserver boolean
read only.
...And 19 more matches
PerformanceResourceTiming - Web APIs
properties this interface extends the following performanceentry properties for resource performance entry types by qualifying and constraining them as follows: performanceentry.entrytype
read only returns "resource".
... performanceentry.name
read only returns the resources url.
... performanceentry.starttime
read only returns the timestamp for the time a resource fetch started.
...And 19 more matches
Multiprocess on Windows
prerequisite
reading since so much of this design resolves around microsoft com and its concept of the apartment,
readers of this document should have a solid understanding of what apartments are.
... gecko and apartments most code that runs on gecko's main th
read is not th
read safe.
... since gecko's main th
read uses com, and com requires th
reads to declare their th
reading model, the main th
read must initialize itself to live inside its own single th
readed apartment (sta).
...And 18 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
sample code 3 /* nspr headers */ #include <prth
read.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" #define buffersize 80 #define digestsize 16 #define ptext_mac_buffer_size 96 #define ciphersize 96 #define blocksize 32 #define cipher_header "-----begin cipher-----" #define cipher_trailer "-----end cipher-----" #define enckey_header "-----begin aeskey ckaid-----" #define enckey_trailer "-----end aeskey ckaid-----" #...
...*/ /* nspr headers */ #include <prth
read.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_
readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_
readrawattribute returned (%d)\n", rv); pr...
..._fprintf(pr_stderr, "could not
read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secstatus rv; pk11symkey *key; if (pk11_needlogin(slot)) { rv = pk11_authenticate(slot, pr_true, pwdata); if (rv != secsuccess) { pr_fprintf(pr_stderr, "could not authenticate to token %s.\n", pk11_gettokenname(slot)); return null; } } /* generate the symmetric key */ key = pk11_tokenkeygen(slot, mechanism, null, keysize, keyid, pr_true, pwdata); if (!key) { pr_fprintf(...
...And 18 more matches
sample2
*/ /* nspr headers */ #include <prth
read.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <cryptohi.h> #include <keyhi.h> #include <pk11priv.h> #include <cert.h> #include <base64.h> #include <secerr.h> #include <secport.h> #include <secoid.h> #include <secmodt.h> #include <secoidt.h> #include <sechash.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #define enckey_...
...path> -b <headerfilename> -e <encryptfilename> -o <opfilename>\n"); exit(-1); } } /* * sign the contents of input file using private key and * return result as secitem */ secstatus signdata(const char *infilename, seckeyprivatekey *pk, secitem *res) { secstatus rv = secfailure; unsigned int nb; unsigned char ibuf[4096]; prfiledesc *infile = null; sgncontext *sgn = null; /* open the input file for
reading */ infile = pr_open(infilename, pr_rdonly, 0); if (!infile) { pr_fprintf(pr_stderr, "unable to open \"%s\" for
reading.\n", infilename); rv = secfailure; goto cleanup; } /* sign using private key */ sgn = sgn_newcontext(sec_oid_pkcs1_md5_with_rsa_encryption, pk); if (!sgn) { pr_fprintf(pr_stderr, "unable to create context for signing\n"); rv = secfailure; goto cleanup; } rv = sgn_begin(sgn); i...
...f (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_begin\n"); goto cleanup; } while ((nb = pr_
read(infile, ibuf, sizeof(ibuf))) > 0) { rv = sgn_update(sgn, ibuf, nb); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_update\n"); goto cleanup; } } rv = sgn_end(sgn, res); if (rv != secsuccess) { pr_fprintf(pr_stderr, "problem while sgn_end\n"); goto cleanup; } cleanup: if (infile) { pr_close(infile); } if (sgn) { sgn_destroycontext(sgn, pr_true); } return rv; } /* * verify the signature using public key */ secstatus verifydata(const char *infilename, seckeypublickey *pk, secitem *sigitem, secupwdata *pwdata) { unsigned int nb; unsigned char ibuf[4096]; secstatus rv = secfailure; vfycontext *vfy = null; prfiledesc *infile = null; /* open the input file for
reading */ i...
...And 18 more matches
nsIDOMWindowInternal
onal] in boolean showdialog) domstring atob(in domstring aasciistring) domstring btoa(in domstring abase64data) nsivariant showmodaldialog(in nsivariant aargs, [optional] in domstring aoptions) void postmessage(in domstring message, in domstring targetorigin) attributes attribute type description window nsidomwindowinternal
readonly: the window object itself.
... self nsidomwindowinternal
readonly: returns an object reference to the window object.
... navigator nsidomnavigator
readonly: returns a reference to the navigator object.
...And 18 more matches
nsIOutputStream
a blocking output stream may suspend the calling th
read in order to satisfy a call to close(), flush(), write(), writefrom(), or writesegments().
... a non-blocking output stream, on the other hand, must not block the calling th
read of execution.
... note: blocking output streams are often written to on a background th
read to avoid locking up the main application th
read.
...And 18 more matches
PerformanceTiming - Web APIs
performancetiming.navigationstart
read only when the prompt for unload terminates on the previous document in the same browsing context.
... performancetiming.unloadeventstart
read only when the unload event has been thrown, indicating the time at which the previous document in the window began to unload.
... performancetiming.unloadeventend
read only when the unload event handler finishes.
...And 18 more matches
Front-end web developer - Learn web development
for example, if you al
ready know html, you can skip ahead to the css section.
... how will i know i'm
ready to move on?
...it is important to get you set up and
ready to do work for exercises later on in the course.
...And 17 more matches
NSS API Guidelines
within pkcs #11, wraps crypto lib/freebl blapi.h, blapit.h jar provides support for
reading and writing data in java archive (jar) format, including zlib compression.
...the library supports base-64 encoding/decoding,
reader-writer locks, the secitem data type, der encoding/decoding, error types and numbers, oid handling, and secure random number generation.
...this was added via javascript; a fast, lightweight, non-th
read-safe (though 'free-th
readed') implementation.
...And 17 more matches
Performance best practices for Firefox front-end engineers
avoid the main th
read where possible the main th
read is where we process user events and do painting.
... it's also important to note that most of our javascript runs on the main th
read, so it's easy for script to cause delays in event processing or painting.
... that means that the more code we can get off of the main th
read, the more that th
read can respond to user events, paint, and generally be responsive to the user.
...And 16 more matches
PKCS11 FAQ
read-only sessions,
read/write sessions, serial, parallel?
... nss typically holds one session
read-only session per slot, in which some of the non-multipart functions are handled.
...if no new sessions are available, the one
read-only session is used, and the state is saved and restored after each multipart operation.
...And 16 more matches
nsIWindowsRegKey
index); unsigned long getvaluetype(in astring name); boolean haschanged(); boolean haschild(in astring name); boolean hasvalue(in astring name); boolean iswatching(); void open(in unsigned long rootkey, in astring relpath, in unsigned long mode); nsiwindowsregkey openchild(in astring relpath, in unsigned long mode); acstring
readbinaryvalue(in astring name); unsigned long long
readint64value(in astring name); unsigned long
readintvalue(in astring name); astring
readstringvalue(in astring name); void removechild(in astring relpath); void removevalue(in astring name); void startwatching(in boolean recurse); void stopwatching(); void writebinaryvalue(in ...
...
read only.
...
read only.
...And 16 more matches
Notification - Web APIs
notification.permission
read only a string representing the current permission to display notifications.
... notification.maxactions
read only instance properties these properties are available only on instances of the notification object.
... notification.actions
read only the actions array of the notification as specified in the constructor's options parameter.
...And 16 more matches
Streams API - Web APIs
there are more advantages too — you can detect when streams start or end, chain streams together, handle errors and cancel streams as required, and react to the speed of the stream is being
read at.
...for example, the response body returned by a successful fetch request can be exposed as a
readablestream, and you can then
read it using a
reader created with
readablestream.get
reader(), cancel it with
readablestream.cancel(), etc.
... more complicated uses involve creating your own stream using the
readablestream() constructor, for example to process data inside a service worker.
...And 16 more matches
Using IO Timeout And Interrupt On NT - Archive of obsolete content
due to a limitation of the present implementation of nspr io on nt, programs must follow the following guideline: if a th
read calls an nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the th
read exits.
...a th
read calling an io function is blocked until the io operation finishes, either due to a successful io completion or an error.
...if the th
read gets interrupted by another th
read's <tt>pr_interrupt()</tt> call, the io function returns with <tt>pr_pending_interrupt_error</tt>.
...And 15 more matches
Using workers in extensions - Archive of obsolete content
« previous this article shows you how to use worker th
reads in extensions to perform tasks in the background without blocking the user interface.
... if you haven't al
ready created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension localizing an extension updating an extension to support multiple mozilla applications download the sample you may download the complete example: download the example.
... how this differs from previous versions this version of the stock ticker extension moves the xmlhttprequest call that fetches updated stock information into a worker th
read, which then passes that information back to the main body of the extension's code to update the display in the status bar.
...And 15 more matches
How to structure a web form - Learn web development
we al
ready met this in the previous article.
...for example, some screen
readers such as jaws and nvda will speak the legend's content before speaking the label of each control.
... when
reading the above form, a screen
reader will speak "fruit juice size small" for the first widget, "fruit juice size medium" for the second, and "fruit juice size large" for the third.
...And 15 more matches
Client-side storage - Learn web development
you are now
ready to start adding code to it.
... inside the window.onload handler, add the following: // open our database; it is created if it doesn't al
ready exist // (see onupgradeneeded below) let request = window.indexeddb.open('notes_db', 1); this line creates a request to open version 1 of a database called notes_db.
... if this doesn't al
ready exist, it will be created for you by subsequent code.
...And 15 more matches
PBackground
pbackground is a mechanism available since gecko 30 (see bug 956218) that builds on top of ipdl to provide a solution to common problems that arise when handling multiple th
reads in the chrome process, for example communication between workers and multiple child processes and other parent-process worker th
reads.
... note: if you want more detailed information on ipdl, start out by
reading the ipdl tutorial.
...all actors in a tree "live" on the same th
read, and can only be used safely from that th
read.
...And 15 more matches
Encrypt Decrypt MAC Keys As Session Objects
f(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_
readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_
readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not
read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, i...
...encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* *
read cryptographic parameters from the header file */ secstatus
readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; ou...
... strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to
read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) ...
...And 15 more matches
Encrypt and decrypt MAC using token
f(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_
readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_
readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not
read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, i...
...encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* *
read cryptographic parameters from the header file */ secstatus
readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; ou...
... strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to
read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) ...
...And 15 more matches
Introduction to XPCOM for the DOM
the use of xpcom and nscomptr's described in this document covers about 80% of what you need to know to
read the dom code, and even write some.
...the understanding of the content of this document is a requirement to
read the rest of the dom hacking guide.
...i learned c++ by
reading "c++ primer" from stanley lippman and josee lajoie, then experimenting on the dom code.
...And 15 more matches
Cognitive accessibility - Accessibility
guideline 2.2 states "provide users enough time to
read and use content." a time limit is any process that happens without user initiation after a set time or on a periodic basis, such as being logged out after 30 minutes or having 15 minutes to make a purchase.
... people with cognitive disabilities may require more time to
read content, or to perform functions such as filling out forms.
...examples of timed content include forms, timed
reading exercises, and training materials.
...And 15 more matches
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
objective the objective is to provide users with a mailer agent, a web browser, and a news
reader which are automatically configured (preferences) at startup to the current user connected on the computer.
...the old netscape 4.x the file is encoded (byte-shift/rotary is 7), and the presence of the file (netscape.cfg) in the mozilla_home directory suffices for it to be
read and executed.
...the presence of pref("general.config.filename", "mozilla.cfg"); in any appropriate .js file (here we use autoconf.js dedicated file) enables the
read and execution of prefcalls.js.
...And 14 more matches
browser - Archive of obsolete content
cangoback type: boolean this
read-only property is true if there is a page to go back to in the session history and the back button should be enabled.
... cangoforward type: boolean this
read-only property is true if there is a page to go forward to in the session history and the forward button should be enabled.
... contentdocument type: document this
read-only property contains the document object in the element.
...And 14 more matches
tabbrowser - Archive of obsolete content
« xul reference home [ examples | attributes | properties | methods | related ] this element is used for holding a set of
read-only views of web documents.
... cangoback type: boolean this
read-only property is true if there is a page to go back to in the session history and the back button should be enabled.
... cangoforward type: boolean this
read-only property is true if there is a page to go forward to in the session history and the forward button should be enabled.
...And 14 more matches
nsIDownload
read only.
...
read only.
... displayname astring a user-
readable description of the transfer.
...And 14 more matches
nsIScriptableInputStream
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview unsigned long available(); void close(); void init(in nsiinputstream ainputstream); string
read(in unsigned long acount); acstring
readbytes(in unsigned long acount); methods available() return the number of bytes currently available in the stream.
...
read()
read data from the stream.
...string
read( in unsigned long acount ); parameters acount the maximum number of bytes to
read from the stream.
...And 14 more matches
nsIZipWriter
read only.
...
read only.
... ns_error_file_al
ready_exists the specified path al
ready exists in the zip file.
...And 14 more matches
Getting Started Guide
if you're al
ready familiar with nscomptrs, then you might want to skip ahead to the reference manual or the faq.
...you should al
ready know this, and should be able to just skim this short section.
... if this is unfamiliar material, you're not
ready for nscomptrs yet.
...And 14 more matches
Node - Web APIs
node.baseuri
read only returns a domstring representing the base url of the document containing the node.
... node.baseuriobject
read only (not available to web content.) the nsiuri object representing the base uri for the element.
... node.childnodes
read only returns a live nodelist containing all the children of this node.
...And 14 more matches
PerformanceNavigationTiming - Web APIs
onaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancenavigationtiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties this interface extends the following performanceentry properties for navigation performance entry types by qualifying and constraining them as follows: performanceentry.entrytype
read only returns "navigation".
... performanceentry.name
read only returns the document's address.
... performanceentry.starttime
read only returns a domhighrestimestamp with a value of "0".
...And 14 more matches
USBDevice - Web APIs
properties usbdevice.configuration
read only a usbconfiguration object for the currently selected interface for a paired usb device.
... usbdevice.configurations
read only an array of device-specific interfaces for controlling a paired usb device.
... usbdevice.deviceclass
read only one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
...And 14 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
preference description value nglayout.debug.disable_xul_cache (not present in firefox 3.5+) ordinarily, firefox will cache xul documents after they have been
read in once, to speed subsequent displays.
...we’ve al
ready covered the dialog element in chapter 3.
...if the browser.xul file, which is the target of the overlay in overlay.xul is being
read in again, the changes will be reflected, and you’ll be able to see the changes by opening a new browser window.
...And 13 more matches
EncDecMAC using token object - sample 3
t takes as an input file and produces\n", "note :"); fprintf(stderr, "%-7s .enc and .header as intermediate output files.\n\n", ""); fprintf(stderr, "%-7s for decrypt, it takes .enc and .header\n", ""); fprintf(stderr, "%-7s as input files and produces as a final output file.\n\n", ""); exit(-1); } /* * gather a cka_id */ secstatus gathercka_id(pk11symkey* key, secitem* buf) { secstatus rv = pk11_
readrawattribute(pk11_typesymkey, key, cka_id, buf); if (rv != secsuccess) { pr_fprintf(pr_stderr, "pk11_
readrawattribute returned (%d)\n", rv); pr_fprintf(pr_stderr, "could not
read symkey cka_id attribute\n"); return rv; } return rv; } /* * generate a symmetric key */ pk11symkey * generatesymkey(pk11slotinfo *slot, ck_mechanism_type mechanism, int keysize, secitem *keyid, secupwdata *pwdata) { secst...
...t, outlen, maxout, in, inlen); } /* * encryptinit */ pk11context * encryptinit(pk11symkey *ek, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(ek, iv, ivlen, type, cka_encrypt); } /* * decryptinit */ pk11context * decryptinit(pk11symkey *dk, unsigned char *iv, unsigned int ivlen, ck_mechanism_type type) { return cryptinit(dk, iv, ivlen, type, cka_decrypt); } /* *
read cryptographic parameters from the header file */ secstatus
readfromheaderfile(const char *filename, headertype type, secitem *item, prbool ishexdata) { secstatus rv; prfiledesc* file; secitem filedata; secitem outbuf; unsigned char *nonbody; unsigned char *body; char header[40]; char trailer[40]; outbuf.type = sibuffer; file = pr_open(filename, pr_rdonly, 0); if (!file) { pr_fprintf(pr_stderr, "f...
...er, mackey_header); strcpy(trailer, mackey_trailer); break; case iv: strcpy(header, iv_header); strcpy(trailer, iv_trailer); break; case mac: strcpy(header, mac_header); strcpy(trailer, mac_trailer); break; case pad: strcpy(header, pad_header); strcpy(trailer, pad_trailer); break; } rv = filetoitem(&filedata, file); nonbody = (char *)filedata.data; if (!nonbody) { pr_fprintf(pr_stderr, "unable to
read data from input file\n"); rv = secfailure; goto cleanup; } /* check for headers and trailers and remove them */ if ((body = strstr(nonbody, header)) != null) { char *trail = null; nonbody = body; body = port_strchr(body, '\n'); if (!body) body = port_strchr(nonbody, '\r'); /* maybe this is a mac file */ if (body) trail = strstr(++body, trailer); if (trail != null) { *trail = '\0'; } else { pr_fpr...
...And 13 more matches
jsdIStackFrame
read only.
...
read only.
...
read only.
...And 13 more matches
nsIScriptableIO
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
... nsiscriptableio provides a convenient api for creating files and streams, as well as for
reading and writing data to them.
...And 13 more matches
KeyboardEvent - Web APIs
keyboardevent.altkey
read only returns a boolean that is true if the alt ( option or ⌥ on os x) key was active when the key event was generated.
... keyboardevent.code
read only returns a domstring with the code value of the physical key represented by the event.
... keyboardevent.ctrlkey
read only returns a boolean that is true if the ctrl key was active when the key event was generated.
...And 13 more matches
SVGTransformList - Web APIs
an svgtransformlist object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
...vgtransform insertitembefore(in svgtransform newitem, in unsigned long index) svgtransform replaceitem(in svgtransform newitem, in unsigned long index) svgtransform removeitem(in unsigned long index) svgtransform appenditem(in svgtransform newitem) svgtransform createsvgtransformfrommatrix(in svgmatrix) svgtransform consolidate() properties
readonly unsigned long numberofitems
readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a
read only attribute or when the object itself is
read only.
...And 13 more matches
Populating the page: how browsers work - Web Performance
two major issues in web performance are understanding issues having to do with latency and issues having to do with the fact that for the most part, browsers are single th
readed.
... for the most part, browsers are considered single th
readed.
...render time is key, with ensuring the main th
read can complete all the work we throw at it and still always be available to handle user interactions.
...And 13 more matches
File I/O - Archive of obsolete content
read path from prefs var file = prefs.getcomplexvalue("filename", components.interfaces.nsilocalfile); relative path (nsirelativefilepref) to store paths relative to one of the predefined folders listed above, for example file relative to profile folder, use the following code: // 1.
...
read from prefs var value = prefs.getcomplexvalue("filename", components.interfaces.nsirelativefilepref); // |value.file| is the file.
...path + "\\" : path + "/") + "myfile.txt"; is possible, but nsifile.append() is much easier to
read and is guaranteed to work on all platforms.
...And 12 more matches
UI pseudo-classes - Learn web development
:enabled and :disabled, and :
read-only and :
read-write: target enabled or disabled form controls (e.g.
... with the disabled html attribute set), and
read-write or
read-only form controls (e.g.
... with the
readonly html attribute set).
...And 12 more matches
HTML table advanced features and accessibility - Learn web development
this is useful for all
readers wishing to get a quick idea of whether the table is useful to them as they scan the page, but particularly for blind users.
... rather than have a screen
reader
read out the contents of many cells just to find out what the table is about, he or she can rely on a caption and then decide whether or not to
read the table in greater detail.
... note: the summary attribute can also be used on the <table> element to provide a description — this is also
read out by screen
readers.
...And 12 more matches
Error codes returned by Mozilla APIs
ns_error_al
ready_initialized (0xc1f30002) an attempt is made to initialize a component or object again which has al
ready been initialized.
... ns_error_file_al
ready_exists (0x80520008) an attempt was made to create a file that al
ready exists.
... ns_error_file_is_locked (0x8052000e) this error indicates that a file cannot be accessed because it is locked, typically because the file is al
ready being used by another application.
...And 12 more matches
Extending a Protocol
quick start: extending a protocol this tutorial implements a simple ping-pong style ipdl protocol, which sends a message from the content process (main th
read) to the chrome process (ui th
read).
... the tutorial is designed for browser engineers who are implementing dom/web apis that need to, for example, send a message to the os or spin up something off the main th
read - so it's biased towards supporting w3c/whatwg dom apis.
... implementing the navigator.echo() in your favorite editor, open dom/webidl/navigator.webidl at the end of the file, add: partial interface navigator { [throws] promise<domstring> echo(domstring astring); }; now we need to implement the echo() method in c++, so open up ./dom/base/navigator.h and let's add the method definition, so under public:: al
ready_addrefed<promise> echo(const nsastring& astring, errorresult& arv); we use nsastring& as the domstring comes in from js as utf-16.
...And 12 more matches
nsIMsgDatabase
nsisimpleenumerator enumeratemessages(); nsisimpleenumerator enumerateth
reads(); void synccounts; nsimsgth
read getth
readcontainingmsghdr(in nsimsgdbhdr msghdr); void markhdr
read(in nsimsgdbhdr msghdr, in boolean b
read, in nsidbchangelistener instigator); void markhdrreplied(in nsimsgdbhdr msghdr, in boolean breplied, in nsidbchangelistener instigator); void markhdrmarked(in nsimsgdbhdr msghdr, in boolean mark,in nsidbchangelistener instigator); void markmdnnee...
...ded(in nsmsgkey key, in boolean bneeded,in nsidbchangelistener instigator); boolean ismdnneeded(in nsmsgkey key); void markmdnsent(in nsmsgkey key, in boolean bneeded, in nsidbchangelistener instigator); boolean ismdnsent(in nsmsgkey key); void mark
read(in nsmsgkey key, in boolean b
read, in nsidbchangelistener instigator); void markreplied(in nsmsgkey key, in boolean breplied, in nsidbchangelistener instigator); void markforwarded(in nsmsgkey key, in boolean bforwarded, in nsidbchangelistener instigator); void markhasattachments(in nsmsgkey key, in boolean bhasattachments, in nsidbchangelistener instigator); void markth
readread(in nsimsgth
read th
read, in nsidbchangelistener instigator, in nsmsgkeyarrayptr thosemarked); native code only!
... void markth
readignored(in nsimsgth
read th
read, in nsmsgkey th
readkey, in boolean bignored, in nsidbchangelistener instigator); void markth
readwatched(in nsimsgth
read th
read, in nsmsgkey th
readkey, in boolean bwatched, in nsidbchangelistener instigator); void markheaderkilled(in nsimsgdbhdr msg, in boolean bignored, in nsidbchangelistener instigator); boolean is
read(in nsmsgkey key); boolean isignored(in nsmsgkey key); boolean ismarked(in nsmsgkey key); boolean hasattachments(in nsmsgkey key); void markall
read(in nsmsgkeyarrayptr thosemarked); native code only!
...And 12 more matches
nsINavBookmarksService
obsolete since gecko 2.0 nsiuri getbookmarkuri(in long long aitemid); long long getchildfolder(in long long afolder, in astring asubfolder); obsolete since gecko 2.0 long long getfolderidforitem(in long long aitemid); boolean getfolder
readonly(in long long aitemid); astring getfoldertitle(in print64 folder); obsolete since gecko 1.9 nsiuri getfolderuri(in print64 folder); obsolete since gecko 1.9 long long getidforitemat(in long long aparentid, in long aindex); prtime getitemdateadded(in long long aitemid); astring getitemguid(in long long aitemid); obsolete since gecko 14.0 ...
... void removefolderchildren(in long long aitemid); void removeitem(in long long aitemid); void removeobserver(in nsinavbookmarkobserver observer); void replaceitem(in print64 folder, in nsiuri item, in nsiuri newitem); obsolete since gecko 1.9 void runinbatchmode(in nsinavhistorybatchcallback acallback, in nsisupports auserdata); void setfolder
readonly(in long long afolder, in boolean a
readonly); void setfoldertitle(in print64 folder, in astring title); obsolete since gecko 1.9 void setitemdateadded(in long long aitemid, in prtime adateadded); void setitemguid(in long long aitemid, in astring aguid); obsolete since gecko 14.0 void setitemindex(in long long aitemid, in long anewindex); void se...
...
read only.
...And 12 more matches
nsISupports proxies
xpcom proxies were a technology which allowed code to make asynchronous or synchronous xpcom calls to a different th
read on arbitrary xpcom interfaces.
...it is no longer needed because javascript code can no longer run on arbitrary th
reads, and compiled code can use compiled runnable to achieve the same effect in a much simpler manner.
... for more information about alternatives, see making cross-th
read calls using runnables.
...And 12 more matches
BluetoothDevice - Web APIs
_top"><rect x="151" y="1" width="150" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="226" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">bluetoothdevice</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} interface interface bluetoothdevice {
readonly attribute domstring id;
readonly attribute domstring?
... name;
readonly attribute bluetoothremotegattserver?
... gatt;
readonly attribute frozenarray uuids; promise watchadvertisements(); void unwatchadvertisements();
readonly attribute boolean watchingadvertisements; }; bluetoothdevice implements eventtarget; bluetoothdevice implements bluetoothdeviceeventhandlers; bluetoothdevice implements characteristiceventhandlers; bluetoothdevice implements serviceeventhandlers; properties bluetoothdevice.id
read only a domstring that uniquely identifies a device.
...And 12 more matches
CustomEvent - Web APIs
properties customevent.detail
read only any data passed when initializing the event.
... this interface inherits properties from its parent, event: event.bubbles
read only a boolean indicating whether or not the event bubbles up through the dom.
... event.cancelable
read only a boolean indicating whether the event is cancelable.
...And 12 more matches
FileHandle API - Web APIs
perform
read and write operations to
read or write within a handled file, it is required to get a lockedfile.
... the filehandle.open() method provides such an object which can be
readonly or
readwrite.
... any attempt to perform a write action on a
readonly lockedfile object will fail.
...And 12 more matches
IDBObjectStore - Web APIs
properties idbobjectstore.indexnames
read only a list of the names of indexes on objects in this object store.
... idbobjectstore.keypath
read only the key path of this object store.
... idbobjectstore.transaction
read only the idbtransaction object to which this object store belongs.
...And 12 more matches
Basic concepts - Web APIs
for more information on how the browser handles storing your data in the background,
read browser storage limits and eviction criteria.
...if you are not familiar with transactions in a database,
read the wikipedia article on transactions.
...they also have
readystate, result, and errorcode properties that tell you the status of the request.
...And 12 more matches
SVGLengthList - Web APIs
an svglengthlist object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... void clear() svglength initialize(in svglength newitem) svglength getitem(in unsigned long index) svglength insertitembefore(in svglength newitem, in unsigned long index) svglength replaceitem(in svglength newitem, in unsigned long index) svglength removeitem(in unsigned long index) svglength appenditem(in svglength newitem) properties
readonly unsigned long numberofitems
readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a
read only attribute or when the object itself is
read only.
...And 12 more matches
SVGNumberList - Web APIs
an svgnumberlist object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
...void clear() svgnumber initialize(in svgnumber newitem) svgnumber getitem(in unsigned long index) svgnumber insertitembefore(in svgnumber newitem, in unsigned long index) svgnumber replaceitem(in svgnumber newitem, in unsigned long index) svgnumber removeitem(in unsigned long index) svgnumber appenditem(in svgnumber newitem) properties
readonly unsigned long numberofitems
readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a
read only attribute or when the object itself is
read only.
...And 12 more matches
SVGPointList - Web APIs
an svgpointlist object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... svgpoint getitem(in unsigned long index) svgpoint insertitembefore(in svgpoint newitem, in unsigned long index) svgpoint replaceitem(in svgpoint newitem, in unsigned long index) svgpoint removeitem(in unsigned long index) svgpoint appenditem(in svgpoint newitem) properties
readonly unsigned long numberofitems normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a
read only attribute or when the object itself is
read only.
...And 12 more matches
SVGStringList - Web APIs
an svgstringlist object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
...void clear() domstring initialize(in domstring newitem) domstring getitem(in unsigned long index) domstring insertitembefore(in domstring newitem, in unsigned long index) domstring replaceitem(in domstring newitem, in unsigned long index) domstring removeitem(in unsigned long index) domstring appenditem(in domstring newitem) properties
readonly unsigned long numberofitems
readonly unsigned long length normative document svg 1.1 (2nd edition) properties name type description numberofitems unsigned long the number of items in the list.
... exceptions: a domexception with code no_modification_allowed_err is raised when the list corresponds to a
read only attribute or when the object itself is
read only.
...And 12 more matches
XMLHttpRequest - Web APIs
xmlhttprequest.on
readystatechange an eventhandler that is called whenever the
readystate attribute changes.
... xmlhttprequest.
readystate
read only returns an unsigned short, the state of the request.
... xmlhttprequest.response
read only returns an arraybuffer, blob, document, javascript object, or a domstring, depending on the value of xmlhttprequest.responsetype, that contains the response entity body.
...And 12 more matches
Same-origin policy - Web security
(examples are listed below.) cross-origin
reads are typically disallowed, but
read access is often leaked by embedding.
... for example, you can
read the dimensions of an embedded image, the actions of an embedded script, or the availability of an embedded resource.
...you must prevent cross-origin
reads of pages that require this token.
...And 12 more matches
io/text-streams - Archive of obsolete content
experimental provides streams for
reading and writing text.
... function
readtextfromfile(filename) { var fileio = require("sdk/io/file"); var text = null; if (fileio.exists(filename)) { var text
reader = fileio.open(filename, "r"); if (!text
reader.closed) { text = text
reader.
read(); text
reader.close(); } } return text; } function writetexttofile(text, filename) { var fileio = require("sdk/io/file"); var textwriter = fileio.open(filename, "w"); if (!textwriter.closed) { textwriter.write(text); textwriter.close(); } } globals constructors text
reader(inputstream, charset) creates a buffered input stream that
reads text from a backing stream using a given text encoding.
... you can also create text
reader objects using io/file's open() function.
...And 11 more matches
ui/frame - Archive of obsolete content
if the frame script initiates the conversation, you need to specify "*" as the origin: window.parent.postmessage("ping", "*"); if the frame script has received a message from the add-on al
ready, it can use the origin property of the event object passed to the message hander: // listen for messages from the add-on, and send a reply window.addeventlistener("message", function(event) { event.source.postmessage("pong", event.origin) }, false); this frame script listens to change events on the "city-selector" <select> element, and sends a message to the add-on containing the value for t...
...you can specify the frame's url property as the targetorigin: frame.postmessage(message, frame.url); this add-on listens for a frame script to send the "city changed" message above, and in response, updates all frames across all browser windows with that city's current weather (it just
reads this from a dictionary, where in a real case it might ask a web service): var { frame } = require("sdk/ui/frame"); var { toolbar } = require("sdk/ui/toolbar"); var weather = { "london" : "rainy", "toronto" : "snowy", "san francisco" : "foggy" } var frame = new frame({ url: "./city-info.html", onmessage: (e) => { updateweather(e.data); } }); var toolbar = toolbar({ name: "ci...
... toolbar } = require("sdk/ui/toolbar"); var frame = new frame({ url: "./city-info.html", onmessage: function(e) { // message only the frame that pinged us e.source.postmessage("pong", e.origin); } }); var toolbar = toolbar({ name: "ping-pong", title: "ping pong", items: [frame] }); this does not have to be the message event: the other events frame can emit: attach, load and
ready, also provide access to source and origin.
...And 11 more matches
How to build custom form controls - Learn web development
we require our control to be usable with a mouse as well as with a keyboard, and comprehensible to a screen
reader, just like any native control.
... finally, let's define how the control's options will behave: when the control is opened, the selected option is highlighted when the mouse is over an option, the option is highlighted and the previously highlighted option is returned to its normal state for the purposes of our example, we'll stop with that; however, if you're a careful
reader, you'll notice that some behaviors are missing.
...remember, if you want to provide the same functionality as the existing native <select>, it should behave the exact same way as the select for all users, from keyboard to mouse to touch to screen
reader, and any other input device.
...And 11 more matches
React interactivity: Events and state - Learn web development
there are a couple of other things to note: the camel-cased nature of onclick is important — jsx will not recognize onclick (again, it is al
ready used in javascript for a specific purpose, which is related but different — standard onclick handler properties).
...it's not possible to update the props a component receives; only to
read them.
...in form.js, change your very first line so that it
reads like this: import react, { usestate } from "react"; this allows us to import the usestate() function by itself, and utilize it anywhere in this file.
...And 11 more matches
Accessible Toolkit Checklist
expose your ui - a way for assistive technologies such as screen
readers, screen magnifiers and voice dictation software to understand your software.
... the approaches there are two basic kinds of toolkits, which each provide different challenges when implementing accessibility: native widget toolkits , like eclipse and wxwidgets, al
ready have some accessibility built-in.
...since the individual widgets predominately come from the operating system, they al
ready implement standard keyboard commands and follow the operating system's visual theme.
...And 11 more matches
Download
method overview promise start(); promise launch(); promise showcontainingdirectory(); promise cancel(); promise removepartialdata(); promise whensucceeded(); promise finalize([optional] boolean aremovepartialdata); properties attribute type description canceled
read only boolean indicates that the download has been canceled.
... currentbytes
read only number number of bytes currently transferred.
... error
read only downloaderror when the download fails, this is set to a downloaderror instance indicating the cause of the failure.
...And 11 more matches
JS::CompileOptions
constructor js::
readonlycompileoptions(); // added in spidermonkey 31 js::owningcompileoptions(jscontext *cx); // added in spidermonkey 31 js::compileoptions(jscontext *cx, jsversion version = jsversion_unknown); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
... methods of js::
readonlycompileoptions method description bool mutederrors() const determines if errors are muted.
...And 11 more matches
nsIAsyncInputStream
inherits from: nsiinputstream last changed in gecko 1.7 if an input stream is non-blocking, it may return ns_base_stream_would_block when
read.
... the caller must then wait for the stream to have some data to
read.
... if the stream implements nsiasyncinputstream, then the caller can use this interface to request an asynchronous notification when the stream becomes
readable or closed (via the asyncwait() method).
...And 11 more matches
nsIUpdateItem
read only.
...
read only.
...
read only.
...And 11 more matches
nsIXPConnect
void setdefaultsecuritymanager(in nsixpcsecuritymanager amanager, in pruint16 flags); nsixpcfunctionthistranslator setfunctionthistranslator(in nsiidref aiid, in nsixpcfunctionthistranslator atranslator); void setreportalljsexceptions(in boolean reportalljsexceptions); void setsafejscontextforcurrentth
read(in jscontextptr cx); void setsecuritymanagerforjscontext(in jscontextptr ajscontext, in nsixpcsecuritymanager amanager, in pruint16 flags); void syncjscontexts(); void updatexows(in jscontextptr ajscontext, in nsixpconnectwrappednative aobject, in pruint32 away); native code only!
...xt, in jsobjectptr ascope, in nsisupports acomobj, in nsiidref aiid); void wrapnativetojsval(in jscontextptr ajscontext, in jsobjectptr ascope, in nsisupports acomobj, in nswrappercacheptr acache, in nsiidptr aiid, in boolean aallowwrapper, out jsval aval, out nsixpconnectjsobjectholder aholder); attributes attribute type description collectgarbageonmainth
readonly prbool obsolete since gecko 1.9 currentjsstack nsistackframe
read only.
... currentnativecallcontext nsaxpcnativecallcontextptr
read only.
...And 11 more matches
IDBTransaction - Web APIs
all
reading and writing of data is done within transactions.
...is it
readonly or
readwrite), and you access an idbobjectstore to make a request.
...y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbtransaction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} transactions are started when the transaction is created, not when the first request is placed; for example consider this: var trans1 = db.transaction("foo", "
readwrite"); var trans2 = db.transaction("foo", "
readwrite"); var objectstore2 = trans2.objectstore("foo") var objectstore1 = trans1.objectstore("foo") objectstore2.put("2", "key"); objectstore1.put("1", "key"); after the code is executed the object store should contain the value "2", since trans2 should run after trans1.
...And 11 more matches
RTCIceCandidate - Web APIs
properties candidate
read only a domstring representing the transport address for the candidate that can be used for connectivity checks.
... component
read only a domstring which indicates whether the candidate is an rtp or an rtcp candidate; its value is either "rtp" or "rtcp", and is derived from the "component-id" field in the candidate a-line string.
... foundation
read only returns a domstring containing a unique identifier that is the same for any candidates of the same type, share the same base (the address from which the ice agent sent the candidate), and come from the same stun server.
...And 11 more matches
RTCPeerConnection - Web APIs
ddle" alignment-baseline="middle">rtcpeerconnection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constructorrtcpeerconnection() the rtcpeerconnection() constructor returns a newly-created rtcpeerconnection, which represents a connection between the local device and a remote peer.propertiesalso inherits properties from: eventtargetcantrickleicecandidatesthe
read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.connectionstate the
read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum rtcpeerconnectionstate.currentlocaldescri...
...ption
read only the
read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... also included is a list of any ice candidates that may al
ready have been generated by the ice agent since the offer or answer represented by the description was first instantiated.currentremotedescription
read only the
read-only property rtcpeerconnection.currentremotedescription returns an rtcsessiondescription object describing the remote end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
...And 11 more matches
Response - Web APIs
properties response.headers
read only the headers object associated with the response.
... response.ok
read only a boolean indicating whether the response was successful (status in the range 200–299) or not.
... response.redirected
read only indicates whether or not the response is the result of a redirect (that is, its url list has more than one entry).
...And 11 more matches
Signaling and video calling - Web APIs
readying the chat server for signaling our chat server uses the websocket api to send information as json strings between each client and the server.
...since the message has al
ready been stringified, we can send it with no further processing.
...each peer sends candidates in the order they're discovered, and keeps sending candidates until it runs out of suggestions, even if media has al
ready started streaming.
...And 11 more matches
WorkerNavigator - Web APIs
workernavigator.connection
read only provides a networkinformation object containing information about the network connection of a device.
... workernavigator.locks
read only returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
... workernavigator.permissions
read only returns a permissions object that can be used to query and update permission status of apis covered by the permissions api.
...And 11 more matches
How to convert an overlay extension to restartless - Archive of obsolete content
step 2a: load your jsm from chrome:// now with that preface out of the way, this part is easy: drop support for firefox 3.x if you haven't al
ready, move your jsm files to wherever you've got your chrome mapping to for your xul overlay and/or windows, import your files from that new chrome mapped path instead of the old resource one, and remove your "resource" line from your chrome.manifest file.
... if you need to
read data, or otherwise access files within your bundle, there are two options.
... the first is to use the nsizip
reader interface which permits continuing to use nsiinputstreams, etc.
...And 10 more matches
MMgc - Archive of obsolete content
it has a get method which returns the pointer to the original object, or null if that object has al
ready been destroyed.
...th
reading the gc routines are not currently th
read safe, we're operating under the assumption that none of the player spawned th
reads create gc'd things.
... if this isn't true we hope to eliminate other th
reads from doing this and if we can't do that we will be forced to make our gc th
read safe, although we hope we don't have to do that.
...And 10 more matches
Porting NSPR to Unix Platforms - Archive of obsolete content
porting instructions you can use different th
reading packages to implement nspr th
reads.
... nspr has a user-level th
reading library where th
read context switches are done by <tt>setjmp/longjmp</tt> or <tt>sigsetjmp/siglongjmp</tt>.
... this is called the local th
reads only version of classic nspr.
...And 10 more matches
XUL accessibility guidelines - Archive of obsolete content
many screen
reader users and those with physical disabilities rely on the keyboard as their primary input tool.
...navigation order may vary depending on the nature of the application or the
reading direction of the language.
...when creating an extension (for firefox or another xul application), make sure the keyboard shortcuts you assign do not interfere with those al
ready defined by the base application.
...And 10 more matches
CSS and JavaScript accessibility best practices - Learn web development
as an example, a screen
reader user can't navigate a page via heading elements if the developer hasn't appropriately used heading elements to markup the content.
...to make your text logical, legible, and comfortable to
read.
...your design might look cool, but it is no good if people with visual impairments like color blindness can't
read your content.
...And 10 more matches
Handling common JavaScript problems - Learn web development
if you are not al
ready familiar with the basics of troubleshooting javascript, you should study that article before moving on.
...you can
read what is "this"?
... to install it: install atom (if you haven't got an up-to-date version al
ready installed) — download it from the atom page linked above.
...And 10 more matches
How Mozilla's build system works
as the moz.build files are
read, data structures describing the overall build system definition are emitted.
... these data structures are then
read by a build backend generator, which then converts them into files, function calls, and so on.
...finished
reading 1096 moz.build files into 1276 descriptors in 2.40s backend executed in 2.39s 2188 total backend files.
...And 10 more matches
PR_Interrupt
sets the interrupt request for a target th
read.
... syntax #include <prth
read.h> prstatus pr_interrupt(prth
read *th
read); parameter pr_interrupt has the following parameter: th
read the th
read whose interrupt request you want to set.
... returns the function returns one of the following values: if the specified th
read is currently blocked, pr_success.
...And 10 more matches
GCIntegration - SpiderMonkey Redirect 1
at a high level, there are three issues to be aware of: interactions between the garbage collector and the cycle collector incremental garbage collection moving garbage collection the apis for gc/cc interaction and incremental gc are al
ready in place.
... {{ svg{source: "http://people.mozilla.org/~wmccloskey/incremental1.svg", embedding: "iframe", height:"130"} }} assume object b is al
ready marked, as in the leftmost frame, while objects a and c have not been marked yet.
... if a pointer is not traced via js_call_tracer or any similar mechanism, then there's no need for a write barrier (although see below about
read barriers).
...And 10 more matches
Hacking Tips
this unwinder is able to
read the frames created by the jit, and to display the frames which are after these jit frames.
...ssue you can use the recording feature of gdb, to step one instruction, and settle back to where you came from with the following set of gdb commands: (gdb) record full (gdb) si (gdb) record goto 0 (gdb) record stop if you have a core file, you can use the gdb unwinder the same way, or do everything from the command line as follow: $ gdb -ex 'enable unwinder .* spidermonkey' -ex 'bt 0' -ex 'th
read apply all backtrace' -ex 'quit' out/dist/bin/js corefile the gdb unwinder is supposed to be loaded by dist/bin/js-gdb.py and load python scripts which are located in js/src/gdb/mozilla under gdb.
... step next a few times, so that the "code" variable gets generated print code->code_, which is the address of the code disassembly code
read at this address (using x/ni address, where n is the number of instructions you would like to see) here is an example.
...And 10 more matches
JSAPI reference
sapi 30 js_getoperationcallback obsolete since jsapi 30 js_triggeroperationcallback obsolete since jsapi 30 js_clearoperationcallback obsolete since javascript 1.9.1 js_getoperationlimit obsolete since javascript 1.9.1 js_setoperationlimit obsolete since javascript 1.9.1 js_max_operation_limit obsolete since javascript 1.9.1 js_operation_weight_base obsolete since javascript 1.9.1 js_setth
readstacklimit obsolete since jsapi 13 js_setscriptstackquota obsolete since javascript 1.8.6 js_setoptions obsolete since jsapi 27 js_getoptions obsolete since jsapi 27 js_toggleoptions obsolete since jsapi 27 enum jsversion jsversion_ecma_3 jsversion_1_6 jsversion_1_7 jsversion_1_8 jsversion_ecma_5 jsversion_default jsversion_unknown jsversion_latest js_g...
...since jsapi 18 locale callbacks: struct jslocalecallbacks js_getlocalecallbacks js_setlocalecallbacks locale callback types: jslocaletouppercase jslocaletolowercase jslocalecompare jslocaletounicode scripts just running some javascript code is straightforward: class js::compileoptions added in spidermonkey 17 class js::owningcompileoptions added in spidermonkey 31 class js::
readonlycompileoptions added in spidermonkey 31 class js::sourcebufferholder added in spidermonkey 31 js::evaluate added in spidermonkey 17 js_evaluatescript obsolete since jsapi 36 js_evaluateucscript obsolete since jsapi 36 js_evaluatescriptforprincipals obsolete since jsapi 30 js_evaluateucscriptforprincipals obsolete since jsapi 30 js_evaluatescriptforprincipalsversion obsolete since jsa...
... class jsscript js::compile added in spidermonkey 17 js::compileoffth
read added in spidermonkey 31 js::cancompileoffth
read added in spidermonkey 31 js::finishoffth
readscript added in spidermonkey 31 js_compilescript js_compileucscript js_bufferiscompilableunit js_executescript js::cloneandexecutescript added in spidermonkey 31 js_decompilescript js_executescriptversion obsolete since jsapi 36 js_compileutf8file added in spidermonkey 11 obsolete since jsapi 19 js_compileutf8filehandle added in spidermonkey 11 obsolete since jsapi 19 js_compileutf8filehandleforprincipals added in spidermonkey 11 obsolete sin...
...And 10 more matches
Mozilla internal string guide
common
read-only methods: .length() - the number of code units (bytes for 8-bit string classes and char16_ts for 16-bit string classes) in the string.
...
read-only strings the const attribute on a string determines if the string is writable.
... iterators because mozilla strings are always a single buffer, iteration over the characters in the string is done using raw pointers: /** * find whether there is a tab character in `data` */ bool hastab(const nsastring& data) { const char16_t* cur = data.begin
reading(); const char16_t* end = data.end
reading(); for (; cur < end; ++cur) { if (char16_t('\t') == *cur) return true; } return false; } note that `end` points to the character after the end of the string buffer.
...And 10 more matches
nsIAccessNode
read only.
...
read only.
...
read only.
...And 10 more matches
Event - Web APIs
properties event.bubbles
read only a boolean indicating whether or not the event bubbles up through the dom.
... event.cancelable
read only a boolean indicating whether the event is cancelable.
... event.composed
read only a boolean indicating whether or not the event can bubble across the boundary between the shadow dom and the regular dom.
...And 10 more matches
Using files from web applications - Web APIs
using the file api, which was added to the dom in html5, it's now possible for web content to ask the user to select local files and then
read the contents of those files.
... name the file's name as a
read-only string.
... size the size of the file in bytes as a
read-only 64-bit integer.
...And 10 more matches
IDBIndex - Web APIs
properties idbindex.isautolocale
read only returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) idbindex.locale
read only returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) idbindex.name the name of this index.
... idbindex.objectstore
read only the name of the object store referenced by this index.
... idbindex.keypath
read only the key path of this index.
...And 10 more matches
WorkerLocation - Web APIs
properties the workerlocation interface doesn't inherit any property, but implements properties defined in the urlutils
readonly interface.
... urlutils
readonly.href
read only is a stringifier that returns a domstring containing the whole url of the script executed in the worker.
... urlutils
readonly.protocol
read only is a domstring containing the protocol scheme of the url of the script executed in the worker, including the final ':'.
...And 10 more matches
ARIA: document role - Accessibility
generally used in complex composite widgets or applications, the document role can inform assistive technologies to switch context to a
reading mode: the document role tells assistive technologies with
reading or browse modes to use the document mode to
read the content contained within this element.
... <button>close</button> </div> this example shows a dialog widget with some controls and a section with some informational text that the assistive technology user can
read when tabbing to it.
... description by default, web pages are treated as documents; assistive technologies (at) enter browse or
read mode when entering a new web page.
...And 10 more matches
Accessibility documentation index - Accessibility
it supplements html so that interactions and widgets commonly used in applications can be passed to assistive technologies 3 aria screen
reader implementors guide aria, accessibility this is just a guide.
...the following is intended to provide implementation guidance that respects screen
readers developers' need to try different things.
... the intention is to strike a balance between providing useful guidance on how to use the markup's intended meaning while supporting live regions as an area for screen
readers to innovate and compete.
...And 10 more matches
WAI ARIA Live Regions/API Support - Developer guides
these notes are for developers of screen
readers.
...these features will help screen
reader developers improve the quality and performance of live region support, both for pages that are marked up with aria live region markup, and for pages where the author did not add any additional markup.
... please
read the aria spec or the live region report to learn about aria live region markup.
...And 10 more matches
JavaScript Daemons Management - Archive of obsolete content
text.constructor = object; /* these properties can be manually reconfigured after the creation of the daemon */ daemon.prototype.owner = daemon.context; daemon.prototype.task = null; daemon.prototype.rate = 100; daemon.prototype.length = infinity; daemon.prototype.reversals = 0; daemon.prototype.onstart = null; daemon.prototype.onstop = null; /* these properties should be
read-only after the creation of the daemon */ daemon.prototype.session = -1; daemon.prototype.index = 0; daemon.prototype.paused = true; daemon.prototype.backw = true; /* system required daemon global object methods */ daemon.forcecall = function (odmn) { odmn.index += odmn.backw ?
...onstart.call(this.owner, this.index, this.length, this.backw); } this.synchronize(); return true; }; daemon.prototype.stop = function () { this.pause(); if (this.onstop) { this.onstop.call(this.owner, this.index, this.length, this.backw); } delete this.index; delete this.backw; delete this.reversals; }; /******************************* * daemon is now
ready!
...n; } cleartimeout(this.session); this.session = settimeout(daemon.safe.forcecall, this.rate, this); }; daemon.safe.prototype.pause = function () { cleartimeout(this.session); this.paused = true; }; /* system not required daemon.safe instances methods */ /* [inherited from daemon.prototype] */ /**************************************** * the safe-daemon is now
ready!
...And 9 more matches
Creating a Microsummary - Archive of obsolete content
in this tutorial we're going to create a microsummary generator for the sp
read firefox home page that displays the current firefox download count along with the label fx downloads; for example: 174475447 fx downloads.
... note: if you are a web site developer, and you want to create microsummaries for pages on your site, you can write generators to do so, but a simpler and more efficient approach is to create the microsummaries on the server-side using the same tools and languages you al
ready use to generate pages.
...but for the purposes of generating a microsummary for the sp
read firefox page, we only need to use a single <template> element that matches the root node of the document and is processed once: <?xml version="1.0" encoding="utf-8"?> <generator xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <tem...
...And 9 more matches
Index - Archive of obsolete content
underlined text may be
read by the screen
reader.
... 307
readonly xul attributes, xul reference no summary!
... 407 un
read xul, xul attributes, xul reference no summary!
...And 9 more matches
NPP_NewStream - Archive of obsolete content
stream supports random access through calls to npn_request
read (for example, local files or http servers that support byte-range requests).
...the browser must copy data in the stream to the local cache to satisfy random access requests made through npn_request
read.
... np_normal (default): delivers stream data to the instance in a series of calls to npp_write
ready and npp_write.
...And 9 more matches
Anatomy of a video game - Game development
before we discuss ways to change it, let us discuss what it al
ready does well.
... modern versions of firefox and google chrome (and probably others) attempt to connect requestanimationframe callbacks to their main th
read at the very beginning of a frame's timeslice.
... the browser's main th
read thus tries to look like the following: start a new frame (while the previous frame is handled by the display).
...And 9 more matches
Getting started with React - Learn web development
of course, your browser can't
read jsx without help.
...in doing this, however, you lose the declarative benefit of jsx, and your code becomes harder to
read.
... compilation is an extra step in the development process, but many developers in the react community think that the
readability of jsx is worthwhile.
...And 9 more matches
Working with Svelte stores - Learn web development
code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/06-stores or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/06-stores remember to run npm install && npm run dev to start your app in development mode.
... repl to code along with us using the repl, start at https://svelte.dev/repl/d1fa84a5a4494366b179c87395940039?version=3.23.2 dealing with our app state we have al
ready seen how our components can communicate with each other using props, two-way data binding, and events.
...if you’ve al
ready worked with redux or vuex, then you'll be familiar with how this kind of store works.
...And 9 more matches
Mozilla accessibility architecture
accessibility apis are used by 3rd party software like screen
readers, screen magnifiers, and voice dictation software, which need information about document content and ui controls, as well as important events like changes of focus.
...you may also wish to
read gecko info for windows accessibility vendors, a primer for vendors of 3rd party accessibility software, on how msaa clients can utilize gecko's support.
...
readers of this document should be familiar with interfaces, the w3c dom, xul and the concept of a layout object tree.
...And 9 more matches
Application Translation with Mercurial
check what is available for translation find out on which branch localization is done for your locale:
read your localization team's page by clicking on the team with your language code (e.g.
... thunderbird and tb-* denote branches of thunderbird, the mail client, newsgroup and feed
reader and chat client.
...
read the text next to it.
...And 9 more matches
Nonblocking IO In NSPR
a th
read invoking an io function is blocked until the io operation is finished.
... the blocking io model encourages the use of multiple th
reads as a programming model.
... a th
read is typically created to attend to one of the simultaneous i/o operations that may potentially block.
...And 9 more matches
PR_Wait
the monitor object referenced must be one for which the calling th
read currently holds the lock.
... ticks the amount of time (in printervaltime units) that the th
read is willing to wait for an explicit notification before being rescheduled.
... returns the function returns one of the following values: pr_success means the th
read is being resumed from the pr_wait call either because it was explicitly notified or because the time specified by the parameter ticks has expired.
...And 9 more matches
sslerr.html
ssl_error_bad_mac_
read -12273 "ssl received a record with an incorrect message authentication code." this usually indicates that the client and server have failed to come to agreement on the set of keys used to encrypt the application data and to check message integrity.
... sec_error_duplicate_cert -8170 certificate al
ready exists in your database.
... sec_error_duplicate_cert_name -8169 downloaded certificate's name duplicates one al
ready in your database.
...And 9 more matches
nsIBoxObject
obsolete since gecko 1.9 wstring getproperty(in wstring propertyname); nsisupports getpropertyassupports(in wstring propertyname); void removeproperty(in wstring propertyname); void setproperty(in wstring propertyname, in wstring propertyvalue); void setpropertyassupports(in wstring propertyname, in nsisupports value); attributes attribute type description element nsidomelement
read only.
...
read only.
...
read only.
...And 9 more matches
nsIDOMNode
ttributes(); boolean haschildnodes(); nsidomnode insertbefore(in nsidomnode newchild, in nsidomnode refchild) boolean issupported(in domstring feature, in domstring version); void normalize(); nsidomnode removechild(in nsidomnode oldchild) nsidomnode replacechild(in nsidomnode newchild, in nsidomnode oldchild) attributes attribute type description attributes nsidomnamednodemap
read only.
... childnodes nsidomnodelist
read only.
... firstchild nsidomnode
read only.
...And 9 more matches
nsIDOMWindow
read only.
...
read only.
...
read only.
...And 9 more matches
nsIEventTarget
xpcom/th
reads/nsieventtarget.idlscriptable a target for events.
... events may be sent to this target from any th
read by calling the dispatch method.
... implement this interface in order to support receiving events from other th
reads.
...And 9 more matches
nsIPipe
xpcom/io/nsipipe.idlscriptable this interface represents an in-process buffer that can be
read using nsiinputstream and written using nsioutputstream.
...
read only.
...
read only.
...And 9 more matches
nsITreeColumn
read only.
...
read only.
...
read only.
...And 9 more matches
DevTools API - Firefox Developer Tools
toolbox-
ready(toolbox) a new toolbox has been created and is
ready to use.
... {toolid}-
ready(toolbox, panel) a tool with the given id has finished its initialization and is
ready to be used.
... getpanelwhen
ready(toolid) similar to getpanel() but waits for the tool to load first.
...And 9 more matches
AddressErrors - Web APIs
the contents of the string provide a human-
readable explanation of the validation failure, and ideally suggestions to correct the problem.
...the contents of the string provide a human-
readable explanation of the validation failure, and ideally suggestions to correct the problem.
...the contents of the string provide a human-
readable explanation of the validation failure, and ideally suggestions to correct the problem.
...And 9 more matches
HTMLElement - Web APIs
htmlelement.accesskeylabel
read only returns a domstring containing the element's assigned access key.
... htmlelement.iscontenteditable
read only returns a boolean that indicates whether or not the content of the element can be edited.
... htmlorforeignelement.dataset
read only returns a domstringmap with which script can
read and write the element's custom data attributes (data-*) .
...And 9 more matches
In depth: Microtasks and the JavaScript runtime environment - Web APIs
that's what this section covers introduction javascript is an inherently single-th
readed language.
...to support this, it was necessary to find ways to allow for projects to escape the limitations of a single-th
readed language.
... starting with the addition of timeouts and intervals as part of the web api (settimeout() and setinterval()), the javascript environment provided by web browsers has gradually advanced to include powerful features that enable scheduling of tasks, multi-th
readed application development, and so forth.
...And 9 more matches
PaymentAddress - Web APIs
properties paymentaddress.addressline
read only an array of domstring objects providing each line of the address not included among the other properties.
... paymentaddress.country
read only a domstring specifying the country in which the address is located, using the iso-3166-1 alpha-2 standard.
... paymentaddress.city
read only a domstring which contains the city or town portion of the address.
...And 9 more matches
Request - Web APIs
properties request.cache
read only contains the cache mode of the request (e.g., default, reload, no-cache).
... request.context
read only contains the context of the request (e.g., audio, image, iframe, etc.) request.credentials
read only contains the credentials of the request (e.g., omit, same-origin, include).
... request.destination
read only returns a string from the requestdestination enum describing the request's destination.
...And 9 more matches
SVGFEConvolveMatrixElement - Web APIs
svgfeconvolvematrixelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfeconvolvematrixelement.orderx
read only an svganimatedinteger corresponding to the order attribute of the given element.
... svgfeconvolvematrixelement.ordery
read only an svganimatedinteger corresponding to the order attribute of the given element.
...And 9 more matches
SecurityPolicyViolationEvent - Web APIs
properties securitypolicyviolationevent.blockeduri
read only a usvstring representing the uri of the resource that was blocked because it violates a policy.
... securitypolicyviolationevent.columnnumber
read only the column number in the document or worker at which the violation occurred.
... securitypolicyviolationevent.disposition
read only indicates how the violated policy is configured to be treated by the user agent.
...And 9 more matches
TextMetrics - Web APIs
properties textmetrics.width
read only is a double giving the calculated width of a segment of inline text in css pixels.
... textmetrics.actualboundingboxleft
read only is a double giving the distance from the alignment point given by the canvasrenderingcontext2d.textalign property to the left side of the bounding rectangle of the given text, in css pixels.
... textmetrics.actualboundingboxright
read only is a double giving the distance from the alignment point given by the canvasrenderingcontext2d.textalign property to the right side of the bounding rectangle of the given text, in css pixels.
...And 9 more matches
Touch - Web APIs
basic properties touch.identifier
read only returns a unique identifier for this touch object.
... touch.screenx
read only returns the x coordinate of the touch point relative to the left edge of the screen.
... touch.screeny
read only returns the y coordinate of the touch point relative to the top edge of the screen.
...And 9 more matches
Getting Started - Developer guides
at this stage, you need to tell the xmlhttp request object which javascript function will handle the response, by setting the on
readystatechange property of the object and naming it after the function to call when the request changes state, like this: httprequest.on
readystatechange = nameofthefunction; note that there are no parentheses or parameters after the function name, because you're assigning a reference to the function, rather than actually calling it.
... alternatively, instead of giving a function name, you can use the javascript technique of defining functions on the fly (called "anonymous functions") to define the actions that will process the response, like this: httprequest.on
readystatechange = function(){ // process the server response here.
...for example, use the following before calling send() for form data sent as a query string: httprequest.setrequestheader('content-type', 'application/x-www-form-urlencoded'); step 2 – handling the server response when you sent the request, you provided the name of a javascript function to handle the response: httprequest.on
readystatechange = nameofthefunction; what should this function do?
...And 9 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
pattern password, text, tel pattern the value must match to be valid placeholder password, search, tel, text, url text that appears in the form control when it has no value set
readonly almost all boolean.
... warning: automatically focusing a form control can confuse visually-impaired people using screen-
reading technology and people with cognitive impairments.
... when autofocus is assigned, screen-
readers "teleport" their user to the form control without warning them beforehand.
...And 9 more matches
core/promise - Archive of obsolete content
flat chaining you can use then for chaining intermediate operations on promises (var data =
readasync().then(parse).then(extract)).
...it makes code easier to
read and make changes later: var data =
readasync(url).
... //
read content of url asynchronously then(parse).
...And 8 more matches
Enhanced Extension Installation - Archive of obsolete content
the composite datasource handles all
read-only information requests, and when data must be written the extension manager determines the appropriate datasource to write and flush to.
... the model looks something like this: nsextensionsdatasource.prototype = { _composite // the composite that manages the two // datasources at the install locations for //
read-only information requests _profileextensions // the rdf/xml datasource for the items at the // profile install location _globalextensions // the rdf/xml datasource for the items at the // global install location.
... since our needs and the needs of other applications may vary in the future, since we've al
ready effectively generalized the concept of an install location, we can make this set configurable by applications and extensions.
...And 8 more matches
Appendix D: Loading Scripts - Archive of obsolete content
speed: script tags may or may not be loaded from pre-compiled bytecode in the fastload cache (gecko 1.x) or startup cache (gecko 2), which means they don't necessarily need to
read as source and compiled with each restart.
... speed: even if these scripts are loaded from a cache, only
read and compile time are reduced.
...the script will be
read with the utf-8 encoding, based on the encoding of the overlay, and will execute as javascript version 1.8, based on the version specified in the script tag.
...And 8 more matches
JavaScript Client API - Archive of obsolete content
this document is somewhat outdated, and the api isn't well-supported for use from add-ons; t
read carefully.
... before starting before you start learning the javascript api, you should spend some time on http://docs.services.mozilla.com/
reading about how the sync service operates.
...this makes your synchronized data more secure and un
readable by the server operators.
...And 8 more matches
New Skin Notes - Archive of obsolete content
devmo has a new skin that is
ready for testing.
...there's no real reason for user to give him info that he al
ready visited xml main page.
...it looks odd when someone who uses devmo on regular basis sees some violet links just because he al
ready worked with this site yesterday.also, the current color for visited links makes them less visible.
...And 8 more matches
Running Tamarin acceptance tests - Archive of obsolete content
notes on using acceptance runtests.py th
reading in order to speed up the execution time of the acceptance testsuite, the runtests script automatically detects the number of cores on the machine and sets an equivalent number of th
reads.
... this can be overrided with the th
reads flag: python ./runtests.py --th
reads=3 th
reading on cygwin / windows due to an issue with cygwin python, th
reading does not work, and th
reads will always be set to 1.
... in order to use th
reading on windows you must install windows python and invoke runtests using that python executable in cygwin.
...And 8 more matches
Package management basics - Learn web development
a simple example of a useful dependency that your project might need is some code to calculate relative dates as human-
readable text.
... you could certainly code this yourself, but there's a strong chance that someone else has al
ready solved this problem — why waste time reinventing the wheel?
... a project dependency can be an entire javascript library or framework — such as react or vue — or a very small utility like our human-
readable date library, or it can be a command line tool such as prettier or eslint, which we talked about in previous articles.
...And 8 more matches
CSUN Firefox Materials
" -- darren paskell, from window-eyes beta testing list firefox works with popular screen
readers, with the best support currently coming from gw micro's window-eyes 5.5.
...in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadblocks in moving to firefox from internet explorer for screen
reader users.
...mozilla corporation is currently reaching out to work with ai squared, the makers of zoomtext, in order to enable complete support of advanced zoomtext features such as the doc
reader and app
reader.
...And 8 more matches
JNI.jsm
a note about firefox for android, this jsm file is al
ready globally imported and is available from the privileged window scope as window.jni.
... method overview cdata getforth
read(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string
readstring(cdata ajenv, cdata ajavastring); void unloadclasses(); methods getforth
read() blah blah cdata getforth
read(); parameters this function does not take any arguments.
... return value blah blah loadclass() blah blah cdata loadclass( ajenv, afullyqualifiedname, [optional] object adeclares ); parameters ajenv the return value of getforth
read().
...And 8 more matches
OSFile.jsm
javascript module os.file contains primitives for manipulating files out of the main th
read.
... os.file is a new api designed for efficient, off-main th
read, manipulation of files by privileged javascript code.
... why is off main th
read file i/o important?
...And 8 more matches
AsyncTestUtils extended framework
when i/o results in newly
read data it places an event in the queue.
... most of the things you will want to do al
ready have helper functions that take care of all of this, so all you need to do is pass their return values through.
... msgsperth
read: 1 how many messages should be in each th
read?
...And 8 more matches
Monitors
monitor type monitor functions with a mutex of type prlock, a single th
read may enter the monitor only once before it exits, and the mutex can have multiple associated condition variables.
... with a mutex of type prmonitor, a single th
read may re-enter a monitor as many times as it sees fit.
... the first time the th
read enters a monitor, it acquires the monitor's lock and the th
read's entry count is incremented to 1.
...And 8 more matches
extIApplication
method overview boolean quit() boolean restart() void getextensions(extiextensionscallback acallback) attributes the following interfaces are available to all applications: attribute type description id
readonly attribute astring the id of the application.
... name
readonly attribute astring the name of the application.
... version
readonly attribute astring the version number of the application.
...And 8 more matches
imgIContainer
read only.
...
read only.
...
read only.
...And 8 more matches
mozIStorageService
if the filename is al
ready taken, attempts will be made to ensure that it is unique.
...the specified file is created if it does not al
ready exist.
...consumers should check mozistorageconnection.connection
ready to ensure that they can use the database.
...And 8 more matches
nsIDOMEvent
read only.
...
read only.
...
read only.
...And 8 more matches
nsIDOMFontFace
read only.
...
read only.
...
read only.
...And 8 more matches
nsIDOMWindowUtils
read only.
...
read only.
...cannot be accessed from unprivileged context (not content-accessible)
read only.
...And 8 more matches
nsIMsgCloudFileProvider
ring aemailaddress, in acstring apassword, in acstring afirstname, in acstring alastname, in nsirequestobserver acallback); void createexistingaccount(in nsirequestobserver acallback); acstring providerurlforerror(in unsigned long aerror); attributes attribute type description type acstring
readonly: the type is a unique string identifier which can be used by interface elements for styling.
... displayname acstring
readonly: used for displaying the service name in the user interface.
... serviceurl acstring
readonly: a link to the homepage of the service, if applicable.
...And 8 more matches
Intensive JavaScript - Firefox Developer Tools
by default the browser uses a single th
read to run all the javascript in your page as well as to perform layout, reflows, and garbage collection.
... this means that long-running javascript functions can block the th
read, leading to an unresponsive page and a bad user experience.
...the first is to split long-running functions into pieces and use requestanimationframe to schedule each piece, and the second is to run the whole function in a separate th
read using a web worker.
...And 8 more matches
ValidityState - Web APIs
badinput
read only a boolean that is true if the user has provided input that the browser is unable to convert.
... customerror
read only a boolean indicating whether the element's custom validity message has been set to a non-empty string by calling the element's setcustomvalidity() method.
... patternmismatch
read only a boolean that is true if the value does not match the specified pattern, and false if it does match.
...And 8 more matches
Using XMLHttpRequest - Web APIs
note: starting with gecko 30.0 (firefox 30.0 / thunderbird 30.0 / seamonkey 2.27), synchronous requests on the main th
read have been deprecated due to the negative effects to the user experience.
...
read the article about html in xmlhttprequest to learn how to do this.
...the only case where you need an additional api is if you want to upload one or more files, where you use the file
reader api.
...And 8 more matches
ARIA: feed role - Accessibility
a feed enables screen
readers to use the browse mode
reading cursor to both
read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user
reads.
...the list establishes an interoperability contract between the web page and assistive technologies that governs scroll interactions so that assistive technology users can
read articles, jump forward and backward by article, and reliably trigger new articles to load while in
reading mode.
...implementing the feed pattern allows a screen
reader to reliably
read and trigger the loading of feed content while in
reading mode.
...And 8 more matches
page-mod - Archive of obsolete content
contentscriptoptions defines
read-only values accessible to content scripts.
... attachto controls whether to attach scripts to tabs that were al
ready open when the page-mod was created, and whether to attach scripts to iframes as well as the topmost document.
... for example, if you maintain a list of workers attached to a page-mod: var workers = []; var pagemod = require("sdk/page-mod").pagemod({ include: ['*'], contentscriptwhen: '
ready', contentscriptfile: data.url('pagemod.js'), onattach: function(worker) { workers.push(worker); } }); you can remove workers when they are no longer valid by listening to detach: var workers = []; function detachworker(worker, workerarray) { var index = workerarray.indexof(worker); if(index != -1) { workerarray.splice(index, 1); } } var pagemod = require("sdk/page-mod").p...
...And 7 more matches
widget - Archive of obsolete content
scripting trusted widget content we've al
ready seen that you can package html files in your add-on's data directory and use them to define the widget's content.
...widgets.widget({ id: "auto-update-widget", label: "widget that updates content on a timer", content: "0", contentscript: 'settimeout(function() {' + ' document.body.innerhtml++;' + '}, 2000)', contentscriptwhen: "
ready" }); // a widget created with a specified width, that grows.
...var widget = widgets.widget({ id: "message-test", label: "bi-directional communication!", content: "<foo>bar</foo>", contentscriptwhen: "
ready", contentscript: 'self.on("message", function(message) {' + ' alert("got message: " + message);' + '});' + 'self.postmessage("
ready");', onmessage: function(message) { if (message == "
ready") widget.postmessage("me too"); } }); globals constructors widget(options) creates a new widget.
...And 7 more matches
dev/panel - Archive of obsolete content
you can use the class utility function: const { panel } = require("dev/panel"); const { class } = require("sdk/core/heritage"); const mypanel = class({ extends: panel, label: "my panel", tooltip: "my new devtool", icon: "./my-devtool.png", url: "./my-devtool.html", setup: function(options) { // my setup goes here }, dispose: function() { // my teardown goes here }, on
ready: function() { // i can send messages to // the panel document here } }); alternatively, you can use the extend function: const { extend } = require("sdk/core/heritage"); function mypanel() {}; mypanel.prototype = extend(panel.prototype, { label: "my panel", tooltip: "...", ....
... optional on
ready function an event handler that will be called when the document in the panel becomes interactive.
... it's equivalent to document.
readystate === "interactive".
...And 7 more matches
io/byte-streams - Archive of obsolete content
experimental provides streams for
reading and writing bytes.
... function
readbinarydatafromfile (filename) { var fileio = require("sdk/io/file"); var data = null; if (fileio.exists(filename)) { var byte
reader = fileio.open(filename, "rb"); if (!byte
reader.closed) { data = byte
reader.
read(); byte
reader.close(); } } return data; } function writebinarydatatofile(data, filename) { var fileio = require("sdk/io/file"); var bytewriter = fileio.open(filename, "wb"); if (!bytewriter.closed) { bytewriter.write(data); bytewriter.close(); } } globals constructors byte
reader(inputstream) creates a binary input stream that
reads bytes from a backing stream.
... you can also create byte
reader objects using io/file's open() function.
...And 7 more matches
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
it doesn't matter whether a file at the specified path al
ready exists.
... nsilocalfile.is
readable() determines whether or not the file can be
read.
... listing 13:
reading the contents of a binary file file.initwithpath('c:\\temp\\temp.txt'); var filestream = components.classes['@mozilla.org/network/file-input-stream;1'] .createinstance(components.interfaces.nsifileinputstream); filestream.init(file, 1, 0, false); var binarystream = components.classes['@mozilla.org/binaryinputstream;1'] .createinstance(components.interfaces.n...
...And 7 more matches
Promises - Archive of obsolete content
request("login", { username: user, password: password }) .then(response => { if (response.messages) return publish({ username: user, messages: response.messages }); }) .then(null, (e) => { self.reporterror("publication failed", e); }); file io file io in add-ons should be done via the os.file api, which provides a simple, but powerful, interface for
reading, writing, and manipulating both text and binary files.
... it is also available for use off-main-th
read in workers as a synchronous api.
... let info = yield os.file.stat(configpath); if (info.lastmodificationdate <= timestamp) return; timestamp = info.lastmodificationdate; //
read the file as a utf-8 string, parse as json.
...And 7 more matches
Using gdb on wimpy computers - Archive of obsolete content
however, you need to make sure that the base libraries like libc and pth
reads are loaded before you tell gdb to stop loading shared libraries.
... if you don't allow those libraries to be loaded then gdb will not be able to properly debug th
reads on linux.
... mozilla uses pth
reads for its networking library so you need to be able to work in a th
readed environment.
...And 7 more matches
Elements - Archive of obsolete content
if supported, in strongly typed languages the bound element can be referenced not only as any of the interfaces that the element might al
ready support (e.g., htmlelement) but also as any of the interfaces described by this attribute.
...so full access to anonymous nodes generated by the binding is al
ready possible.
... field <!element field empty> <!attlist field id id #implied name cdata #required
readonly (true|false) #implied > a field is similar to a property, except that it should not have a getter or setter.
...And 7 more matches
Extentsions FAQ - Archive of obsolete content
read http://developer.mozilla.org/en/docs/extension_faq and check if there are any errors in js console.
... var tab = gbrowser.addtab( url ); // and if you want it to load in the foreground: gbrowser.selectedtab = tab; is it possible to
read the html-code of the current url/site?
... why does his extension not able to
read the contents of a folder and then produce a segmentation fault after his extension
reads preferences in thunderbird?
...And 7 more matches
Mobile accessibility - Learn web development
these days, mobile devices can usually handle fully-featured websites, and the main platforms even have screen
readers built in to enable visually impaired users to use them successfully.
... summary of screen
reader testing on android and ios the most common mobile platforms have fully functional screen
readers.
... these function in much the same way as desktop screen
readers, except they are largely operated using touch gestures rather than key combinations.
...And 7 more matches
Accessible multimedia - Learn web development
images, videos, <canvas> elements, flash movies, etc., aren't as easily understood by screen
readers or navigated by the keyboard, and we need to give them a helping hand.
... simple images we al
ready covered simple text alternatives for html images in our html: a good basis for accessibility article — you can refer back to there for the full details.
... in short, you should ensure that where possible visual content has an alternative text available for screen
readers to pick up and
read to their users.
...And 7 more matches
Creating hyperlinks - Learn web development
inside the html body, add one or more paragraphs or other types of content you al
ready know about.
...we need to make our links accessible to all
readers, regardless of their current context and which tools they prefer.
... for example: screen
reader users like jumping around from link to link on the page, and
reading links out of context.
...And 7 more matches
Componentizing our React app - Learn web development
go back to src/app.js, copy the first <li> from inside the unordered list, and paste it into todo.js so that it
reads like this: export default function todo() { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> eat </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edit <span class...
...your <ul> should
read like this: <ul role="list" classname="todo-list stack-large stack-exception" aria-labelledby="list-heading" > <todo /> <todo /> <todo /> </ul> when you look back at your browser, you'll notice something unfortunate: your list now repeats the first task three times!
... putting all that together, your todo() function should
read like this: export default function todo(props) { return ( <li classname="todo stack-small"> <div classname="c-cb"> <input id="todo-0" type="checkbox" defaultchecked={true} /> <label classname="todo-label" htmlfor="todo-0"> {props.name} </label> </div> <div classname="btn-group"> <button type="button" classname="btn"> edi...
...And 7 more matches
TypeScript support in Svelte - Learn web development
code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/07-typescript-support or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/07-typescript-support remember to run npm install && npm run dev to start your app in development mode.
...thanks to the hard work of the svelte team, together with many contributors, we have an official solution
ready to be put to the test.
...
readability: static typing gives the code more structure, making it self-documenting and more
readable.
...And 7 more matches
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/05-advanced-concepts or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/05-advanced-concepts remember to run npm install && npm run dev to start your app in development mode.
... like we al
ready saw, we could just tell svelte to update the variable with a self-assignment, like this: const checkalltodos = (completed) => { todos.foreach(t => t.completed = completed) todos = todos } this will solve the problem.
...the function returns a copy of each todo using sp
read syntax and overwrites the property of the completed value accordingly.
...And 7 more matches
Dynamic behavior in Svelte: working with variables and props - Learn web development
previous overview: client-side javascript frameworks next now that we have our markup and styles
ready we can start developing the required features for our svelte to-do list app.
... code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/03-adding-dynamic-behavior or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/03-adding-dynamic-behavior remember to run npm install && npm run dev to start your app in development mode.
... we've turned our static markup into a dynamic template
ready to display the tasks from our component's state.
...And 7 more matches
Accessibility Features in Firefox
at my next opportunity, i intend to convert my family over to it too." darren paskell, from window-eyes beta testing list firefox works with popular screen
readers, with the best support currently coming from gw micro's window-eyes 5.5.
...in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadblocks in moving to firefox from internet explorer for screen
reader users.
...mozilla corporation is currently reaching out to work with ai squared, the makers of zoomtext, in order to enable complete support of advanced zoomtext features such as the doc
reader and app
reader.
...And 7 more matches
Software accessibility: Where are we today?
these applications assumed that computer users could:
read and react to text and images displayed on the screen.
...some examples of these assistive devices and software include: screen
reading software, which speaks text displayed on the screen using hardware or software text-to-speech, and which allows a blind person to use the keyboard to simulate mouse actions alternate input devices, which allow people with physical disabilities to use alternatives to a keyboard and mouse voice recognition software, which allows a person to simulate typing on a keyboard or selecting with a m...
...ouse by speaking into the computer screen magnification software, which allows a low-vision computer user to more easily
read portions of the screen comprehension software, which allows a dyslexic or learning disabled computer user to see and hear text as it is manipulated on the computer screen in fact, the entire adaptive technology industry has grown up around these issues.
...And 7 more matches
MozScrolledAreaChanged
note: while you can poll the values of document.scrollwidth and document.scrollheight to watch for changes to the document size,
reading these properties can trigger document reflow, which can make them computationally expensive.
... specification mozilla specific interface uievent bubbles yes cancelable yes target defaultview, document default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
...And 7 more matches
NetUtil.jsm
method overview nsiasyncstreamcopier asynccopy(nsiinputstream asource, nsioutputstream asink, [optional] acallback) void asyncfetch(asource, acallback) nsichannel newchannel(awhattoload, [optional] aorigincharset, [optional] nsiuri abaseuri) nsiuri newuri(atarget, [optional] aorigincharset, [optional] nsiuri abaseuri) string
readinputstreamtostring(ainputstream, acount, aoptions) attributes attribute type description ioservice nsiioservice returns a reference to nsiioservice.
... nsiasyncstreamcopier asynccopy( asource, asink, acallback ); parameters asource the input stream from which to
read the source data.
...}); remarks note: if you specify an nsichannel as the input source, and its notification callbacks have al
ready been set, callers are responsible for implementing nsibadcertlistener and nsisslerrorlistener.
...And 7 more matches
L20n Javascript API
you can listen to the
ready event (emitted by the context instance when all the resources have been compiled) and use ctx.getsync and ctx.getentitysync to get translations synchronously.
... alternatively, you can register callbacks to execute when the context is
ready (or when globals change and translations need to be updated) with ctx.localize.
...this array (with defaultlocale appended to it if it is not al
ready present) will be used to negotiate the fallback chain for the user.
...And 7 more matches
JSS Provider Notes
in order to use a different token, use cryptomanager.setth
readtoken().
... this sets the token to be used by the jss jca provider in the current th
read.
... when you call getinstance() on a jca class, the jss provider checks the current per-th
read default token (by calling cryptomanager.getth
readtoken()) and instructs the new object to use that token for cryptographic operations.
...And 7 more matches
Mozilla-JSS JCA Provider notes
in order to use a different token, use cryptomanager.setth
readtoken().
... this sets the token to be used by the jss jca provider in the current th
read.
... when you call getinstance() on a jca class, the jss provider checks the current per-th
read default token (by calling cryptomanager.getth
readtoken()) and instructs the new object to use that token for cryptographic operations.
...And 7 more matches
NSS_3.12_release_notes.html
nment statements in ec_gf2m_pt_mul_mont bug 349011: please stop exporting these crmf_ symbols bug 397178: crash when entering chrome://pippki/content/resetpassword.xul in url bar bug 403822: pkix_pl_ocsprequest_create can leave some members uninitialized bug 403910: cert_findusercertbyusage() returns wrong certificate if multiple certs with same subject available bug 404919: memory leak in sftkdb_
readsecmoddb() (sftkmod.c) bug 406120: allow application to specify ocsp timeout bug 361025: support for camellia cipher suites to tls rfc4132 bug 376417: pk11_generatekeypair needs to get the key usage from the caller.
...bug 357015: on windows,
readsystemfiles
reads 21 files as opposed to 10 files in c:\windows\system32.
... bug 361076: clean up the use_pth
reads related code in coreconf/sunos5.mk.
...And 7 more matches
Rhino shell
-f script-filename-or-url
reads script-filename-or-url content and execute it as a javascript script.
...if multiple arguments are given, each file is
read in and executed in turn.
...
readfile(path [, charactercoding])
read given file and convert its bytes to a string using the specified character coding or default character coding if explicit coding argument is not given.
...And 7 more matches
nsIAccessibleRetrieval
create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it al
ready exists.
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it al
ready exists.
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it al
ready exists.
...And 7 more matches
nsIAccessibleTable
read only.
...
read only.
... note: renamed from columns in gecko 1.9.2 columnheader nsiaccessibletable
read only.
...And 7 more matches
nsICRLInfo
read only.
...
read only.
... lastupdatelocale astring lastupdate formatted as a human
readable string formatted according to the environment locale.
...And 7 more matches
nsINavHistoryContainerResultNode
read only.
... children
readonly boolean false if the node's list of children can be modified (by adding or removing children, or rearranging them), or true if the user interface should not allow the list of children to be altered.
...
read-only.
...And 7 more matches
nsINavHistoryQuery
gettransitions([optional] out unsigned long count, [retval,array,size_is(count)] out unsigned long transitions); void setfolders([const,array, size_is(foldercount)] in long long folders, in unsigned long foldercount); void settransitions([const,array, size_is(count)] in unsigned long transitions, in unsigned long count); attributes attribute type description absolutebegintime prtime
read only: retrieves the begin time value that the currently loaded reference points + offset resolve to.
... absoluteendtime prtime
read only: retrieves the end time value that the currently loaded reference points + offset resolve to.
... foldercount long
read only: count of folders.
...And 7 more matches
nsIProcess
xpcom/th
reads/nsiprocess.idlscriptable this interface represents an executable process.
...
read only.
...
read only.
...And 7 more matches
nsIScriptError
read only.
...
read only.
...
read only.
...And 7 more matches
Storage
synchronously if you are ok with the possibility of locking up your user interface, or if you are running on a background th
read, you can use mozistoragestatement.executestep().
... warning: if you fail to reset a write statement, it will continue to hold a lock on the database preventing future writes or
reads.
... additionally, if you fail to reset a
read statement, it will prevent any future writes to the database.
...And 7 more matches
Index
if the user al
ready has an email account, the user can switch to the original account setup wizard.
... 20 db views (message lists) mailnews, thunderbird the th
read pane (aka message list) is driven by classes that implement nsimsgdbview and inherit from nsmsgdbview.
... 29 gloda debugging the gloda code has log4moz logging statements sp
read throughout.
...And 7 more matches
CData
read only.
...
readstring() converts a character array to a javascript string.
... string
readstring(); parameters none.
...And 7 more matches
BluetoothCharacteristicProperties - Web APIs
properties authenticatedsignedwrites
read only returns a boolean that is true if signed writing to the characteristic value is permitted.
... broadcast
read only returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
... indicate
read only returns a boolean that is true if indications of the characteristic value with acknowledgement is permitted.
...And 7 more matches
DOMRect - Web APIs
it inherits from its parent, domrect
readonly.
... <div id="interfacediagram" style="display: inline-block; position: relative; width: 100%; padding-bottom: 11.666666666666666%; vertical-align: middle; overflow: hidden;"><svg style="display: inline-block; position: absolute; top: 0; left: 0;" viewbox="-50 0 600 70" preserveaspectratio="xminymin meet"><a xlink:href="/docs/web/api/domrect
readonly" target="_top"><rect x="1" y="1" width="150" height="50" fill="#fff" stroke="#d4dde4" stroke-width="2px" /><text x="76" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">domrect
readonly</text></a><polyline points="151,25 161,20 161,30 151,25" stroke="#d4dde4" fill="none"/><line x1="161" y1="25" x2="191" y2="25" stroke="#d4dde4"/><a xlink:href="/docs/web/a...
... properties domrect inherits properties from its parent, domrect
readonly.
...And 7 more matches
File - Web APIs
in particular, file
reader, url.createobjecturl(), createimagebitmap(), and xmlhttprequest.send() accept both blobs and files.
... instance properties file.prototype.lastmodified
read only returns the last modified time of the file, in millisecond since the unix epoch (january 1st, 1970 at midnight).
... file.prototype.lastmodifieddate
read only returns the last modified date of the file referenced by the file object.
...And 7 more matches
HTMLImageElement - Web APIs
htmlimageelement.complete
read only returns a boolean that is true if the browser has finished fetching the image, whether successful or not.
... htmlimageelement.currentsrc
read only returns a usvstring representing the url from which the currently displayed image was loaded.
...
read the decoding page for details on the implications of this property's values.
...And 7 more matches
HTMLVideoElement - Web APIs
htmlvideoelement.videoheight
read only returns an unsigned integer value indicating the intrinsic height of the resource in css pixels, or 0 if no media is available yet.
... htmlvideoelement.videowidth
read only returns an unsigned integer value indicating the intrinsic width of the resource in css pixels, or 0 if no media is available yet.
... gecko-specific properties htmlvideoelement.mozparsedframes
read only returns an unsigned long with the count of video frames that have been parsed from the media resource.
...And 7 more matches
LockManager.request() - Web APIs
this shared/exclusive lock pattern is common in database transaction architecture, for example to allow multiple simultaneous
readers (each requests a "shared" lock) but only one writer (a single "exclusive" lock).
... this is known as the
readers-writer pattern.
... in the indexeddb api, this is exposed as "
readonly" and "
readwrite" transactions which have the same semantics.
...And 7 more matches
ServiceWorkerRegistration - Web APIs
serviceworkerregistration.scope
read only returns a unique identifier for a service worker registration.
... serviceworkerregistration.installing
read only returns a service worker whose state is installing.
... serviceworkerregistration.waiting
read only returns a service worker whose state is installed.
...And 7 more matches
Using Service Workers - Web APIs
read jake archibald's (unfortunately-titled but well-written) application cache is a douchebag for more details.
...this is al
ready available with native apps, which is one of the main reasons native apps are often chosen over web apps.
... if successful, the service worker is executed in a serviceworkerglobalscope; this is basically a special kind of worker context, running off the main script execution th
read, with no dom access.
...And 7 more matches
TextEncoder.prototype.encodeInto() - Web APIs
return value a textencoderencodeintoresult dictionary, which contains two members:
read the number of utf-16 units of code from the source that has been converted over to utf-8.
...if the
read item it the return dictionary is s.length, the conversion is done.
... if not, reallocate the target buffer to written + (s.length -
read) * 3 and then convert the rest by taking a substring of s starting from index
read and a subbuffer of the target buffer starting from index written.
...And 7 more matches
UIEvent - Web APIs
uievent.detail
read only returns a long with details about the event, depending on the event type.
... uievent.ischar
read only returns a boolean indicating whether the event produced a key character or not.
... uievent.layerx
read only returns the horizontal coordinate of the event relative to the current layer.
...And 7 more matches
Writing WebSocket servers - Web APIs
this article assumes you're al
ready familiar with how http works, and that you have a moderate level of programming experience.
... note:
read the latest official websockets specification, rfc 6455.
...in many common setups, a reverse proxy has al
ready dealt with them.
...And 7 more matches
Window.open() - Web APIs
=yes,status=yes"; function openrequestedpopup() { windowobjectreference = window.open("http://www.cnn.com/", "cnn_windowname", windowfeatures); } var windowobjectreference; function openrequestedpopup() { windowobjectreference = window.open( "http://www.domainname.ext/path/imagefile.png", "descriptivewindowname", "resizable,scrollbars,status" ); } if a window with the name al
ready exists, then url is loaded into the existing window.
... best practices <script type="text/javascript"> var windowobjectreference = null; // global variable function openffpromotionpopup() { if(windowobjectreference == null || windowobjectreference.closed) /* if the pointer to the window object in memory does not exist or if such pointer exists but the window was closed */ { windowobjectreference = window.open("http://www.sp
readfirefox.com/", "promotefirefoxwindowname", "resizable,scrollbars,status"); /* then create it.
...*/ }; } </script> (...) <p><a href="http://www.sp
readfirefox.com/" target="promotefirefoxwindowname" onclick="openffpromotionpopup(); return false;" title="this link will create a new window or will re-use an al
ready opened one" >promote firefox adoption</a></p> the above code solves a few usability problems related to links opening secondary window.
...And 7 more matches
ARIA live regions - Accessibility
aria-live: the aria-live=politeness_setting is used to set the priority with which screen
reader should treat updates to live regions - the possible settings are: off, polite or assertive.
...the screen
reader will speak changes whenever the user is idle.
...because the live region has aria-live="polite", the screen
reader will wait until the user pauses before announcing the update.
...And 7 more matches
ARIA: listbox role - Accessibility
when a list is tabbed to, the first item in the list will be selected if nothing else al
ready is.
... when the listbox role is added to an element, or such an element becomes visible, screen
readers announce the label and role of the listbox when it gets focus.
... if an option or item is focused within the list, it gets announced next, followed by an indication of the item's position with the list if the screen
reader supports this.
...And 7 more matches
Navigation and resource timings - Web Performance
both provide the same
read-only properties, but navigation timing measures the main document's timings whereas the resource timing provides the times for all the assets or resources called in by that main document and the resources' requested resources.
... the performance timing api provided
read only times, in milliseconds(ms), describing at what time each point in the page loading process was reached.
... to help measure the time it takes to complete all the steps, the performance timing api provides
read only measurements of navigation timings.
...And 7 more matches
Optimizing startup performance - Web Performance
that means not running all your startup code in a single event handler on the app's main th
read.
... instead, you should write your code so that your app creates a web worker that does as much as possible in a background th
read (for example, fetching and processing data.) then, anything that must be done on the main th
read (such as user events and rendering ui) should be broken up into small pieces so that the app's event loop continues to cycle while it starts up.
...all pure startup calculations should be performed in background th
reads, while you keep the run-time of main th
read events as short as possible.
...And 7 more matches
The building blocks of responsive design - Progressive web apps (PWAs)
read more about responsive design advantages and disadvantages.
... you can also
read our discussion on the basics of responsive design, if you need some more background information and basics.
...we have used brick to create the mobile layout for snapshot, which you will
read more about below.
...And 7 more matches
Understanding WebAssembly text format - WebAssembly
to enable webassembly to be
read and edited by humans, there is a textual representation of the wasm binary format.
... getting and setting locals and parameters locals/parameters can be
read and written by the body of the function with the local.get and local.set instructions.
... for example, local.get is defined to push the value of the local it
read onto the stack, and i32.add pops two i32 values (it implicitly grabs the previous two values pushed onto the stack), computes their sum (modulo 2^32) and pushes the resulting i32 value.
...And 7 more matches
Preferences - Archive of obsolete content
if you haven't yet,
read other documents about mozilla preferences on mdn (links below in resources section).
...there are six methods in nsiprefbranch that
read and write preferences: getboolpref(), setboolpref(), getcharpref(), setcharpref(), getintpref(), and setintpref().
... pref("extensions.myext.welcomemessage", "chrome://myext/locale/defaults.properties");
read the preference with getcomplexvalue, passing nsipreflocalizedstring as atype: var prefs = components.classes["@mozilla.org/preferences-service;1"] .getservice(components.interfaces.nsiprefservice); var branch = prefs.getbranch("extensions.myext."); var value = branch.getcomplexvalue("welcomemessage", components.interfaces.nsipreflocalizedstring).data; the code i...
...And 6 more matches
XPCOM Objects - Archive of obsolete content
you'll usually know what string to use by
reading examples and documentation.
...the getservice and createinstance methods allow you to get the component al
ready set to an interface.
...this section is a quick guide on how to
read xpcom documentation, which basically amounts to understanding the syntax of xpidl, the language used to specify xpcom interfaces.
...And 6 more matches
command - Archive of obsolete content
general info specification xul interface xulcommandevent bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not cancelable
read only boolean whether the event is cancellable or not?
...And 6 more matches
Textbox (XPFE autocomplete) - Archive of obsolete content
utocomplete, disableautocomplete, disabled, disablehistory, enablehistory, focused, forcecomplete, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, minresultsforpopup, minresultsforpopup, nomatch, onchange, onerrorcommand, oninput, onsearchcomplete, ontextcommand, ontextentered, ontextrevert, ontextreverted, open,
readonly, searchsessions, showcommentcolumn, showcommentcolumn, showpopup, size, tabindex, tabscrolling, tabscrolling, timeout, type, useraction, value properties accessible, alwaysopenpopup, autofill, autofillaftermatch, completedefaultindex, crop, disableautocomplete, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, issearching, i...
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...And 6 more matches
Accessibility/XUL Accessibility Reference - Archive of obsolete content
underlined text may be
read by the screen
reader.
... <!--wrapped label--> </label> </button> <button id='butwrap2'> <label control="butwrap2" value="<!--this-->" /> <label control="butwrap2" value="is" /> <label control="butwrap2" value="a" /> <label control="butwrap2" value="button" /> </button> <button image="images/img.xbm" tooltiptext="<!--button text-->"/> note that in the third example, only the first label is
read browser jaws 7.10 issues to use a browser element with html, the type="content" attribute should be specified.
... caption see groupbox checkbox <checkbox label='<!--label text-->' /> colorpicker <colorpicker type="button" palettename="standard" /> colorpicker appears to
read color values out if the colorpicker can get focus in the first place.
...And 6 more matches
XML - Archive of obsolete content
using a combination of xul's
ready-made widgets (e.g., menubar, scrollbar, progressmeter, and so on) and xul's incorporation of such standards as html4, dom1/2, and cascading stylesheets, you can design any interface that you can imagine, using any number of different features, tools, and methodologies.
... xul is made out of xml you don't need to know all about xml in order to use xul, but you may want to
read through this article to get a sense of xul's pedigree as a specialized markup language.
...any familiarity you al
ready have with xml will help you quickly get up to speed developing with xul.
...And 6 more matches
textbox - Archive of obsolete content
attributes cols, decimalplaces, disabled, emptytext, hidespinbuttons, increment, label, max, maxlength, min, multiline, newlines, onblur, onchange, onfocus, oninput, placeholder, preference,
readonly, rows, searchbutton, size, spellcheck, tabindex, timeout, type, value, wrap, wraparound properties accessibletype, clickselectsall, decimalplaces, decimalsymbol, defaultvalue, disabled, editor, emptytext, increment, inputfield, label, max, maxlength, min, placeholder,
readonly, searchbutton, selectionend, selectionstart, size, spinbuttons, tabindex, textlength, timeout, type, value, valu...
... label type: string if present and not empty, this will be exposed to screen
readers through the label property.
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
...And 6 more matches
Mozilla release FAQ - Archive of obsolete content
originally, the plan was just to re-stabilize the code and release 5.0, but it was decided within the community that the more ambitious changes that were planned for later integration were close to being
ready.
...if you're new to the mozilla newsgroups, you probably should be
reading the newsgroup for a few days regularly before you post anything.
...
reading this faq might help as well.
...And 6 more matches
How can we design for all types of users? - Learn web development
prerequisites: you should first
read what is accessibility?, since we don't cover accessibility in detail here.
... dig deeper color contrast to keep your text
readable, use a text color that contrasts well with the background color.
... make it extra easy to
read the text, to help visually-impaired people and people using their phones on the street.
...And 6 more matches
Introduction to client-side frameworks - Learn web development
the web became not just a place to
read things, but to do things.
...mdn web docs, which you are currently
reading this on, uses the react/reactdom framework to power its front end.
...by this point, it had al
ready been using react to solve many of its problems internally.
...And 6 more matches
Starting our Svelte Todo list app - Learn web development
in this article we will first have a look at the desired functionality of our app, then we'll create a todos.svelte component and put static markup and styles in place, leaving everything
ready to start developing our to-do list app features, which we'll go on to in subsequent articles.
... code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/02-starting-our-todo-app or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/02-starting-our-todo-app remember to run npm install && npm run dev to start your app in development mode.
... repl to code along with us using the repl, start at https://svelte.dev/repl/b7b831ea3a354d3789cefbc31e2ca495?version=3.23.2 todo list app features this is how our todo list app wil look like once it's
ready: using this ui our user will be able to: browse their tasks.
...And 6 more matches
Introducing a complete toolchain - Learn web development
in addition, you should include tests before you deploy to your production server to ensure your software works as intended — this al
ready sounds like a necessary toolchain.
... once you've signed up for github (click the sign up link on the homepage if you don't al
ready have an account, and follow the instructions), you can use your github account for authentication on netlify (click sign up, then choose github from the "sign up with one of the following" list), so technically you only need to create one new account.
...you should have node.js and npm installed al
ready, but if not, refer back to that section.
...And 6 more matches
JavaScript OS.Constants
using os.constants from the main th
read to initialize os.constants for use in the main th
read, add the following snippet to your code: components.classes["@mozilla.org/net/osfileconstantsservice;1"].
... s_irwxu current user can
read, write, execute the file.
... s_irusr current user can
read the file.
...And 6 more matches
Localizing with Koala
if you click on the highlighted arrow pointing down while
reading this tutorial on mdc, you will see two string that need to be translated: add "mdc search" manage search engines...
...s removed, 0 files unresolved configure the locale locale id: x-testing (put your locale's code) version: 3.6 location: choose the folder where you want to keep the localized files or leave empty for now check "mercurial" if you wish to use mercurial to keep the revision history of your files (very recommended) existing localizations: url: if you're editing an existing localization or you al
ready have a repository set up (either on hg.mozilla.org or bitbucket), type the url of the remote repository, e.g.
...new localizations: url: if you al
ready have a repository set up by l10n-drivers (on bitbucket), type the url of the remote repository, e.g.
...And 6 more matches
Mozilla DOM Hacking Guide
if you don't know xpcom yet, and would like to be able to
read this document quickly, you can
read the introduction to xpcom for the dom.
...in idl, location is declared to be a
readonly attribute.
... we al
ready know what nsixpcscriptable is used for (see the previous section).
...And 6 more matches
Midas
if there is a selection and all of the characters are al
ready bold, the bold will be removed.
... content
readonly this command will make the editor
readonly(true)or editable(false).
... if there is a selection and all of the characters are al
ready italic, the italic will be removed.
...And 6 more matches
About NSPR
these facilities include th
reads, th
read synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.
... th
reads th
reads are the major feature of nspr.
... the industry's offering of th
reads is quite sundry.
...And 6 more matches
NSPR Error Handling
pr_pending_interrupt_error the operation terminated because another th
read has interrupted it with pr_interrupt.
... pr_is_connected_error an attempt to connect on an al
ready connected network file descriptor.
... pr_tpd_range_error attempt to access a th
read-private data index that is out of range of any index that has been allocated to the process.
...And 6 more matches
PR_Poll
detects when i/o is
ready for a set of socket file descriptors.
... timeout amount of time the call will block waiting for i/o to become
ready.
... if this time expires without any i/o becoming
ready, pr_poll returns zero.
...And 6 more matches
sslintro.html
it is also possible for an application to import a socket into ssl after the tcp connection on that socket has al
ready been established.
... in this case, initial configuration takes place in the same way: pass the existing nspr file descriptor to ssl_importfd and perform any additional configuration that has not al
ready been determined by the model file descriptor.
...these can be used, for example, when interrupting and restarting socket communications, when the application needs to change socket parameters, or when an application imports a socket into ssl after the tcp connection on that socket has al
ready been established.
...And 6 more matches
Necko Architecture
handlers & channels nsichannel provides a data access interface which allows you to
read or write data from or to a uri.
...once you have a channel you can
read or write data from or to your uri.
... receiving data & nsistreamlistener you can
read or write, from or to a channel using either the synchronous api, or the asynchronous api.
...And 6 more matches
Rhino scopes and contexts
contexts the rhino context object is used to store th
read-specific information about the execution environment.
... there should be one and only one context associated with each th
read that will be executing javascript.
... to associate the current th
read with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is al
ready a context associated with the current th
read.
...And 6 more matches
Invariants
that is, they take a parameter cx of type jscontext *, and require that cx is in a request on the current th
read.
... see js_th
readsafe.
... a general rule about the state of all th
reads at a given time: either exactly one th
read is "in gc" and no th
reads are in requests; or no th
read is doing gc, in which case any number of th
reads may be in requests; or the gc lock is held.
...And 6 more matches
Introduction to the JavaScript shell
it is the javascript equivalent of python's interactive prompt, the lisp
read-eval-print loop, or ruby's irb.
... after following the build documentation and installing the built shell using make install, you can run the shell in interactive mode using the command: js [ if you get " symbol lookup error: ./js: undefined symbol: pr_setcurrentth
readname" e.g.
... gcparam(name[, value]) added in spidermonkey 1.8
read or configure garbage collector parameters.
...And 6 more matches
JSAPI User Guide
you will need at least one jsruntime per th
read that uses the jsapi.
...to do anything useful with spidermonkey, you must
read all three sections.
... throwing and catching exceptions we have al
ready seen one example of how to throw an exception from a jsnative function.
...And 6 more matches
JS_BeginRequest
indicates to the js engine that the calling th
read is entering a region of code that may call into the jsapi but does not block.
... syntax void js_beginrequest(jscontext *cx); void js_endrequest(jscontext *cx); name type description cx jscontext * the context in which the calling th
read intends to call jsapi functions.
... description when your multith
readed application wants to use a jscontext, it must use js_beginrequest and js_endrequest to bracket maximal non-blocking hunks of native code that call the jsapi.
...And 6 more matches
JS_SetGCCallback
some quirky behavior follows from this: the javascript engine can call the gc callback reentrantly on a single th
read.
...but the javascript engine will then detect that gc is al
ready happening and will not actually do a nested gc cycle in this case.
... in a js_th
readsafe build, a jsgc_begin callback may happen on any th
read, any time that th
read triggers garbage collection (from almost any jsapi call).
...And 6 more matches
XPCOM array guide
this array is
read-only, and the interface does not provide any methods that will allow adding and removing members.
... nsisupportsarray xpcom object yes no yes* no reference counted, strong (*) note: concrete c++ arrays can be made
read-only by declaring them const.
...since nsimutablearray derives from nsiarray, the resulting array can be cast to a
read-only array.
...And 6 more matches
imgIRequest
read only.
... decoderobserver imgidecoderobserver
read only.
...
read only.
...And 6 more matches
nsIAccessibleDocument
obsolete since gecko 2.0 astring getnamespaceuriforid(in short namespaceid); attributes attribute type description caretaccessible nsiaccessible
read only.
...
read only.
...
read only.
...And 6 more matches
nsIAsyncOutputStream
method overview void asyncwait(in nsioutputstreamcallback acallback, in unsigned long aflags, in unsigned long arequestedcount, in nsieventtarget aeventtarget); void closewithstatus(in nsresult reason); constants constant value description wait_closure_only (1<<0) if passed to asyncwait(), this flag overrides the default behavior, causing the onoutputstream
ready notification to be suppressed until the stream becomes closed (either as a result of closewithstatus()/close being called on the stream or possibly due to some error in the underlying stream).
...after the nsioutputstreamcallback.onoutputstream
ready() event is dispatched, the stream releases its reference to the nsioutputstreamcallback object.
...in other words, this method may be called when the stream al
ready has room for more data.
...And 6 more matches
nsIClassInfo
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview nsisupports gethelperforlanguage(in pruint32 language); void getinterfaces(out pruint32 count, [array, size_is(count), retval] out nsiidptr array); attributes attribute type description classdescription string a human
readable string naming the class, or null.
...
read only.
...
read only.
...And 6 more matches
nsICookie
read only.
...
read only.
...
read only.
...And 6 more matches
nsIEditor
document document
read only.
... documentisempty boolean
read only.
... documentmodified boolean
read only.
...And 6 more matches
nsIException
read only.
...
read only.
... null indicates "no data"
read only.
...And 6 more matches
nsILocalFile
read only.
... example #include <stdio.h> #include "nserror.h" #include "nsilocalfile.h" //
read the contents of a nsilocalfile...
... nsresult
readlocalfile(nsilocalfile *alocalfile) { file *fp; nsresult rv = alocalfile->openansifiledesc("r", &fp); if (ns_failed(rv)) return rv; char buf[512]; size_t n; while ((n = f
read(buf, sizeof(buf), 1, fp)) > 0) { // do something with n-byte block of data from file...
...And 6 more matches
nsIPrincipal
read only.
...
read only.
...
read only.
...And 6 more matches
nsIXULRuntime
read only.
...
read only.
...
read only.
...And 6 more matches
nsIZipEntry
read only.
...
read only.
...
read only.
...And 6 more matches
Reference Manual
this section will help you if you're al
ready familiar with nscomptr but you need details.
... if you've never use nscomptrs before, you might want to
read the getting started guide first.
...e(nsisupports*, nsresult*) do_queryreferent(nsiweakreference*), do_queryreferent(nsiweakreference*, nsresult*) don't addref dont_addref(t*), getter_addrefs(t*) n/a e.g., one of the possibilities for assigning into an nscomptr, but you don't want to addref the pointer you are assigning (because it has al
ready been addrefed for some reason) is dont_addref(t*) found at the intersection of "don't addref" and "don't qi".
...And 6 more matches
Waterfall - Firefox Developer Tools
worker event in main th
read shown when the main th
read sends a message to a worker, or receives a message from a worker.
... one of: serialize data on the main th
read the main th
read is serializing a message to be sent to the worker.
... deserialize data on the main th
read the main th
read is deserializing a message received from the worker.
...And 6 more matches
Attr - Web APIs
properties name
read only the attribute's name.
... namespaceuri
read only a domstring representing the namespace uri of the attribute, or null if there is no namespace.
... localname
read only a domstring representing the local part of the qualified name of the attribute.
...And 6 more matches
Background Tasks API - Web APIs
concepts and usage the main th
read of a web browser is centered around its event loop.
...it's an extremely busy chunk of code, and your main javascript code may run right inside this th
read along with all of this.
... certainly most if not all code that is capable of making changes to the dom is running in the main th
read, since it's common for user interface changes to only be available to the main th
read.
...And 6 more matches
DirectoryEntrySync - Web APIs
it includes methods for creating,
reading, looking up, and recursively removing files in a directory.
... var direntry = fs.root.getdirectory('superseekrit', {create: true}); method overview directory
readersync create
reader () raises (fileexception); fileentrysync getfile (in domstring path, in optional flags options) raises (fileexception); directoryentrysync getdirectory (in domstring path, in optional flags options) raises (fileexception); void removerecursively () raises (fileexception); methods create
reader() creates a new directory
readersync to
read entri...
... directory
readersync create
reader ( ) raises (fileexception); returns directory
readersync represents a directory in a file system.
...And 6 more matches
Gamepad - Web APIs
properties gamepad.axes
read only an array representing the controls with axes present on the device (e.g.
... gamepad.buttons
read only an array of gamepadbutton objects representing the buttons present on the device.
... gamepad.connected
read only a boolean indicating whether the gamepad is still connected to the system.
...And 6 more matches
HTMLTextAreaElement - Web APIs
form
read only object: returns a reference to the parent form element.
...
readonly boolean: returns / sets the element's
readonly attribute, indicating that the user cannot modify the value of the control.
... textlength
read only long: returns the codepoint length of the control's value.
...And 6 more matches
IDBObjectStoreSync - Web APIs
idbindexsync openindex (in domstring name) raises (idbdatabaseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); void removeindex (in domstring indexname) raises (idbdatabaseexception); attributes attribute type description indexnames
readonly domstringlist a list of the names of the indexes on this object store.
... keypath
readonly domstring the key path of this object store.
... mode
readonly unsigned short the mode for isolating access to the data in this object store.
...And 6 more matches
MSGestureEvent - Web APIs
msgestureevent.expansion
read only the diameter of the gesture area.
... msgestureevent.gestureobject
read only returns the msgesture object for this gesture event.
... msgestureevent.rotation
read only amount of rotation (in radians) since the previous msgestureevent of the current gesture.
...And 6 more matches
MediaKeyStatusMap - Web APIs
the mediakeystatusmap interface of the encryptedmediaextensions api is a
read-only map of media key statuses by key ids.
... properties mediakeystatusmap.size
read only returns the number of key/value pars in the status map.
... methods mediakeystatusmap.entries()
read only returns a new iterator object containing an array of [key, value] for each element in the status map, in insertion order.
...And 6 more matches
MediaStreamTrack - Web APIs
mediastreamtrack.id
read only returns a domstring containing a unique identifier (guid) for the track; it is generated by the browser.
... mediastreamtrack.isolated
read only returns a boolean value which is true if the track is isolated; that is, the track cannot be accessed by the document that owns the mediastreamtrack.
... mediastreamtrack.kind
read only returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track.
...And 6 more matches
PointerEvent - Web APIs
pointerevent.pointerid
read only a unique identifier for the pointer causing the event.
... pointerevent.width
read only the width (magnitude on the x axis), in css pixels, of the contact geometry of the pointer.
... pointerevent.height
read only the height (magnitude on the y axis), in css pixels, of the contact geometry of the pointer.
...And 6 more matches
Using writable streams - Web APIs
if not, we suggest that you first
read the streams concepts and usage overview and dedicated streams api concepts article, then come back.
... note: if you are looking for information about
readable streams, try using
readable streams instead.
... write(chunk,controller) — a method that is called repeatedly every time a new chunk is
ready to be written to the underlying sink (specified in the chunk parameter).
...And 6 more matches
TouchEvent - Web APIs
touchevent.altkey
read only a boolean value indicating whether or not the alt key was down when the touch event was fired.
... touchevent.changedtouches
read only a touchlist of all the touch objects representing individual points of contact whose states changed between the previous touch event and this one.
... touchevent.ctrlkey
read only a boolean value indicating whether or not the control key was down when the touch event was fired.
...And 6 more matches
VisualViewport - Web APIs
visualviewport.offsetleft
read only returns the offset of the left edge of the visual viewport from the left edge of the layout viewport in css pixels.
... visualviewport.offsettop
read only returns the offset of the top edge of the visual viewport from the top edge of the layout viewport in css pixels.
... visualviewport.pageleft
read only returns the x coordinate of the visual viewport relative to the initial containing block origin of the top edge in css pixels.
...And 6 more matches
WorkerGlobalScope - Web APIs
standard properties workerglobalscope.navigator
read only returns the workernavigator associated with the worker.
... workerglobalscope.self
read only returns a reference to the workerglobalscope itself.
... workerglobalscope.location
read only returns the workerlocation associated with the worker.
...And 6 more matches
ARIA annotations - Accessibility
rsion 75 onwards, on windows and linux (on macos, we are first waiting for apple to define what safari will expose as apple-dialect attributes to voiceover, and will then follow suit.) chrome from version 81 onwards, currently behind the #enable-accessibility-expose-aria-annotations flag (go to chrome://flags to enable this.) unfortunately, you won’t be able to use any of these yet, as screen
reader support is currently not there.
...the annotations should just work once screen
reader support is added.
... aria-details versus aria-describedby we have al
ready alluded to the difference between these two above — aria-describedby is for textual descriptions, whereas aria-details is for more complex sets of details.
...And 6 more matches
Text labels and names - Accessibility
a common navigation technique for users of assistive technology is to infer what content a page contains by
reading its title.
...in addition, it is difficult for screen
readers to navigate pages with <frame> elements.
...(this assumes that the enclosed document is under your control; if not, try to match the frame's title attribute to the document's title.) some screen
readers replace the contents of the title attribute with the contents of the enclosed document's <title>.
...And 6 more matches
Understandable - Accessibility
note: to
read the w3c definitions for understandable and its guidelines and success criteria, see principle 3: understandable — information and the operation of user interface must be understandable.
... guideline 3.1 —
readable: make text content
readable and understandable this guideline focuses on making text content as understandable as possible.
...this is essential for purposes like making sure the
reader has arrived at a page written in a language suitable for them.
...And 6 more matches
Box-shadow generator - CSS: Cascading Style Sheets
lur" data-min="0" data-max="200" data-step="1"> </div> <div class="ui-slider-btn-set" data-topic="blur" data-type="add"></div> <div class="ui-slider-input" data-topic="blur" data-unit="px"></div> </div> <div class="slidergroup"> <div class="ui-slider-name"> sp
read </div> <div class="ui-slider-btn-set" data-topic="sp
read" data-type="sub"></div> <div class="ui-slider" data-topic="sp
read" data-min="-100" data-max="100" data-step="1" data-value="50"> </div> <div class="ui-slider-btn-set" data-topic="sp
read" data-type="add"></div> ...
... <div class="ui-slider-input" data-topic="sp
read" data-unit="px"></div> </div> </div> </div> <div id="element_properties" class="category"> <div class="title"> class element properties </div> <div class="group"> <div class="group property"> <div class="ui-slider-name"> border </div> <div class="ui-checkbox" data-topic='border-state' data-state="true"></div> </div> <div id="z-index" class="slidergroup"> <div class="ui-slider-name"> z-index </div> <div class="ui-slider-btn-set" data-topic="z-index" data-type="sub"></div> ...
...r v = ''; if (this.a !== 1) { a = 'a'; v = ', ' + this.a; } var value = "rgb" + a + rgb + v + ")"; return value; } color.prototype.getcolor = function getcolor() { if (this.a | 0 === 1) return this.gethexa(); return this.getrgba(); } /** * shadow object */ function shadow() { this.inset = false; this.posx = 5; this.posy = -5; this.blur = 5; this.sp
read = 0; this.color = new color(); var hue = (math.random() * 360) | 0; var saturation = (math.random() * 75) | 0; var value = (math.random() * 50 + 50) | 0; this.color.sethsv(hue, saturation, value, 1); } shadow.prototype.computecss = function computecss() { var value = ""; if (this.inset === true) value += "inset "; value += this.posx + "px "; value += this.posy + "px ...
...And 6 more matches
Event reference
media events event name fired when audioprocess the input buffer of a scriptprocessornode is
ready to be processed.
... emptied the media has become empty; for example, this event is sent if the media has al
ready been loaded (or partially loaded), and the load() method is called to reload it.
... playing playback is
ready to start after having been paused or delayed due to lack of data.
...And 6 more matches
context-menu - Archive of obsolete content
read more about patterns.
... iseditable true if the menu was invoked in an editable element, and that element isn't disabled or
read-only.
...this property is
read-only.
...And 5 more matches
CSS3 - Archive of obsolete content
while some modules are al
ready w3c recommendations, other still are early working drafts.
...some modules, like selectors 4 or css borders and backgrounds level 4 al
ready have an editor's draft, though they haven't yet reached the first published working draft status.
... css modules status completed modules a few css modules al
ready became a standard as a w3c recommendation.
...And 5 more matches
JXON - Archive of obsolete content
there are some cases in which the whole content of an xml document must be
read from the javascript interpreter (like for web-apps languages or settings xml documents, for example).
...it could be useful to
read the xml introduction article first.
... if you want a complete bidirectional jxon library (modelled on the json global object), skip to the dedicated paragraph (but please
read the note about the const statement compatibility).
...And 5 more matches
Message Summary Database - Archive of obsolete content
the mail summary files (.msf) are used to store summary information about messages and th
reads in a folder, and some meta information about the folder.
...mdb is a schema-less db interface, so it's trivial to add new attributes without regenerating the db, and it's trivial for older code to
read newer databases, because the code can ignore but maintain the attributes it doesn't know about.
...there are a set of generic property methods so that core code and extensions can set attributes on msg headers without changing nsimsghdr.idl.msg th
reads we store th
read information persistently in the database and expose these object through the [nsimsgth
read interface.
...And 5 more matches
textbox (Toolkit autocomplete) - Archive of obsolete content
utocompletepopup, autocompletesearch, autocompletesearchparam, completedefaultindex, completeselectedindex,crop, disableautocomplete, disabled, disablekeynavigation, enablehistory, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputtooltiptext, label, maxlength, maxrows, minresultsforpopup, nomatch, onchange, oninput, onsearchcomplete, ontextentered, ontextreverted, open,
readonly,showcommentcolumn, showimagecolumn, size, tabindex, tabscrolling, timeout, type, value properties accessibletype, completedefaultindex, controller, crop, disableautocomplete, disablekeynavigation, disabled, editable, focused, forcecomplete, highlightnonmatches, ignoreblurwhilesearching, inputfield, label, maxlength, maxrows, minresultsforpopup, open, popup, popupopen, searchcount, s...
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...And 5 more matches
listbox - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... itemcount type: integer
read only property holding the number of child items.
...this property is
read-only.
...And 5 more matches
menulist - Archive of obsolete content
attributes accesskey, crop, disableautoselect, disabled, editable, focused, image, label, oncommand, open, preference,
readonly, sizetopopup, tabindex, value properties accessibletype, crop, description, disableautoselect, disabled, editable, editor, image, inputfield, itemcount, label, menuboxobject, menupopup, open, selectedindex, selecteditem, tabindex, value methods appenditem, contains, getindexofitem, getitematindex, insertitemat, removeallitems, removeitemat, select examples <menulist> <menupop...
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...And 5 more matches
Styling tables - Learn web development
unfortunately, it doesn't look good when rendered on the screen (see it live at punk-bands-unstyled.html): with only the default browser styling it looks cramped, hard to
read, and boring.
... at this point, our table al
ready looks a lot better: some simple typography now we'll get our text sorted out a bit.
... typography */ html { font-family: 'helvetica neue', helvetica, arial, sans-serif; } thead th, tfoot th { font-family: 'rock salt', cursive; } th { letter-spacing: 2px; } td { letter-spacing: 1px; } tbody td { text-align: center; } tfoot th { text-align: right; } there is nothing really specific to tables here; we are generally tweaking the font styling to make things easier to
read: we have set a global sans-serif font stack; this is purely a stylistic choice.
...And 5 more matches
Images in HTML - Learn web development
note: you should
read a quick primer on urls and paths to refresh your memory on relative and absolute urls before continuing.
... note: search engines also
read image filenames and count them towards seo.
...it can come in handy for a number of reasons: the user is visually impaired, and is using a screen
reader to
read the web out to them.
...And 5 more matches
Graceful asynchronous programming with Promises - Learn web development
since the call to getusermedia() is made from the browser's main th
read, the entire browser is blocked until getusermedia() returns!
...even if the handlecallbutton() function has al
ready returned to the code that called it, when getusermedia() has finished working, it calls the handler you provide.
... with old-style callbacks, a pseudo-code representation of the above functionality might look something like this: choosetoppings(function(toppings) { placeorder(toppings, function(order) { collectorder(order, function(pizza) { eatpizza(pizza); }, failurecallback); }, failurecallback); }, failurecallback); this is messy and hard to
read (often referred to as "callback hell"), requires the failurecallback() to be called multiple times (once for each nested function), with other issues besides.
...And 5 more matches
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
the asynchronous code set up by these functions runs on the main th
read (after their specified timer has elapsed).
...depending on how processor-intensive these operations are, they can delay your async code even further, as any async code will execute only after the main th
read is available.
...the callbacks you pass to these functions cannot run until the stack on the main th
read is empty.
...And 5 more matches
Accessibility in React - Learn web development
previous overview: client-side javascript frameworks next in our final tutorial article, we'll focus on (pun intended) accessibility, including focus management in react, which can improve usability and reduce confusion for both keyboard-only and screen
reader users.
...this could confuse a wide variety of users — particularly users who rely on the keyboard, or users who use a screen
reader.
... to improve the experience for keyboard and screen-
reader users, we should manage the browser’s focus ourselves.
...And 5 more matches
Introduction to cross browser testing - Learn web development
people with disabilities, who use the web with the aid of assistive technologies like screen
readers, or don't use a mouse (some people use only the keyboard).
... on the other hand, it is not ok for a site to work fine for sighted users, but be completely inaccessible for visually impaired users because their screen
reader application can't
read any of the information stored on it.
...before you even get to cross browser issues, you should have al
ready fixed out bugs in your code (see debugging html, debugging css, and what went wrong?
...And 5 more matches
Accessibility API cross-reference
they also define a list of possible object states, such as focused,
read-only, checked, etc.
...they also define a list of possible object states, such as focused,
read-only, checked, etc.
...the roles it specifies have al
ready informed the 'semantic elements' of html5 (such as main and footer), but there is not a one-to-one mapping between the aria roles and the semantics of html5.
...And 5 more matches
I/O Functions
pr_open pr_delete pr_getfileinfo pr_getfileinfo64 pr_rename pr_access type praccesshow functions that act on file descriptors pr_close pr_
read pr_write pr_writev pr_getopenfileinfo pr_getopenfileinfo64 pr_seek pr_seek64 pr_available pr_available64 pr_sync pr_getdesctype pr_getspecialfd pr_createpipe directory i/o functions pr_opendir pr_
readdir pr_closedir pr_mkdir pr_rmdir socket manipulation functions the network programming interface presented here is a socket api modeled after the popular berkeley sockets.
... two new functions, pr_transmitfile and pr_accept
read, can exploit the new system calls of some operating systems for higher performance.
... list of functions: pr_openudpsocket pr_newudpsocket pr_opentcpsocket pr_newtcpsocket pr_importtcpsocket pr_connect pr_connectcontinue pr_accept pr_bind pr_listen pr_shutdown pr_recv pr_send pr_recvfrom pr_sendto pr_transmitfile pr_accept
read pr_getsockname pr_getpeername pr_getsocketoption pr_setsocketoption converting between host and network addresses pr_ntohs pr_ntohl pr_htons pr_htonl pr_familyinet memory-mapped i/o functions the memory-mapped i/o functions allow sections of a file to be mapped to memory regions, allowing
read-write accesses to the file to be accomplished by normal memory accesses.
...And 5 more matches
PR_Open
opens a file for
reading, writing, or both.
...if the flags parameter does not include any of the first three flags (pr_rdonly, pr_wronly, or pr_rdwr), the open file can't be
read or written, which is not useful.
... name value description pr_rdonly 0x01 open for
reading only.
...And 5 more matches
PR_WaitCondVar
timeout the value pr_interval_no_timeout requires that a condition be notified (or the th
read interrupted) before it will resume from the wait.
... the value pr_interval_no_wait causes the th
read to release the lock, possibly causing a rescheduling within the runtime, then immediately attempt to reacquire the lock and resume.
... if unsuccessful (for example, if the caller has not locked the lock associated with the condition variable or the th
read was interrupted with pr_interrupt), pr_failure.
...And 5 more matches
Utilities for nss samples
it shows the following:
read der from a file.
...*/ typedef struct { enum { pw_none = 0, /* no password */ pw_fromfile = 1, /* password stored in a file */ pw_plaintext = 2 /* plain-text password passed in buffer */ /* pw_external = 3 */ } source; char *data; /* depending on source this can be the actual * password or the file to
read it from */ } secupwdata; /* * printasascii */ extern void printasascii(prfiledesc* out, const unsigned char *data, unsigned int len); /* * printashex */ extern void printashex(prfiledesc* out, const unsigned char *data, unsigned int len); /* * getdigit */ extern int getdigit(char c); /* * hextobuf */ extern int hextobuf(unsigned char *instring, secitem *outbuf, prbool ishexdata);...
... void *pwdata); /* * generaterandom */ extern secstatus generaterandom(unsigned char *rbuf, int rsize); /* * filetoitem */ extern secstatus filetoitem(secitem *dst, prfiledesc *src); /* * seedfromnoisefile */ extern secstatus seedfromnoisefile(const char *noisefilename); /* * filesize */ extern long filesize(const char* filename); /* *
readderfromfile */ extern secstatus
readderfromfile(secitem *der, const char *infilename, prbool ascii); #endif /* _util_h */ util.c /* this source code form is subject to the terms of the mozilla public * license, v.
...And 5 more matches
Property attributes
mxr id search for jsprop_enumerate jsprop_
readonly the property's value cannot be set.
... in javascript 1.2 and lower, it is an error to attempt to assign a value to a
read-only property.
... in javascript 1.3 and higher, as in ecmascript, attempts to set a value on a
read-only property are ignored.
...And 5 more matches
History Service Design
charset for pages: allows setting and
reading charset for each page.
... performance to ensure performance a bunch of statements, commonly used when adding or
reading visit informations, are created at startup.
...since places is actually not th
read-safe and doing most of the work in the main-th
read, adding visits (the most common action usually executed on user interaction) could end up locking the ui till the database i/o to save data is complete.
...And 5 more matches
Places utilities for JavaScript
these just take in the node, as the interface is al
ready defined: asvisit(anode) asfullvisit(anode) ascontainer(anode) asquery(anode) annotations a few annotation names are defined here.
...ey); boolean nodeisfolder(nsinavhistoryresultnode anode); boolean nodeisbookmark(nsinavhistoryresultnode anode); boolean nodeisseparator(nsinavhistoryresultnode anode); boolean nodeisvisit(nsinavhistoryresultnode anode); boolean nodeisuri(nsinavhistoryresultnode anode); boolean nodeisquery(nsinavhistoryresultnode anode); boolean nodeis
readonly(nsinavhistoryresultnode anode); boolean nodeishost(nsinavhistoryresultnode anode); boolean nodeiscontainer(nsinavhistoryresultnode anode); boolean nodeisdynamiccontainer(nsinavhistoryresultnode anode); boolean nodeislivemarkcontainer(nsinavhistoryresultnode anode); obsolete since gecko 21 boolean nodeislivemarkitem(nsinavhistoryresultnode ...
...anode); obsolete since gecko 21 boolean is
readonlyfolder(nsinavhistoryresultnode anode); int getindexofnode(nsinavhistoryresultnode anode); string wrapnode(nsinavhistoryresultnode anode, string atype, nsiuri aoverrideuri); array unwrapnodes(string blob, string atype); nsitransaction maketransaction(string data, string type, nsinavhistoryresultnode container, int index, boolean copy); nsinavhistoryresult getfoldercontents(int afolderid, boolean aexcludeitems, boolean aexpandqueries); boolean showaddbookmarkui(nsiuri auri, string atitle, string adescription, int adefaultinsertionpoint, boolean ashowpicker, boolean aloadinsidebar, string akeyword, string apostdata); boolean showminimaladdbookmarkui(nsiuri auri, string atitle,...
...And 5 more matches
Detailed XPCOM hashtable guide
a basic guide is included here, but you should
read most of xpcom/glue/pldhash.h if you intend to use pldhash.
...you should
read xpcom/glue/nsthashtable.h.
... because of this, nsthashtable is not inherently th
read-safe.
...And 5 more matches
Observer Notifications
xpcom-shutdown-th
reads shuts down the th
read manager, causing all nsth
reads to finish processing any events al
ready queued and stop accepting new events.
... the window id can be obtained from subject.queryinterface(components.interfaces.nsisupportspruint64).data toplevel-window-
ready nsiwindowwatcher called just after a new top level window has been opened and is
ready, but has not yet loaded a document.
... http-on-examine-cached-response called instead of http-on-examine-response when a response will be
read completely from the cache.
...And 5 more matches
nsICache
access_
read 1 access requested - i only want to
read, if there isn't an entry just fail.
... access granted - you can
read from this descriptor.
... access_
read_write 3 access requested - i want to
read, but i'm willing to update an existing entry if necessary, or create a new one if none exists.
...And 5 more matches
nsIFileInputStream
netwerk/base/nsifilestreams.idlscriptable an input stream that allows you to
read from a file.
...it may be removed before the stream is closed if it is possible to delete it and still
read from it.
... if open_on_
read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again.
...And 5 more matches
nsITransport
constant value description status_
reading 0x804b0008 status_writing 0x804b0009 methods close() close the transport and any open streams.
...this means that if the stream has no data and is not closed, then
reading from it will block the calling th
read until at least one byte is available or until the stream is closed.
...this means that if the stream has no data and is not closed, then
reading from it returns ns_base_stream_would_block.
...And 5 more matches
nsIXULAppInfo
read only.
... this has traditionally been in the form "{aaaaaaaa-bbbb-cccc-dddd-eeeeeeeeeeee}" but for new applications a more
readable form is encouraged: "appname@vendor.tld".
...@ _ { } *
read only.
...And 5 more matches
nsMsgViewCommandType
for example to mark a message
read, you would call: // assuming gdbview is a global nsimsgdbview gdbview.docommand(components.interfaces.nsmsgviewcommandtype.markmessages
read); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) constants name value description markmessages
read 0 marks the selected messages as
read.
... markmessagesun
read 1 mark the selected messages as un
read togglemessage
read 2 toggle the
read flag of the selected messages flagmessages 3 flag the selected messages.
...And 5 more matches
Working with windows in chrome code
it contains tips and example code on opening new windows, finding an al
ready opened window, and passing data between different windows.
... finding al
ready opened windows the window mediator xpcom component (nsiwindowmediator interface) provides information about existing windows.
...=== example: opening a window only if it's not opened al
ready === xxx tbd passing data between windows when working with multiple windows, you often need to pass information from one window to another.
...And 5 more matches
BluetoothAdvertisingData - Web APIs
interface interface bluetoothadvertisingdata {
readonly attribute unsigned short?
... appearance;
readonly attribute byte?
... txpower;
readonly attribute byte?
...And 5 more matches
Content Index API - Web APIs
the content index api is an extension to service workers, which allows developers to add urls and metadata of al
ready cached pages, under the scope of the current service worker.
... the browser can then use these entries to display offline
reading to a user.
... serviceworkerregistration.index
read only returns a reference to the contentindex interface for indexing cached pages.
...And 5 more matches
HTMLInputElement - Web APIs
th="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="411" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmlinputelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties properties related to the parent form form
read only htmlformelement object: returns a reference to the parent <form> element.
...see also
readonly autofocus boolean: returns / sets the element's autofocus attribute, which specifies that a form control should have input focus when the page loads, unless the user overrides it, for example by typing in a different control.
... validity
read only validitystate object: returns the element's current validity state.
...And 5 more matches
HTMLSelectElement - Web APIs
htmlselectelement.form
read only an htmlformelement referencing the form that this element is associated with.
... htmlselectelement.labels
read only a nodelist of <label> elements associated with the element.
... htmlselectelement.options
read only an htmloptionscollection representing the set of <option> (htmloptionelement) elements contained by this element.
...And 5 more matches
IDBCursor - Web APIs
idbcursor.source
read only returns the idbobjectstore or idbindex that the cursor is iterating.
... idbcursor.direction
read only returns the direction of traversal of the cursor.
... idbcursor.key
read only returns the key for the record at the cursor's position.
...And 5 more matches
PaymentResponse - Web APIs
properties paymentresponse.details
read only secure context returns a json-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine successful fund transfer.
... paymentresponse.methodname
read only secure context returns the payment method identifier for the payment method that the user selected, for example, visa, mastercard, paypal, etc..
... paymentresponse.payeremail
read only secure context returns the email address supplied by the user.
...And 5 more matches
SVGFESpotLightElement - Web APIs
svgfespotlightelement.x
read only an svganimatednumber corresponding to the x attribute of the given element.
... svgfespotlightelement.y
read only an svganimatednumber corresponding to the y attribute of the given element.
... svgfespotlightelement.z
read only an svganimatednumber corresponding to the z attribute of the given element.
...And 5 more matches
SVGFilterElement - Web APIs
"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterelement.filterunits
read only an svganimatedenumeration that corresponds to the filterunits attribute of the given <filter> element.
... svgfilterelement.primitiveunits
read only an svganimatedenumeration that corresponds to the primitiveunits attribute of the given <filter> element.
... svgfilterelement.x
read only an svganimatedlength that corresponds to the x attribute on the given <filter> element.
...And 5 more matches
SVGGradientElement - Web APIs
width="180" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="391" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svggradientelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} constants name value description svg_sp
readmethod_unknown 0 the type is not one of predefined types.
... svg_sp
readmethod_pad 1 corresponds to value pad.
... svg_sp
readmethod_reflect 2 corresponds to value reflect.
...And 5 more matches
SVGLength - Web APIs
an svglength object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... interface overview also implement none methods void newvaluespecifiedunits(in unsigned short unittype, in float valueinspecifiedunits) void converttospecifiedunits(in unsigned short unittype) properties
readonly unsigned short unittype float value float valueinspecifiedunits domstring valueasstring constants svg_lengthtype_unknown = 0 svg_lengthtype_number = 1 svg_lengthtype_percentage = 2 svg_lengthtype_ems = 3 svg_lengthtype_exs = 4 svg_lengthtype_px = 5 svg_lengthtype_cm = 6 svg_lengthtype_mm = 7 svg_lengthtype_in = 8 svg_lengthtype_pt = 9 svg_lengthtype_pc = 10 normative document svg 1.1 (2nd edition...
...) example <svg height="200" onload="start();" version="1.1" width="200" xmlns="http://www.w3.org/2000/svg"> <script type="text/javascript"><![cdata[ function start() { var rect = document.getelementbyid("myrect"); var val = rect.x.baseval; //
read x in pixel and cm units console.log("value: " + val.value + ", valueinspecifiedunits: " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); // set x = 20pt and
read it out in pixel and pt units val.newvaluespecifiedunits(svglength.svg_lengthtype_pt, 20); console.log("value: " + val.value + ", valueinspecifiedunits " + val.unittype + ": " + val.valueinspecifiedunits + ", valueasstring: " + val.valueasstring); // convert x = 20pt to ...
...And 5 more matches
SVGTransform - Web APIs
an svgtransform object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... interface overview also implement none methods void setmatrix(in svgmatrix matrix) void settranslate(in float tx, in float ty) void setscale(in float sx, in float sy) void setrotate(in float angle, in float cx, in float cy) void setskewx(in float angle) void setskewy(in float angle) properties
readonly unsigned short type
readonly float angle
readonly svgmatrix matrix constants svg_transform_unknown = 0 svg_transform_matrix = 1 svg_transform_translate = 2 svg_transform_scale = 3 svg_transform_rotate = 4 svg_transform_skewx = 5 svg_transform_skewy = 6 normative document svg 1.1 (2nd edition) constants ...
... exceptions: a domexception with code no_modification_allowed_err is raised when attempting to modify a
read only attribute or when the object itself is
read only.
...And 5 more matches
Sensor APIs - Web APIs
for example, the accelerometer interface returns the acceleration of the device along all three axes at the time it is
read.
... } else if (event.error.name === 'not
readableerror' ) { console.log('cannot connect to the sensor.'); } }); accelerometer.addeventlistener('
reading', () => reloadonshake(accelerometer)); accelerometer.start(); } catch (error) { // handle construction errors.
... console.log('sensor construction was blocked by a feature policy.'); } else if (error.name === 'referenceerror') { console.log('sensor is not supported by the user agent.'); } else { throw error; } } permissions and feature policy sensor
readings may not be taken unless the user grants permission to a specific sensor type.
...And 5 more matches
SourceBuffer - Web APIs
sourcebuffer.audiotracks
read only a list of the audio tracks currently contained inside the sourcebuffer.
... sourcebuffer.buffered
read only returns the time ranges that are currently buffered in the sourcebuffer.
... sourcebuffer.texttracks
read only a list of the text tracks currently contained inside the sourcebuffer.
...And 5 more matches
WebGLRenderingContext.bufferData() - Web APIs
when using a webgl 2 context, the following values are available additionally: gl.copy_
read_buffer: buffer for copying from one buffer object to another.
... when using a webgl 2 context, the following values are available additionally: gl.static_
read: the contents are intended to be specified once by
reading data from webgl, and queried many times by the application.
... gl.dynamic_
read: the contents are intended to be respecified repeatedly by
reading data from webgl, and queried many times by the application.
...And 5 more matches
WebGL best practices - Web APIs
geterror, getparameter) certain webgl entry points cause synchronous stalls on the calling th
read.
... in production code, avoid such entry points, especially on the browser main th
read where they can cause the entire page to jank (often including scrolling or even the whole browser).
...(this is okay for
read buffers in conjunction with fences - see async data
readback below.)
readpixels() to the cpu (i.e.
...And 5 more matches
Rendering and the WebXR frame animation callback - Web APIs
refresh rate and frame rate assuming you've called the xrsession method requestanimationframe() since the last time the screen refreshed, the browser will call your frame renderer callback every time it's
ready to repaint your app or site window.
... hardare vertical refresh rate when the browser is
ready to refresh the <canvas> within which your webxr content is displayed, it calls your frame rendering callback, which uses the specified timestamp and any other relevant data, such as models and textures, as well as application state, to render the scene—as it should appear at the specified time—into the webgl backbuffer.
...you achieve this by doing as much as is practicable off the main th
read and by keeping your frame rendering callback as efficient as possible.
...And 5 more matches
Synchronous and asynchronous requests - Web APIs
var xhr = new xmlhttprequest(); xhr.open("get", "/bar/foo.txt", true); xhr.onload = function (e) { if (xhr.
readystate === 4) { if (xhr.status === 200) { console.log(xhr.responsetext); } else { console.error(xhr.statustext); } } }; xhr.onerror = function (e) { console.error(xhr.statustext); }; xhr.send(null); line 2 specifies true for its third parameter to indicate that the request should be handled asynchronously.
...this handler looks at the request's
readystate to see if the transaction is complete in line 4; if it is, and the http status is 200, the handler dumps the received content.
... example: writing a function to
read an external file in some cases, you must
read many external files.
...And 5 more matches
Using the alert role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen
readers may interrupt current output (whether it's speech or braille) and immediately announce or display the alert message.
...the moment the element finishes loading the screen
reader should be notified of the alert.
... if the element was al
ready in the original source code when the page loaded, the screen
reader will announce the error immediately after announcing the page title.
...And 5 more matches
Perceivable - Accessibility
note: to
read the w3c definitions for perceivable and its guidelines and success criteria, see principle 1: perceivable - information and user interface components must be presentable to users in ways they can perceive.
... for example, it can be spoken by a screen
reader, converted to large print, or represented on a braille display.
...otherwise, screen
readers may try to
read out the filepath, etc.
...And 5 more matches
Cross-browser audio basics - Developer guides
// associate functions with the 'onclick' events play.onclick = playaudio; pause.onclick = pauseaudio; function playaudio() { myaudio.play(); } function pauseaudio() { myaudio.pause(); } } media loading events above we have shown how you can create a very simple audio player, but what if we want to show progress, buffering and only activate the buttons when the media is
ready to play?
...the playhead is in position but not quite
ready to play.
... myaudio.addeventlistener("progress", function() { // you could let the user know the media is downloading }); canplay canplay is a useful event to detect should you want to determine whether the media is
ready to play.
...And 5 more matches
<input type="number"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, placeholder,
readonly idl attributes list, value, valueasnumber methods select(), stepup(), stepdown() value any floating-point number, or empty.
... type number support these attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the maximum value to accept for this input min the minimum value to accept for this input placeholder an example value to display inside the field when it's empty
readonly a boolean attribute indicating whether the value is
read-only step a stepping interval to use when using up and down arrows to adjust the value, as well as for validation list the values of the list attribute is the id of a <datalist> element located in the same document.
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
...And 5 more matches
<textarea> - HTML: Hypertext Markup Language
the <textarea> element also accepts several attributes common to form <input>s, such as autocomplete, autofocus, disabled, placeholder,
readonly, and required.
...
readonly this boolean attribute indicates that the user cannot modify the value of the control.
... unlike the disabled attribute, the
readonly attribute does not prevent the user from clicking or selecting in the control.
...And 5 more matches
Cross-Origin Resource Sharing (CORS) - HTTP
who should
read this article?
...another article for server developers discussing cross-origin sharing from a server perspective (with php code snippets) is supplementary
reading.
... functional overview the cross-origin resource sharing standard works by adding new http headers that let servers describe which origins are permitted to
read that information from a web browser.
...And 5 more matches
Using Promises - JavaScript
since most people are consumers of al
ready-created promises, this guide will explain consumption of returned promises before explaining how to create them.
... here's some code that uses createaudiofileasync(): function successcallback(result) { console.log("audio file
ready at url: " + result); } function failurecallback(error) { console.error("error generating audio file: " + error); } createaudiofileasync(audiosettings, successcallback, failurecallback); modern functions return a promise that you can attach your callbacks to instead: if createaudiofileasync() were rewritten to return a promise, using it could be as simple as this: createaudiofileasync(aud...
...
read the following example: new promise((resolve, reject) => { console.log('initial'); resolve(); }) .then(() => { throw new error('something failed'); console.log('do this'); }) .catch(() => { console.error('do that'); }) .then(() => { console.log('do this, no matter what happened before'); }); this will output the following text: initial do that do this, no matter what ...
...And 5 more matches
panel - Archive of obsolete content
opening a panel will close any panel created by the panel() constructor that is al
ready open, even if that panel was opened by a different add-on sdk based extension.
... we've al
ready seen that you can package html files in your add-on's data directory and use them to define the panel's content.
...this may take one of the following values: "start": load content scripts immediately after the document element for the panel is inserted into the dom, but before the dom content itself has been loaded "
ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the panel has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
...And 4 more matches
io/file - Archive of obsolete content
read more about escaping characters in strings.
... if the string contains "r", the file is opened in
read-only mode.
... if mode is not given, "r" is assumed, and the file is opened in
read-only text mode.
...And 4 more matches
StringView - Archive of obsolete content
in the past, this had to be simulated by treating the raw data as a string and using the charcodeat() method to
read the bytes from the data buffer.
...characteroffset, optional unsigned long characterslength); void stringview.foreachchar(function callback, optional object thisobject, optional unsigned long characteroffset, optional unsigned long characterslength); domstring stringview.valueof(); domstring stringview.tostring(); properties overview attribute type description encoding
read only domstring a string expressing the encoding type.
... buffer
read only arraybuffer the buffer to be shared between stringview.rawdata and stringview.bufferview view references.
...And 4 more matches
Local Storage - Archive of obsolete content
let localdir = directoryservice.get("profd", ci.nsifile); localdir.append("xulschool"); if (!localdir.exists() || !localdir.isdirectory()) { //
read and write permissions to owner and group,
read-only for others.
... to
read and write information in files, you need to use stream objects.
... you can
read more about
reading and writing files here.
...And 4 more matches
jspage - Archive of obsolete content
ement.match(o,m))){if(!p){return document.id(o,r); }q.push(o);}o=o[l];}return(p)?new elements(q,{ddup:false,cash:!r}):null;};var e={html:"innerhtml","class":"classname","for":"htmlfor",defaultvalue:"defaultvalue",text:(browser.engine.trident||(browser.engine.webkit&&browser.engine.version<420))?"innertext":"textcontent"}; var b=["compact","nowrap","ismap","declare","noshade","checked","disabled","
readonly","multiple","selected","noresize","defer"];var k=["value","type","defaultvalue","accesskey","cellpadding","cellspacing","colspan","frameborder","maxlength","
readonly","rowspan","tabindex","usemap"]; b=b.associate(b);hash.extend(e,b);hash.extend(e,k.associate(k.map(string.tolowercase)));var a={before:function(m,l){if(l.parentnode){l.parentnode.insertbefore(m,l); }},after:function(m,l){if(!l.pa...
...}else{if(c[a]){c[a].keys.each(function(e){this.addevent(a,e);},this);}}return this;}});element.nativeevents={click:2,dblclick:2,mouseup:2,mousedown:2,contextmenu:2,mousewheel:2,dommousescroll:2,mouseover:2,mouseout:2,mousemove:2,selectstart:2,selectend:2,keydown:2,keypress:2,keyup:2,focus:2,blur:2,change:2,reset:2,select:2,submit:2,load:1,unload:1,beforeunload:2,resize:1,move:1,domcontentloaded:1,
readystatechange:1,error:1,abort:1,scroll:1}; (function(){var a=function(b){var c=b.relatedtarget;if(c==undefined){return true;}if(c===false){return false;}return($type(this)!="document"&&c!=this&&c.prefix!="xul"&&!this.haschild(c)); };element.events=new hash({mouseenter:{base:"mouseover",condition:a},mouseleave:{base:"mouseout",condition:a},mousewheel:{base:(browser.engine.gecko)?"dommousescroll":"mo...
...%c.a==c.b); },index:function(a){var b=this,c=0;while((b=b.previoussibling)){if(b.nodetype==1&&++c>a){return false;}}return(c==a);},even:function(b,a){return selectors.pseudo["nth-child"].call(this,"2n+1",a); },odd:function(b,a){return selectors.pseudo["nth-child"].call(this,"2n",a);},selected:function(){return this.selected;},enabled:function(){return(this.disabled===false); }});element.events.dom
ready={onadd:function(a){if(browser.loaded){a.call(this);}}};(function(){var b=function(){if(browser.loaded){return;}browser.loaded=true; window.fireevent("dom
ready");document.fireevent("dom
ready");};window.addevent("load",b);if(browser.engine.trident){var a=document.createelement("div"); (function(){($try(function(){a.doscroll();return document.id(a).inject(document.body).set("html","temp").dispose()...
...And 4 more matches
Venkman Introduction - Archive of obsolete content
even if you are al
ready using venkman, the features, procedures, and tips described here will make you a more confident web developer and debugger.
... if you don't al
ready have venkman or would like to upgrade, you can easily get the latest version from firefox add-ons.
...if the source text you are debugging is poorly formatted, pretty print can help make it easier to
read by inserting line breaks and whitespace in appropriate places.
...And 4 more matches
Using XPInstall to Install Plugins - Archive of obsolete content
for plugin vendors who have al
ready written a native code (e.g.
...if you are developing a plugin and wish to make it scriptable,
read the relevant portions of the plugin api.
...rather than re-initiate the download of the plugin with the yet another browser, the second netscape gecko browser can detect that an installation has al
ready occurred.
...And 4 more matches
Writing to Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...if this flag is not used, the data is written at the beginning of the file, overwriting what is al
ready there.
...And 4 more matches
Property Files - Archive of obsolete content
these would be
read by a script and displayed to the user.
... stringbundles you could write the code to
read properties yourself, however xul provides the stringbundle element which does this for you.
...this element
reads in the contents of a property file and builds a list of properties for you.
...And 4 more matches
timepicker - Archive of obsolete content
attributes disabled, hideseconds, increment,
readonly, tabindex, value properties amindicator, datevalue, disabled, hideseconds, hour, hourleadingzero, increment, is24hourclock, ispm, minute, minuteleadingzero, pmindicator,
readonly, second, secondleadingzero, tabindex, value examples <timepicker value="12:05"/> attributes disabled type: boolean indicates whether the element is disabled or not.
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
... hourleadingzero type: boolean a
read only value indicating whether a leading zero should be displayed before the hour when it is less than 10.
...And 4 more matches
NPP_Write - Archive of obsolete content
can be used to check stream progress or by range requests from npn_request
read.
...if the return value is smaller than the size of the buffer, the browser sends the remaining data to the plug-in through subsequent calls to npp_write
ready and npp_write.
...description the browser calls the npp_write function to deliver the data specified in a previous npp_write
ready call to the plug-in.
...And 4 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
please see the following th
reads on mozillazine for solutions to this issue: http://forums.mozillazine.org/viewtopic.php?f=18&t=2131121 http://forums.mozillazine.org/viewtopic.php?f=18&t=1953371&start=60 windows 7 aero not going into full screen mode properly on win7 with aero glass support firefox doesn't always go to full screen mode from a normal window properly.
... @media all and (-moz-windows-compositor) { /* make transition to fullscreen mode seamlessly in firefox 10+ */ #main-window[infullscreen="true"] { -moz-appearance: none; background-color: -moz-dialog!important; } } for more information about this issue please see bug 732757 and bug 732757 and this mozillazine th
read.
... style inspector's b
read crumb buttons are hard to
read the text labels of b
readcrumbs on the style inspector (tools > web developer > inspect) are too similar to the background colors making them very hard to
read.
...And 4 more matches
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
it is assumed that you have al
ready downloaded, extracted, and consumed the necessary documentation to get up and running with some basic rhino scripts.
... if you don’t al
ready have it, you’ll need to also download the jdbc driver for mysql, extract the class files, and include the path in your classpath environment variable.
... importpackage( java.net ); // connect to the remote resource var u = new url( "http://www.mozilla.org/news.rdf" ); var c = u.openconnection(); c.connect(); //
read in the raw data var s = new java.io.inputstream
reader( c.getinputstream() ); var b = new java.io.buffered
reader( s ); var l, str = ""; while( ( l = b.
readline() ) != null ) { // skip if( l != "" ) { str = str + l + "\n"; } } // define the namespaces, first the default, // then additional namespaces default xml namespace = "http://purl.org/rss/1.0/"; var dc = new namespace( "http://purl.org/d...
...And 4 more matches
Reference - Archive of obsolete content
i also just
read a document on proper inheritance using apply().
...this will impact the presentation of future examples if it hasn't al
ready.
...--jonnyq i've al
ready added those methods in the methods listing, but i haven't defined them yet.
...And 4 more matches
RDF in Mozilla FAQ - Archive of obsolete content
var remote = ds.queryinterface(components.interfaces.nsirdfremotedatasource); if (remote.loaded) { alert("the datasource was al
ready loaded!"); } else { alert("the datasource wasn't loaded, but it's loading now!"); } say the datasource wasn't loaded, and is loading asynchronously.
...var remote = ds.queryinterface(components.interfaces.nsirdfremotedatasource); if (remote.loaded) { alert("the datasource was al
ready loaded!"); } else { alert("the datasource wasn't loaded, but it's loading now!"); // rdf/xml datasources are all nsirdfxmlsinks var sink = ds.queryinterface(components.interfaces.nsirdfxmlsink); // attach the observer to the datasource-as-sink sink.addxmlsinkobserver(observer); // now observer's methods will be called-back as // the load progresses.
...you can "make a resource into a container" if it isn't one al
ready using makeseq(), makebag(), or makealt().
...And 4 more matches
Index - Game development
it is assumed that before
reading this you have
read our 3d collision detection introductory article first, and have basic knowledge about three.js.
... 16 building up a basic demo with a-frame 3d, a-frame, vr, virtual reality, web, webgl the webxr and webgl apis al
ready enable us to start creating virtual reality (vr) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier.
... 20 building up a basic demo with the playcanvas engine 3d, animation, beginner, canvas, games, playcanvas, tutorial, webgl, camera, engine, lighting, rendering now you can continue
reading the playcanvas editor article, go back to the building up a basic demo with playcanvas page, or go back a level higher to the main 3d games on the web page.
...And 4 more matches
Building up a basic demo with A-Frame - Game development
the webxr and webgl apis al
ready enable us to start creating virtual reality (vr) experiences inside web browsers, but the community is still waiting for tools and libraries to appear, to make this easier.
... high level overview the current version of a-frame is 0.3.2, which means it's highly experimental, but it al
ready works and you can test it right away in the browser.
...add it now: <a-box color="#0095dd" position="0 1 0" rotation="20 40 0"> </a-box> it contains a few parameters al
ready defined: color, position and rotation — these are fairly obvious, and define the base color of the cube, the position inside the 3d scene, and the rotation of the cube.
...And 4 more matches
Assessment: Accessibility troubleshooting - Learn web development
color the text is difficult to
read because of the current color scheme.
... semantic html the content is still not very accessible — report on what happens when you try to navigate it using a screen
reader.
... can you update the article text to make it easier for screen
reader users to navigate?
...And 4 more matches
What is accessibility? - Learn web development
some users will rely on screen
readers, which is software that
reads digital text aloud.
... some screen
reader examples include: some are paid commercial products, like jaws (windows) and dolphin screen
reader (windows).
... it is a good idea to familiarise yourself with screen
readers; you should also set up a screen
reader and have a play around with it, to get an idea of how it works.
...And 4 more matches
How CSS is structured - Learn web development
second, inline css also mixes (css) presentational code with html and content, making everything more difficult to
read and understand.
...
read on and have fun!
...we have al
ready discovered a variety of selectors in the getting started with css tutorial.
...And 4 more matches
What is a Domain Name? - Learn web development
they provide a human-
readable address for any web server available on the internet.
... to solve all those problems we use human-
readable addresses called domain names.
... deeper dive structure of domain names a domain name has a simple structure made of several parts (it might be one part only, two, three...), separated by dots and
read from right to left: each of those parts provides specific information about the whole domain name.
...And 4 more matches
JavaScript basics - Learn web development
you should see something like this: note: the reason the instructions (above) place the <script> element near the bottom of the html file is that the browser
reads code in the order it appears in the file.
... -, *, / 9 - 3; 8 * 2; // multiply in js is an asterisk 9 / 3; assignment as you've seen al
ready: this assigns a value to a variable.
...you have al
ready seen some uses of functions previously.
...And 4 more matches
Document and website structure - Learn web development
many web designers consider the navigation bar to be part of the header rather than an individual component, but that's not a requirement; in fact, some also argue that having the two separate is better for accessibility, as screen
readers can
read the two features better if they are separate.
... main content: a big area in the center that contains most of the unique content of a given webpage, for example, the video you want to watch, or the main story you're
reading, or the map you want to view, or the news headlines, etc.
... in your html code, you can mark up sections of content based on their functionality — you can use elements that represent the sections of content described above unambiguously, and assistive technologies like screen
readers can recognise those elements and help with tasks like "find the main navigation", or "find the main content." as we mentioned earlier in the course, there are a number of consequences of not using the right element structure and semantics for the right job.
...And 4 more matches
HTML table basics - Learn web development
one thing you'll notice is that the table does look a bit more
readable there — this is because the table you see above on this page has minimal styling, whereas the github version has more significant css applied.
... we won't focus on css in this module, but we have provided a minimal css stylesheet for you to use that will make your tables more
readable than the default you get without any styling.
...the main reasons are as follows: layout tables reduce accessibility for visually impaired users: screen
readers, used by blind people, interpret the tags that exist in an html page and
read out the contents to the user.
...And 4 more matches
Introducing asynchronous JavaScript - Learn web development
e here, and see the source): const btn = document.queryselector('button'); btn.addeventlistener('click', () => { alert('you clicked me!'); let pelem = document.createelement('p'); pelem.textcontent = 'this is a newly-added paragraph.'; document.body.appendchild(pelem); }); in this block, the lines are executed one after the other: we grab a reference to a <button> element that is al
ready available in the dom.
...this is because as we said in the previous article, javascript is single th
readed.
... only one thing can happen at a time, on a single main th
read, and everything else is blocked until an operation completes.
...And 4 more matches
Aprender y obtener ayuda - Learn web development
this article provides some hints and tips in both of these areas that will help you get more out of learning web development, as well as further
reading so you can find out more information about each sub-topic should you wish..
... this is why it is usually good to
read some introductory material first to get a high-level understanding of an area before you leap into the specific details.
... when you have worked out a weekly schedule, then you should keep a record of what you manage to do each week in a simple sp
readsheet or even in a notebook!
...And 4 more matches
Understanding client-side JavaScript frameworks - Learn web development
we are not aiming to exhaustively teach you everything you need to know about react/reactdom, or vue, or some other specific framework; the framework teams' own docs (and other resources) do that job al
ready.
...this article will walk you through putting the basic app component structure and styling in place,
ready for individual component definition and interactivity, which we'll add later.
...accessibility in react in our final tutorial article, we'll focus on (pun intended) accessibility, including focus management in react, which can improve usability and reduce confusion for both keyboard-only and screen
reader users.
...And 4 more matches
Handling common HTML and CSS problems - Learn web development
responsive design problems are also common — a site that looks good in a desktop browser might provide a terrible experience on a mobile device, because the content is too small to
read, or perhaps the site is slow because of expensive animations.
...for example, you might use a css framework and find that one of the class names it uses clashes with one you've al
ready used for a different purpose.
... or you might find that html generated by some kind of third party api (generating ad banners, for example) includes a class name or id that you are al
ready using for a different purpose.
...And 4 more matches
Strategies for carrying out testing - Learn web development
of course, this relies on you al
ready having a site to use it on, so it isn't much good for completely new sites.
...your site should now be
ready to start reporting analytics data.
... the text should be
readable.
...And 4 more matches
Commenting IDL for better documentation
happily, following these recommendations will also help ensure your comments are extremely human-
readable, too.
...we will take your comments and notes and turn them into beautiful, easy to search and
read documentation.
...following the rules below will ensure that our tools are able to produce the best possible results, and will have the added bonus of making your comments easier to
read!
...And 4 more matches
IPDL Tutorial
ipdl, short for "inter-process-communication protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or th
reads in an organized and secure way.
...the following ipdl code defines a very basic interaction of browser and plugin actors: async protocol pplugin { child: async init(nscstring pluginpath); async shutdown(); parent: async
ready(); }; this code declares the pplugin protocol.
...one message can be sent from the child to the parent,
ready().
...And 4 more matches
CustomizableUI.jsm
events are dispatched synchronously on the ui th
read, so if you can delay any/some of your processing, that is advisable.
...anode is the widget's node, acontainer is the area it was moved into (nb: it might al
ready have been there and been moved to a different position!) onwidgetundomove(anode, acontainer) fired after undoing a reset to default placements moves a widget's node to a different location.
... anode is the widget's node, acontainer is the area it was moved into (nb: it might al
ready have been there and been moved to a different position!) onareareset(aarea, acontainer) fired after a reset to default placements is complete on an area's dom node.
...And 4 more matches
Promise
you don't need to import the promise.jsm module to use a promise object to which you al
ready have a reference.
...if the associated promise has al
ready been resolved, either to a value, a rejection, or another promise, this method does nothing.
... note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is fulfilled or rejected, will have no effect the second time, as the associated promise is al
ready resolved to the pending promise.
...And 4 more matches
Index
you also need to determine if a localization effort al
ready exists for your locale.
...now you're
ready for the final phase: becoming an official l10n release.
...editing the raw xliff file is also rather easy, especially if you're al
ready familiar with xml.
...And 4 more matches
Scroll-linked effects
these effects work well in browsers where the scrolling is done synchronously on the browser's main th
read.
...in the asynchronous scrolling model, the visual scroll position is updated in the compositor th
read and is visible to the user before the scroll event is updated in the dom and fired on the main th
read.
...as the scroll event listener runs in the javascript on the browser's main th
read, it will be asynchronous relative to the user-visible scrolling.
...And 4 more matches
NSPR Poll Method
the prototype of the poll method is print16 poll_method(prfiledesc *fd, print16 in_flags, print16 *out_flags); the purpose of the poll method is to allow a layer to modify that flags that will ultimately be used in the call to the underlying network transport's select (or equivalent) function, and to indicate that a layer is al
ready able to make progress in the manner suggested by the polling flags.
... for pr_recv, you should pass pr_poll_
read as the in_flags argument to the poll method for pr_send, you should pass pr_poll_write as the in_flags argument to the poll method out_flags [output argument] if an i/o layer is
ready to satisfy the i/o request defined by in_flags without involving the underlying network transport, its poll method sets the corresponding event in *out_flags on return.
...if the caller wishes to test for
read ready (that is, pr_poll_
read is set in in_flags) and the layer has input data buffered, the poll method would set the pr_poll_
read event in *out_flags.
...And 4 more matches
PR_CNotify
notify a th
read waiting on a change in the state of monitored data.
...the calling th
read must be in the monitor defined by the value of the address.
... returns pr_success indicates that the calling th
read is the holder of the mutex for the monitor referred to by the address parameter.
...And 4 more matches
PR_CreateFileMap
prot protection option for
read and write accesses of a file mapping.
... this parameter consists of one of the following options: pr_prot_
readonly.
...
read-only access.
...And 4 more matches
PR_SetConcurrency
creates extra virtual processor th
reads.
... syntax #include <prinit.h> void pr_setconcurrency(pruintn numcpus); parameter pr_setconcurrency has one parameter: numcpus the number of extra virtual processor th
reads to be created.
... description setting concurrency controls the number of virtual processors that nspr uses to implement its m x n th
reading model.
...And 4 more matches
PR_Sleep
causes the current th
read to yield for a specified amount of time.
... syntax #include <prth
read.h> prstatus pr_sleep(printervaltime ticks); parameter pr_sleep has the following parameter: ticks the number of ticks you want the th
read to sleep for (see printervaltime).
...if you set ticks to pr_interval_no_wait, the th
read yields.
...And 4 more matches
An overview of NSS Internals
in order to support multiple operating systems (os), it is based on a cross platform portability layer, called the netscape portable runtime (nspr), which provides cross platform application programming interfaces (apis) for os specific apis like file system access, memory management, network communication, and multith
readed programming.
...a trust anchor is just another x.509 certificate that is al
ready known and has been deliberately marked as trusted by a software vendor, administrators inside an organizational infrastructure, or the software user.
...nss will usually create an in-memory (ram) presentation of certificates, once a certificate has been received from the network,
read from disk, or looked up from the database, and prepare in-memory data structures that contain the certificate's properties, as well as providing a handle for the programmer to use.
...And 4 more matches
JS_SuspendRequest
since then, a jsruntime is tied to the th
read that created it; it may not be accessed by any other th
read.
... suspends the calling th
read's current request, if any, to allow the th
read to block or perform time-consuming calculations.
... description in js_th
readsafe builds, when a multi-th
readed application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after.
...And 4 more matches
JS_YieldRequest
momentarily suspend the current jsapi request, allowing garbage collection to run if another th
read has requested it.
... syntax void js_yieldrequest(jscontext *cx); name type description cx jscontext * the jscontext that is currently in a request on the calling th
read.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...And 4 more matches
SpiderMonkey 1.8.5
multith
readed js programs that race against the same objects are now explicitly not supported.
... multith
readed programs are allowed, but each th
read must operate on objects in a separate compartment, isolated from the other th
reads.
... no compartment may execute js code or call into jsapi on two os th
reads at the same time.
...And 4 more matches
Mork
the information on this page was constructed by
reading the source code of the mork database in mozilla and attempting to codify what it parses as faithfully as possible.
...for example, the message summary format files use a table for each th
read, where the meta-rows represent information about the th
read in general.
...mork
reader usage mork
reader has both internal and external linkage static libraries that can be used.
...And 4 more matches
extIExtension
method overview fixme: attributes attribute type description id
readonly attribute astring the id of the extension.
... name
readonly attribute astring the name of the extension.
... enabled
readonly attribute boolean true if the extension is currently enabled.
...And 4 more matches
Component Internals
read on to see how components are generally implemented in xpcom, or you can skip to the next chapter, where the weblock component tutorial takes you step by step through the component creation process.
...xpcom
reads this file into an in-memory database.
... type library manifests another important file that xpcom
reads in is the type library manifest file.
...And 4 more matches
nsString external
class declaration basic strings method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral ...
...methods constructors void nsstring_external() - source void nsstring_external(const nsstring_external&) - source parameters nsstring_external& astring void nsstring_external(const nsastring&) - source parameters nsastring& a
readable void nsstring_external(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength get prunichar* get() const - source operator= nsstring_external& operator=(const nsstring_external&) - source parameters nsstring_external& astring nsastrin...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
...And 4 more matches
mozIStorageAggregateFunction
there are a number of al
ready defined aggregate functions provided by sqlite.
... note this callback is executed on the th
read that the statement or trigger is executing on.
... if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different th
read from the rest of your code.
...And 4 more matches
nsIAutoCompleteInput
read only.
...
read only.
... popup nsiautocompletepopup the view in which results will be displayed.
read only.
...And 4 more matches
nsIChannel
this interface must be used only from the xpcom main th
read.
... securityinfo nsisupports transport-level security information (if any, else null) corresponding to the channel, normally presented through the interfaces nsitransportsecurityinfo and nsisslstatusprovider
read only.
...
read only.
...And 4 more matches
nsIContentView
method overview void scrollby(in float dxpx, in float dypx); void scrollto(in float xpx, in float ypx); void setscale(in float xscale, in float yscale); attributes attribute type description contentheight float
read only.
...
read only.
...
read only.
...And 4 more matches
nsICookie2
read only.
...
read only.
...
read only.
...And 4 more matches
nsIDNSService
esolve(in autf8string ahostname, in unsigned long aflags, in nsidnslistener alistener, in nsieventtarget alistenertarget); void init(); obsolete since gecko 1.8 nsidnsrecord resolve(in autf8string ahostname, in unsigned long aflags); void shutdown(); obsolete since gecko 1.8 attributes attribute type description myhostname autf8string
read only.
...if not null, this parameter specifies the nsieventtarget of the th
read on which the listener's onlookupcomplete should be called.
... if this parameter is null, then onlookupcomplete will be called on an unspecified th
read (possibly recursively).
...And 4 more matches
nsIDOMXULElement
boxobject nsiboxobject
read only.
... builder nsixultemplatebuilder
read only.
... controllers nsicontrollers
read only.
...And 4 more matches
nsIMemoryReporter
read only.
... description autf8string a human-
readable description of this memory usage report.
...
read only.
...And 4 more matches
nsIStackFrame
inherits from: nsisupports last changed in gecko 1.7 method overview string tostring(); attributes attribute type description caller nsistackframe
read only.
...null indicates "no data"
read only.
...
read only.
...And 4 more matches
nsIURIFixupInfo
read only.
...
read only.
...
read only.
...And 4 more matches
nsMsgNavigationType
for example to move forward a message, you would call: // assuming gdbview is a global nsimsgdbview var resultid = new object(); var resultindex = new object(); var th
readindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.nextmessage, resultid, resultindex, th
readindex, true); the nsmsgnavigationtype interface is defined as a global variable in thunderbird: var nsmsgviewcommandtype = components.interfaces.nsmsgviewcommandtype; mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... toggleth
readkilled 5 must match nsmsgviewcommandtype toggleth
readkilled.
... firstun
readmessage 6 go to the first un
read message in the view.
...And 4 more matches
XPCOM
file and memory management, th
reads, basic data structures (strings, arrays, variants), etc.
...to this end, there exist xpcom interfaces to
read and write registry data.
... this article will show you how to use the available interfaces in several mozilla products.aggregating the in-memory datasourceal
ready_addrefedal
ready_addrefed in association with nscomptr allows you to assign in a pointer without addrefing it.binary compatibilityif mozilla decides to upgrade to a compiler that does not have the same abi as the current version, any built component may fail.
...And 4 more matches
ArrayType
read only.
...
read only.
...
read only.
...And 4 more matches
AudioProcessingEvent - Web APIs
the web audio api audioprocessingevent represents events that occur when a scriptprocessornode input buffer is
ready to be processed.
... property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
...And 4 more matches
Blob - Web APIs
the blob object represents a blob, which is a file-like object of immutable, raw data; they can be
read as text or binary data, or converted into a
readablestream so its methods can be used for processing the data.
... instance properties blob.prototype.size
read only the size, in bytes, of the data contained in the blob object.
... blob.prototype.type
read only a string indicating the mime type of the data contained in the blob.
...And 4 more matches
BluetoothRemoteGATTCharacteristic - Web APIs
interface interface bluetoothremotegattcharacteristic {
readonly attribute bluetoothremotegattservice service;
readonly attribute uuid uuid;
readonly attribute bluetoothcharacteristicproperties properties;
readonly attribute dataview?
... value; promise<bluetoothremotegattdescriptor> getdescriptor(bluetoothdescriptoruuid descriptor); promise<sequence<bluetoothremotegattdescriptor>> getdescriptors(optional bluetoothdescriptoruuid descriptor); promise<dataview>
readvalue(); promise<void> writevalue(buffersource value); promise<void> startnotifications(); promise<void> stopnotifications(); }; bluetoothremotegattcharacteristic implements eventtarget; bluetoothremotegattcharacteristic implements characteristiceventhandlers; properties bluetoothremotegattcharacteristic.service
read only returns the bluetoothgattservice this characteristic belongs to.
... bluetoothremotegattcharacteristic.uuid
read only returns a domstring containing the uuid of the characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic.
...And 4 more matches
BluetoothRemoteGATTDescriptor - Web APIs
interface interface bluetoothremotegattdescriptor {
readonly attribute bluetoothgattcharacteristic characteristic;
readonly attribute uuid uuid;
readonly attribute arraybuffer?
... value; promise<arraybuffer>
readvalue(); promise<void> writevalue(buffersource value); }; properties bluetoothremotegattdescriptor.characteristic
read only returns the bluetoothremotegattcharacteristic this descriptor belongs to.
... bluetoothremotegattdescriptor.uuid
read only returns the uuid of the characteristic descriptor, for example '00002902-0000-1000-8000-00805f9b34fb' for theclient characteristic configuration descriptor.
...And 4 more matches
Body - Web APIs
properties body.body
read only a simple getter used to expose a
readablestream of the body contents.
... body.bodyused
read only a boolean that indicates whether the body has been
read.
... methods body.arraybuffer() takes a response stream and
reads it to completion.
...And 4 more matches
Clipboard - Web APIs
the clipboard interface implements the clipboard api, providing—if the user grants permission—both
read and write access to the contents of the system clipboard.
... calls to the methods of the clipboard object will not succeed if the user hasn't granted the needed permissions using the permissions api and the "clipboard-
read" or "clipboard-write" permission as appropriate.
...
read() requests arbitrary data (such as images) from the clipboard, returning a promise.
...And 4 more matches
ClipboardItem - Web APIs
the clipboarditem interface of the clipboard api represents a single item format, used when
reading or writing data via the clipboard api.
... that is clipboard.
read() and clipboard.write() respectively.
...the clipboard-
read permission must be requested, which you can do by trying to
read data from the clipboard.
...And 4 more matches
FileSystemEntry - Web APIs
it includes methods for working with files—including copying, moving, removing, and
reading files—as well as information about a file it points to—including the file name and its path from the root to the entry.
...chrome shows a
read-only list of all the files and folders stored the origin of your app.
... filesystem
read only a filesystem object representing the file system in which the entry is located.
...And 4 more matches
FileSystemEntrySync - Web APIs
it includes methods for working with files—including copying, moving, removing, and
reading files—as well as information about the file it points to—including the file name and its path from the root to the entry.
...chrome shows a
read-only list of all the files and folders stored the origin of your app.
...irectoryentrysync parent, optional domstring newname) raises (fileexception); filesystementrysync copyto(in directoryentrysync parent, optional domstring newname) raises (fileexception); domstring tourl(); void remove() raises (fileexception); directoryentrysync getparent(); attributes attribute type description filesystem
readonly filesystemsync the file system where the entry resides.
...And 4 more matches
GeolocationCoordinates - Web APIs
geolocationcoordinates.latitude
read only secure context returns a double representing the position's latitude in decimal degrees.
... geolocationcoordinates.longitude
read only secure context returns a double representing the position's longitude in decimal degrees.
... geolocationcoordinates.altitude
read only secure context returns a double representing the position's altitude in meters, relative to sea level.
...And 4 more matches
HTMLImageElement.alt - Web APIs
perhaps the most important reason to use the alt tag is to support accessibility, as the alt text may be used by screen
readers and other assistive technologies to help differently-abled users make full use of your content.
... it will be
read aloud or sent to the touch device, for example, to support visually impaired users.
... think of it like this: when choosing alt strings for your images, imagine what you would say when
reading the page to someone over the phone without mentioning that there's an image on the page.
...And 4 more matches
HTMLOutputElement - Web APIs
htmloutputelement.form
read only an htmlformelement indicating the form associated with the control, reflecting the form html attribute if it is defined.
... htmloutputelement.htmlfor
read only a domtokenlist reflecting the for html attribute, containing a list of ids of other elements in the same document that contribute to (or otherwise affect) the calculated value.
... htmloutputelement.labels
read only a nodelist of <label> elements associated with the element.
...And 4 more matches
HTMLTableCellElement - Web APIs
this is used to offer a shorter term for use by screen
readers in particular, and is a valuable accessibility tool.
... htmltablecellelement.cellindex
read only a long integer representing the cell's position in the cells collection of the <tr> the cell is contained within.
... htmltablecellelement.headers
read only is a domsettabletokenlist describing a list of id of <th> elements that represents headers associated with the cell.
...And 4 more matches
IDBDatabase.transaction() - Web APIs
transactions are opened in one of three modes:
readonly,
readwrite and
readwriteflush (non-standard, firefox-only.) versionchange mode can't be specified here.
... if you don't provide the parameter, the default access mode is
readonly.
... to avoid slowing things down, don't open a
readwrite transaction unless you actually need to write into the database.
...And 4 more matches
IDBDatabase - Web APIs
e" target="_top"><rect x="151" y="1" width="110" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="206" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">idbdatabase</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties idbdatabase.name
read only a domstring that contains the name of the connected database.
... idbdatabase.version
read only a 64-bit integer that contains the version of the connected database.
... idbdatabase.objectstorenames
read only a domstringlist that contains a list of the names of the object stores currently in the connected database.
...And 4 more matches
IDBRequest - Web APIs
each
reading and writing operation on a database is done using a request.
...each request has a
readystate that is set to the 'pending' state; this changes to 'done' when the request is completed or fails.
... idbrequest.error
read only returns a domexception in the event of an unsuccessful request, indicating what went wrong.
...And 4 more matches
IDBTransaction.mode - Web APIs
the mode
read-only property of the idbtransaction interface returns the current mode for accessing the data in the object stores in the scope of the transaction (i.e.
... is the mode to be
read-only, or do you want to write to the object stores?) the default value is
readonly.
... syntax var mycurrentmode = idbtransaction.mode; value an idbtransactionmode object defining the mode for isolating access to data in the current object stores: value explanation
readonly allows data to be
read but not changed.
...And 4 more matches
IntersectionObserverEntry - Web APIs
properties intersectionobserverentry.boundingclientrect
read only returns the bounds rectangle of the target element as a domrect
readonly.
... intersectionobserverentry.intersectionratio
read only returns the ratio of the intersectionrect to the boundingclientrect.
... intersectionobserverentry.intersectionrect
read only returns a domrect
readonly representing the target's visible area.
...And 4 more matches
LockedFile - Web APIs
properties lockedfile.filehandle
read only the filehandle object from which the lock was opened.
... lockedfile.mode
read only the mode for accessing the file; can be
readonly or
readwrite.
... lockedfile.active
read only a flag indicating if the file can be accessed (true) or not (false).
...And 4 more matches
NDEFRecord - Web APIs
the ndefrecord interface of the web nfc api is an abstract interface that represents data that can be
read from or written to compatible nfc devices, e.g.
... attributes ndefrecord.recordtype
read only represents the ndef record type.
... ndefrecord.mediatype
read only represents the mime type of the ndef record payload.
...And 4 more matches
PaymentRequestEvent - Web APIs
properties instrumentkey
read only returns a paymentinstrument object reflecting the payment instrument selected by the user or an empty string if the user has not registered or chosen a payment instrument.
... methoddata
read only returns an array of paymentmethoddata objects containing payment method identifers for the payment methods that the web site accepts and any associated payment method specific data.
... modifiers
read only returns an array of objects containing changes to payment details.
...And 4 more matches
SVGComponentTransferFunctionElement - Web APIs
svgcomponenttransferfunctionelement.type
read only an svganimatedenumeration corresponding to the type attribute of the given element.
... svgcomponenttransferfunctionelement.tablevalues
read only an svganimatednumberlist corresponding to the tablevalues attribute of the given element.
... svgcomponenttransferfunctionelement.slope
read only an svganimatednumber corresponding to the slope attribute of the given element.
...And 4 more matches
SVGPathSegList - Web APIs
gned long index) svgpathseg insertitembefore(in svgpathseg newitem, in unsigned long index) svgpathseg replaceitem(in svgpathseg newitem, in unsigned long index) svgpathseg removeitem(in unsigned long index) svgpathseg appenditem(in svgpathseg newitem) properties
readonly unsigned long numberofitems normative document svg 1.1 (2nd edition) properties name type description numberofitems
read only unsigned long the number of items in the list.
...if the inserted item is al
ready in a list, it is removed from its previous list before it is inserted into this list.
... if newitem is al
ready in a list, it is removed from its previous list before it is inserted into this list.
...And 4 more matches
SVGPatternElement - Web APIs
svgpatternelement.patternunits
read only an svganimatedenumeration corresponding to the patternunits attribute of the given <pattern> element.
... svgpatternelement.patterncontentunits
read only an svganimatedenumeration corresponding to the patterncontentunits attribute of the given <pattern> element.
... svgpatternelement.patterntransform
read only an svganimatedtransformlist corresponding to the patterntransform attribute of the given <pattern> element.
...And 4 more matches
Selection - Web APIs
properties selection.anchornode
read only returns the node in which the selection begins.
... selection.anchoroffset
read only returns a number representing the offset of the selection's anchor within the anchornode.
... selection.focusnode
read only returns the node in which the selection ends.
...And 4 more matches
ServiceWorkerMessageEvent - Web APIs
serviceworkermessageevent.data
read only returns the event's data.
... serviceworkermessageevent.origin
read only returns the origin of the service worker's environment settings object.
... serviceworkermessageevent.lasteventid
read only represents, in server-sent events, the last event id of the event source.
...And 4 more matches
SharedWorkerGlobalScope - Web APIs
sharedworkerglobalscope.name
read only the name that the sharedworker was (optionally) given when it was created using the sharedworker() constructor.
... sharedworkerglobalscope.applicationcache
read only this property returns the applicationcache object for the worker (see using the application cache).
... workerglobalscope.console
read only returns the console associated with the worker.
...And 4 more matches
TextTrack - Web APIs
texttrack.activecues
read only a texttrackcuelist object listing the currently active set of text track cues.
... texttrack.cues
read only a texttrackcuelist which contains all of the track's cues.
... texttrack.id
read only a domstring which identifies the track, if it has one.
...And 4 more matches
WebGL constants - Web APIs
0x8038 texture_binding_2d 0x8069 sample_buffers 0x80a8 samples 0x80a9 sample_coverage_value 0x80aa sample_coverage_invert 0x80ab compressed_texture_formats 0x86a3 vendor 0x1f00 renderer 0x1f01 version 0x1f02 implementation_color_
read_type 0x8b9a implementation_color_
read_format 0x8b9b browser_default_webgl 0x9244 buffers constants passed to webglrenderingcontext.bufferdata(), webglrenderingcontext.buffersubdata(), webglrenderingcontext.bindbuffer(), or webglrenderingcontext.getbufferparameter().
... constant name value description current_vertex_attrib 0x8626 passed to getvertexattrib to
read back the current vertex attribute.
... constant name value description
read_buffer 0x0c02 unpack_row_length 0x0cf2 unpack_skip_rows 0x0cf3 unpack_skip_pixels 0x0cf4 pack_row_length 0x0d02 pack_skip_rows 0x0d03 pack_skip_pixels 0x0d04 texture_binding_3d 0x806a unpack_skip_images 0x806d unpack_image_height 0x806e ...
...And 4 more matches
Background audio processing using AudioWorklet - Web APIs
the drawback to scriptprocessornode was simple: it ran on the main th
read, thus blocking everything else going on until it completed execution.
...an audio context's audio worklet is a worklet which runs off the main th
read, executing audio processing code added to it by calling the context's audioworklet.addmodule() method.
...it also handles creating the audio context if it hasn't al
ready been done.
...And 4 more matches
WritableStream - Web APIs
properties writablestream.locked
read only a boolean indicating whether the writablestream is locked to a writer.
... const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
...And 4 more matches
XPathResult - Web APIs
properties xpathresult.booleanvalue
read only a boolean representing the value of the result if resulttype is boolean_type.
... xpathresult.invaliditeratorstate
read only signifies that the iterator has become invalid.
... xpathresult.numbervalue
read only a number representing the value of the result if resulttype is number_type.
...And 4 more matches
XRInputSource - Web APIs
properties gamepad
read only a gamepad object describing the state of the buttons and axes on the xr input source, if it is a gamepad or comparable device.
... gripspace
read only an xrspace whose origin tracks the pose which is used to render objects which should appear as if they're held in the hand indicated by handedness.
...
read on in the main article on gripspace for more details on how to use this space.
...And 4 more matches
Web APIs
e constrainboolean constraindomstring constraindouble constrainulong contentindex contentindexevent convolvernode countqueuingstrategy crashreportbody credential credentialscontainer crypto cryptokey cryptokeypair customelementregistry customevent d domconfiguration domerror domexception domhighrestimestamp domimplementation domimplementationlist domlocator dommatrix dommatrix
readonly domobject domparser dompoint dompointinit dompoint
readonly domquad domrect domrect
readonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody devicelightevent devicemotionevent devicemotioneventacceleration devicemotioneventrotationrate deviceor...
...ientationevent deviceproximityevent directoryentrysync directory
readersync displaymediastreamconstraints document documentfragment documentorshadowroot documenttimeline documenttouch documenttype doublerange dragevent dynamicscompressornode e ext_blend_minmax ext_color_buffer_float ext_color_buffer_half_float ext_disjoint_timer_query ext_float_blend ext_frag_depth ext_srgb ext_shader_texture_lod ext_texture_compression_bptc ext_texture_compression_rgtc ext_texture_filter_anisotropic eckeygenparams eckeyimportparams ecdhkeyderiveparams ecdsaparams effecttiming element elementcssinlinestyle elementtraversal errorevent event eventlistener eventsource eventtarget extendableevent extendablemessageevent f featurepolicy federatedcredential fetchevent file fileentrysync fileerror fil...
...eexception filelist file
reader file
readersync filerequest filesystem filesystemdirectoryentry filesystemdirectory
reader filesystementry filesystementrysync filesystemfileentry filesystemflags filesystemsync focusevent fontface fontfaceset fontfacesetloadevent formdata formdataentryvalue formdataevent fullscreenoptions g gainnode gamepad gamepadbutton gamepadevent gamepadhapticactuator geolocation geolocationcoordinates geolocationposition geolocationpositionerror geometryutils gestureevent globaleventhandlers gyroscope h htmlanchorelement htmlareaelement htmlaudioelement htmlbrelement htmlbaseelement htmlbasefontelement htmlbodyelement htmlbuttonelement htmlcanvaselement htmlcollection htmlcontentelement htmldlistelement htmldataelement htmldatalistelement...
...And 4 more matches
Operable - Accessibility
note: to
read the w3c definitions for operable and its guidelines and success criteria, see principle 2: operable — user interface components and navigation must be operable.
... guideline 2.2 — enough time: provide users enough time to
read and use content this guideline covers situations in which functionality may have a time limit.
... understanding timeouts note: also see the wcag description for guideline 2.2 enough time: provide users enough time to
read and use content.
...And 4 more matches
user-modify - CSS: Cascading Style Sheets
/* keyword values */ user-modify:
read-only; user-modify:
read-write; user-modify: write-only; /* global values */ user-modify: inherit; user-modify: initial; user-modify: unset; this property has been replaced by the contenteditable attribute.
... values
read-only default value.
... contents are
read-only.
...And 4 more matches
HTML attribute reference - HTML: Hypertext Markup Language
buffered <audio>, <video> contains the time range of al
ready buffered media.
... label <optgroup>, <option>, <track> specifies a user-
readable title of the element.
... radiogroup <command>
readonly <input>, <textarea> indicates whether the element can be edited.
...And 4 more matches
<input type="search"> - HTML: Hypertext Markup Language
ocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty
readonly a boolean attribute indicating whether or not the contents of the input should be
read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id o...
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
... note: because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
...And 4 more matches
Promise - JavaScript
to learn about the way promises work and how you can use them, we advise you to
read using promises first.
...if the promise has al
ready been fulfilled or rejected when a corresponding handler is attached, the handler will be called, so there is no race condition between an asynchronous operation completing and its handlers being attached.
...promises in javascript represent processes that are al
ready happening, which can be chained with callback functions.
...And 4 more matches
CSS and JavaScript animation performance - Web Performance
for more details
read animating with javascript from setinterval to requestanimationframe.
...this can occur because css transitions/animations are simply resampling element styles in the main ui th
read before each repaint event happens, which is almost the same as resampling element styles via a requestanimationframe() callback, also triggered before the next repaint.
... if both animations are made in the main ui th
read, there is no difference performance-wise.
...And 4 more matches
page-worker - Archive of obsolete content
for example, the content script might
read some content and send it back to the main add-on, which could store it using the simple-storage api.
...e page to the add-on: var script = "var elements = document.queryselectorall('h2 > span'); " + "for (var i = 0; i < elements.length; i++) { " + " postmessage(elements[i].textcontent) " + "}"; // create a page worker that loads wikipedia: pageworkers.page({ contenturl: "http://en.wikipedia.org/wiki/internet", contentscript: script, contentscriptwhen: "
ready", onmessage: function(message) { console.log(message); } }); for conciseness, this example creates the content script as a string and uses the contentscript property.
... scripting trusted page content we've al
ready seen that you can package html files in your add-on's data directory and load them using page-worker.
...And 3 more matches
ui/sidebar - Archive of obsolete content
there are two events emitted by the sidebar which will give you a worker: attach and
ready.
... listen to attach if the first message in your add-on goes from the sidebar scripts to the main add-on code, and listen to
ready if the first message goes from the main add-on code to the sidebar script.
...you should see console output like: console.log: add-on: add-on script got the message console.log: add-on: sidebar script got the reply using
ready the
ready event is emitted when the dom for the sidebar's content is
ready.
...And 3 more matches
Migrating from Internal Linkage to Frozen Linkage - Archive of obsolete content
- #include "nsastring.h"- #include "nsstring.h"- #include "ns
readableutils.h"- #include "nsescape.h" + #include "nsstringapi.h" on windows, if you see the following error, you are including a header you shouldn't be: nsstringfwd.h(60) : fatal error c1001: internal compiler error to debug this error, make in the failing directory, adding the /showincludes directive to figure out what is being included incorrectly: make -c directory/that/failed os_cppflags=-showin...
...use .setlength() instead: nsstring mystring = somestring; - mystring.truncate(4); + mystring.setlength(4); the frozen string api doesn't support the iterator or const_iterator classes, but you can use pointers the same way: nsstring mystring = somestring; - nsstring::const_iterator begin, end;- mystring.begin
reading(begin); mystring.end
reading(end); + const prunichar *begin, *end;+ mystring.begin
reading(&begin, &end); the frozen string api uses comparator functions instead of a virtual comparator class.
...ng or nscstring instead of promiseflatstring: nsstring firststring = somestring; nsstring secondstring = someotherstring; - nsstring combostring = firststring + secondstring; + nsstring combostring = firststring;+ combostring += secondstring; // or: combostring.append(secondstring); - nsresult rv = somefunc(promiseflatstring(combostring)); + nsresult rv = somefunc(combostring); removing the ns
readableutils.h from the headers list also means that we would not have access to appendutf16toutf8 kind of functions.
...And 3 more matches
MozAudioAvailable - Archive of obsolete content
properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean does the event normally bubble?
...And 3 more matches
Source code directories overview - Archive of obsolete content
dbm contains c code for managing,
reading and writing hash tables.
... ipc contains jpeg contains c code for
reading/writing jpeg images.
...it includes all the code for managing mail,
reading newsgroup messages, importing other mail formats, composing new messages and so on.
...And 3 more matches
Embedding Mozilla in a Java Application using JavaXPCOM - Archive of obsolete content
if your code cannot find the gre and keeps throwing filenotfoundexceptions during the getgrepathwithproperties(...) call, check whether you al
ready registered the gre on your system: gre registration the initembedding method kicks off the embedding process, allowing the java application to work with xpcom and mozilla.
... another example: (taken from rayh.co.uk) // note, on linux, gtk has to be al
ready initialized for this code to work mozilla moz = mozilla.getinstance(); // now we need to start an xul application, so we get an instance of the xpcom service manager nsiservicemanager servicemanager = moz.getservicemanager(); // now we need to get the @mozilla.org/toolkit/app-startup;1 service: nsiappstartup appstartup = (nsiappstartup)servicemanager.getservicebycontra...
...quals("comsd")) { file = new file(file, "components"); } } return file; } public file[] getfiles(string aprop) { file[] files = null; if (aprop.equals("apluginsdl")) { files = new file[1]; files[0] = new file(libxulpath, "plugins"); } return files; } } calling xpcom ui from another th
read appstartup.run() enters the main event loop and will stay there until the application exits.
...And 3 more matches
Migrate apps from Internet Explorer to Mozilla - Archive of obsolete content
not only does this make the code easier to
read, it simplifies adding support for new clients: var elm = getelmbyid("myid"); function getelmbyid(aid){ var element = null; if (ismozilla || isie5) element = document.getelementbyid(aid); else if (isnetscape4) element = document.layers[aid]; else if (isie4) element = document.all[aid]; return element; } the above code still has the issue of browser sniffing, or detectin...
... javascript also allows inline conditional statements, which can help with code
readability: var foo = (condition) ?
...for example, the following code assumes that the div node al
ready exists in the dom by the time the script block executes: ...
...And 3 more matches
Mozilla Application Framework in Detail - Archive of obsolete content
what this means to you as the developer is this: you can take advantage of skills you al
ready have with xml or web technologies to design and implement anything from a simple text editor to a comprehensive ide - complete with all of the interface widgets that you would find in virtually any major application framework.
...in addition, if the organization maintains sophisticated, interactive websites, it will al
ready possess a wealth of technical expertise that will be relevant for creating xul applications.
... in addition to the technologies al
ready mentioned, we go even further by allowing you to even create your own custom interface widgets.
...And 3 more matches
Getting File Information - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...the following four methods return true or false: nsifile.is
readable() - returns true if the file can be
read from.
...And 3 more matches
datepicker - Archive of obsolete content
attributes disabled, firstdayofweek,
readonly, type, tabindex, value properties date, dateleadingzero, datevalue, disabled, month, monthleadingzero, open,
readonly, tabindex, value, year, yearleadingzero examples <datepicker type="grid" value="2007-03-26"/> attributes disabled type: boolean indicates whether the element is disabled or not.
...
readonly type: boolean if set to true, then the user cannot change the value of the element.
... dateleadingzero type: boolean a
read only value indicating whether a leading zero should be displayed before the date when it is less than 10.
...And 3 more matches
menu - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... itemcount type: integer
read only property holding the number of child items.
...this property is
read-only.
...And 3 more matches
preference - Archive of obsolete content
attributes disabled, instantapply, inverted, name, onchange,
readonly, tabindex, type properties defaultvalue, disabled, hasuservalue, inverted, locked, name, preferences,
readonly, tabindex, type, value, valuefrompreferences methods reset examples <preferences> <preference id="pref_id" name="preference.name" type="int"/> </preferences> see preferences system for a complete example.
... id="findfile-window" title="find files" orient="horizontal" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type="text/javascript"> function myfunction(e){ /* do something cool here or just say the below */ alert(e.target.nodename); } </script> <textbox id="find-text" onchange="return myfunction(event);"/> </window>
readonly type: boolean if set to true, then the user cannot change the value of the element.
... properties defaultvalue (
readonly) returns the default value of the preference.
...And 3 more matches
richlistbox - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... itemcount type: integer
read only property holding the number of child items.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
...And 3 more matches
Getting started with XULRunner - Archive of obsolete content
if you need to change xulrunner itself or integrate it with external binaries you may need to
read that article.
...please continue
reading to learn the "what", "why" and "how" parts of building a xulrunner application.
... for information about mixing html elements into your xul
read adding html elements.
...And 3 more matches
SAX - Archive of obsolete content
quick start the sax parser functionality is available through the xml
reader component.
... to create one, use the following code: var xml
reader = components.classes["@mozilla.org/saxparser/xml
reader;1"] .createinstance(components.interfaces.nsisaxxml
reader); after you created the sax parser, you need to set the handlers for the events you're interested in and fire off the parsing process.
... all functionality is available through the nsisaxxml
reader interface.
...And 3 more matches
Using SSH to connect to CVS - Archive of obsolete content
this document assumes that you al
ready have a write-access cvs account to cvs.mozilla.org.
... anonymous/
read-only access via ssh is not available at this time.
... please see our source code page for directions accessing
read-only cvs, and our getting write access page for directions on obtaining write access.
...And 3 more matches
Organizing your CSS - Learn web development
if spaces, how many spaces?) having a set of rules you always follow reduces the amount of mental overhead needed when writing css, as some of the decisions are al
ready made.
... formatting
readable css there are a couple of ways you will see css formatted.
...we personally find it is more
readable to have each property and value pair on a new line.
...And 3 more matches
Getting started with CSS - Learn web development
it contains an <em>emphasized</em> element.</p> <ul> <li>item one</li> <li>item two</li> <li>item <em>three</em></li> </ul> </body> </html> note: if you are
reading this on a device or an environment where you can't easily create files, then don't worry — live code editors are provided below to allow you to write example code right here in the page.
... styling html elements by making our heading red we have al
ready demonstrated that we can target and style an html element.
... changing the default behavior of elements when we look at a well-marked up html document, even something as simple as our example, we can see how the browser is making the html
readable by adding some default styling.
...And 3 more matches
Fundamental text and font styling - Learn web development
as you'll have al
ready experienced in your work with html and css, text inside an element is laid out inside the element's content box.
... text-decoration: sets/unsets text decorations on fonts (you'll mainly use this to unset the default underline on links when styling them.) available values are: none: unsets any text decorations al
ready present.
... justify: makes the text sp
read out, varying the gaps in between the words so that all lines of text are the same width.
...And 3 more matches
Basic native form controls - Learn web development
you've al
ready met some form elements, including <form>, <fieldset>, <legend>, <textarea>, <label>, <button>, and <input>.
...they are a very convenient way to let the user enter any kind of data, and we've al
ready seen a few simple examples.
... all basic text controls share some common behaviors: they can be marked as
readonly (the user cannot modify the input value but it is still sent with the rest of the form data) or disabled (the input value can't be modified and is never sent with the rest of the form data).
...And 3 more matches
Sending forms through JavaScript - Learn web development
there are many sources for binary data, including file
reader, canvas, and webrtc.
...to learn more about the file
reader api, see using files from web applications.
... in the following example, we use the file
reader api to access binary data and then build the multi-part form data request by hand: <form id="theform"> <p> <label for="thetext">text data:</label> <input id="thetext" name="mytext" value="some text data" type="text"> </p> <p> <label for="thefile">file data:</label> <input id="thefile" name="myfile" type="file"> </p> <button>send me!</button> </form> as you see, the html is a standard <form>.
...And 3 more matches
Video and Audio APIs - Learn web development
each <button> has a class name, a data-icon attribute for defining what icon should be shown on each button (we'll show how this works in the below section), and an aria-label attribute to provide an understandable description of each button, since we're not providing a human-
readable label inside the tags.
... the contents of aria-label attributes are
read out by screen
readers when their users focus on the elements that contain them.
... implementing the javascript we've got a fairly complete html and css interface al
ready; now we just need to wire up all the buttons to get the controls working.
...And 3 more matches
A first splash into JavaScript - Learn web development
you create a variable with the keyword let (or var) followed by a name for your variable (you'll
read more about the difference between the keywords in a future article).
... if you haven't al
ready done so, save your code, refresh the page in your browser, and open the developer tools javascript console.
... the last three lines in the function (lines 26–28 above) get us
ready for the next guess to be submitted.
...And 3 more matches
Arrays - Learn web development
if we had 10 items to add to the invoice it would al
ready be annoying, but what about 100 items, or 1000?
...paste the following code into the console: let shopping = ['b
read', 'milk', 'cheese', 'hummus', 'noodles']; shopping; in the above example, each element is a string, but in an array we can store various data types — strings, numbers, objects, and even other arrays.
... enter the following into your console: shopping[0]; // returns "b
read" you can also modify an item in an array by simply giving a single array item a new value.
...And 3 more matches
Server-side web frameworks - Learn web development
objective: to understand how web frameworks can simplify development/maintenance of server-side code and to get
readers thinking about selecting a framework for their own development.
...web frameworks often provide a database layer that abstracts database
read, write, query, and delete operations.
...if you are part of a development team that al
ready has significant experience with a particular web framework or programming language, then it makes sense to stick with that.
...And 3 more matches
Framework main features - Learn web development
unlike html, these languages know how to
read data variables, and this data can be used to streamline the process of writing your ui.
... dsls can't be
read by the browser directly; they must be transformed into javascript or html first.
...the curly braces around subject on line 4 tell the application to
read the value of the subject constant and insert it into our <h1>.
...And 3 more matches
React interactivity: Editing, filtering, conditional rendering - Learn web development
in the case of our <todo /> component, our condition is "is this task being edited?" change the return statement inside todo() so that it
reads like so: return <li classname="todo">{isediting ?
... toggling the <todo /> templates at long last, we are
ready to make our final core feature interactive.
... adding a filter hook add a new hook to your app() function that
reads and sets a filter.
...And 3 more matches
Beginning our React todo list - Learn web development
this article will walk you through putting the basic app component structure and styling in place,
ready for individual component definition and interactivity, which we'll add later.
...our app should fulfill the following stories: as a user, i can
read a list of tasks.
... the form will allow us to make tasks; the buttons will let us filter them; the heading and list are our way to
read them.
...And 3 more matches
Deployment and next steps - Learn web development
code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/08-next-steps or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/08-next-steps remember to run npm install && npm run dev to start your app in development mode.
...delta compression using up to 8 th
reads.
...if you haven't al
ready done it, make sure you go through the svelte interactive tutorial.
...And 3 more matches
Getting started with Svelte - Learn web development
your browser will display something like this: application structure the starter template comes with the following structure: moz-todo-svelte ├──
readme.md ├── package.json ├── package-lock.json ├── rollup.config.js ├── .gitignore ├── node_modules ├── public │ ├── favicon.ico │ ├── index.html │ ├── global.css │ └── build │ ├── bundle.css │ ├── bundle.css.map │ ├── bundle.js │ └── bundle.js.map └── src ├...
...you don't need to understand this file at all to complete this tutorial, however, if you'd like to learn more about it, you can
read what is the file package.json?
... at this point you can try updating your app.svelte component — for example change the <h1> element on line 6 of app.svelte so that it
reads like this: <h1>hello {name} from mdn!</h1> just save your changes and the app running at localhost:5000 will be automatically updated.
...And 3 more matches
Introduction to automated testing - Learn web development
(if you al
ready have node and npm installed, jump to point 4) install it like you would any other program.
... once the install completes, test that node is installed by typing the following into the terminal, which returns the installed versions of node and npm: node -v npm -v if you've got node/npm al
ready installed, you should update them to their latest versions.
...you can customize it later, but for now it'll look something like this: { "name": "node-test", "version": "1.0.0", "description": "test for npm projects", "main": "index.js", "scripts": { "test": "test" }, "author": "chris mills", "license": "mit" } with this, you are
ready to move on.
...And 3 more matches
Information for Assistive Technology Vendors
mozilla now has enough accessibility support that we're
reading for early adopters and testers to start giving it a try.
... please
read this page if you're interested in an alternative accessible browser.
...this makes it possible for the vendors of windows accessibility software, such as screen
readers, voice dictation packages and screen magnifiers to provide support for mozilla.
...And 3 more matches
Deferred
eject(); }); return deferred.promise; would be return new promise(function(resolve, reject) { dosomething(function cb(good) { if (good) resolve(); else reject(); }); }); method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise
read only promise a newly created promise, initially in the pending state.
...if the associated promise has al
ready been resolved, either to a value, a rejection, or another promise, this method does nothing.
... note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is resolved or rejected, will have no effect the second time, as the associated promise is al
ready resolved to the pending promise value as its resolution.
...And 3 more matches
Sqlite.jsm
use of synchronous storage apis is discouraged because they block the main th
read.
...this makes code easy to write and
read.
... await conn.close(); throw e; } clone(
readonly) this function returns a clone of the current connection-promise.
...And 3 more matches
Release phase
now you're
ready for the final phase: becoming an official l10n release.
...depending on which branch you work on, the url of your repository might look like this: http://hg.mozilla.org/releases/l10n-central/x-testing if you followed the koala or plain text approach, you probably al
ready have a local clone of the repository.
...consequently, if you al
ready have a local clone that you pulled using http, you'll need to modify a config file to tell mercurial to push through ssh.
...And 3 more matches
Research and prep
productization is the process of determining a user's choice of default search engines, content and protocol handlers (rss
readers, web mail and web calendar), bookmarks, and links to recommended sites on the in-product pages as it relates to their locale.
... rss
readers and content handlers productization for rss
readers and content handlers applies only to firefox desktop.
... your selections for default rss
readers and content handlers should follow these guidelines: be translated in your language (because it makes the application unusable if it's not in your language provide for the intended user experience (e.g., minimal to no advertisements within the user experience) no more than three (if possible) choices.
...And 3 more matches
PR_CWait
timeout the amount of time (in printervaltime units) that the th
read is willing to wait for an explicit notification before being rescheduled.
... pr_failure indicates either that the monitor could not be located in the cache or that the monitor was located and the calling th
read was not the th
read that held the monitor's mutex.
...while the th
read is waiting, it exits the monitor (just as if it had called pr_cexitmonitor as many times as it had called pr_centermonitor).
...And 3 more matches
PR_MkDir
all the path components up to but not including the leaf component must al
ready exist.
...
read by owner.
...
read by group.
...And 3 more matches
NSS Sample Code Utilities_1
this code shows the following: extract seed from noise file
read der encoding from a file extract the password from a text file get the module password print as ascii or hexadecimal sample code #include <prlog.h> #include <termios.h> #include <base64.h> #include <unistd.h> #include <sys/stat.h> #include <prprf.h> #include "util.h" /* * these utility functions are adapted from those found in * the sectool library used by the nss security tools and * other nss test applications.
... } outbuf->len = truelen; return 0; } /* * filetoitem */ secstatus filetoitem(secitem *dst, prfiledesc *src) { prfileinfo info; print32 numbytes; prstatus prstatus; prstatus = pr_getopenfileinfo(src, &info); if (prstatus != pr_success) { return secfailure; } dst->data = 0; if (secitem_allocitem(null, dst, info.size)) { numbytes = pr_
read(src, dst->data, info.size); if (numbytes == info.size) { return secsuccess; } } secitem_freeitem(dst, pr_false); dst->data = null; return secfailure; } /* * echooff */ static void echooff(int fd) { if (isatty(fd)) { struct termios tio; tcgetattr(fd, &tio); tio.c_lflag &= ~echo; tcsetattr(fd, tcsaflush, &tio); } } /*...
...f (retry) { return 0; /* no good retrying - the file contents will be the same */ } phrases = port_zalloc(maxpwdfilesize); if (!phrases) { return 0; /* out of memory */ } fd = pr_open(pwfile, pr_rdonly, 0); if (!fd) { fprintf(stderr, "no password file \"%s\" exists.\n", pwfile); port_free(phrases); return null; } nb = pr_
read(fd, phrases, maxpwdfilesize); pr_close(fd); if (nb == 0) { fprintf(stderr,"password file contains no data\n"); port_free(phrases); return null; } if (slot) { tokenname = pk11_gettokenname(slot); if (tokenname) { tokenlen = port_strlen(tokenname); } } i = 0; do { int startphrase = i; int phra...
...And 3 more matches
NSS Sample Code sample6
* in a real app, this function should obtain the password using secure means * such as prompting an operator, or retrieving it over a secure communication * channel */ char *passwdcb(pk11slotinfo *info, prbool retry, void *arg); int main(int argc, char **argv) { secstatus rv; /* initialize nss */ pk11_setpasswordfunc(passwdcb); /* the nss db must be initialized
read-write since we'll be creating * keys in it.
... once keys are generated, it can be opened without
read-write * subsequently (nss_init).
... */ rv = nss_init
readwrite("."); if (rv != secsuccess) { fprintf(stderr, "nss initialization failed (err %d)\n", pr_geterror()); exit(1); } /* generate a key with id 1.
...And 3 more matches
NSS PKCS11 Functions
secmod_loadusermodule secmod_unloadusermodule secmod_openuserdb secmod_closeuserdb pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_is
readonly pk11_setpasswordfunc secmod_loadusermodule load a new pkcs #11 module based on a modulespec.
...secmod_closeuserdb close an al
ready opened user database.
...valid flags are:
readonly - databases should be opened
read only.
...And 3 more matches
PKCS11 Implement
c_getslotinfo the nss calls c_getslotinfo on startup or when it loads a new module and
reads in the information that can be viewed on the slot information page.
... c_encrypt c_decrypt ckm_rsa_pkcs ckm_rsa_x_509 (ssl 2.0 server only) c_decrypt ckm_rsa_pkcs ckm_rsa_x_509 (ssl 2.0 server only) c_decrypt c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_sign ckm_rsa_pkcs ckm_dsa c_verify ckm_rsa_pkcs ckm_dsa c_verifyrecover ckm_rsa_pkcs c_generatekey c_generatekeypair (if token is
read/write)c_generatekeypair (if token is
read/write) c_generatekeypair (if token is
read/write)c_generatekeypair (if token is
read/write) c_wrapkey c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_unwrapkey ckm_rsa_pkcs c_generaterandom c_save (when token runs out of sessions) c_restore (when token runs out of sessions) external key tokens ne...
...if they have a
read/write value and can't generate a key pair, nss uses its own c_generatekeypair and loads the key with c_createobject.
...And 3 more matches
NSS_Initialize
it is more flexible than nss_init, nss_init
readwrite, and nss_nodb_init.
...the flags parameter is a bitwise or of the following flags: nss_init_
readonly - open the databases
read only.
...nss_init_pk11th
readsafe - only load pkcs#11 modules that are th
read-safe, i.e., that support locking - either os locking or nss-provided locks .
...And 3 more matches
NSS tools : signtool
when testing is finished and you are
ready to disitribute your software, you should obtain an object-signing certificate from one of two kinds of sources: * an independent certificate authority (ca) that authenticates your identity and charges you a fee.
...if the certificate authority's certificate isn't al
ready installed in your copy of communicator, you typically install it by clicking the appropriate link on the certificate authority's web site, for example on the page from which you initiated enrollment for your signing certificate.
... the certificate information is
read from standard input.
...And 3 more matches
Scripting Java
one example of this is the th
read class: its constructor takes a runnable that contains a single method run that will be called when the new th
read is started.
...now that we have an object implementing runnable, we can create a th
read and run it.
... the function we defined for run will be called on a new th
read.
...And 3 more matches
Garbage collection
much of the gc work is performed on helper th
reads.
...for information on how the rooting apis should be used by embedders,
read: gc rooting guide.
... the spidermonkey incremental
read barrier the textbook version of incremental gc has only a write barrier.
...And 3 more matches
Property cache
the property cache is a per-th
read cache of the results of steps 1 and 2.
... the jit
reads the property cache too, as it needs the same information when recording such an instruction.
...without this guarantee, every access to a property via a prototype chain would have to recheck each link in the prototype chain, even though assigning to __proto__ is very rare.) adding guarantee — if at time t0 the object x has shape s, and rt->protohazardshape is z, and x does not inherit a jsprop_shared or jsprop_
readonly property with name n from any prototype, and at time t1 an object y has shape s and rt->protohazardshape is z, and no shape-regenerating gc occurred, then y does not inherit a jsprop_shared or jsprop_
readonly property named n from any prototype.
...And 3 more matches
JS::Compile
syntax // added in spidermonkey 45 bool js::compile(jscontext *cx, const js::
readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::
readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::
readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, const js::
readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(...
...jscontext *cx, const js::
readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); // obsolete since jsapi 39 bool js::compile(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, con...
...st js::
readonlycompileoptions &options, file *file, js::mutablehandlescript script); bool js::compile(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char *filename, js::mutablehandlescript script); name type description cx jscontext * pointer to a js context from which to derive runtime information.
...And 3 more matches
JSClass.flags
mxr id search for jsclass_global_flags jsclass_foreground_finalize objects of this class must be finalized on the main th
read.
... if this class has a finalizer that makes use of state shared with the main th
read then this option must be specified.
... jsclass_background_finalize it is safe to finalize objects of this class on a background th
read.
...And 3 more matches
JS_CheckAccess
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... mode jsaccessmode the type of access requested (
read, write, etc.) vp jsval * out parameter.
...it is one of the following values: value description jsacc_proto check for permission to
read to obj's prototype.
...And 3 more matches
SpiderMonkey 1.8
in js_th
readsafe builds, some objects are not safe to be shared among th
reads.
...in short, applications that share objects among th
reads in such a way that two th
reads could access an array, iterator, or generator object at the same time should not use spidermonkey 1.8.
... js_al
readyhasownproperty and friends are new functions for examining an object without triggering resolve hooks.
...And 3 more matches
Redis Tips
in one redis-cli, do this: redis1> subscribe message-channel
reading messages...
... i recommend
reading this article on realtime metrics with bitstrings: https://blog.getspool.com/2011/11/29/fast-easy-realtime-metrics-using-redis-bitmaps/.
... i recommend instead
reading about redis's memory optimizations for small zsets: http://oldblog.antirez.com/post/everything-about-redis-24.html.
...And 3 more matches
Secure Development Guidelines
(char *file) { handle fh; if (strstr(file, “\”)) return -1; fh = createfilea(file, ...); writefile(fh, data, sizeofdata, null, null); } could be a normal file, directory, device, or link directory traversal (../../../../) file i/o: file permissions should be set correctly be sure not to make world-writable files sensitive files shouldn’t be world
readable file i/o: file descriptors and handles could be a race if instances of fh are shared between th
reads fh inheritence: default in unix, needs to be set in windows int main(int argc, char **argv, char **envp) { int fd = open("/etc/shadow", o_rdwr); setreuid(getuid(), getuid()); excve("/bin/sh", argv, envp); } suid root applications file i/o: file descriptors and hand...
...2])); } file i/o: race conditions previous example contains a race condition the file may change between the call top stat() and open() this opens the possibility of writing arbitrary content to any file race conditions occur when two separate execution flows share a resource and its access is not synchronized properly race condition types include file (previously covered) th
read (two th
reads share a resource but don’t lock it) signal race conditions example char *ptr; void sighandler() { if (ptr) free(ptr); _exit(0); } int main() { signal(sigint, sighandler); ptr = malloc(1000); if (!ptr) exit(0); ...
... it would lead to a double free race conditions: prevention be very careful when working with th
reads, the file system, or signals track down shared resources and lock them accordingly for signal handlers never use non-atomic operations longjmp() is a sign of badness even exit() could cause problems, but _exit() is okay deadlocks and locking issues locks are used when dealing with th
reads acquiring more than one lock to perform an action if a second th
read acquires the same locks but in a different order, it causes denial of service...
...And 3 more matches
Preface
who should
read this book no one.
...if you al
ready have a mozilla build or the source from mozilla 1.2 or later, then you can use the xpcom framework available there.
... if you don't al
ready have the mozilla source, then an even easier way to get and use xpcom is to download the gecko sdk, which is a collection of libraries and tools that features the xpcom component framework.
...And 3 more matches
Components.utils
dispatch() dispatches a runnable to the current/main th
read.
... obsolete since gecko 45 the function was moved to th
readsafechromeutils nukesandbox() recomputewrappers() to be called from js only.
... ion boolean
read only.
...And 3 more matches
NS ConvertASCIItoUTF16 external
class declaration method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
NS ConvertUTF8toUTF16 external
class declaration method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find ...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
PromiseFlatString (External)
class declaration method overview get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind f...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
nsAutoString (External)
class declaration method overview get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind f...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
nsCString external
class declaration method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...methods constructors void nscstring_external() - source void nscstring_external(const nscstring_external&) - source parameters nscstring_external& astring void nscstring_external(const nsacstring&) - source parameters nsacstring& a
readable void nscstring_external(const char*, pruint32) - source parameters char* adata pruint32 alength get char* get() const - source operator= nscstring_external& operator=(const nscstring_external&) - source parameters nscstring_external& astring nsacstring& operato...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
...And 3 more matches
nsDependentString external
class declaration dependent strings method overview constructors rebind get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowerc...
...ing& astring nsastring& operator=(const prunichar*) - source parameters prunichar* aptr nsastring& operator=(prunichar) - source parameters prunichar achar adopt void adopt(const prunichar*, pruint32) - source parameters prunichar* adata pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
nsDependentSubstring external
class declaration substrings method overview constructors rebind begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const prunichar*, print32 (*) compare(const nsastring&, print32 (*) equals(const prunichar*, print32 (*) equals(const nsastring&, print32 (*) operator< operator<=...
...tring astr pruint32 astartpos void nsdependentsubstring_external(const nsastring&, pruint32, pruint32) - source parameters nsastring astr pruint32 astartpos pruint32 alength rebind void rebind(const prunichar*, pruint32) - source parameters prunichar astart pruint32 alength begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar* begin prunichar* end prunichar begin
reading() const - source end
reading prunichar end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
nsStringContainer (External)
class declaration method overview begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral lowercaseequalsliteral find rfind findchar rfindchar ...
...methods begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 3 more matches
IAccessibleText
however, if the application developer was not satisfied with how screen
readers have handled the
reading of sentences this boundary type could be implemented and screen
readers could use the application's version of a sentence rather than the screen
reader's.
...this data is only guaranteed to be valid while the th
read notifying the event continues.
...servers should document their life cycle strategy as this will be of interest to assistive technology or script engines accessing data out of process or from other th
reads.
...And 3 more matches
mozIPlaceInfo
toolkit/components/places/public/moziasynchistory.idlscriptable this interface provides additional info for a places entry 1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description frecency long
read only: the frecency of the place.
... guid string
read only: the globally unique id of the place.
... placeid long
read only: the machine-local (internal) id of the place.
...And 3 more matches
nsIAuthInformation
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the caller of nsiauthprompt2.promptusernameandpassword() or nsiauthprompt2.promptpasswordasync() provides an object implementing this interface; the prompt implementation can then
read the values here to prefill the dialog.
...
read only.
...
read only.
...And 3 more matches
nsICacheDeviceInfo
inherits from: nsisupports last changed in gecko 1.7 attributes attribute type description description string get a human
readable description of the cache device.
...
read only.
...
read only.
...And 3 more matches
nsICacheEntryDescriptor
read only.
...
read only.
...markvalid() this method means that a writer must validate this cache object before any
readers are given a descriptor to the object.
...And 3 more matches
nsIContentSecurityPolicy
read only.
...
read only.
... isinitialized boolean set to true when the content security policy has been
read in and parsed and is
ready to enforce.
...And 3 more matches
nsICryptoHash
return value this method returns a hash of the data that was
read by this object.
... void updatefromstream( in nsiinputstream astream, in unsigned long alen ); parameters astream an input stream to
read from.
... alen how much to
read from the given astream.
...And 3 more matches
nsIDOMNSHTMLDocument
read only.
... embeds nsidomhtmlcollection equivalent to getelementsbytagname("embed")
read only.
...
read only.
...And 3 more matches
nsIFaviconService
read only.
...void getfavicondata( in nsiuri afaviconuri, out autf8string amimetype, out unsigned long adatalen, optional from gecko 2.0 [array,retval,size_is(adatalen)] out octet adata ); parameters afaviconuri uri of the favicon whose data is being
read.
...astring getfavicondataasdataurl( in nsiuri afaviconuri ); parameters afaviconuri uri of the favicon whose data is being
read.
...And 3 more matches
nsIProxyInfo
read only.
...
read only.
...
read only.
...And 3 more matches
nsISearchEngine
read only.
...
read only.
...
read only.
...And 3 more matches
nsISelection
read only.
...
read only.
...
read only.
...And 3 more matches
nsISmsRequestManager
manager amanager, out nsidommozsmsrequest arequest); void notifycreatemessagelist(in long arequestid, in long alistid, in nsidommozsmsmessage amessage); void notifygetsmsfailed(in long arequestid, in long aerror); void notifygotnextmessage(in long arequestid, in nsidommozsmsmessage amessage); void notifygotsms(in long arequestid, in nsidommozsmsmessage amessage); void notifymarkedmessage
read(in long arequestid, in bool a
read); void notifymarkmessage
readfailed(in long arequestid, in long aerror); void notifynomessageinlist(in long arequestid); void notify
readmessagelistfailed(in long arequestid, in long aerror); void notifysmsdeleted(in long arequestid, in bool adeleted); void notifysmsdeletefailed(in long arequestid, in long aerror); void notifysmssendfailed(in long arequ...
... constant value description success_no_error 0 no_signal_error 1 not_found_error 2 unknown_error 3 internal_error 4 methods addrequest() track an al
ready existing request object.
... notifymarkedmessage
read() requires gecko 15.0(firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) void notifymarkedmessage
read( in long arequestid in bool a
read ); parameters arequestid a number representing the id of the request.
...And 3 more matches
nsISocketTransportService
this will fail with the error code ns_error_not_available if the maximum number of sockets is al
ready reached.
... note: this function may only be called from an event dispatch on the socket th
read.
... ahandler socket handler that will receive notifications when the socket is
ready or detached.
...And 3 more matches
nsIStreamListener
method overview void ondataavailable(in nsirequest arequest, in nsisupports acontext, in nsiinputstream ainputstream, in unsigned long aoffset, in unsigned long acount); methods ondataavailable() this method is called when the next chunk of data for the ongoing request may be
read without blocking the calling th
read.
... the data can be
read from the nsiinputstream object passed as the argument to this method.
... note: your implementation of this method must
read exactly acount bytes of data before returning.
...And 3 more matches
nsITreeBoxObject
element, out long x, out long y, out long width, out long height); boolean iscellcropped(in long row, in nsitreecolumn col); void rowcountchanged(in long index, in long count); void beginupdatebatch(); void endupdatebatch(); void clearstyleandimagecaches(); attributes attribute type description columns nsitreecolumns
readonly: obtain the columns.
... treebody nsidomelement
readonly: obtain the treebody content node.
... rowheight long
readonly: obtain the height of a row.
...And 3 more matches
DB Views (message lists)
the th
read pane (aka message list) is driven by classes that implement nsimsgdbview and inherit from nsmsgdbview.
... these are the main view classes: nsmsgth
readeddbview - (implementation) nsmsgsearchdbview - (implementation) nsmsgquicksearchdbview - (implementation) nsmsgxfvirtualfolderdbview - (implementation) nsmsggroupview - (implementation) usually, a view object has parallel arrays, which map directly to lines in the message list: m_keys message header key m_flags 32 bits, combination of message header flags and view-only flags (e.g., collapsed) m_level the indentation level when in th
readed mode.
... m_folders cross-folder views only (nsmsgsearchdbview and its descendant, nsmsgxfvirtualfolderdbview) most of the time, the th
read pane is driven by an nsmsgth
readeddbview object (even when we're in a flat sort).
...And 3 more matches
Thunderbird extensions
start by
reading the tutorial and learn how to build a thunderbird extension.
...
read about the main windows to learn about « th
read pane », « preview pane », and « folder pane ».
...
read the thunderbird how-tos; they contain many recipes for things extensions want to do.
...And 3 more matches
Working with data
if the original value is al
ready a cdata object, the original object is simply duplicated directly into the new one.
... if type is an array type of unspecified length, the following steps are taken: if the value is a size value, a new array of that length is created, with its cells
ready to accept values of the same type as those in the specified array.
... example: creating an array of strings var cstr1 = ctypes.jschar.array()('rawr'); var cstr2 = ctypes.jschar.array()('boo'); var mycarray_ofstrings = ctypes.jschar.ptr.array(2)([cstr1, cstr2]); // specifying length of 2 is optional, can omit it, so can just do `ctypes.jschar.ptr.array()([cstr1, cstr2])` mycarray_ofstrings.addressofelement(0).contents.
readstring(); // outputs: "rawr" mycarray_ofstrings.addressofelement(1).contents.
readstring(); // outputs: "boo" example: creating an array of integers var jsarr = [4, 10]; var mycarr = ctypes.int.array(jsarr.length)(jsarr); // specifying length is optional, can omit.
...And 3 more matches
FunctionType
read only.
...
read only.
...
read only.
...And 3 more matches
PointerType
read only.
...
read only.
...
read only.
...And 3 more matches
Accelerometer - Web APIs
the accelerometer interface of the sensor apis provides on each
reading the acceleration applied to the device along all three axes.
... properties accelerometer.x
read only returns a double containing the acceleration of the device along the device's x axis.
... accelerometer.y
read only returns a double containing the acceleration of the device along the device's y axis.
...And 3 more matches
BaseAudioContext - Web APIs
<rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">baseaudiocontext</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties baseaudiocontext.audioworklet
read only secure context returns the audioworklet object, which can be used to create and manage audionodes in which javascript code implementing the audioworkletprocessor interface are run in the background to process audio data.
... baseaudiocontext.currenttime
read only returns a double representing an ever-increasing hardware time in seconds used for scheduling.
... baseaudiocontext.destination
read only returns an audiodestinationnode representing the final destination of all audio in the context.
...And 3 more matches
BasicCardResponse - Web APIs
properties basiccardresponse.cardnumber
read only secure context contains the number of the card used to make the payment.
... basiccardresponse.cardholdername
read only secure context optional contains the cardholder name of the card used to make the payment.
... basiccardresponse.cardsecuritycode
read only secure context optional contains the security code of the card used to make the payment.
...And 3 more matches
Blob.stream() - Web APIs
the blob interface's stream() method returns a
readablestream which upon
reading returns the data contained within the blob.
... returns a
readablestream which, upon
reading, returns the contents of the blob.
... usage notes with stream() and the returned
readablestream, you gain several interesting capabilities: call get
reader() on the returned stream to get an object to use to
read the data from the blob using methods such as the
readablestreamdefault
reader interface's
read() method.
...And 3 more matches
Using the CSS Typed Object Model - Web APIs
al] of defaultcomputedstyles) { // properties const cssproperty = document.createelement('dt'); cssproperty.appendchild(document.createtextnode(prop)); styleslist.appendchild(cssproperty); // values const cssvalue = document.createelement('dd'); cssvalue.appendchild(document.createtextnode(val)); styleslist.appendchild(cssvalue); } the computedstylemap() method returns a stylepropertymap
readonly object containing the size property, which indicates how many properties are in the map.
...let's start by adding some css to our example, including a custom property and an inhertable property: p { font-weight: bold; } a { --color: red; color: var(--color); } instead of getting all the properties, we create an array of properties of interest and use the stylepropertymap
readonly.get() method to get each of their values: <p> <a href="https://example.com">link</a> </p> <dl id="regurgitation"></dl> // get the element const myelement = document.queryselector('a'); // get the <dl> we'll be populating const styleslist = document.queryselector('#regurgitation'); // retrieve all computed styles with computedstylemap() const allcomputedstyles = myelement.computedstyl...
... it has two methods: cssstylevalue.parse() cssstylevalue.parseall() as noted above, stylepropertymap
readonly.get('--customproperty') returns a cssunparsedvalue.
...And 3 more matches
Clipboard API - Web APIs
the clipboard api provides the ability to respond to clipboard commands (cut, copy, and paste) as well as to asynchronously
read from and write to the system clipboard.
...the clipboard-
read permission must be requested, which you can do by trying to
read data from the clipboard.
... accessing the clipboard instead of creating a clipboard object through instantiation, you access the system clipboard through the navigator.clipboard global: navigator.clipboard.
readtext().then( cliptext => document.queryselector(".editor").innertext += cliptext); this snippet fetches the text from the clipboard and appends it to the first element found with the class editor.
...And 3 more matches
DOMException - Web APIs
properties domexception.code
read only returns a short that contains one of the error code constants, or 0 if none match.
... domexception.message
read only returns a domstring representing a message or description associated with the given error name.
... domexception.name
read only returns a domstring that contains one of the strings associated with an error name.
...And 3 more matches
DOMLocator - Web APIs
properties domlocator.linenumber
read only returns a positive integer or -1.
... domlocator.columnnumber
read only returns a positive integer or -1.
... domlocator.byteoffset
read only returns a positive integer or -1.
...And 3 more matches
DOMMatrix - Web APIs
it is a mutable version of the dommatrix
readonly interface.
... properties this interface inherits properties from dommatrix
readonly, though some of these properties are altered to be mutable.
... is2d
read only a boolean flag whose value is true if the matrix was initialized as a 2d matrix.
...And 3 more matches
DOMPoint - Web APIs
dompoint is based on dompoint
readonly but allows its properties' values to be changed.
...you can also use an existing dompoint or dompoint
readonly or a dompointinit dictionary to create a new point by calling the dompoint.frompoint() static method.
... methods dompoint inherits methods from its parent, dompoint
readonly.
...And 3 more matches
DataTransfer - Web APIs
datatransfer.items
read only gives a datatransferitemlist object which is a list of all of the drag data.
... datatransfer.types
read only an array of strings giving the formats that were set in the dragstart event.
... datatransfer.mozsourcenode
read only the node over which the mouse cursor was located when the button was pressed to initiate the drag operation.
...And 3 more matches
DeviceMotionEventAcceleration - Web APIs
properties devicemotioneventacceleration.x
read only the amount of acceleration along the x axis.
...
read only.
... devicemotioneventacceleration.y
read only the amount of acceleration along the y axis.
...And 3 more matches
DeviceOrientationEvent - Web APIs
properties deviceorientationevent.absolute
read only a boolean that indicates whether or not the device is providing orientation data absolutely.
... deviceorientationevent.alpha
read only a number representing the motion of the device around the z axis, express in degrees with values ranging from 0 to 360.
... deviceorientationevent.beta
read only a number representing the motion of the device around the x axis, express in degrees with values ranging from -180 to 180.
...And 3 more matches
Document.cookie - Web APIs
the document property cookie lets you
read and write cookies associated with the document.
... syntax
read all cookies accessible from this location allcookies = document.cookie; in the code above allcookies is a string containing a semicolon-separated list of all cookies (i.e.
... note: as you can see from the code above, document.cookie is an accessor property with native setter and getter functions, and consequently is not a data property with a value: what you write is not the same as what you
read, everything is always mediated by the javascript interpreter.
...And 3 more matches
DocumentType - Web APIs
documenttype.entities
read only a namednodemap of entities declared in the dtd.
... documenttype.internalsubset
read only a domstring of the internal subset, or null if there is none.
... documenttype.name
read only a domstring, eg "html" for <!doctype html>.
...And 3 more matches
DynamicsCompressorNode - Web APIs
dynamicscompressornode.threshold
read only is a k-rate audioparam representing the decibel value above which the compression will start taking effect.
... dynamicscompressornode.knee
read only is a k-rate audioparam containing a decibel value representing the range above the threshold where the curve smoothly transitions to the compressed portion.
... dynamicscompressornode.ratio
read only is a k-rate audioparam representing the amount of change, in db, needed in the input for a 1 db change in the output.
...And 3 more matches
EventSource - Web APIs
eventsource.
readystate
read only a number representing the state of the connection.
... eventsource.url
read only a domstring representing the url of the source.
... eventsource.withcredentials
read only a boolean indicating whether the eventsource object was instantiated with cross-origin (cors) credentials set (true), or not (false, the default).
...And 3 more matches
ExtendableMessageEvent - Web APIs
extendablemessageevent.data
read only returns the event's data.
... extendablemessageevent.origin
read only returns the origin of the client that sent the message.
... extendablemessageevent.lasteventid
read only represents, in server-sent events, the last event id of the event source.
...And 3 more matches
FetchEvent() - Web APIs
options are as follows: clientid
read only the client that the current service worker is controlling.
... isreload
read only a boolean that signifies whether the page was reloaded or not when the event was dispatched.
... preloadresponse
read only a promise which returns a previously-loaded response to the client.
...And 3 more matches
Using Fetch - Web APIs
my vegas vacation'); for (let i = 0; i < photos.files.length; i++) { formdata.append('photos', photos.files[i]); } fetch('https://example.com/posts', { method: 'post', body: formdata, }) .then(response => response.json()) .then(result => { console.log('success:', result); }) .catch(error => { console.error('error:', error); }); processing a text file line by line the chunks that are
read from a response are not broken neatly at line boundaries and are uint8arrays, not strings.
... async function* maketextfilelineiterator(fileurl) { const utf8decoder = new textdecoder('utf-8'); const response = await fetch(fileurl); const
reader = response.body.get
reader(); let { value: chunk, done:
readerdone } = await
reader.
read(); chunk = chunk ?
... utf8decoder.decode(chunk) : ''; const re = /\n|\r|\r\n/gm; let startindex = 0; let result; for (;;) { let result = re.exec(chunk); if (!result) { if (
readerdone) { break; } let remainder = chunk.substr(startindex); ({ value: chunk, done:
readerdone } = await
reader.
read()); chunk = remainder + (chunk ?
...And 3 more matches
FileError - Web APIs
represents an error that occurs while using the file
reader interface.
... best practices most people don't
read the page on errors and exceptions unless they're stumped.
...in fact, many of the powerful storage apis (such as file system, blobbuilder, and file
reader) throw errors if you run the app locally from file://.
...And 3 more matches
FileSystemDirectoryEntry.getDirectory() - Web APIs
options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file al
ready exists.
... fileerror.path_exists_err the create and exclusive options were both true, indicating that the directory should be created but must not al
ready exist, but the directory does in fact al
ready exist.
...the parent directory must al
ready exist.
...And 3 more matches
FileSystemDirectoryEntry.getFile() - Web APIs
options optional an object based on the filesystemflags dictionary, which allows you to specify whether or not to create the entry if it's missing and if it's an error if the file al
ready exists.
... fileerror.path_exists_err the create and exclusive options were both true, indicating that the file should be created but must not al
ready exist, but the file does in fact al
ready exist.
...the parent directory must al
ready exist.
...And 3 more matches
Gyroscope - Web APIs
the gyroscope interface of the sensor apis provides on each
reading the angular velocity of the device along all three axes.
... properties gyroscope.x
read only returns a double, containing the angular velocity of the device along the device's x axis.
... gyroscope.y
read only returns a double, containing the angular velocity of the device along the device's y axis.
...And 3 more matches
HTMLButtonElement - Web APIs
htmlbuttonelement.form
read only is a htmlformelement reflecting the form that this button is associated with.
... htmlbuttonelement.labels
read only is a nodelist that represents a list of <label> elements that are labels for this button.
... htmlbuttonelement.willvalidate
read only is a boolean indicating whether the button is a candidate for constraint validation.
...And 3 more matches
HTMLObjectElement - Web APIs
htmlobjectelement.contentdocument
read only returns a document representing the active document of the object element's nested browsing context, if any; otherwise null.
... htmlobjectelement.contentwindow
read only returns a windowproxy representing the window proxy of the object element's nested browsing context, if any; otherwise null.
... htmlobjectelement.form
read only retuns a htmlformelement representing the object element's form owner, or null if there isn't one.
...And 3 more matches
IDBDatabaseSync - Web APIs
aises (idbdatabaseexception); void removeobjectstore (in domstring storename) raises (idbdatabaseexception); void setversion (in domstring version); idbtransactionsync transaction (in optional domstringlist storenames, in optional unsigned int timeout) raises (idbdatabaseexception); attributes attribute type description description
readonly domstring the human-
readable description of the connected database.
... name
readonly domstring the name of the connected database.
... objectstores
readonly domstringlist the names of the object stores that exist in the connected database.
...And 3 more matches
IDBIndexSync - Web APIs
n) raises (idbdatabaseexception); void openobjectcursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); any put (in any value, in optional any key) raises (idbdatabaseexception); void remove (in any key) raises (idbdatabaseexception); attributes attribute type description keypath
readonly domstring the key path of this index.
... name
readonly domstring the name of this index.
... storename
readonly domstring this index's referenced object store.
...And 3 more matches
IDBObjectStore.add() - Web APIs
the add() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, creates a structured clone of the value, and stores the cloned value in the object store.
...if a record al
ready exists in the object store with the key parameter as its key, then an error constrainerror event is fired on the returned request object.
... exceptions this method may raise a domexception of one of the following types: exception description
readonlyerror the transaction associated with this operation is in
read-only mode.
...And 3 more matches
Checking when a deadline is due - Web APIs
the basic problem in the to-do app, we wanted to first record time and date information in a format that is both machine
readable and human understandable when displayed, and then check whether each time and date is occurring at the current moment.
...human-
readable dates are quite different, with a number of different representations.
...support html form validation (i have used the required attribute in my html to force validation, in those that do.) else { var newitem = [ { tasktitle: title.value, hours : hours.value, minutes : minutes.value, day : day.value, month : month.value, year : year.value, notified : "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction opened for task addition.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due ...
...And 3 more matches
LinearAccelerationSensor - Web APIs
the linearaccelerationsensor interface of the sensor apis provides on each
reading the acceleration applied to the device along all three axes, but without the contribution of gravity.
... properties linearaccelerationsensor.x
read only returns a double containing the linear acceleration of the device along the device's x axis.
... linearaccelerationsensor.y
read only returns a double containing the linear acceleration of the device along the device's y axis.
...And 3 more matches
MessageEvent - Web APIs
messageevent.data
read only the data sent by the message emitter.
... messageevent.origin
read only a usvstring representing the origin of the message emitter.
... messageevent.lasteventid
read only a domstring representing a unique id for the event.
...And 3 more matches
Navigator.clipboard - Web APIs
the clipboard api adds to the navigator interface the
read-only clipboard property, which returns the clipboard object used to
read and write the clipboard's contents.
... use of the asynchronous clipboard
read and write methods requires that the user grant the web site or app permission to access the clipboard.
... this permission must be obtained from the permissions api using the "clipboard-
read" and/or "clipboard-write" permissions.
...And 3 more matches
NavigatorID - Web APIs
navigatorid.appcodename
read only always returns "mozilla", in any browser.
... navigatorid.appname
read only always returns "netscape", in any browser.
... navigatorid.appversion
read only returns either "4.0" or a string representing version information about the browser.
...And 3 more matches
NetworkInformation - Web APIs
networkinformation.downlink
read only returns the effective bandwidth estimate in megabits per second, rounded to the nearest multiple of 25 kilobits per seconds.
... networkinformation.downlinkmax
read only returns the maximum downlink speed, in megabits per second (mbps), for the underlying connection technology.
... networkinformation.effectivetype
read only returns the effective type of the connection meaning one of 'slow-2g', '2g', '3g', or '4g'.
...And 3 more matches
NodeIterator - Web APIs
nodeiterator.root
read only returns a node representing the root node as specified when the nodeiterator was created.
... nodeiterator.whattoshow
read only returns an unsigned long being a bitmask made of constants describing the types of node that must to be presented.
... nodeiterator.filter
read only returns a nodefilter used to select the relevant nodes.
...And 3 more matches
Using the Notifications API - Web APIs
firefox is al
ready doing this from version 72, for example, and safari has done it for some time.
... checking current permission status you can check to see if you al
ready have permission by checking the value of the notification.permission
read only property.
...we don't want to show it if permission has al
ready been granted, but if the user chose to deny permission, we want to give them the chance to change their mind later on.
...And 3 more matches
Performance - Web APIs
an object of this type can be obtained by calling the window.performance
read-only attribute.
...if you create a mark on the main th
read (or other worker), you cannot see it in a worker th
read, and vice versa.
... performance.navigation
read only a legacy performancenavigation object that provides useful context about the operations included in the times listed in timing, including whether the page was a load or a refresh, how many redirections occurred, and so forth.
...And 3 more matches
RTCErrorEvent.error - Web APIs
the
read-only rtcerrorevent property error contains an rtcerror object describing the details of the error which the event is announcing.
...additional properties defined by rtcerror are: errordetail
read only a domstring specifying the webrtc-specific error code identifying the type of error that occurred.
... receivedalert
read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
...And 3 more matches
Range - Web APIs
range.collapsed
read only returns a boolean indicating whether the range's start and end points are at the same position.
... range.commonancestorcontainer
read only returns the deepest node that contains the startcontainer and endcontainer nodes.
... range.endcontainer
read only returns the node within which the range ends.
...And 3 more matches
SVGAngle - Web APIs
an svgangle reflected through the animval attribute is always
read only.
... an svgangle object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised when the length corresponds to a
read-only attribute, or when the object itself is
read-only.
...And 3 more matches
SVGFESpecularLightingElement - Web APIs
svgfespecularlightingelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfespecularlightingelement.surfacescale
read only an svganimatednumber corresponding to the surfacescale attribute of the given element.
... svgfespecularlightingelement.specularconstant
read only an svganimatednumber corresponding to the specularconstant attribute of the given element.
...And 3 more matches
SVGFETurbulenceElement - Web APIs
svgfeturbulenceelement.basefrequencyx
read only an svganimatednumber corresponding to the x component of the basefrequency attribute of the given element.
... svgfeturbulenceelement.basefrequencyy
read only an svganimatednumber corresponding to the y component of the basefrequency attribute of the given element.
... svgfeturbulenceelement.numoctaves
read only an svganimatedinteger corresponding to the numoctaves attribute of the given element.
...And 3 more matches
SVGImageElement - Web APIs
svgimageelement.height
read only an svganimatedlength corresponding to the height attribute of the given <image> element.
... svgimageelement.preserveaspectratio
read only an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
... svgimageelement.width
read only an svganimatedlength corresponding to the width attribute of the given <image> element.
...And 3 more matches
SVGMaskElement - Web APIs
svgmaskelement.maskunits
read only an svganimatedenumeration corresponding to the maskunits attribute of the given <mask> element.
... svgmaskelement.maskcontentunits
read only an svganimatedenumeration corresponding to the maskcontentunits attribute of the given <mask> element.
... svgmaskelement.x
read only an svganimatedlength corresponding to the x attribute of the given <mask> element.
...And 3 more matches
SVGRectElement - Web APIs
svgrectelement.x
read only returns an svganimatedlength corresponding to the x attribute of the given <rect> element.
... svgrectelement.y
read only returns an svganimatedlength corresponding to the y attribute of the given <rect> element.
... svgrectelement.width
read only returns an svganimatedlength corresponding to the width attribute of the given <rect> element.
...And 3 more matches
SVGUseElement - Web APIs
svguseelement.x
read only an svganimatedlength corresponding to the x attribute of the given element.
... svguseelement.y
read only an svganimatedlength corresponding to the y attribute of the given element.
... svguseelement.width
read only an svganimatedlength corresponding to the width attribute of the given element.
...And 3 more matches
StyleSheet - Web APIs
stylesheet.href
read only returns a domstring representing the location of the stylesheet.
... stylesheet.media
read only returns a medialist representing the intended destination medium for style information.
... stylesheet.ownernode
read only returns a node associating this style sheet with the current document.
...And 3 more matches
USBAlternateInterface - Web APIs
properties usbalternateinterface.alternatesetting
read only returns the alternate setting number of this interface.
... usbalternateinterface.interfaceclass
read only returns the class of this interface.
... usbalternateinterface.interfacesubclass
read only returns the subclass of this interface.
...And 3 more matches
Using the Web Animations API - Web APIs
to prevent the cake from eating itself up before the user has had the chance to click on it, we call animation.pause() on it immediately after it is defined, like so: nommingcake.pause(); we can now use the animation.play() method to run it whenever we’re
ready: nommingcake.play(); specifically, we want to link it to alice’s animation, so she gets bigger as the cupcake gets eaten.
...then we pause her: alicechange.pause(); if we had left her paused at the beginning of her animation, she’d start at half her full size, as if she’d drunk the entire bottle al
ready!
... we want to set her animation’s “playhead” in the middle, so she’s al
ready halfway done.
...And 3 more matches
Web Audio API - Web APIs
you can
read about the theory of the web audio api in a lot more detail in our article basic concepts behind web audio api.
... audioworklet the audioworklet interface is available through the audiocontext object's audioworklet, and lets you add modules to the audio worklet to be executed off the main th
read.
... audioworkletglobalscope the audioworkletglobalscope interface is a workletglobalscope-derived object representing a worker context in which an audio processing script is run; it is designed to enable the generation, processing, and analysis of audio data directly using javascript in a worklet th
read rather than on the main th
read.
...And 3 more matches
Web Workers API - Web APIs
web workers makes it possible to run a script operation in a background th
read separate from the main execution th
read of a web application.
... the advantage of this is that laborious processing can be performed in a separate th
read, allowing the main (usually the ui) th
read to run without being blocked/slowed down.
...worker()) that runs a named javascript file — this file contains the code that will run in the worker th
read; workers run in another global context that is different from the current window.
...And 3 more matches
WritableStream.WritableStream() - Web APIs
write(chunk, controller) optional this method, also defined by the developer, will be called when a new chunk of data (specified in the chunk parameter) is
ready to be written to the underlying sink.
... const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
...And 3 more matches
XRWebGLLayer - Web APIs
properties antialias
read only a boolean value indicating whether or not the webgl context's framebuffer supports anti-aliasing.
... framebuffer
read only returns a webglframebuffer suitable for passing into the bindframebuffer() method.
... framebufferwidth
read only returns the width of the xrwebgllayer's framebuffer.
...And 3 more matches
ARIA: alert role - Accessibility
screen
readers will instantly start
reading out the updated content when the role is added.
...it is perfect for situations such as when a user fills out a form and javascript is used to add an error message - the alert would immediately
read out the message.
...for example, if a page loads with multiple visible alerts scattered throughout, none would be
read because they are not dynamically triggered.
...And 3 more matches
ARIA: application role - Accessibility
background for historic reasons, especially on windows, screen
readers and some other assistive technologies (at) have traditionally grabbed the whole web content from the browser at once after it had finished loading.
...a keyboard interaction model is generated that is very similar to a word processor where users can
read line by line, sentence by sentence, or paragraph by paragraph.
... the at will
read any semantics like links, headings, form controls, tables, lists, or images.
...And 3 more matches
ARIA: Navigation Role - Accessibility
screen
readers use landmark roles to provide keyboard navigation to important sections of a page.
... associated wai-aria roles, states, and properties aria-label a brief description of the purpose of the navigation, omitting the term "navigation", as the screen
reader will
read both the role and the contents of the label.
...using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
...And 3 more matches
ARIA: img role - Accessibility
you shouldn't count on the alt text of individual elements images for conveying context to assistive technologies; most screen
readers will consider the element with role="img" set on it to be to be like a black box, and not access the individual elements inside it.
...this will cause screen
readers to just consider it as a single entity and describe it using the label, rather than trying to
read out all the child nodes: <svg role="img" aria-label="description of your svg image"> <!-- contents of the svg image --> </svg> using role="img" to confer meaning that is obscured or implied in certain cases, assistive technology users won't be able to get the meaning of content expressed in ...
... for example, if you use emojis in your text, the meaning might be obvious to a sighted user, but someone using a screen
reader might get confused because the emojis might have either no text representation at all, or the alternative text might be confusing and not match the context it is being used in.
...And 3 more matches
ARIA: dialog role - Accessibility
if a dialog al
ready has a visible title bar, the text inside that bar can be used to label the dialog itself.
...ole="dialog" aria-labelledby="dialog1title" aria-describedby="dialog1desc"> <h2 id="dialog1title">your personal details were successfully updated</h2> <p id="dialog1desc">you can change your details at any time in the user account section.</p> <button>close</button> </div> keep in mind that a dialog's title and description text do not have to be focusable in order to be perceived by screen
readers operating in a non-virtual mode.
... the combination of the aria dialog role and labeling techniques should make the screen
reader announce the dialog's information when focus is moved into it.
...And 3 more matches
Web applications and ARIA FAQ - Accessibility
aria provides a means to make web applications and widgets more accessible to a diverse range of users, including those who use assistive technologies such as screen
readers or magnifiers.
... browsers aria is supported in the following browsers: browser minimum version notes firefox 3.0+ works with nvda, jaws 10+, and orca chrome latest screen
reader support still experimental as of chrome 15 safari 4+ safari 5 support is much improved.
...for example, a screen
reader uses this api to
read the user interface with a text-to-speech engine, a magnifier uses it to highlight important or active areas of the screen, and an onscreen keyboard might use it to provide the most efficient keyboard layout for a given context or ui control.
...And 3 more matches
Alerts - Accessibility
the form first, please
read about the aria-required technique if you have not done so, as this technique expands upon that.
... if invalid, the function does two things: it sets the element’s aria-invalid attribute to “true”, which will indicate to screen
readers that there is invalid content in here.
...most screen
readers will pick this one up automatically and speak it.
...And 3 more matches
Web Accessibility: Understanding Colors and Luminance - Accessibility
thin letters will be harder to
read than thick ones; all type faces need space to "breathe" for human perception.
... this affects the ability of a user to
read text against a background.
... local adaptation takes place right on the "page" a
reader is looking at.
...And 3 more matches
CSS Grid Layout and Accessibility - CSS: Cascading Style Sheets
in order to lay the design out in the table we often broke up the content in ways that made no sense at all when
read out by a screen
reader for example.
... re-ordering content in css grid layout we’ve al
ready seen in these guides that grid gives us power to re-order the content of our page in various ways.
... if you reorder things visually using grid layout, this will not change how the items are ordered if the content is being
read out by a screen
reader, or other text to speech user agent.
...And 3 more matches
box-shadow - CSS: Cascading Style Sheets
a box shadow is described by x and y offsets relative to the element, blur and sp
read radius, and color.
... syntax /* keyword values */ box-shadow: none; /* offset-x | offset-y | color */ box-shadow: 60px -16px teal; /* offset-x | offset-y | blur-radius | color */ box-shadow: 10px 5px 5px black; /* offset-x | offset-y | blur-radius | sp
read-radius | color */ box-shadow: 2px 2px 2px 1px rgba(0, 0, 0, 0.2); /* inset | offset-x | offset-y | color */ box-shadow: inset 5em 1em gold; /* any number of shadows, separated by commas */ box-shadow: 3px 3px red, -1em 0 0.4em olive; /* global keywords */ box-shadow: inherit; box-shadow: initial; box-shadow: unset; specify a single box-shadow using: two, three, or four <length> values.
... if a fourth value is given, it is interpreted as a <sp
read-radius>.
...And 3 more matches
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
having a single top-level title is also arguably better for screen
reader users, and seo.
... <h1>heading elements</h1> <h2>summary</h2> <p>some text here...</p> <h2>examples</h2> <h3>example 1</h3> <p>some text here...</p> <h3>example 2</h3> <p>some text here...</p> <h2>see also</h2> <p>some text here...</p> here is the result of this code: accessibility concerns navigation a common navigation technique for users of screen
reading software is jumping from heading to heading to quickly determine the content of the page.
...most screen
readers can also generate an ordered list of all the headings on a page, which can help a person quickly determine the hierarchy of the content: h1 beetles h2 etymology h2 distribution and diversity h2 evolution h3 late paleozoic h3 jurassic h3 cretaceous h3 cenozoic h2 external morphology h3 head h4 mouthparts ...
...And 3 more matches
<input type="password"> - HTML: Hypertext Markup Language
the element is presented as a one-line plain text editor control in which the text is obscured so that it cannot be
read, usually by replacing each character with a symbol such as the asterisk ("*") or a dot ("•").
... value a domstring representing a password, or empty events change and input supported common attributes autocomplete, inputmode, maxlength, minlength, pattern, placeholder,
readonly, required, and size idl attributes selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), and setselectionrange() value the value attribute contains a domstring whose value is the current contents of the text editing control being used to enter the password.
...ng attributes: attribute description maxlength the maximum length the value may be, in utf-16 characters minlength the minimum length in characters that will be considered valid pattern a regular expression the value must match in order to be valid placeholder an example value to display in the field when the field is empty
readonly a boolean attribute which, if present, indicates that the field's contents should not be editable size the number of characters wide the input field should be maxlength the maximum number of characters (as utf-16 code units) the user can enter into the password field.
...And 3 more matches
<input type="tel"> - HTML: Hypertext Markup Language
value a domstring representing a telephone number, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder,
readonly, and size idl attributes list, selectionstart, selectionend, selectiondirection, and value methods select(), setrangetext(), setselectionrange() value the <input> element's value attribute contains a domstring that either represents a telephone number or is an empty string ("").
...tocomplete options maxlength the maximum length, in utf-16 characters, to accept as a valid input minlength the minimum length that is considered valid for the field's contents pattern a regular expression the entered value must match to pass constraint validation placeholder an example value to display inside the field when it has no value
readonly a boolean attribute which, if present, indicates that the field's contents should not be user-editable size the number of characters wide the input field should be onscreen list the values of the list attribute is the id of a <datalist> element located in the same document.
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
...And 3 more matches
<input type="text"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder,
readonly, required and size idl attributes list, value methods select(), setrangetext() and setselectionrange().
...ocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty
readonly a boolean attribute indicating whether or not the contents of the input should be
read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id o...
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
...And 3 more matches
<input type="url"> - HTML: Hypertext Markup Language
value a domstring representing a url, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, pattern, placeholder,
readonly, required and size idl attributes list, value, selectionend, selectiondirection methods select(), setrangetext() and setselectionrange().
...ocomplete options maxlength the maximum number of characters the input should accept minlength the minimum number of characters long the input can be and still be considered valid pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty
readonly a boolean attribute indicating whether or not the contents of the input should be
read-only size a number indicating how many characters wide the input field should be spellcheck controls whether or not to enable spell checking for the input field, or if the default spell checking configuration should be used list the values of the list attribute is the id o...
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
...And 3 more matches
<p>: The Paragraph element - HTML: Hypertext Markup Language
alternate separation methods, such as first-line indentation, can be achieved with css: html <p>separating paragraphs with blank lines is easiest for
readers to scan, but they can also be separated by indenting their first lines.
...nowadays, this is considered claustrophobic and hard to
read.</p> <p>how hard to
read?
...screen-
readers and other assistive technology provide shortcuts to let their users skip to the next or previous paragraph, letting them skim content like how white space lets visual users skip around.
...And 3 more matches
<video>: The Video Embed element - HTML: Hypertext Markup Language
buffered an attribute you can
read to determine the time ranges of the buffered media.
... currenttime
reading currenttime returns a double-precision floating-point value indicating the current playback position of the media specified in seconds.
... duration
read only a double-precision floating-point value which indicates the duration (total length) of the media in seconds, on the media's timeline.
...And 3 more matches
HTML documentation index - HTML: Hypertext Markup Language
if a non-null value doesn't conform to the constraints set by the pattern value, the validitystate object's
read-only patternmismatch property will be true.
... 46 html attribute:
readonly attribute, attributes, constraint validation, forms, required the boolean
readonly attribute, when present, makes the element not mutable, meaning the user can not edit the control.
... 64 <b>: the bring attention to element attention, element, html, html text-level semantics, html:flow content, html:palpable content, html:phrasing content, reference, web the html bring attention to element (<b>) is used to draw the
reader's attention to the element's contents, which are not otherwise granted special importance.
...And 3 more matches
Cross-Origin Resource Policy (CORP) - HTTP
cross-origin resource policy complements cross-origin
read blocking (corb), which is a mechanism to prevent some cross-origin
reads by default.
... in response, chromium shipped cross-origin
read blocking, which automatically protects certain resources (of content-type html, json and xml) against cross-origin
reads.
... usage note: due to a bug in chrome, setting cross-origin-resource-policy can break pdf rendering, preventing visitors from being able to
read past the first page of some pdfs.
...And 3 more matches
An overview of HTTP - HTTP
he cache can be public or private, like the browser cache) filtering (like an antivirus scan or parental controls) load balancing (to allow multiple servers to serve the different requests) authentication (to control access to different resources) logging (allowing the storage of historical information) basic aspects of http http is simple http is generally designed to be simple and human
readable, even with the added complexity introduced in http/2 by encapsulating http messages into frames.
... http messages can be
read and understood by humans, providing easier testing for developers, and reduced complexity for newcomers.
... send an http message: http messages (before http/2) are human-
readable.
...And 3 more matches
Grammar and types - JavaScript
const declares a block-scoped,
read-only named constant.
... an attempt to access an undeclared variable results in a referenceerror exception being thrown: var a; console.log('the value of a is ' + a); // the value of a is undefined console.log('the value of b is ' + b); // the value of b is undefined var b; // this one may puzzle you until you
read 'variable hoisting' below console.log('the value of c is ' + c); // uncaught referenceerror: c is not defined let x; console.log('the value of x is ' + x); // the value of x is undefined console.log('the value of y is ' + y); // uncaught referenceerror: y is not defined let y; you can use undefined to determine whether a variable has a value.
... constants you can create a
read-only, named constant with the const keyword.
...And 3 more matches
JavaScript modules - JavaScript
most servers al
ready set the correct type for .js files, but not yet for .mjs files.
... servers that al
ready serve .mjs files correctly include github pages and http-server for node.js.
... this is ok if you are using such an environment al
ready, or if you aren't but you know what you are doing and have access (i.e.
...And 3 more matches
Atomics - JavaScript
atomic operations when memory is shared, multiple th
reads can
read and write the same data in memory.
... atomic operations make sure that predictable values are written and
read, that operations are finished before the next operation starts and that operations are not interrupted.
...(most browsers will not allow wait() on the browser's main th
read.) atomics.xor() computes a bitwise xor on the value at the specified index of the array with the provided value.
...And 3 more matches
Planned changes to shared memory - JavaScript
there is standardization work ongoing that enables developers to create sharedarraybuffer objects again, but changes are needed in order to be use these across th
reads (i.e., postmessage() for sharedarraybuffer objects throws by default).
... for top-level documents, two headers will need to be set: cross-origin-opener-policy with same-origin as value (protects your origin from attackers) cross-origin-embedder-policy with require-corp as value (protects victims from your origin) with these two headers set, postmessage() will no longer throw for sharedarraybuffer objects and shared memory across th
reads is therefore available.
... webassembly shared memory the webassembly th
reads proposal allows webassembly.memory objects to be created with a new shared constructor flag.
...And 3 more matches
JavaScript typed arrays - JavaScript
javascript typed arrays are array-like objects that provide a mechanism for
reading and writing raw binary data in memory buffers.
... as you may al
ready know, array objects grow and shrink dynamically and can have any javascript value.
...you can't directly manipulate the contents of an arraybuffer; instead, you create a typed array view or a dataview which represents the buffer in a specific format, and use that to
read and write the contents of the buffer.
...And 3 more matches
Performance fundamentals - Web Performance
by manipulating pixels, a
reader app emits photons in a similar pattern to "fool" the user's eyes.
...then when the data is needed later, hopefully it's al
ready available and the application doesn't have to wait.
... note: for much more information on improving startup performance,
read optimizing startup performance.
...And 3 more matches
Mobile first - Progressive web apps (PWAs)
mobile constraints we have al
ready mentioned the fact that mobiles generally have less memory, processing power and bandwidth than other devices (although bear in mind that smart tvs are also generally pretty low powered.) they also have less viewport size available.
...a phrase you'll
read in a few places is "one eyeball, one thumb", referring to how much of the user's attention you are likely to have.
...i installed the volo automation tool by running the following on the command line sudo npm install -g volo (you'll also need to get node.js too if you don't al
ready have it) i then created my sample project using volo create myapp mozilla/mortar-app-stub this creates a sample project inside a directory called myapp.
...And 3 more matches
Content Scripts - Archive of obsolete content
you can load multiple scripts by passing an array of strings to either contentscript or contentscriptfile: // main.js var tabs = require("sdk/tabs"); tabs.on('
ready', function(tab) { tab.attach({ contentscript: ['document.body.style.border = "5px solid red";', 'window.alert("hi");'] }); }); // main.js var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*.mozilla.org", contentscriptfile: [data.url("jquery.min.js"), data.url("my-content-script.js")] }); if you do this, the scripts can inte...
... "
ready": load the scripts after the dom for the page has been loaded: that is, at the point the domcontentloaded event fires.
... passing configuration options the contentscriptoptions is a json object that is exposed to content scripts as a
read-only value under the self.options property: // main.js var tabs = require("sdk/tabs"); tabs.on('
ready', function(tab) { tab.attach({ contentscript: 'window.alert(self.options.message);', contentscriptoptions: {"message" : "hello world"} }); }); any kind of jsonable value (object, array, string, etc.) can be used here.
...And 2 more matches
Working with Events - Archive of obsolete content
for example, the following add-on registers a listener with the tabs module to listen for the
ready event, and logs a string to the console reporting the event: var tabs = require("sdk/tabs"); tabs.on("
ready", function () { console.log("tab loaded"); }); it is not possible to enumerate the set of listeners for a given event.
... adding listeners in constructors event emitters may be modules, as is the case for the
ready event above, or they may be objects returned by constructors.
... in the latter case the options object passed to the constructor typically defines properties whose names are the names of supported event types prefixed with "on": for example, "onopen", "on
ready" and so on.
...And 2 more matches
simple-storage - Archive of obsolete content
for example, this add-on tries to store the urls of pages the user visits: var ss = require("sdk/simple-storage"); ss.storage.pages = []; require("sdk/tabs").on("
ready", function(tab) { ss.storage.pages.push(tab.url); }); require("sdk/ui/button/action").actionbutton({ id: "
read", label: "
read", icon: "./
read.png", onclick: function() { console.log(ss.storage.pages); } }); but this isn't going to work, because it empties the array each time the add-on runs (for example, each time firefox is started).
... line 2 needs to be made conditional, so the array is only constructed if it does not al
ready exist: if (!ss.storage.pages) ss.storage.pages = []; deleting data you can delete properties using the delete operator.
... here's an add-on that adds three buttons to write,
read, and delete a value: var ss = require("sdk/simple-storage"); require("sdk/ui/button/action").actionbutton({ id: "write", label: "write", icon: "./write.png", onclick: function() { ss.storage.value = 1; console.log("setting value"); } }); require("sdk/ui/button/action").actionbutton({ id: "
read", label: "
read", icon: "./
read.png", onclick: function() { console.log(ss.storage.value); } }); require("sdk/ui/button/action").actionbutton({ id: "delete", label: "delete", icon: "./delete.png", onclick: function() { delete ss.storage.value; console.log("deleting value"); } }); if you run it, you'll see that after clicking "
read" after clicking "delete" gives you the expected output: info: un...
...And 2 more matches
Miscellaneous - Archive of obsolete content
var postdata = history.getentryatindex(history.index-1,false).queryinterface(ci.nsishentry).postdata; if you got here all by yourself, your problem must be at
reading the postdata, because it's a nsiinputstream object, whose available function always returns 0.
... and if you
read it directly, you always got nothing.
... and here's how it's done postdata.queryinterface(ci.nsiseekablestream).seek(ci.nsiseekablestream.ns_seek_set, 0); var stream = cc["@mozilla.org/binaryinputstream;1"].createinstance(ci.nsibinaryinputstream); stream.setinputstream(postdata); var postbytes = stream.
readbytearray(stream.available()); var poststr = string.fromcharcode.apply(null, postbytes); //do anything to your poststr alert(poststr); getting a string from the input stream is made somewhat simpler in firefox 4, by the addition of netutil.
readinputstreamtostring() getting postdata of a request before the request is sent the above code will get the postdata for a page that has al
ready loaded.
...And 2 more matches
Chapter 6: Firefox extensions and XUL applications - Archive of obsolete content
using venkman
read in source code activate venkman, and then select open windows:quicknote.xul:files on the top-left of the screen.
...with functions that include a lot of variables, this will be hard to
read, so you can point out specific variables that you want to watch (figure 4).
... this.stack = new array(); }, push: function(val) { this.stack.push(number(val)); }, _letfunc: function(func) { a = this.pop(); b = this.pop(); this.push(func(a, b)); }, plus: function() { return this._letfunc(this._plus); }, _plus: function(a, b) { return a + b; }, pop: function() { return this.stack.pop(); } } check for errors now you’re
ready for your first test.
...And 2 more matches
Adding Toolbars and Toolbar Buttons - Archive of obsolete content
this popup is al
ready part of the main window, so it doesn't need to be implemented again.
...
read more about this in the type attribute specification.
...we've al
ready mentioned this before, and if you follow our recommendations, then you shouldn't have many problems making your toolbar compatible with the customize toolbars dialog.
...And 2 more matches
Adding windows and dialogs - Archive of obsolete content
read the article and its examples carefully, because there are many useful functions to use in the prompt service.
...all it does is display a text message that the user can
read and then click the ok button to dismiss it.
... <dialog id="xulschoolhello-hello-dialog" title="&xulschoolhello.hellodialog.title;" buttons="accept,cancel" ondialogaccept="return xulschoolchrome.hellodialog.accept();" ondialogcancel="return xulschoolchrome.hellodialog.cancel();" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> carefully
read the specification of the dialog element.
...And 2 more matches
Mozilla Documentation Roadmap - Archive of obsolete content
many of the tips and tricks included in this tutorial were discovered by
reading these blogs.
... there are several useful feeds that you can follow using a feed
reader, such as thunderbird.
...it can be hard to follow due of the sheer mass of information coming out of it (dozens of posts per day), but you'll certainly be up to date with pretty much everything if you take the time to
read at least part of it.
...And 2 more matches
IO - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
... files and streams this section describes how to access and get information about files,
read from files and create and write files.
...And 2 more matches
Styling a Tree - Archive of obsolete content
set the property on a row or cell, as in the following example: <treerow properties="makeitblue"> css selectors for the tree the style sheet can take this property and use it to change the appearance of the row for un
read messages or labels.
...the example below sets the background color to grey for rows that have the '
readonly' and 'un
read' properties.
... for properties that are '
readonly', it adds a red border around the row.
...And 2 more matches
menuitem - Archive of obsolete content
this value is
read-only.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... parentcontainer type: menu element
read only property that returns the containing menu element, or null if there isn't a containing menu.
...And 2 more matches
menuseparator - Archive of obsolete content
this value is
read-only.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... parentcontainer type: menu element
read only property that returns the containing menu element, or null if there isn't a containing menu.
...And 2 more matches
prefwindow - Archive of obsolete content
instantapply (
readonly) indicates whether the window is in "instant apply" mode.
... the value is
read from browser.preferences.instantapply boolean user preference.
...if a window with that type is al
ready open, this method will just switch that window to the front and focus it instead of opening another window.
...And 2 more matches
tab - Archive of obsolete content
attributes accesskey, afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, un
read, validate, value properties accesskey, accessibletype, command, control, crop, disabled, image, label, linkedpanel, selected, tabindex, value examples (example needed) attributes accesskey type: character this should be set to a character that is used as a shortcut key.
... un
read type: boolean this attribute is set to true if the tab is un
read; that is, either it has not yet been selected during the current session, or has changed since the last time it was selected.
... this attribute is not present if the tab is not un
read.
...And 2 more matches
Creating XULRunner Apps with the Mozilla Build System - Archive of obsolete content
building your application if you decided that you needed a custom-built xulrunner and
read the previous section then you're way ahead of the game.
...you'll learn a lot more by looking at the project files than you will from
reading this drivel, but just to be safe let's run through the files one by one: makefile.in - the top-level makefile.
... makefile.in - didn't we al
ready do this one?
...And 2 more matches
2006-11-10 - Archive of obsolete content
summary: mozilla.dev.accessibility - oct 28-nov 10, 2006 announcements acm transactions on accessible computing "transactions on accessible computing (taccess) is a quarterly journal that publishes refereed articles addressing issues of computing as it impacts the lives of people with disabilities."
read more...
...important dates: technical submissions: monday 19th feb 2007 technical paper notification: friday 16th march 2007 communication submissions: monday 26th march 2007 communication paper notification: friday 06th april 2007 all camera
ready due: monday 16th april 2007 conference dates: monday 07th and tuesday 08th may 2007 notable keynotes representatives from w3c, ibm, university of manchester, uk and oxford brookes university, uk.
...
read more...
...And 2 more matches
What is RSS - Archive of obsolete content
userland bumped up the version number all the way up to 2.0 because the rss-dev working group al
ready used 1.0 with their rdf-based rss 1.0.
...in other words, when you syndicate, you are telling everyone something like: "hey everyone, i've got articles that i want everyone to come and
read.
...they can
read it.
...And 2 more matches
Theme changes in Firefox 2 - Archive of obsolete content
feeds/addfeed
reader.xul feeds/addfeed
reader.css new file that presents ui for adding a new feed
reader.
... browser/feeds/addfeed
reader.css new file; css used for the window to add a new feed
reader.
... feeds/addfeed
reader.css this is a new file in firefox 2.
...And 2 more matches
Implementation Status - Archive of obsolete content
278448; 338146; 4.2 initialization events supported 4.2.1 xforms-model-construct supported 4.2.2 xforms-model-construct-done supported 4.2.3 xforms-
ready supported 4.2.4 xforms-model-destruct supported 4.3.1 xforms-rebuild supported 4.3.2 xforms-recalculate supported 4.3.3 xforms-revalidate supported 4.3.4 xforms-refresh sup...
... 4.4.1 xforms-insert supported 4.4.2 xforms-delete supported 4.4.3 xforms-value-changed supported 4.4.4 xforms-valid supported 4.4.5 xforms-invalid supported 4.4.6 xforms-
readonly supported 4.4.7 xforms-
readwrite supported 4.4.8 xforms-required supported 4.4.9 xforms-optional supported 4.4.10 xforms-enabled supported 4.4.11 xforms-disabled support...
...model item properties section title status notes bugs 6.1.1 type partial limited to types mentioned above 6.1.2
readonly supported 6.1.3 required supported 6.1.4 relevant partial relevancy applied via a bind to an element fails to apply to child attributes 342319; 6.1.5 calculate supported 6.1.6 constraint supported ...
...And 2 more matches
Building up a basic demo with Babylon.js - Game development
if you have al
ready worked through our building up a basic demo series with three.js, playcanvas or a-frame (or you are familiar with other 3d libraries) you'll notice that babylon.js works on similar concepts: camera, light and objects.
...there is one helper variable al
ready included, which will store a reference to the <canvas> element.
... before
reading on, copy this code to a new text file and save it in your working directory as index.html.
...And 2 more matches
Building up a basic demo with the PlayCanvas engine - Game development
if you have al
ready worked through our building up a basic demo with three.js article (or you are familiar with other 3d libraries) you'll notice that playcanvas works on similar concepts: camera, light and objects.
...there is one helper variable al
ready included, which will store a reference to the <canvas> element.
... before
reading on, copy this code to a new text file and save it in your working directory as index.html.
...And 2 more matches
Building up a basic demo with Three.js - Game development
there are two helper variables al
ready included, which store the window's width and height.
... before
reading further, copy this code to a new text file, and save it in your working directory as index.html.
... rendering the scene everything is
ready, but we still can't see anything.
...And 2 more matches
Desktop gamepad controls - Game development
api status, browser and hardware support the gamepad api is still in working draft status, although browser support is al
ready quite good — around 63% global coverage, according to caniuse.com.
... pressed buttons we will need a function that will do exactly that on every frame: function gamepadupdatehandler() { buttonspressed = []; if(controller.buttons) { for(var b=0; b<controller.buttons.length; b++) { if(controller.buttons[b].pressed) { buttonspressed.push(b); } } } } we first reset the buttonspressed array to get it
ready to store the latest info we'll write to it from the current frame.
...if we want to check the button is not held al
ready (so it's a new press), then looping through the cached states from the previous frame does the job — if the button was al
ready pressed, then we ignore the new press and set it to false.
...And 2 more matches
Unconventional controls - Game development
there's al
ready a gamepad api working on the desktop computers, so we can imitate the experience, but we can go even further.
...interestingly enough, the first captain rogers game (asteroid belt of sirius) was optimized for low-end, small-screen, cheap smartphones running firefox os, so you can see the difference three years can make — you can
read the whole story in our building games for firefox os tv hacks post.
...captain rogers had the keyboard controls implemented al
ready: this.cursors = this.input.keyboard.createcursorkeys(); //...
...And 2 more matches
2D maze game with device orientation - Game development
you can check it out on github where it’s open sourced,
read the online documentation and go through the big collection of examples.
... note: you can
read the building monster wants candy article for the in-depth introduction to the basic phaser-specific functions and methods.
...the create function holds some basic configuration: we're setting up the scaling and alignment of the canvas, and moving on to the preload state when everything's
ready.
...And 2 more matches
Test your skills: WAI-ARIA - Learn web development
assuming you are not able to change the elements used, how can you allow screen
reader users to recognize this as a list?
... wai-aria 2 in our second wai-aria task, we present a simple search form, and we want you to add in a couple of wai-aria features to improve its accessibility: how can you allow the search form to be called out as a separate landmark on the page by screen
readers, to make it easily findable?
... the problem we have now is that when the dom changes to show a new decription, screen
readers cannot see what has changed.
...And 2 more matches
Beginner's guide to media queries - Learn web development
width and height the feature we tend to detect most often in order to create responsive designs (and that has widesp
read browser support) is viewport width, and we can apply css if the viewport is above or below a certain width — or an exact width — using the min-width, max-width, and width media features.
...perhaps the line lengths become far too long, or a boxed out sidebar gets squashed and hard to
read.
...this means that you probably don't need to do a lot of layout for small devices — order your source well and you will have a
readable layout by default.
...And 2 more matches
How does the Internet work? - Learn web development
prerequisites: none, but we encourage you to
read the article on setting project goals first objective: you will learn the basics of the technical infrastructure of the web and the difference between internet and the web.
...of course a single router can't scale that far, but, if you
read carefully, we said that a router is a computer like any other, so what keeps us from connecting two routers together?
...well, there are al
ready cables linked to your house, for example, electric power and telephone.
...And 2 more matches
What software do I need to build a website? - Learn web development
prerequisites: you should al
ready know the difference between webpages, websites, web servers, and search engines.
... (all unix) gedit (gnome) kate (kde) leafpad (xfce) emacs vim visual studio code brackets shiftedit sublime text chrome os shiftedit here is a screenshot of an advanced text editor: here is a screenshot of an online text editor: uploading files on the web when your website is
ready for public viewing, you'll have to upload your webpages to your web server.
...c (s)ftp clients: operating system ftp software windows winscp moba xterm filezilla (all os) linux nautilus/files (gnome) dolphin (kde) mac os cyberduck chrome os shiftedit (all os) browsing websites as you al
ready know, you need a web browser to view websites.
...And 2 more matches
HTML basics - Learn web development
an attribute should always have the following: a space between it and the element name (or the previous attribute, if the element al
ready has one or more attributes).
...take the <img> element that we al
ready have in our html page: <img src="images/firefox-icon.png" alt="my test image"> this contains two attributes, but there is no closing </img> tag and no inner content.
...users with significant visual impairments often use tools called screen
readers to
read out the alt text to them.
...And 2 more matches
Using data attributes - Learn web development
</article> javascript access
reading the values of these attributes out in javascript is also very simple.
... you could use getattribute() with their full html name to
read them, but the standard defines a simpler way: a domstringmap you can
read out via a dataset property.
... const article = document.queryselector('#electric-cars'); article.dataset.columns // "3" article.dataset.indexnumber // "12314" article.dataset.parent // "cars" each property is a string and can be
read and written.
...And 2 more matches
Looping code - Learn web development
we al
ready met this in the previous article when we looked at switch statements — when a case is met in a switch statement that matches the input expression, the break statement immediately exits the switch statement and moves onto the code after it.
... we store the value entered into the text input in a variable called searchname, before then emptying the text input and focusing it again,
ready for the next search.
... we've al
ready provided you with: let i = 0; — your initializer.
...And 2 more matches
Drawing graphics - Learn web development
so that's it — our canvas is now primed and
ready for drawing on!
... update the variables that describe the sequence of triangles, so we can be
ready to draw the next one.
...the next time the browser is
ready to update the screen, your function will get called.
...And 2 more matches
Fetching data from the server - Learn web development
this is because of security restrictions (for more on web security,
read website security).
...to find out how to do this,
read how do you set up a local testing server?
... the following block does the same thing as our original example, but is written in a different style: fetch(url).then(function(response) { return response.text() }).then(function(text) { poemdisplay.textcontent = text; }); many developers like this style better, as it is flatter and arguably easier to
read for longer promise chains — each subsequent promise comes after the previous one, rather than being inside the previous one (which can get unwieldy).
...And 2 more matches
Introduction to web APIs - Learn web development
client-side storage apis are becoming a lot more widesp
read in web browsers — the ability to store data on the client-side is very useful if you want to create an app that will save its state between page loads, and perhaps even work when the device is offline.
... note: if you are not al
ready familiar with how objects work, you should go back and work through our javascript objects module before continuing.
... they use events to handle changes in state we al
ready discussed events earlier on in the course in our introduction to events article, which looks in detail at what client-side web events are and how they are used in your code.
...And 2 more matches
Getting started with Ember - Learn web development
previous overview: client-side javascript frameworks next in our first ember article we will look at how ember works and what it's useful for, install the ember toolchain locally, create a sample app, and then do some initial setup to get it
ready for development.
...go here to find out how to install node and npm, if you haven't al
ready got them.
...(good suggestions are your "desktop" or "documents" directories, so that it is easy to find): ember new todomvc or, on windows: npx ember-cli new todomvc this generates a production-
ready application development environment that includes the following features by default: development server with live reload.
...And 2 more matches
React resources - Learn web development
you can
read more about component stylesheets in the create-react-app docs.
... you can
read more about react devtools on the react blog.
... state and lifecycle in the react docs intro to react in the react docs
read about javascript classes at mdn testing create-react-app provides some tools for testing your application out of the box — you may have deleted the relevant files earlier in the tutorial.
...And 2 more matches
Deploying our app - Learn web development
instead of running the server with npx parcel src/index.html, we can run it with npx parcel build src/index.html and parcel will build everything
ready for production instead of just running it for development and testing purposes.
... the newly-created production code is placed in a new directory called dist, which contains all the files required to run the website,
ready for you to upload to a server.
... "build": "parcel build src/index.html" } note: if the scripts property al
ready has a command inside it, put a comma at the end of it.
...And 2 more matches
Client-side tooling overview - Learn web development
you might even find yourself writing a piece of software to aid your own development process, to solve a specific problem that existing tools don’t al
ready seem to handle.
... bundlers/packagers these are tools that get your code
ready for production, for example by “tree-shaking” to make sure only the parts of your code libraries that you are actually using are put into your final production code, or "minifying" to remove all the whitespace in your production code, making it as small as possible before it is uploaded to a server.
...the knowledge about which are the best tools to use is a bit tribal, meaning that if you aren’t al
ready in the web community, it is hard to find out exactly which ones to go for!
...And 2 more matches
Chrome registration
mozilla locates and
reads the root chrome.manifest file for extensions and themes.
... note: with gecko 1.9.2 and older, mozilla
reads chrome/*.manifest files from applications.
... contract contract @foobar/mycontract;1 {00000000-0000-0000-0000-000000000000} [flags] maps a contract id (a
readable string) to the classid for a specific implementation.
...And 2 more matches
Debugging on Mac OS X
# therefore setting `settings set target.load-cwd-lldbinit true` can't help us # without xcode providing that functionality.) # # the following works by setting a one-shot breakpoint to break on a function # that we know will both run early (which we want when we start first start the # app) and run frequently (which we want so that it will trigger asap if we # attach to an al
ready running app).
...# breakpoint set --name nsth
read::processnextevent --th
read-index 1 --auto-continue true --one-shot true breakpoint command add -s python # this script that we run does not work if we try to use the global 'lldb' # object, since it is out of date at the time that the script runs (for # example, `lldb.target.executable.fullpath` is empty).
... target = frame.getth
read().getprocess().gettarget() debugger = target.getdebugger() # delete our breakpoint (not actually necessary with `--one-shot true`): target.breakpointdelete(bp_loc.getbreakpoint().getid()) # for completeness, find and delete the dummy breakpoint (the breakpoint # lldb creates when it can't initially find the method to set the # breakpoint on): # bug workaround!
...And 2 more matches
Eclipse CDT
(if you're thinking of adding tips, please first consider how widely useful they'll be before adding to this al
ready lengthy page.) for further documentation see the official eclipse user guide and eclipse cdt user guide.
...;-) to jump to the definition of a symbol (or the declaration of a symbol if al
ready at the definition), hover over the symbol, hold down the ctrl/cmd key, move the mouse slightly to linkify the symbol, then click on it.
...(see the "code assistance" section above for why.) nevertheless, if you understand the above warning and you still want to configure eclipse's "build" button to invoke a real build, then
read on.
...And 2 more matches
Eclipse CDT Manual Setup
mach setup most people should be
reading the eclipse cdt page instead of this one, now that mach ide eclipse is a thing.
... (this assumes that you al
ready have a copy of the mozilla source, and that you have also built the source so that you have a pre-existing object directory.
...owing two settings in the workspace preferences (window > preferences, or eclipse > preferences) before creating a project in that workspace: in "general > workspace", disable "build automatically" in "c/c++ > indexer", disable "automatically update the index" turning off automatic indexing prevents the cpu intensive indexer from running at various stages during the steps below before we're
ready.
...And 2 more matches
Storage access policy: Block cookies from trackers
dom storage: localstorage: window.localstorage:
read and write attempts throw a securityerror exception.
...thus, attempts to
read and write using this object will throw a typeerror exception.
... sessionstorage:
read and write attempts are permitted.
...And 2 more matches
AsyncShutdown.jsm
void addblocker( in string name, in function|promise|* condition, optional in function info ) arguments name the human-
readable name of the blocker.
...note that a result of false may mean either that the blocker has never been installed or that the phase has completed and the blocker has al
ready been resolved.
... properties attribute type description profilebeforechange
read only phase the profile is about to be unmounted.
...And 2 more matches
DeferredTask.jsm
this is always true when
read from code inside the task function, but can also be true when
read from external code, in case the task is an asynchronous generator function.
... void arm(); disarm cancel any request for a delayed execution of the task, though the task itself cannot be canceled in case it is al
ready running.
...}, 2000); // the task is
ready, but will not be executed until requested.
...And 2 more matches
Following the Android Toasts Tutorial from a JNI Perspective
this article teaches developers how to port java code to jni by
reading the java and android documentation.
... this is the template that will follow our object of signatures: var my_jenv = null; try { my_jenv = jni.getforth
read(); // do the jni work here } finally { if (my_jenv) { jni.unloadclasses(my_jenv); } } the reason we choose my_jenv for a variable name, and not jenv, is because the global privileged window scope of firefox for android has a variable jenv al
ready, and we don't want to mix.
... declare constructors, methods, and fields now that the sig's and java environment is
ready, it is now possible to declare the constructors, methods, and fields.
...And 2 more matches
OS.File.Info
instances of os.file.info may be obtained by: calling global method os.file.stat() either from the main th
read or from a worker th
read; calling instance method stat() of os.file either from the main th
read or from a worker th
read.
... using os.file.info example: determining if a file is a regular file the following snippet uses the main th
read api to determine (asynchronously) whether some path is a regular file, or a directory, or a symbolic link: let promise = os.file.stat(somepath); promise.then( function onsuccess(info) { // |info| is an instance of |os.file.info| if (info.isdir) { // |somepath| represents a directory } else if (info.issymlink) { // |somepath| represents a symbolic link } else { // |somepath| represents a regular file } }, function onfailure(reason) { if (reason instanceof os.file.error && reason.becausenosuchfile) { // |somepath| does not represent anything } else { // some other error } } ) example: determining the owner of a fi...
... global object os.file.info methods object tomsg(in os.file.info value) os.file.tomsg convert an instance of os.file.info to a form that can be serialized and transmitted between th
reads or processes.
...And 2 more matches
source-editor.jsm
read only.
...
read only.
...
readonly boolean set this value to true to make the editor
read only, thereby preventing the user from making changes.
...And 2 more matches
MathML Accessibility in Mozilla
this table below provides a list of mathml constructions and how they are
read in mozilla applications for various platforms: windows: mathml support is provided by nvda, which actually delegates math
reading to the proprietary mathplayer plugin.
...mozilla and nvda developers essentially do not have control on how mathematical formulas are
read, please contact design science for any inquiries.
...see bug 1176970 ; safari+voiceover
reads "(, abcde, )".
...And 2 more matches
Mozilla Web Developer FAQ
the past practice of displaying non-latin text by assigning non-latin glyphs to latin code points breaks copying and pasting, breaks searching on the page, breaks indexing by search engines and breaks
readability in browsers that do not support downloadable fonts (e.g.
...however, it turns out mozilla is doing that al
ready.
... mozilla’s standards mode is, obviously, al
ready compatible with other browsers that implement the same standards reasonably correctly.
...And 2 more matches
Power profiling overview
each core typically has hyper-th
reading, which means it contains two logical cpus.
... tools that can take rapl
readings include the following.
... of these, tools/power/rapl is generally the easiest and best to use because it
reads all power planes, it's a command line utility, and it doesn't measure anything else.
...And 2 more matches
Process Forking in NSPR
the th
reads provided in netscape portable runtime (nspr) are implemented using different mechanisms on the various platforms.
... on some platforms, nspr th
reads directly map one-to-one to the th
reads provided by the platform vendor, on other platforms nspr th
reads are basically user-level th
reads within a single process (with no kernel th
reads) and on still others nspr th
reads are user-level th
reads implemented on top of one or more kernel th
reads within single address space.
... nspr does not override the fork function and so, when fork is called from the nspr th
read the results are different on the various platforms.
...And 2 more matches
PRIOMethods
syntax #include <prio.h> struct priomethods { prdesctype file_type; prclosefn close; pr
readfn
read; prwritefn write; pravailablefn available; pravailable64fn available64; prfsyncfn fsync; prseekfn seek; prseek64fn seek64; prfileinfofn fileinfo; prfileinfo64fn fileinfo64; prwritevfn writev; prconnectfn connect; pracceptfn accept; prbindfn bind; prlistenfn listen; prshutdownfn shutdown; prrecvfn recv; prsendfn send; prrecvfromfn recvfrom; prsendtofn sendto; prpollfn poll; praccept
readfn accept
read; prtransmitfilefn transmitfile; prgetsocknamefn getsockname; prgetpeernamefn getpeername; prgetsockoptfn getsockopt; prsetsockoptfn setsockopt; }; typedef struct priomethods priomethods; p...
...
read read up to the specified number of bytes into buffer.
... available determine number of bytes available for
reading.
...And 2 more matches
PR_CNotifyAll
notifies all the th
reads waiting for a change in the state of monitored data.
...the calling th
read must be in the monitor at the time pr_cnotifyall is called.
... returns pr_success indicates that the referenced monitor was located and the calling th
read was in the monitor.
...And 2 more matches
PR_Cleanup
if the calling th
read of this function is not the primordial th
read, pr_failure.
... description pr_cleanup must be called by the primordial th
read near the end of the main function.
...it does so by blocking the caller, if and only if it is the primordial th
read, until all user th
reads have terminated.
...And 2 more matches
PR_EnterMonitor
description when the calling th
read returns, it will have acquired the monitor's lock.
... attempts to acquire the lock for a monitor that is held by some other th
read will result in the caller blocking.
... if the monitor's entry count is greater than zero and the calling th
read is recognized as the holder of the lock, pr_entermonitor increments the entry count by one and returns.
...And 2 more matches
PR_Initialize
syntax #include <prinit.h> printn pr_initialize( prprimordialfn prmain, printn argc, char **argv, pruintn maxptds); parameters pr_initialize has the following parameters: prmain the function that becomes the primordial th
read's root function.
...this allows main to be treated like any other function, signaling its completion by returning and allowing the runtime to coordinate the completion of the other th
reads of the runtime.
... pr_initialize does not return to its caller until all user th
reads have terminated.
...And 2 more matches
PR_Notify
the monitor object referenced must be one for which the calling th
read currently holds the lock.
...when the notification occurs, the runtime promotes a th
read that is waiting on the monitor to a
ready state.
... if more than one th
read is waiting, the selection of which th
read gets promoted cannot be determined in advance.
...And 2 more matches
PR_NotifyAll
promotes all th
reads waiting on a specified monitor to a
ready state.
...the monitor object referenced must be one for which the calling th
read currently holds the lock.
... description a call to pr_notifyall causes all of the th
reads waiting on the monitor to be scheduled to be promoted to a
ready state.
...And 2 more matches
PR_NotifyCondVar
description the calling th
read must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition.
...when the notification occurs, the runtime promotes a th
read that is waiting on the condition variable to a
ready state.
... if more than one th
read is waiting, the selection of which th
read gets promoted cannot be predicted.
...And 2 more matches
JSS FAQ
can i have multiple jss instances
reading separate db's?
...jss only supports the native th
reading model (no green th
reads).
...the nt fiber problem affects applications that call blocking system calls from the primordial th
read.
...And 2 more matches
PKCS #11 Module Specs
ciphers - comma separated list of ciphers this token will enable that isn't al
ready enabled by the library (currently only fortezza is defined) (case-insensitive).
... publiccerts - the certificates on this token can be
read without authenticating to this token, and any user certs on this token have a matching public key which is also
readable without authenticating.
...at init time nss, will try to look for a default root cert device if one has not al
ready been loaded.
...And 2 more matches
NSS tools : certutil
the certificate database should al
ready exist; if one is not present, this command option will initialize one by default.
...the key database should al
ready exist; if one is not present, this option will initialize one by default.
... -q pqgfile or curve-name
read an alternate pqg value from the specified file when generating dsa key pairs.
...And 2 more matches
NSS Tools modutil
if any of these databases al
ready exist in a specified directory, the security module database tool displays an error message.
...the following mechanisms are currently available: rsa, dsa, rc2, rc4, rc5, des, dh, fortezza, sha1, md5, md2, random (for random number generation), and friendly (meaning certificates are publicly
readable).
...this string is a bitwise or of the following constants: user
read: 0400 user write: 0200 user execute: 0100 group
read: 0040 group write: 0020 group execute: 0010 other
read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions.
...And 2 more matches
certutil
the certificate database should al
ready exist; if one is not present, this option will initialize one by default.
... the key database should al
ready exist; if one is not present, this option will initialize one by default.
... -q pqgfile
read an alternate pqg value from the specified file when generating dsa key pairs.
...And 2 more matches
SpiderMonkey Build Documentation
at this point, you're
ready to run and try out the shell.
... to generate a compile_commands.json with the spidermonkey configure script, enable the compiledb backend, like this: /bin/sh ../configure.in <options> --enable-build-backends=compiledb,recursivemake (recursivemake is there as you'd likely also want to be able to build!) windows builds since version 28, th
readsafe builds are the default, and should work out of the box on all posix platforms.
... support for js_th
readsafe was recently removed, and th
readsafe builds are now enabled by default.
...And 2 more matches
JSAPI Cookbook
specify writable: false to make the property
read-only and configurable: false to prevent it from being deleted or redefined.
...the property attribute jsprop_
readonly corresponds to writeable: false, jsprop_enumerate to enumerable: true, and jsprop_permanent to configurable: false.
... /* jsapi */ if (!js_defineproperty(cx, obj, "prop", int_to_jsval(123), js_propertystub, js_strictpropertystub, jsprop_
readonly | jsprop_enumerate | jsprop_permanent)) { return false; } defining a property with a getter and setter object.defineproperty() can be used to define properties in terms of two accessor functions.
...And 2 more matches
JS::CompileFunction
syntax bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::
readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char16_t *chars, size_t length, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector &scopechain, const js::
readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, js::sourcebufferholder &srcbuf, js::mutablehandlefunction fun); bool js::compilefunction(jscontext *cx, js::autoobjectvector ...
...&scopechain, const js::
readonlycompileoptions &options, const char *name, unsigned nargs, const char *const *argnames, const char *bytes, size_t length, js::mutablehandlefunction fun); name type description cx jscontext * the context in which to compile the function.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...And 2 more matches
JS::Evaluate
syntax // added in spidermonkey 45 bool js::evaluate(jscontext *cx, const js::
readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::
readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::
readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, const js::
readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); ...
...bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const
readonlycompileoptions &options, const char16_t *chars, size_t length, js::mutablehandlevalue rval); // added in spidermonkey 17 bool js::evaluate(jscontext *cx, js::autoobjectvector &scopechain, const js::
readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); // obsolete since jsapi 39 bool js::evaluate(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, js::sourcebufferholder &srcbuf, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char16_t *chars, size_t length...
..., js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char *bytes, size_t length, js::mutablehandlevalue rval); bool js::evaluate(jscontext *cx, js::handleobject obj, const js::
readonlycompileoptions &options, const char *filename, js::mutablehandlevalue rval); name type description cx jscontext * the context in which to run the script.
...And 2 more matches
JSObjectOps.dropProperty
(in a js_th
readsafe build, that would risk deadlock.) when finished with a locked property, the caller must release it by calling the dropproperty callback.
...the granularity of the locking is up to the jsobjectops implementation; deadlock does not happen because each th
read accesses only one property at a time.
... th
reads.
...And 2 more matches
JS_CompileUTF8FileHandle
compile a script,
reading the source code from a stdio file.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
... description js_compileutf8filehandle
reads a script from a stdio file handle and compiles the script for execution by the javascript engine.
...And 2 more matches
JS_GET_CLASS
syntax #ifdef js_th
readsafe #define js_get_class(cx,obj) js_getclass(cx, obj) #else #define js_get_class(cx,obj) js_getclass(obj) #endif parameter type description cx jscontext * any context associated with the runtime in which obj exists.
... note: in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in th
read-safe builds, and in non-th
read-safe builds it took only a jsobject*.
... newer versions have removed the context argument, so that the same signature is used regardless whether or not the build is th
read-safe.
...And 2 more matches
JS_MakeStringImmutable
make a jsstring th
read-safe.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...therefore such strings must not be used by more than one th
read at a time.
...And 2 more matches
JS_NewRuntime
syntax jsruntime * js_newruntime(uint32_t maxbytes, uint32_t maxnurserybytes = js::defaultnurserybytes, jsruntime *parentruntime = nullptr); jsruntime * js_newruntime(uint32_t maxbytes, jsusehelperth
reads usehelperth
reads, jsruntime *parentruntime = nullptr); // deprecated since jsapi 32 name type description maxbytes uint32 maximum number of allocated bytes after which garbage collection is run.
...if parentruntime is specified, the resulting runtime shares significant amounts of
read-only state (the self-hosting and initial atoms compartments).
... the returned jsruntime can be used from the calling th
read only.
...And 2 more matches
SpiderMonkey 1.8.7
no compartment may execute js code or call into jsapi on two os th
reads at the same time.
...new c apis js_assert_string_is_flat js_addgcthingroot js_addnamedgcthingroot js_addnamedobjectroot js_addnamedstringroot js_addnamedvalueroot js_addobjectroot js_addstringroot js_addvalueroot js_al
readyhasownpropertybyid js_anchorptr js_beginjsonparse (removed in future releases, replaced with js_parsejson) js_compilefilehandleforprincipalsversion js_compilescriptforprincipalsversion js_compileucfunctionforprincipalsversion js_compileucscriptforprincipalsversion js_consumejsontext (removed in future releases, replaced with js_parsejson) js_decompilescriptobject js_deepfreezeobject js_...
...rincipalsversion js_executeregexp js_executeregexpnostatics js_executescriptversion js_forget_string_flatness js_fileescapedstring js_finishjsonparse (removed in future releases, replaced with js_parsejson) js_flatstringequalsascii js_flattenstring js_flushcaches js_freezeobject js_getcompartmentprivate js_getemptystring js_getflatstringchars js_getgcparameter js_getgcparameterforth
read js_getglobalforscopechain js_getinternedstringchars js_getinternedstringcharsandlength js_getownpropertydescriptor js_getpropertyattrsgetterandsetterbyid js_getpropertybyid js_getpropertybyiddefault js_getpropertydefault js_getpropertydescriptorbyid js_getruntimesecuritycallbacks js_getsecuritycallbacks js_getstringcharsandlength js_getstringcharsz js_getstringcharszandlength js_ge...
...And 2 more matches
TPS Tests
the python test runner will
read a test file (in javascript format), setup one or more firefox profiles with the necessary extensions and preferences, then launch firefox and pass the test file to the extension.
... the extension will
read the test file and perform a series of actions specified therein, such as populating a set of bookmarks, syncing to the sync server, making bookmark modifications, etc.
... phase implementation (mandatory) it's worth noting that some parts of tps assume that it can
read the number off the end of the phase or profile to get to the next one, so try to stick to the convention established in the other tests.
...And 2 more matches
Language bindings
more specifically, an xpcom language binding: enables access to xpcom objects from that language (where access means
reading/writing/creating xpcom objects as well as calling methods on them).
...the components object is actually a native instance of the nsixpccomponents interface which is reflected into javascript as a top level object using xpconnect.components.classescomponents.classes is a
read-only object whose properties are classes indexed by contractid.components.classesbyidcomponents.classesbyid is a
read-only object whose properties are classes indexed by cid.components.constructorcreates a javascript function which can be used to create or construct new instances of xpcom components.components.exceptioncomponents.exception is a javascript constructor to create nsixpcexception obj...
...these exception objects may be thrown when implementing xpcom interfaces in javascript, and they can provide better diagnostics in the error console if not caught than simply throwing an nsresult's value will.components.idcomponents.id is a constructor that creates native objects that conform to the nsijsid interface.components.interfacescomponents.interfaces is a
read-only object whose properties are interfaces indexed by their names.components.interfacesbyidcomponents.interfacesbyid is a
read-only array of classes indexed by iid.components.issuccesscodedetermines whether a given xpcom return code (that is, an nsresult value) indicates the success or failure of an operation, returning true or false respectively.components.lastresultcomponents.managercomponents.manager is a convenience r...
...And 2 more matches
NS ConvertUTF16toUTF8 external
class declaration method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
NS LossyConvertUTF16toASCII external
class declaration method overview constructors get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
PromiseFlatCString (External)
class declaration method overview get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsACString (External)
e="ns_convertutf16toutf8_external"> <area alt="" coords="499,294,779,342" href="http://developer.mozilla.org/en/ns_lossyconvertutf16toascii_external" shape="rect" title="ns_lossyconvertutf16toascii_external"> <area alt="" coords="803,294,925,342" href="http://developer.mozilla.org/en/nsliteralcstring_(external)" shape="rect" title="nsliteralcstring_(external)"></map> method overview begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripc...
...methods begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsAString (External)
shape="rect" title="ns_convertasciitoutf16_external"> <area alt="" coords="491,294,733,342" href="http://developer.mozilla.org/en/ns_convertutf8toutf16_external" shape="rect" title="ns_convertutf8toutf16_external"> <area alt="" coords="757,294,869,342" href="http://developer.mozilla.org/en/nsliteralstring_(external)" shape="rect" title="nsliteralstring_(external)"> </map> method overview begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsl...
...methods begin
reading pruint32 begin
reading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* begin
reading() const - source end
reading prunichar* end
reading() const - source charat prunichar charat(pruint32) const - source parameters pruint32 apos operator[] prunichar operator[](pruint32) const - source parameters pruint32 apos first prunichar first() const - source beginwriting pruint32 beginwriting(prunichar**, prunichar**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsCAutoString (External)
class declaration method overview get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfindchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsCStringContainer (External)
class declaration method overview begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare(const char*, print32 (*) compare(const nsacstring&, print32 (*) equals(const char*, print32 (*) equals(const nsacstring&, print32 (*) operator< operator<= operator== operator>= operato...
...methods begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char* begin char* end char begin
reading() const - source end
reading char end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsDependentCString external
class declaration method overview constructors rebind get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsDependentCSubstring external
class declaration method overview constructors rebind begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar rfind...
...sacstring& astr pruint32 astartpos void nsdependentcsubstring_external(const nsacstring&, pruint32, pruint32) - source parameters nsacstring& astr pruint32 astartpos pruint32 alength rebind void rebind(const char*, pruint32) - source parameters char* astart pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsLiteralCString (External)
class declaration method overview rebind get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
nsLiteralString (External)
class declaration method overview rebind get operator= adopt begin
reading end
reading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral replace append appendliteral operator+= insert cut truncate stripchars stripwhitespace trim defaultcomparator compare equals operator< operator<= operator== operator>= operator> operator!= equalsliteral find rfind findchar ...
...parameters nsacstring& astring nsacstring& operator=(const char*) - source parameters char* aptr nsacstring& operator=(char) - source parameters char achar adopt void adopt(const char*, pruint32) - source parameters char* adata pruint32 alength begin
reading pruint32 begin
reading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* begin
reading() const - source end
reading char* end
reading() const - source charat char charat(pruint32) const - source parameters pruint32 apos operator[] char operator[](pruint32) const - source parameters pruint32 apos first char first() const - source beginwriting pruint32 beginwriting(char**, char**, pruint32) - source get the length, begin writing, and optionally set the length of a string all in one operation.
...And 2 more matches
mozIVisitInfo
1.0 66 introduced gecko 2.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) attributes attribute type description referreruri nsiuri
read only: the referring uri of this visit.
... sessionid long
read only: the sessionid of this visit.
... transitiontype long
read only: the transition type used to get to this visit.
...And 2 more matches
nsIAppShell
this interface is designed to be used on the main application th
read only.
...
read only.
... resumenative() resumes the use of additional platform-specific methods to run() gecko events on the main application th
read.
...And 2 more matches
nsICacheSession
does not block the calling th
read.
...isstorageenabled() this method checks if the cache devices implied by the session storage policy are currently enabled for instantiation if they don't al
ready exist.
...when called by multiple th
reads for write access, only one writable descriptor will be granted.
...And 2 more matches
nsIDOMOfflineResourceList
read only.
...
read only.
... onupdate
ready nsidomeventlistener an event listener to be called when a resource update is
ready; this event is not currently used since versioned application caches aren't supported yet.
...And 2 more matches
nsIFileStreams
the nsifilestreams interface is an input stream that allows you to
read from a file.
...it may be removed before the stream is closed if it is possible to delete it and still
read from it.
... if open_on_
read is defined, and the file was recreated after the first delete, the file will be deleted again when it is closed again.
...And 2 more matches
nsIHttpChannel
read only.
...
read only.
...
read only.
...And 2 more matches
nsIJSON
decodefromstream() decodes a json string
read from an input stream, returning the javascript object it represents.
... jsobject decodefromstream( in nsiinputstream stream, in long contentlength ); parameters stream the nsiinputstream from which to
read the json string.
... contentlength the length of the json string to
read.
...And 2 more matches
nsIPermission
read only.
...
read only.
...
read only.
...And 2 more matches
nsIProtocolProxyService
iuri auri, in nsresult areason); void registerfilter(in nsiprotocolproxyfilter afilter, in unsigned long aposition); void unregisterfilter(in nsiprotocolproxyfilter afilter); constants constant value description resolve_non_blocking 1<<0 this flag may be passed to the resolve method to request that it fail instead of block the calling th
read.
...so, calling resolve without this flag may result in locking up the calling th
read for a lengthy period of time.
... by passing this flag to resolve, one can failover to asyncresolve to avoid locking up the calling th
read if a pac query is required.
...And 2 more matches
nsISelectionController
ection(in short type); void scrollhorizontal(in boolean left); void scrollline(in boolean forward); void scrollpage(in boolean forward); void scrollselectionintoview(in short type, in short region, in short flags); void selectall(); void setcaretenabled(in boolean enabled); void setcaret
readonly(in boolean
readonly); void setcaretvisibilityduringselection(in boolean visibility); void setcaretwidth(in short pixels); obsolete since gecko 1.8 void setdisplayselection(in short toggle); void wordextendfordelete(in boolean forward); native code only!
...
read only.
... setcaret
readonly() set the caret
readonly or not.
...And 2 more matches
nsIUpdate
read_error (6) an error occurred while
reading the patch.
...
read only.
...
read only.
...And 2 more matches
nsIXULTemplateBuilder
atag); void addrulefilter(in nsidomnode arule, in nsixultemplaterulefilter afilter); [noscript] void init(in nsicontent aelement); [noscript] void createcontents(in nsicontent aelement, in boolean aforcecreation); void addlistener(in nsixulbuilderlistener alistener); void removelistener(in nsixulbuilderlistener alistener); attributes attribute type description root nsidomelement
readonly: the root node in the dom to which this builder is attached.
... database nsirdfcompositedatasource
readonly: the composite datasource that the template builder observes and uses to create content.
... rootresult nsixultemplateresult
readonly: the virtual result representing the starting reference point, determined by calling the query processor's translateref method with the root node's ref attribute as an argument.
...And 2 more matches
nsIXmlRpcClient
word); void clearauthentication(in string username, in string password); void setencoding(in string encoding); void setencoding(in unsigned long type, out nsiidref uuid, out nsqiresult result); void asynccall (in nsixmlrpcclientlistener listener, in nsisupports ctxt, in string methodname, in nsisupports arguments, in pruint32 count); attributes attribute type description serverurl
readonly nsiurl the url of the xml-rpc server inprogress
readonly boolean whether or not a call is in progress fault
readonly nsixmlrpcfault the most recent xml-rpc fault from returned from this server.
... result
readonly nsisupports the most recent xml-rpc call result returned from this server.
... responsestatus
readonly unsigned long the most recent http status code returned from this server.
...And 2 more matches
XPIDL
attributes can be declared
readonly, in which case setting causes an error to be thrown in script contexts and native contexts lack the set method, by using the "
readonly" keyword.
...if foo were declared
readonly, the latter method would not be present.
...however, the capitalization is not applied when using binaryname with attributes; i.e., [binaryname(foo)]
readonly attribute quux bar; becomes getfoo(quux**) in native code.
...And 2 more matches
StructType
read only.
...
read only.
...
read only.
...And 2 more matches
Mozilla
this guide provides information that will not only help you get started as a mozilla contributor, but that you'll find useful to refer to even if you are al
ready an experienced contributor.
... introduction to layout in mozilla ipc protocol definition language (ipdl) ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or th
reads in an organized and secure way.
... mozilla svg project since you have come this far, you probably al
ready know that svg stands for scalable vector graphics, and that it is an xml language for sophisticated 2-dimensional graphics.
...And 2 more matches
Plug-in Basics - Plugins
when the browser starts, it enumerates the available plug-ins (this step varies according to platform),
reads resources from each plug-in file to determine the mime types for that plug-in, and registers each plug-in library for its mime types.
... the following stages outline the life of a plug-in from loading to deletion: when gecko encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it dynamically loads the plug-in code into memory, if it hasn't been loaded al
ready, and it creates a new instance of the plug-in.
... note: plug-in api calls and callbacks use the main navigator th
read.
...And 2 more matches
Gecko Plugin API Reference - Plugins
npp_destroy npp_destroystream npp_getvalue np_getvalue npp_handleevent np_initialize npp_new npp_newstream npp_print npp_setvalue npp_setwindow np_shutdown npp_streamasfile npp_urlnotify npp_write npp_write
ready browser side plug-in api this chapter describes methods in the plug-in api that are available from the browser.
... warning: you must only call these from the main th
read; calling them from other th
reads is not supported and may have unpredictable results.
... npn_pluginth
readasynccall th
read-safe way to request that the browser calls a plug-in function on the browser or plug-in th
read (the th
read on which the plug-in was initiated).
...And 2 more matches
Examine and edit HTML - Firefox Developer Tools
navigating the html html b
readcrumbs at the bottom on the html pane is a b
readcrumbs toolbar.
... this shows the complete hierarchy through the document for the branch containing the selected element: hovering over a b
readcrumb highlights that element in the page.
... the b
readcrumbs bar has its own keyboard shortcuts.
...And 2 more matches
AbstractRange - Web APIs
bstractrange" target="_top"><rect x="1" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="66" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">abstractrange</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties collapsed
read only a boolean value which is true if the range is collapsed.
... endcontainer
read only the dom node in which the end of the range, as specified by the endoffset property, is located.
... endoffset
read only an integer value indicating the offset, in characters, from the beginning of the node's contents to the beginning of the range represented by the range object.
...And 2 more matches
Animation - Web APIs
animation.effect gets and sets the animationeffect
readonly associated with this animation.
... animation.finished
read only returns the current finished promise for this animation.
... animation.pending
read only indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
...And 2 more matches
AudioNode - Web APIs
the exact processing done varies from one audionode to another but, in general, a node
reads its inputs, does some audio-related processing, and generates new values for its outputs, or simply lets the audio pass through (for example in the analysernode, where the result of the processing is accessed separately).
... properties audionode.context
read only returns the associated baseaudiocontext, that is the object representing the processing graph the node is participating in.
... audionode.numberofinputs
read only returns the number of inputs feeding the node.
...And 2 more matches
AudioTrack - Web APIs
id
read only a domstring which uniquely identifies the track within the media.
... kind
read only a domstring specifying the category into which the track falls.
... label
read only a domstring providing a human-
readable label for the track.
...And 2 more matches
BiquadFilterNode - Web APIs
note: though the audioparam objects returned are
read-only, the values they represent are not.
... biquadfilternode.frequency
read only is an a-rate audioparam, a double representing a frequency in the current filtering algorithm measured in hertz (hz).
... biquadfilternode.detune
read only is an a-rate audioparam representing detuning of the frequency in cents.
...And 2 more matches
Body.arrayBuffer() - Web APIs
the arraybuffer() method of the body mixin takes a response stream and
reads it to completion.
...when the fetch is successful, we
read an arraybuffer out of the response using arraybuffer(), decode the audio data using audiocontext.decodeaudiodata, set the decoded data as the audio buffer source's buffer (source.buffer), then connect the source up to the audiocontext.destination.
... once getdata() has finished running, we start the audio source playing with start(0), then disable the play button so it can't be clicked again when it is al
ready playing (this would cause an error.) function getdata() { source = audioctx.createbuffersource(); var myrequest = new request('viper.ogg'); fetch(myrequest).then(function(response) { return response.arraybuffer(); }).then(function(buffer) { audioctx.decodeaudiodata(buffer, function(decodeddata) { source.buffer = decodeddata; source.connect(audioctx.destination); }); }); }; // wire up buttons to stop and play audio play.onclick = function() { getdata(); source.start(0); play.setattribute('disabled', 'disabled'); }
reading files the response() constructor accepts files and blobs, so it m...
...And 2 more matches
Pixel manipulation with canvas - Web APIs
with the imagedata object you can directly
read and write a data array to manipulate pixel data.
...it contains the following
read-only attributes: width the width of the image in pixels.
... for example, to
read the blue component's value from the pixel at column 200, row 50 in the image, you would do the following: bluecomponent = imagedata.data[((50 * (imagedata.width * 4)) + (200 * 4)) + 2]; if given a set of coordinates (x and y), you may end up doing something like this: var xcoord = 50; var ycoord = 100; var canvaswidth = 1024; function getcolorindicesforcoord(x, y, width) { var red = y * (wi...
...And 2 more matches
ContentIndex - Web APIs
// reference registration const registration = await navigator.serviceworker.
ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } adding to the content index here we're declaring an item in the correct format and creating an asynchronous function which uses the add() method to register it with the content index.
...amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.
ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } retrieving items within the current index the below example shows an asynchronous function that retrieves items within the content index and iterates over each entry, ...
... async function create
readinglist() { // access our service worker registration const registration = await navigator.serviceworker.
ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const
readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a message const message = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline
reading.'
readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const li...
...And 2 more matches
DataTransferItem.webkitGetAsEntry() - Web APIs
note that to
read all files in a directory,
readentries needs to be called repeatedly until it returns an empty array.
... let dropzone = document.getelementbyid("dropzone"); let listing = document.getelementbyid("listing"); function scanfiles(item, container) { let elem = document.createelement("li"); elem.innerhtml = item.name; container.appendchild(elem); if (item.isdirectory) { let directory
reader = item.create
reader(); let directorycontainer = document.createelement("ul"); container.appendchild(directorycontainer); directory
reader.
readentries(function(entries) { entries.foreach(function(entry) { scanfiles(entry, directorycontainer); }); }); } } scanfiles() begins by creating a new <li> element to represent the item being scanned, inserts the name of the item into...
...the first step is to create a filesystemdirectory
reader to handle fetching the directory's contents.
...And 2 more matches
DedicatedWorkerGlobalScope.postMessage() - Web APIs
the postmessage() method of the dedicatedworkerglobalscope interface sends a message to the main th
read that spawned it.
... the main scope that spawned the worker can send back information to the th
read that spawned it using the worker.postmessage method.
... syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main th
read; this will be in the data field in the event delivered to the worker.onmessage handler.
...And 2 more matches
DedicatedWorkerGlobalScope - Web APIs
dedicatedworkerglobalscope.name
read only the name that the worker was (optionally) given when it was created using the worker() constructor.
... workerglobalscope.console
read only returns the console associated with the worker.
... workerglobalscope.location
read only returns the workerlocation associated with the worker.
...And 2 more matches
ErrorEvent - Web APIs
errorevent.message
read only is a domstring containing a human-
readable error message describing the problem.
... errorevent.filename
read only is a domstring containing the name of the script file in which the error occurred.
... errorevent.lineno
read only is an integer containing the line number of the script file on which the error occurred.
...And 2 more matches
FetchEvent - Web APIs
fetchevent.clientid
read only the id of the same-origin client that initiated the fetch.
... fetchevent.preloadresponse
read only a promise for a response, or undefined if this fetch is not a navigation, or navigation preload is not enabled.
... fetchevent.replacesclientid
read only the id of the client that is being replaced during a page navigation.
...And 2 more matches
Introduction to the File and Directory Entries API - Web APIs
you can develop apps that can
read, write, and create files and directories in a sandboxed, virtual file system.
... it provides a storage api that is al
ready familiar to your users, who are used to working with file systems.
...its direct, in-order programming model can make code easier to
read.
...And 2 more matches
File and Directory Entries API - Web APIs
you can develop apps which
read, write, and create files and/or directories in a virtual, sandboxed file system.
... asynchronous api the asynchronous api should be used for most operations, to prevent file system accesses from blocking the entire browser if used on the main th
read.
... filesystemdirectory
reader created by calling filesystemdirectoryentry.create
reader(), this interface provides the functionality which lets you
read the contents of a directory.
...And 2 more matches
HTMLKeygenElement - Web APIs
form
read only is a htmlformelement that indicates the control's form owner, reflecting the form html attribute if it is defined.
... labels
read only unimplemented (see bug 556743) is a nodelist that represents a list of label elements associated with this keygen element.
... type
read only is a domstring that must be the value keygen.
...And 2 more matches
HTMLOptionElement - Web APIs
htmloptionelement.form
read only is a htmlformelement representing the same value as the form of the corresponding <select> element, if the option is a descendant of a <select> element, or null if none is found.
... htmloptionelement.index
read only is a long representing the position of the option within the list of options it belongs to, in tree-order.
... htmloptionelement.label
read only is a domstring that reflects the value of the label html attribute, which provides a label for the option.
...And 2 more matches
IDBCursorSync - Web APIs
method overview bool continue (in optional any key); void remove () raises (idbdatabaseexception); attributes attribute type description count
readonly unsigned long long the total number of objects that share the current key.
... direction
readonly unsigned short the direction of traversal of the cursor.
... key
readonly any the key for the record at the cursor's position.
...And 2 more matches
IDBDatabaseException - Web APIs
for example, an object, such as an object store or index, al
ready exists and a request attempted to create a new one.
... more specific variants of this error includes: transaction_inactive_err and
read_only_err.
...
read_only_err 9 a mutation operation was attempted in a
read_only transaction.
...And 2 more matches
IDBKeyRange - Web APIs
properties idbkeyrange.lower
read only lower bound of the key range.
... idbkeyrange.upper
read only upper bound of the key range.
... idbkeyrange.loweropen
read only returns false if the lower-bound value is included in the key range.
...And 2 more matches
IDBObjectStore.put() - Web APIs
the put() method of the idbobjectstore interface updates a given record in a database, or inserts a new record if the given item does not al
ready exist.
... it returns an idbrequest object, and, in a separate th
read, creates a structured clone of the value and stores the cloned value in the object store.
... this is for adding new records, or updating existing records in an object store when the transaction's mode is
readwrite.
...And 2 more matches
Intersection Observer API - Web APIs
since all this code runs on the main th
read, even one of these can cause performance problems.
...each of these has its own intersection detection routines, all running on the main th
read.
...this way, sites no longer need to do anything on the main th
read to watch for this kind of element intersection, and the browser is free to optimize the management of intersections as it sees fit.
...And 2 more matches
Key Values - Web APIs
ime and composition keys keys used when using an input method editor (ime) to input text which can't
readily be entered by simple keypresses, such as text in languages such as those which have more graphemes than there are character entry keys on the keyboard.
... appcommand_media_pause gdk_key_audiopause (0x1008ff31) qt::key_mediapause (0x1000085) keycode_media_pause (127) "mediaplay" starts or continues playing media at normal speed, if not al
ready doing so.
...has no effect if the media is currently stopped al
ready.
...And 2 more matches
KeyboardLayoutMap - Web APIs
properties keyboardlayoutmap.entries
read only returns an array of a given object's own enumerable property [key, value] pairs, in the same order as that provided by a for...in loop (the difference being that a for-in loop enumerates properties in the prototype chain as well).
... keyboardlayoutmap.keys
read only returns a new array iterator object that contains the keys for each index in the array.
... keyboardlayoutmap.size
read only returns the number of elements in the keyboardlayoutmap object.
...And 2 more matches
MSManipulationEvent - Web APIs
properties property description currentstate
read only returns the current state of a manipulation event.
... inertiadestinationx
read only represents the predicted horizontal scroll offset after the inertia phase completes.
... inertiadestinationy
read only represents the predicted vertical scroll offset after the inertia phase completes.
...And 2 more matches
Magnetometer - Web APIs
properties magnetometer.x
read only returns a double containing the magnetic field around the device's x axis.
... magnetometer.y
read only returns a double containing the magnetic field around the device's y axis.
... magnetometer.z
read only returns a double containing the magnetic field around the device's z axis.
...And 2 more matches
MediaDevices.getUserMedia() - Web APIs
possible errors are: aborterror although the user and operating system both granted access to the hardware device, and no hardware issues occurred that would cause a not
readableerror, some problem occurred which prevented the device from being used.
... not
readableerror although the user granted permission to use the matching devices, a hardware error occurred at the operating system, browser, or web page level which prevented access to the device.
...the error is an object of type overconstrainederror, and has a constraint property whose string value is the name of a constraint which was impossible to meet, and a message property containing a human-
readable string explaining the problem.
...And 2 more matches
MediaKeySystemConfiguration - Web APIs
properties mediakeysystemconfiguration.initdatatypes
read only returns a list of supported initialization data type names.
... mediakeysystemconfiguration.audiocapabilities
read only returns a list of supported audio type and capability pairs.
... mediakeysystemconfiguration.videocapabilities
read only returns a list of supported video type and capability pairs.
...And 2 more matches
MediaSource - Web APIs
properties mediasource.sourcebuffers
read only returns a sourcebufferlist object containing the list of sourcebuffer objects associated with this mediasource.
... mediasource.activesourcebuffers
read only returns a sourcebufferlist object containing a subset of the sourcebuffer objects contained within mediasource.sourcebuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
... mediasource.
readystate
read only returns an enum representing the state of the current mediasource, whether it is not currently attached to a media element (closed), attached and
ready to receive sourcebuffer objects (open), or attached but the stream has been ended via mediasource.endofstream() (ended.) mediasource.duration gets and sets the duration of the current media being presented.
...And 2 more matches
MediaStream - Web APIs
mediastream.active
read only a boolean value that returns true if the mediastream is active, or false otherwise.
... mediastream.ended
read only a boolean value set to true if the end of the stream has been reached.
... this has been removed from the specification; you should instead check the value of mediastreamtrack.
readystate to see if its value is ended for the track or tracks you want to ensure have finished playing.
...And 2 more matches
Transcoding assets for Media Source Extensions - Web APIs
because the audio codec in the mov container is al
ready aac and the video codec is h.264, we can instruct ffmpeg not to perform transcoding.
... this means that metadata within the container is sp
read out and not lumped together.
... note: the fragmented version is slightly larger than the original, due to additional metadata sp
read throughout the file.
...And 2 more matches
PaymentRequest - Web APIs
properties paymentrequest.id
read only secure context an unique identifier for a particular paymentrequest, which can be set via details.id.
... paymentrequest.shippingaddress
read only secure context if requested via payment options, returns the shipping address chosen by the user for the purposes of calculating shipping.
...additionally, in some browsers, the parts of the address will be redacted for privacy until the user indicates they are
ready to complete the transaction (i.e., they hit "pay").
...And 2 more matches
PerformanceServerTiming - Web APIs
properties performanceservertiming.description
read only a domstring value of the server-specified metric description, or an empty string.
... performanceservertiming.duration
read only a double that contains the server-specified metric duration, or value 0.0.
... performanceservertiming.name
read only a domstring value of the server-specified metric name.
...And 2 more matches
PhotoCapabilities - Web APIs
properties photocapabilities.redeyereduction
read only returns one of "never", "always", or "controllable".
... the "controllable" value means the device's
read-eye reduction is controllable by the user.
... photocapabilities.imageheight
read only returns a mediasettingsrange object indicating the image height range supported by the user agent.
...And 2 more matches
PushSubscription - Web APIs
properties pushsubscription.endpoint
read only a usvstring containing the endpoint associated with the push subscription.
... pushsubscription.expirationtime
read only a domhighrestimestamp of the subscription expiration time associated with the push subscription, if there is one, or null otherwise.
... pushsubscription.options
read only an object containing the options used to create the subscription.
...And 2 more matches
RTCDataChannel - Web APIs
the default is "blob".bufferedamount
read only the
read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.bufferedamountlowthreshold the rtcdatachannel property bufferedamountlowthreshold is used to specify the number of bytes of buffered outgoing data that is considered "low." the default value is 0.id
read only the
read-only rtcdatachannel property id re...
...turns an id number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.label
read only the
read-only rtcdatachannel property label returns a domstring containing a name describing the data channel.
... these labels are not required to be unique.maxpacketlifetime
read only the
read-only rtcdatachannel property maxpacketlifetime returns the amount of time, in milliseconds, the browser is allowed to take to attempt to transmit a message, as set when the data channel was created, or null.maxretransmits
read only the
read-only rtcdatachannel property maxretransmits returns the maximum number of times the browser should try to retransmit a message before giving up, as set when the data channel was created, or null, which indicates that there is no maximum.negotiated
read only the
read-only rtcdatachannel property negotiated indicates whether the rtcdatachannel's connection was negotiated by the web app (true) or by the webrtc layer (false).ordered
read only the
read-only rtcdatachannel prop...
...And 2 more matches
RTCError - Web APIs
properties in addition to the properties defined by the parent interface, domexception, rtcerror includes the following properties: errordetail
read only a domstring specifying the webrtc-specific error code identifying the type of error that occurred.
... receivedalert
read only an unsigned long integer value indicating the fatal dtls error which was received from the network.
... sctpcausecode
read only if errordetail is sctp-failure, this property is a long integer specifying the sctp cause code indicating the cause of the failed sctp negotiation.
...And 2 more matches
RTCIceTransport - Web APIs
it also offers the following properties: component
read only the ice component being used by the transport.
... gatheringstate
read only a domstring indicating which gathering state the ice agent is currently in.
... role
read only returns a domstring whose value is one of the members of the rtcicerole enumerated type: "controlling" or "controlled"; this indicates whether the ice agent is the one that makes the final decision as to the candidate pair to use or not.
...And 2 more matches
RTCPeerConnectionIceErrorEvent - Web APIs
properties the rtcpeerconnectioniceerrorevent interface includes the properties found on the event interface, as well as the following properties: address
read only a domstring providing the local ip address used to communicate with the stun or turn server being used to negotiate the connection, or null if the local ip address has not yet been exposed as part of a local ice candidate.
... errorcode
read only an unsigned integer value stating the numeric stun error code returned by the stun or turn server.
... errortext
read only a domstring containing the stun reason text returned by the stun or turn server.
...And 2 more matches
SVGFEDiffuseLightingElement - Web APIs
svgfediffuselightingelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfediffuselightingelement.surfacescale
read only an svganimatednumber corresponding to the surfacescale attribute of the given element.
... svgfediffuselightingelement.diffuseconstant
read only an svganimatednumber corresponding to the diffuseconstant attribute of the given element.
...And 2 more matches
SVGFEDisplacementMapElement - Web APIs
svgfedisplacementmapelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfedisplacementmapelement.in2
read only an svganimatedstring corresponding to the in2 attribute of the given element.
... svgfedisplacementmapelement.scale
read only an svganimatednumber corresponding to the scale attribute of the given element.
...And 2 more matches
SVGFEDropShadowElement - Web APIs
svgfedropshadowelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfedropshadowelement.dx
read only an svganimatednumber corresponding to the dx attribute of the given element.
... svgfedropshadowelement.dy
read only an svganimatednumber corresponding to the dy attribute of the given element.
...And 2 more matches
SVGFilterPrimitiveStandardAttributes - Web APIs
360" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="181" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgfilterprimitivestandardattributes</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgfilterprimitivestandardattributes.x
read only an svganimatedlength corresponding to the x attribute of the given element.
... svgfilterprimitivestandardattributes.y
read only an svganimatedlength corresponding to the y attribute of the given element.
... svgfilterprimitivestandardattributes.width
read only an svganimatedlength corresponding to the width attribute of the given element.
...And 2 more matches
SVGRadialGradientElement - Web APIs
svgradialgradientelement.cx
read only an svganimatedlength corresponding to the cx attribute of the given <radialgradient> element.
... svgradialgradientelement.cx
read only an svganimatedlength corresponding to the cy attribute of the given <radialgradient> element.
... svgradialgradientelement.r
read only an svganimatedlength corresponding to the r attribute of the given <radialgradient> element.
...And 2 more matches
SVGSVGElement - Web APIs
svgsvgelement.x
read only an svganimatedlength corresponding to the x attribute of the given <svg> element.
... svgsvgelement.y
read only an svganimatedlength corresponding to the y attribute of the given <svg> element.
... svgsvgelement.width
read only an svganimatedlength corresponding to the width attribute of the given <svg> element.
...And 2 more matches
SVGTextPositioningElement - Web APIs
svgtextpositioningelement.x
read only returns an svganimatedlengthlist reflecting the x attribute of the given element.
... svgtextpositioningelement.y
read only returns an svganimatedlengthlist reflecting the y attribute of the given element.
... svgtextpositioningelement.dx
read only returns an svganimatedlengthlist reflecting the dx attribute of the given element.
...And 2 more matches
ShadowRoot - Web APIs
properties shadowroot.delegatesfocus
read only returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
... shadowroot.host
read only returns a reference to the dom element the shadowroot is attached to.
... shadowroot.mode
read only the mode of the shadowroot — either open or closed.
...And 2 more matches
StaticRange - Web APIs
staticrange.collapsed
read only returns a boolean value which is true if the range's start and end positions are the same, resulting in a range of length 0.
... staticrange.endcontainer
read only returns the dom node which contains the ending point of the range.
... staticrange.endoffset
read only returns an integer value indicating the offset into the node given by endcontainer at which the last character of the range is found.
...And 2 more matches
TrackDefault - Web APIs
properties trackdefault.type
read only returns the type of track that this sourcebuffer's media segment data relates to (i.e.
... audio, video, or text track.) trackdefault.bytestreamtrackid
read only returns the id of the specific track that the sourcebuffer should apply to.
... trackdefault.language
read only returns the default language to use when an initialization segment does not contain language information for a new track.
...And 2 more matches
VideoPlaybackQuality - Web APIs
creationtime
read only a domhighrestimestamp containing the time in miliseconds between the start of the navigation and the creation of the object.
... droppedvideoframes
read only an unsigned long giving the number of video frames dropped since the creation of the associated htmlvideoelement.
... totalvideoframes
read only an unsigned long giving the number of video frames created and dropped since the creation of the associated htmlvideoelement.
...And 2 more matches
VideoTrack - Web APIs
id
read only a domstring which uniquely identifies the track within the media.
... kind
read only a domstring specifying the category into which the track falls.
... label
read only a domstring providing a human-
readable label for the track.
...And 2 more matches
WebGL2RenderingContext.copyBufferSubData() - Web APIs
syntax void gl.copybuffersubdata(
readtarget, writetarget,
readoffset, writeoffset, size); parameters
readtarget writetarget a glenum specifying the binding point (target) from whose data store should be
read or written.
... gl.copy_
read_buffer: buffer for copying from one buffer object to another (provided specifically for copy operations).
...
readoffset writeoffset a glintptr specifying the byte offset from which to start
reading from or writing to the buffer.
...And 2 more matches
WebGL model view projection - Web APIs
in real world applications, you don't have all your source coordinates al
ready in clip space coordinates.
...his: cubedemo.prototype.computemodelmatrix = function(now) { //scale down by 50% var scale = mdn.scalematrix(0.5, 0.5, 0.5); // rotate a slight tilt var rotatex = mdn.rotatexmatrix(now * 0.0003); // rotate according to time var rotatey = mdn.rotateymatrix(now * 0.0005); // move slightly down var position = mdn.translatematrix(0, -0.1, 0); // multiply together, make sure and
read them in opposite order this.transforms.model = mdn.multiplyarrayofmatrices([ position, // step 4 rotatey, // step 3 rotatex, // step 2 scale // step 1 ]); }; in order to use this in the shader it must be set to a uniform location.
...rather than modifying the vertex directly, it gets multiplied by an additional projection matrix, which (as the name suggests) projects 3d points onto a 2d drawing surface: // make sure to
read the transformations in reverse order gl_position = projection * model * vec4(position, 1.0); the results view on jsfiddle the viewing frustum before we move on to covering how to compute a perspective projection matrix, we need to introduce the concept of the viewing frustum (also known as the view frustum).
...And 2 more matches
WebSocket - Web APIs
websocket.bufferedamount
read only the number of bytes of queued data.
... websocket.extensions
read only the extensions selected by the server.
... websocket.protocol
read only the sub-protocol selected by the server.
...And 2 more matches
Writing a WebSocket server in C# - Web APIs
both sides of the channel have
reading and writing capability.
...
read(byte[] buffer, int offset, int size)
reads bytes to buffer.
... tcpclient client = server.accepttcpclient(); console.writeline("a client connected."); networkstream stream = client.getstream(); //enter to an infinite cycle to be able to handle every change in stream while (true) { while (!stream.dataavailable); byte[] bytes = new byte[client.available]; stream.
read(bytes, 0, bytes.length); } handshaking when a client connects to a server, it sends a get request to upgrade the connection to a websocket from a simple http request.
...And 2 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
while
reading this article and the accompanying source code, it's helpful to keep in mind that the display for a 3d headset is a single screen, divided in half.
... async function onxrbuttonclick(event) { if (!xrsession) { navigator.xr.requestsession(session_type) .then(sessionstarted); } else { await xrsession.end(); if (xrsession) { sessionended(); } } } this begins by looking at the value of xrsession to see if we al
ready have a xrsession object representing an ongoing webxr session.
... if we al
ready have an ongoing session, on the other hand, we call its end() method to stop the session.
...And 2 more matches
Using IIR filters - Web APIs
but what is this and how does it differ from the biquadfilternode we have al
ready?
...it's a commonly-used type and we al
ready have it as a node in the web audio api.
...and this is where the iir filter node is useful — you can create your own if none of the ala
ready available settings is right for what you want.
...And 2 more matches
WindowOrWorkerGlobalScope.setInterval() - Web APIs
minidaemon - not enough arguments'); } if (oowner) { this.owner = oowner; } this.task = ftask; if (isfinite(nrate) && nrate > 0) { this.rate = math.floor(nrate); } if (nlen > 0) { this.length = math.floor(nlen); } } minidaemon.prototype.owner = null; minidaemon.prototype.task = null; minidaemon.prototype.rate = 100; minidaemon.prototype.length = infinity; /* these properties should be
read-only */ minidaemon.prototype.session = -1; minidaemon.prototype.index = 0; minidaemon.prototype.paused = true; minidaemon.prototype.backw = true; /* global methods */ minidaemon.forcecall = function (odmn) { odmn.index += odmn.backw ?
... minidaemon instances properties mydaemon.owner the this object on which is executed the daemon (
read/write).
... mydaemon.task the function that is repeatedly invoked (
read/write).
...And 2 more matches
WindowOrWorkerGlobalScope - Web APIs
windoworworkerglobalscope.caches
read only returns the cachestorage object associated with the current context.
... windoworworkerglobalscope.crossoriginisolated
read only returns a boolean value that indicates whether a sharedarraybuffer can be sent via a window.postmessage() call.
... windoworworkerglobalscope.indexeddb
read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; returns an idbfactory object.
...And 2 more matches
WritableStreamDefaultWriter - Web APIs
properties writablestreamdefaultwriter.closed
read only allows you to write code that responds to an end to the streaming process.
... writablestreamdefaultwriter.desiredsize
read only returns the desired size required to fill the stream's internal queue.
... writablestreamdefaultwriter.
ready
read only returns a promise that resolves when the desired size of the stream's internal queue transitions from non-positive to positive, signaling that it is no longer applying backpressure.
...And 2 more matches
ARIA: Comment role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="th
read-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="th
read-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> to associate the comment with the text being commented, we need to wrap the commented text with...
... multiple comments since aria-details can now accept multiple ids, we can associate multiple comments with the same annotation, like so: <p>the last half of the song is a slow-rising crescendo that peaks at the <mark aria-details="th
read-1 th
read-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="th
read-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> <div role="comment" id="th
read-2" data-author="chris"> <h3>marcus said</h3> <p class="comment-text">the guitar solo could do with a touch more c...
...horus, and a slightly lower volume.</p> <p><time datetime="2019-03-29t15:35">march 29 2019, 15:35</time></p> </div> nested comments nested comments are also possible with aria annotations — simply nest the comments inside one another, like so: <div role="comment" id="th
read-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> <div role="comment" data-author="marcus"> <h3>marcus replied</h3> <p class="comment-text">i don't know about that.
...And 2 more matches
ARIA: Region role - Accessibility
screen
readers use landmark roles to provide keyboard navigation to important sections of a page.
...using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... scrolling content areas with overflow text if there is a content area with tabindex="0", add role="region" to convey to screen
reader users that is a generic region.
...And 2 more matches
ARIA: button role - Accessibility
adding role="button" will make an element appear as a button control to a screen
reader.
... description the button role identifies an element as a button to screen
readers.
... whether an element is a toggle button or not can be indicated with the aria-pressed attribute in addition to the button role (if the element is not al
ready a native button element): if aria-pressed is not used, or is set to the "undefined" state, the button is not a toggle button.
...And 2 more matches
ARIA: textbox role - Accessibility
<label for="txtbox">enter your five-digit zipcode</label> <input type="text" placeholder="5-digit zipcode" id="txtbox"/> <!-- multi-line text area --> <label for="txtboxmultiline">enter the tags for the article</label> <textarea id="txtboxmultiline" required></textarea> where a text field is
read-only, indicated this by setting aria-
readonly="true" on the element.
... aria-
readonly attribute indicates that the user cannot modify the value of the text field.
... instead of using aria-
readonly, use the semantic <input type="text"> or <textarea> with a
readonly attribute.
...And 2 more matches
ARIA - Accessibility
videos of screen
readers using aria see both real and simplified examples from around the web, including "before" and "after" aria videos.
... simple aria enhancements enhancing page navigation with aria landmarks a nice intro to using aria landmarks to improve web page navigation for screen
reader users.
... live regions live regions provide suggestions to screen
readers about how to handle changes to the contents of a page.
...And 2 more matches
speak-as - CSS: Cascading Style Sheets
bullets a phrase or an audio cue defined by the user agent for representing an unordered list item will be
read out.
... numbers the numerical value of the counter will be
read out in the document language.
... words the user agent will generate a counter value as normal and
read it out as a word in the document language.
...And 2 more matches
Ordering Flex Items - CSS: Cascading Style Sheets
to
read more about this disconnect of visual order and logical order and some of the potential problems it raises for accessibility, see the following resources.
... flexbox and the keyboard navigation disconnect html source order vs css display order the responsive order conflict for keyboard focus use cases for order there are sometimes places where the fact that the logical and therefore
reading order of flex items is separate from the visual order, is helpful.
...the heading of the news item is the key thing to highlight and would be the element that a user might jump to if they were tabbing between headings to find content they wanted to
read.
...And 2 more matches
CSS grids, logical values, and writing modes - CSS: Cascading Style Sheets
in these guides, i have al
ready touched on an important feature of grid layout: the support for different writing modes that is built into the specification.
...if you want to dig into writing modes further, however, then i would recommend that you
read jen simmons excellent article on css writing modes.
...it is the direction in which you are
reading this guide.
...And 2 more matches
display - CSS: Cascading Style Sheets
due to a bug in browsers this will currently remove the element from the accessibility tree — screen
readers will not look at what's inside.
...this will cause the element and all its descendant elements to no longer be announced by screen
reading technology.
... if you want to visually hide the element, a more accessible alternative is to use a combination of properties to remove it visually from the screen but keep it parseable by assistive technology such as screen
readers.
...And 2 more matches
Writing Web Audio API code that works in every browser - Developer guides
you probably have al
ready
read the announcement on the web audio api coming to firefox, and are totally excited and
ready to make your until-now-webkit-only sites work with firefox, which uses the unprefixed version of the spec.
...in addition, not all features of web audio are al
ready implemented in firefox yet.
...and it won't do anything if the unprefixed versions are al
ready present.
...And 2 more matches
HTML5 Parser - Developer guides
parsing is now done in a separate th
read from firefox’s main ui th
read, improving overall browser responsiveness.
... tokenization of left angle-bracket within a tag given the string <foo<bar>, the new parser
reads it as one tag named foo<bar.
... this behavior is consistent with ie and opera, and is different from gecko 1.x and webkit, which
read it as two tags, foo and bar.
...And 2 more matches
Localizations and character encodings - Developer guides
however, there are locales where web publishing was common al
ready in the 1990s but the windows-1252 encoding was not suitable for the local language.
... unfortunately, this means that the web-exposed functionality of firefox differs by locale and it is hard to
read legacy content across locales with different fallback encodings.
... to avoid introducing this problem in locales where web publishing took off after the adoption of utf-8, locales that don't have a non-windows-1252 legacy encoding arising from the practices of the 1990s, should leave the fallback encoding at windows-1252 to facilitate
reading content cross-locale from the old locales whose fallback encoding is windows-1252.
...And 2 more matches
User input and controls - Developer guides
when screen orientation matters for your application, through the screen orientation api you can
read the screen orientation state and perform other actions.
... note: for further information about what you can do with touch events, please
read our touch events guide.
... this is the code to request pointer lock on an element: element.requestpointerlock(); note: for a full tutorial and reference,
read our pointer_lock_api page.
...And 2 more matches
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
currenttime
reading currenttime returns a double-precision floating-point value indicating the current playback position, in seconds, of the audio.
... duration
read only a double-precision floating-point value which indicates the duration (total length) of the audio in seconds, on the media's timeline.
... events event name fired when audioprocess the input buffer of a scriptprocessornode is
ready to be processed.
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list,
readonly, and step idl attributes list, value, valueasnumber.
... for example, if you are creating a system where the user is likely to al
ready be logged in, with their locale al
ready set, you could provide the timezone in a hidden input type.
...exactly because you will al
ready be dead, so the companies using your software will be stuck using your software without any other coder who knows the system well enough to come in and fix it.
...And 2 more matches
Using the application cache - HTML: Hypertext Markup Language
since the document has al
ready been loaded into the browser from the cache, the updated document will not be rendered until the document is reloaded (either manually or programatically).
... update
ready there is a new version of the application cache available.
... there is a corresponding update
ready event, which is fired instead of the cached event when a new update has been downloaded but not yet activated using the swapcache() method.
...And 2 more matches
HTTP Index - HTTP
cross-origin resource policy complements cross-origin
read blocking (corb), which is a mechanism to prevent some cross-origin
reads by default.
...database
read/write, cpu time, file system access, etc.) in the developer tools in the user's browser or in the performanceservertiming interface.
... 218 100 continue http, informational, status code the http 100 continue informational status response code indicates that everything so far is ok and that the client should continue with the request or ignore it if it is al
ready finished.
...And 2 more matches
BigInt64Array - JavaScript
this is fixed at construction time and thus
read only.
...this is fixed at construction time and thus
read only.
...this is fixed at construction time and thus
read only.
...And 2 more matches
BigUint64Array - JavaScript
this is fixed at construction time and thus
read only.
...this is fixed at construction time and thus
read only.
...this is fixed at construction time and thus
read only.
...And 2 more matches
Date - JavaScript
read more about it on the igalia blog and fill out the survey.
... it needs real-world feedback from web developers, but is not yet
ready for production use!
... in addition to methods to
read and alter individual components of the local date and time (such as getday() and sethours()), there are also versions of the same methods that
read and manipulate the date and time using utc (such as getutcday() and setutchours()).
...And 2 more matches
Float32Array - JavaScript
instance properties float32array.prototype.buffer returns the arraybuffer referenced by the float32array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Float64Array - JavaScript
instance properties float64array.prototype.buffer returns the arraybuffer referenced by the float64array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Int16Array - JavaScript
instance properties int16array.prototype.buffer returns the arraybuffer referenced by the int16array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Int32Array - JavaScript
instance properties int32array.prototype.buffer returns the arraybuffer referenced by the int32array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Int8Array - JavaScript
instance properties int8array.prototype.buffer returns the arraybuffer referenced by the int8array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
TypedArray - JavaScript
fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Uint16Array - JavaScript
instance properties uint16array.prototype.buffer returns the arraybuffer referenced by the uint16array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Uint32Array - JavaScript
instance properties uint32array.prototype.buffer returns the arraybuffer referenced by the uint32array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Uint8Array - JavaScript
instance properties uint8array.prototype.buffer returns the arraybuffer referenced by the uint8array fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Uint8ClampedArray - JavaScript
instance properties uint8clampedarray.prototype.buffer returns the arraybuffer referenced by the uint8clampedarray fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...And 2 more matches
Lexical grammar - JavaScript
white space white space characters improve the
readability of source text and separate tokens from each other.
... \f u+0020 space <sp> normal space u+00a0 no-break space <nbsp> normal space, but no point at which a line may break others other unicode space characters <usp> spaces in unicode on wikipedia line terminators in addition to white space characters, line terminator characters are used to improve the
readability of the source text.
...this can make it easier to
read and understand.
...And 2 more matches
Object initializer - JavaScript
let object = { foo: 'bar', age: 42, baz: {myprop: 12} } accessing properties once you have created an object, you might want to
read or change them.
...(see property accessors for detailed information.) object.foo // "bar" object['age'] // 42 object.foo = 'baz' property definitions we have al
ready learned how to notate properties using the initializer syntax.
...this is reminiscent of the bracket notation of the property accessor syntax, which you may have used to
read and set properties al
ready.
...And 2 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
they run on a separate th
read from the main javascript code of our page, and don't have any access to the dom structure.
...you are able to give a service worker something to work on, and receive the result whenever it is
ready using a promise-based approach.
... they can do a lot more than "just" offering offline capabilities, including handling notifications, performing heavy calculations on a separate th
read, etc.
...And 2 more matches
SVG documentation index - SVG: Scalable Vector Graphics
191 sp
readmethod svg, svg attribute the sp
readmethod attribute determines how a shape is filled beyond the defined edges of a gradient.
... 259 xlink:title deprecated, svg, svg attribute the xlink:title attribute is used to describe the meaning of a link or resource in a human-
readable fashion.
... 271 basic transformations intermediate, svg, svg:tutorial now we're
ready to start distorting our beautiful images.
...And 2 more matches
/loader - Archive of obsolete content
provide an environment for loading commonjs style modules, which makes it possible to consume lots of interesting code that has al
ready been developed.
... to reuse module instances that are al
ready loaded.
...if options.source is provided then its value is evaluated, otherwise source is
read from the supplied uri.
...}) require() as al
ready mentioned in loading modules it's common to start execution by loading a main module.
frame/hidden-frame - Archive of obsolete content
the following code creates a hidden frame, loads a web page into it, and then logs its title: var hiddenframes = require("sdk/frame/hidden-frame"); let hiddenframe = hiddenframes.add(hiddenframes.hiddenframe({ on
ready: function() { this.element.contentwindow.location = "http://www.mozilla.org/"; let self = this; this.element.addeventlistener("domcontentloaded", function() { console.log(self.element.contentdocument.title); }, true, true); } })); see the panel module for a real-world example of usage of this module.
... parameters options : object required options: name type on
ready function,array functions to call when the frame is
ready to load content.
... you must specify an on
ready callback and refrain from using the hidden frame until the callback gets called, because hidden frames are not always
ready to load content the moment they are added.
... events
ready this event is emitted when the dom for a hidden frame content is
ready.
Forms related code snippets - Archive of obsolete content
date picker (before implementing it in a working environment, please
read the note about the const statement compatibility) <!doctype html> <html> <head> <meta http-equiv="content-type" content="text/html; charset=utf-8" /> <title>datepicker example - mdn</title> <script type="text/javascript"> /*\ |*| |*| datepicker example mdndeveloper network |*| |*| https://developer.mozilla.org/docs/code_snippets/forms |*| https://developer.mozilla.org/user:fusionchess |*| |*| this snippet is released under the gnu public license, version 3 or later.
..., span.zdp-increase-year { float: right; margin-left: 2px; } td.zdp-active-cell { padding: 1px 3px; cursor: pointer; color: #000000; text-align: center; vertical-align: middle; } td.zdp-active-cell:hover { background-color: #999999; cursor: pointer; } td.zdp-empty-cell { cursor: not-allowed; } </style> </head> <body> <form name="myform"> <p> from: <input type="text"
readonly class="date-picker" name="date-from" /> to: <input type="text"
readonly class="date-picker" name="date-to" /> </p> </form> </body> </html> note: the current implementation of const (constant statement) is not part of ecmascript 5.
... image preview before upload the file
reader.prototype.
readasdataurl() method can be useful, for example, to get a preview of an image before uploading it.[article] this example shows how to use it in this way.
... note: the file
reader() constructor was not supported by internet explorer for versions before 10.
Code snippets - Archive of obsolete content
xml file i/o code used to
read, write and process files drag & drop code used to setup and handle drag and drop events dialogs code used to display and process dialog boxes alerts and notifications modal and non-modal ways to notify users preferences code used to
read, write, and modify preferences js xpcom code used to define and call xpcom components in javascript running applications code used to run other appl...
... browser-oriented code tabbed browser code (firefox/seamonkey) basic operations, such as page loading, with the tabbed browser, which is the heart of mozilla's browser applications cookies
reading, writing, modifying, and removing cookies page loading code used to load pages, reload pages, and listen for page loads interaction between privileged and non-privileged code how to communicate from extensions to websites and vice-versa.
... downloading files code to download files, images, and to monitor download progress password manager code used to
read and write passwords to/from the integrated password manager bookmarks code used to
read and write bookmarks javascript debugger service code used to interact with the javascript debugger service svg general general information and utilities svg animation animate svg using javascript and smil svg interacting with script using javascript and dom events to create interactive svg embedding svg in html and xul using svg to enhance html or xul based markup xul widgets html in xul for rich tooltips dynamically embed html into a xul element to attain markup in a tooltip label and description special uses and line breaking examples tree setup and manipulat...
... using the windows registry with xpcom how to
read, write, modify, delete, enumerate, and watch registry keys and values.
Creating custom Firefox extensions with the Mozilla build system - Archive of obsolete content
i'm assuming that you've al
ready built firefox successfully.
...if you al
ready have a mozilla build, you can avoid this by creating a makefile for your extension directly.
...just displaying a new menu item that opens a "hello, world!" dialog box would be al
ready be a great exercise to get warmed up with.
...you'll need an idl file for an interface that looks something like this: interface myilocation : nsisupports {
readonly attribute nsifile locationfile; }; place the idl file in the public/ directory of your project or subproject.
Chapter 1: Introduction to Extensions - Archive of obsolete content
emura-san is a co-author of firefox 3 hacks (o'reilly japan, 2008.) introduction if you're
reading this guide, you’ve probably used firefox before.
...perhaps things like fine-grained tab controls, mouse gestures, extensive toolbars and buttons, a feed
reader, integration with a variety of web applications, or sophisticated tools to assist with web design.
... locationbar separates a url’s domain and path in the location bar for easier
reading.
... these extensions enhance features that al
ready exist in firefox.
Connecting to Remote Content - Archive of obsolete content
ul:hbox> <xul:label value="name:" /> <xul:label> <xsl:value-of select="." /> </xul:label> </xul:hbox> </xsl:for-each> <xul:hbox> <xul:label value="total:" /> <xul:label> <xsl:value-of select="total" /> </xul:label> </xul:hbox> </xul:vbox> </xsl:template> </xsl:stylesheet> next you need to
read the xslt stylesheet as a file stream and parse it into a document object.
...now, the processor is
ready to perform the transformation.
...s.nsidomparser); let filestream = components.classes["@mozilla.org/network/file-input-stream;1"] .createinstance(components.interfaces.nsifileinputstream); let xsltprocessor = components.classes["@mozilla.org/document-transformer;1?type=xslt"] .createinstance(components.interfaces.nsixsltprocessor); let xsldocument; filestream.init(somexslfile, -1, 0x01, 0444); //
read only // parse from the xslt stylesheet file stream xsldocument = domparser.parsefromstream( filestream, null, filestream.available(), "text/xml"); // import the xslt stylesheet to the xslt processor xsltprocessor.importstylesheet(xsldocument); finally, you can either use nsixsltprocessor.transformtodocument() or nsixsltprocessor.transformtofragment() methods to transform the xml document.
... filter a complex xml file and generate a simpler xml document with only the data you need, so then you can use regular dom functions to
read it.
Intercepting Page Loads - Archive of obsolete content
read the recommendations in appendix a regarding performance if you're planning on implementing any of these.
... the subject argument on the observe method is the nsihttpchannel object that corresponds to the http channel being opened or al
ready opened, depending on the topic.
...for that, we recommend that you first
read the documentation on nsiwebprogresslistener and the nsiwebprogress.constants (webprogress notify constants).
...the first one is that you can't easily
read or modify the content to be loaded.
Setting Up a Development Environment - Archive of obsolete content
you should take some time to
read it and understand it, or at least identify the parts that you should change to get a project of your own going.
...this only works if your extension is al
ready installed in a firefox profile.
...in order to set the profile location to the right value, you should
read the support article on profiles, at the mozilla support site.
...
read this piece on development preferences.
Setting up an extension development environment - Archive of obsolete content
as we are specifically defining the user profile dev, if you don't have the dev profile al
ready created, the profile selection window opens, where you can create it.
... in the following example, the described command starts a new instance of firefox, with a profile called dev; even if an instance of firefox is al
ready running.
...if you are al
ready running a firefox instance without -no-remote, and you attempt to start another instance with -p profilename (but without the -no-remote parameter), that second invocation would ignore its -p profilename parameter, instead opening a new window for the al
ready running instance; sharing all its profile, sessions etc.
... note: if you al
ready installed the extension via xpi, you should uninstall it first before creating the pointer file.
Search Extension Tutorial (Draft) - Archive of obsolete content
// an engine with this name must al
ready exist.
... selectsearch = firstrun || reason == addon_enable; // only add the engine if it doesn't al
ready exist.
...var selectsearch = false; function removeobserver() { try { services.obs.removeobserver(searchobserver, engine_added); } // if we've al
ready removed this observer, ignore the error.
... selectsearch = firstrun || reason == addon_enable; // only add the engine if it doesn't al
ready exist.
MozBeforeResize - Archive of obsolete content
general info specification mozilla specific interface event bubbles no cancelable no target window default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
Index of archived content - Archive of obsolete content
ent prism blogposts build bundlelibrary bundles configuration extensions faq hostwindow installer scripting styling proxy ui pydom rdf api rdf datasource how-to
reading textual data remote xul remote debugging rsyncing the cvs repository running windows debug builds downloaded from tinderbox sxsw 2007 presentations safe browsing safe browsing: design documentation safely loading uris same origin policy for xbl space manager detailed design space manag...
... tracevis transforming xml with xslt:mozilla xslt transforming xml with xslt:the netscape xslt treehydra treehydra build instructions treehydra manual tuning pageload urischeme uris and urls uriloader using addresses of stack variables with nspr th
reads on win16 using cross commit using gdb on wimpy computers venkman using breakpoints in venkman venkman internals venkman introduction video presentations when to use ifdefs writing textual data xml in mozilla xpinstall ...
...otify npn_getvalue npn_getvalueforurl npn_hasmethod npn_hasproperty npn_identifierisstring npn_intfromidentifier npn_invalidaterect npn_invalidateregion npn_invoke npn_invokedefault npn_memalloc npn_memflush npn_memfree npn_pluginth
readasynccall npn_posturl npn_posturlnotify npn_releaseobject npn_releasevariantvalue npn_reloadplugins npn_removeproperty npn_request
read npn_retainobject npn_setexception npn_setproperty npn_setvalue npn_setvalueforurl npn_status npn_...
... npn_write npobject npp nppvariable npp_destroy npp_destroystream npp_getvalue npp_handleevent npp_new npp_newstream npp_print npp_setvalue npp_setwindow npp_streamasfile npp_urlnotify npp_write npp_write
ready npprint npprintcallbackstruct nprect npregion npsaveddata npsetwindowcallbackstruct npstream npstring nputf8 npvariant npvarianttype npwindow np_getmimedescription np_getvalue np_initialize np_port ...
Inner-browsing extending the browser navigation paradigm - Archive of obsolete content
extending traditional hypertext navigation the hypertext approach to developing web pages, in which developers format text layouts into pages and link those pages to related content, is analogous to a book or a magazine:
readers view pages, go to other pages for more information, and view resources listed as references on that page.
...instead of forcing the
reader to follow links to new pages, the javascript code can act as the mediator for information access.
...iframes are al
ready a very well established standard, and are implemented with the same functionalities in all modern browsers.
...when the markup is
ready, it copies the markup into the container element, which is a div element.
List of Mozilla-Based Applications - Archive of obsolete content
abstract accounting tool adobe acrobat and adobe
reader portable document format (pdf) software uses mozilla spidermonkey adobe flash player popular browser plug-in uses nss in linux version adwatch content management system uses xul and xpcom aicpcu/iia exam app exam delivery software aliwal geocoder geocoding & data on a map amarok xul remote remote control for amarok ...
...lizilayers gis application 3liz also creates some gis firefox add-ons logitech harmony remote software software for remote control device uses gre or xulrunner longman dictionary of contemporary english cd-rom lotus notes / sametime groupware the latest version of ibm lotus notes and sametime can embed xul applications lucidor e-book
reader lx-office accounting tool looks like it makes at least some use of xul maavis simple ui & communications for accessibility framework designed for elderly people with dementia but other applications mac os x operating system makes use of some mpl files such as libsecurity_asn1 maemo browser browser for maemo internet tablet developm...
...ate and secure web browsing sweet16 apple ii computer emulator uses spidermonkey as a scriptable debugger for software running in the emulator mozilla sunbird/mozilla lightning calendar tabpress authoring tool talend open studo data integration software seems to use xulrunner talking clipboard text to speech software
read epub books, web pages, chm, pdf, ms word, rtf, rss feeds taskpool productivity telasocial kiosk app uses xulrunner telekast teleprompter tenfourfox browser for powerpc-based macs timberwolf browser for amiga os4 based on firefox - project page mozilla thunderbird email 47 million dl tomtom home 2...
...t/ http://dmoz.org/computers/data_formats/markup_languages/xml/applications/xul/applications/ http://blog.mozbox.org/post/2007/06/14/xul-activity-in-france http://www.mozilla.org/projects/security/pki/nss/overview.html http://en.wikipedia.org/wiki/spidermonkey_(javascript_engine) http://www.mozilla.org/rhino/users.html http://groups.google.com/group/mozilla.dev.tech.js-engine.rhino/browse_th
read/th
read/4eb9162c9c3054b0/1d4115b40373ca3b?lnk=raot http://www.ohloh.net/tags/xulrunner ...
How Mozilla finds its configuration files - Archive of obsolete content
this is a
readable file of javascript commands.
...you may use the following items: a program to convert registry.dat file into a
readable (and editable) xml file.
... usage: ./
readmozprofile.pl < registry.dat >registry.xml a program to convert the xml file back into the binary registry.dat file.
... usage: ./writemozprofile.pl < registry.xml >registry.dat a
ready-to-use registry.dat file pointing to h:\mozilla a registry.xml file pointing to h:\mozilla an example of a prefs.js file (to put into the user's h:\mozilla directory).
Layout System Overview - Archive of obsolete content
one of the goals of the layout system's design is to create parts of the presentation as they become available, rather than waiting for the entire document to be
read, parsed, and then presented.
... this is a major benefit for large documents because the user does not have to wait for the 200th page of text to be
read in before the first page can be displayed - they can start
reading something right away.
...in the normal in-flow case this is quite natural because the sequential addition of new content results in sequential addition of new frames, and because everything is in-flow, the new frames do not influence the geometry of the frames that have al
ready been formatted.
...sometimes a content element comes in incrementally, and invalidates the formatting of some of the frames that precede it, frame that have al
ready been formatted.
JavaScript crypto - Archive of obsolete content
pkcs11_pub_
readable_cert_flag: this is the only flag most smart tokens should turn on.
... you can turn this flag on if: the certs on your token can be
read without authentication and, the public key on your token can be found by id, modulus, or value and all your private keys have the associated public key.
...0x1<<4; pkcs11_mech_dh_flag = 0x1<<5; //diffie-hellman pkcs11_mech_skipjack_flag = 0x1<<6; //skipjack algorithm as in fortezza cards pkcs11_mech_rc5_flag = 0x1<<7; pkcs11_mech_sha1_flag = 0x1<<8; pkcs11_mech_md5_flag = 0x1<<9; pkcs11_mech_md2_flag = 0x1<<10; pkcs11_mech_random_flag = 0x1<<27; //random number generator pkcs11_pub_
readable_cert_flag = 0x1<<28; //stored certs can be
read off the token w/o logging in pkcs11_disable_flag = 0x1<<30; //tell mozilla to disable this slot by default cipher flags reserved important for cryptomechanismflags 0x1<<11, 0x1<<12, ...
...# of // arguments js_err_add_module = -5 // error adding a module js_err_bad_module_name = -6 // the module name is invalid js_err_add_module_duplicate = -10 // the module being installed has the // same name as one of the modules that // has al
ready been installed miscellaneous domstring random(in long numbytes); unimplementedyou can use window.crypto.getrandomvalues instead.
Twitter - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...(you can
read about the parameters of the various methods at twitter's api reference.) there are two special, optional properties: success and error.
...when you call a method that requires authentication -- such as jetpack.lib.twitter.statuses.update() -- without providing a username or password, firefox will prompt the user for them if she is not al
ready authenticated with twitter.
... example usage tweeting jetpack.lib.twitter.statuses.update({ status: "o frabjous day!" }); firefox will prompt for a username and password if the user is not al
ready authenticated with twitter.
Space Manager Detailed Design - Archive of obsolete content
must not be null * @param aunavailablespace the bounding rect of the unavailable space * @return ns_ok if successful * ns_error_failure if there is al
ready a region tagged with aframe */ nsresult addrectregion(nsiframe* aframe, const nsrect& aunavailablespace); /** * resize the rectangular region associated with aframe by the specified * deltas.
...must not be null * @param aunavailablespace the bounding rect of the unavailable space * @return ns_ok if successful * ns_error_failure if there is al
ready a region tagged with aframe */ nsresult addrectregion(nsiframe* aframe, const nsrect& aunavailablespace); /** * resize the rectangular region associated with aframe by the specified * deltas.
...if it is found, return an error since the frame is al
ready associated with a region in the spacemanager.
...insert the part that is totally above the bandrect before the current bandrect, as in case #1 above, and adjust the other band rect to exclude the part al
ready added.
Binding Attachment and Detachment - Archive of obsolete content
when a binding is attached using the dom, it inherits from the current most derived binding that may al
ready be attached to the element.
... if a binding is attached and it al
ready specifies an inherited binding using the extends attribute, then the base binding at the end of the inheritance chain is the one that will inherit from the most derived binding that is al
ready attached.
... for example, given a binding d1, with an explicit inheritance chain of d1 -> d2 -> d3 if this element is attached to an element using element.style.mozbinding that al
ready has a binding chain of s1 -> s2 -> s3 the resulting binding chain following the addition of the binding is d1 -> d2 -> d3 -> s1 -> s2 -> s3 the inheritance between d3 and s1 is implicit, meaning that there is no connection in the xbl documents between the two bindings.
...therefore if all the bindings in a chain come from binding documents that have al
ready been loaded by the bound document, then the attachment of a binding (either through css or through the dom) is guaranteed to be synchronous.
Return Codes - Archive of obsolete content
no_matching_certificate -206 extracted file was not signed by the certificate used to sign the installation script cant_
read_archive -207 xpi package cannot be
read invalid_arguments -208 bad parameters to a function illegal_relative_path -209 illegal relative path user_cancelled -210 user clicked cancel on install dialog install_not_started -211 a problem occurred with the parameters to initinsta...
...
read_only -215 the specified file cannot be deleted because its permissions are set to
read only.
... filename_al
ready_used -226 same filename being used in install install_cancelled -227 raised when installation is cancelled in medias res.
... download_error -228 problem with download script_error -229 error in the script al
ready_exists -230 file al
ready exists locally is_file -231 expected target directoy and got file source_does_not_exist -232 source file/dir not found source_is_directory -233 expected source file and got directory source_is_file -234 expected source directory and got file insufficient_disk_space -235 not enough disk space for install filename_too_long -236 unable_to_locate_lib_function -237 unable_to_load_library ...
Learn XPI Installer Scripting by Example - Archive of obsolete content
target subdir true ); // force flag logcomment("adddirectory() returned: " + err); // create the plugins folder next to mozilla var pluginsfolder = getfolder("plugins"); if (!fileexists(pluginsfolder)) { var ignoreerr = dircreate(pluginsfolder); logcomment("dircreate() returned: " + ignoreerr); } else logcomment("plugins folder al
ready exists"); in this case, the files are contained within a single directory, so calling the install object's adddirectory method is sufficient to queue all the files in the archive for installation.
... say you have a simple executable and a
readme file that goes with it, and you want to make it available for installation from a xpi.
... var xpisrc = "cd_ripper.exe"; var xpidoc = "
readme_cdrip"; initinstall("my cd ripper", "cdrip", "1.0.1.7"); f = getfolder("program"); setpackagefolder(f); addfile(xpisrc); addfile(xpidoc); if (0 == getlasterror()) performinstall(); else cancelinstall(); the example above shows this minimal installation.
...it does, however, take the executable and the
readme file and install them on the user's system.
Dynamically modifying XUL-based user interface - Archive of obsolete content
we assume that the
reader has basic knowledge of both xul and javascript.
... you may also want to
read some introductory documents about dom, like the about the document object model article or the introduction page of the gecko dom reference.
...if you have ever written a script that interacts with a xul (or html) document, you have al
ready used dom calls.
...(
read more about this in working with windows in chrome code.) when your script is included using a <script> tag, the document property references the dom document that includes the script.
CheckboxStateChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean does the event normally bubble?
... cancelable
read only boolean is it possible to cancel the event?
DOMMenuItemActive - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
DOMMenuItemInactive - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
RadioStateChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean does the event normally bubble?
... cancelable
read only boolean is it possible to cancel the event?
ValueChange - Archive of obsolete content
general info specification xul interface event bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean does the event normally bubble?
... cancelable
read only boolean is it possible to cancel the event?
broadcast - Archive of obsolete content
general info specification xul interface event bubbles no cancelable no target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
close - Archive of obsolete content
properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
commandupdate - Archive of obsolete content
properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
popuphidden - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
popuphiding - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
popupshowing - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action a popup is displayed properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
popupshown - Archive of obsolete content
general info specification xul interface popupevent bubbles yes cancelable yes target element default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
Working With Directories - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...if the directory al
ready exists, then no action is taken.
...naturally, if the 'myfiles' directory al
ready exists, it won't be recreated.
OpenClose - Archive of obsolete content
these are: if the menu is al
ready open, or al
ready in the process of being opened.
... naturally, attempting to open a menu that is al
ready open doesn't have any effect.
...this property is
readonly and applies to the menupopup, panel or tooltip element.
... for example, you could use the state property to determine if a panel is al
ready open.
The Joy of XUL - Archive of obsolete content
these applications are easily customized with alternative text, graphics, and layout so they can be
readily branded or localized for various markets.
... web developers al
ready familiar with dynamic html (dhtml) will learn xul quickly and can start building applications right away.
... this degree of separation results in applications that are easier to maintain by programmers and
readily customized by designers and language translators.
... fortunately, an implementation of the libical library was al
ready available for macintosh so, with the cross platform nature of xpcom, a macintosh calendar implementation was working within a few days.
XUL Structure - Archive of obsolete content
for instance, an http url does not have any special privileges, and an error will occur if a web page tries, for example, to
read a local file.
... however, a file loaded via a chrome url will be able to
read files with the same access privileges as the installed extension.
...this means that there are certain things that content of web pages cannot do, such as
read the user's bookmarks.
...mozilla does not use the file extension, unless
reading files from the file system, but you should use the .xul extension for all xul files.
The Implementation of the Application Object Model - Archive of obsolete content
individual widgets, even complex widgets like the trees and toolbars need little to no drawing code (above and beyond what nglayout al
ready has) in order to work.
... statement #5 when a change is made to aggregated data that falls outside of the domain of an existing data source, it must be possible for that change to be persistently remembered by recording the change into a new data source that can then be
read in when the data is re-aggregated in future sessions of the application.
... the xul/rdf architecture if you've
read this far, you should now have a general idea of what the architecture is like, as well as the motivations for choosing such an architecture.
...a xul document is
read into gecko's parser, and a specialized content sink, known as the xul content sink, is responsible for constructing the in-memory rdf graph representation of the xul.
editor - Archive of obsolete content
contentdocument type: document this
read-only property contains the document object in the element.
... contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this
read-only property contains the nsidocshell object for the document.
... webbrowserfind type: nsiwebbrowserfind this
read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
... webnavigation type: nsiwebnavigation this
read-only property contains the nsiwebnavigation object for the document.
listitem - Archive of obsolete content
this value is
read-only.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...this property is
read only.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
menupopup - Archive of obsolete content
anchornode type: nsidomelement this
read-only property holds the dom node that was specified as the anchor when opening the popup.
... popupboxobject type: nsipopupboxobject this
read-only property holds the nsipopupboxobject that implements the popup.
... state type: string this
read only property indicates whether the popup is open or not.
... triggernode type: nsidomnode this
read-only property holds the dom node that generated the event triggering the opening of the popup.
radio - Archive of obsolete content
this value is
read-only.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...this property is
read only.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
richlistitem - Archive of obsolete content
this value is
read-only.
...for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...this property is
read only.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
tree - Archive of obsolete content
this property is
read-only.
...this property is
read-only.
... inputfield type: textbox element
read-only property that holds the textbox that is used for editing.
...trees built from rdf or those which use treeitems directly will al
ready have a view.
Archived Mozilla and build documentation - Archive of obsolete content
liveconnect gives your extension's javascript code (linked from or contained in xul code) access to 2 objects: java and packages (note that per this th
read, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the context of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the context of firefox extensions.").
... new skin notes devmo has a new skin that is
ready for testing.
... proxy ui (recently added - some support for
reading os and account settings.) remote xul how to use xul delivered from a webserver, not as part of chrome.
...resources are identified by uri "uniform resource identifier" (taken from rfc 2396): urischeme list of mozilla supported uri schemes using addresses of stack variables with nspr th
reads on win16 this is a cautionary note that may be old information for some of you.
2006-10-27 - Archive of obsolete content
he has al
ready built firefox 1.5.0.7 on the same machine with no problems.
... discussions final ff release al
ready announced october 23rd: axel hecht posted an answer to cédric corazza posting.
... cédric's posting was about a french site which had al
ready announced the availablity of ff 2.0 final release and provided download links, even though the release was on october 24.
... on the same day paul reed replied to cédric's posting by stating that they would like to close the directory before major releases but that unfortunately it wasn't that easy to do because the files must be
readable, so mirrors can get the bits to serve them on the release day.
NPAPI plugin reference - Archive of obsolete content
npn_pluginth
readasynccall th
read safe way to request that the browser calls a plug-in function on the browser or plugin th
read (the th
read on which the plug-in was initiated).
... npn_request
read requests a range of bytes from a seekable stream.
... this initiates a
read operation; the actual data is received through subsequent calls to npp_write
ready() and npp_write().
...(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") npp_write
ready determines maximum number of bytes that the plug-in can consume.
Getting Started - Archive of obsolete content
to get the most from this tutorial, you will need a text editor and a rss
reader.
... it is not mandatory to create rss files in this tutorial (you can just
read on), but this would be a less effective way for you to learn.
... how to use this tutorial although each page in this tutorial has been written so that it can act as a "standalone" tutorial, it does assume you al
ready possess the knowledge of the information taught in previous pages of this tutorial.
... although you may jump to any point in the tutorial that you wish, we suggest that rss beginners
read this tutorial in order.
Using the W3C DOM - Archive of obsolete content
therefore, if you wish to
read and write these properties from javascript through the dom2, use one of these two approaches: place all of the element's static css declarations (if it has any) in the element's style attribute.
... both properties can be
read or set.
...
reading the property returns the text of an element with all the element content removed.
... the following examples show how to modify the text of a span element that al
ready exists in the html file.
Examples - Archive of obsolete content
if you wish to test these examples by yourself, please
read the important notes.
... </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please
read this.
... </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please
read this.
... </p> <p> <a href="http://validator.w3.org/check/referer"><img src="https://udn.realityripple.com/samples/8a/9e64asf935.png" alt="valid xhtml 1.0!" height="31" width="88" /></a> </p> </body> </html> before testing this example by yourself, please
read this.
Writing JavaScript for XHTML - Archive of obsolete content
this will ensure that documents in html will compare correctly and will do no harm in xhtml where the names are al
ready lower case.
... we found out al
ready, that the document object in xml files is different from the ones in html files.
... i
read about e4x.
... for completeness here is the accept field, that firefox 2.0.0.9 sends with its requests: accept: text/xml,application/xml,application/xhtml+xml,text/html;q=0.9,text/plain;q=0.8,image/png,*/*;q=0.5 further
reading you will find several useful articles in the developer wiki: xml in mozilla dom xml introduction xml extras dom 2 methods you will need are: dom:document.createelementns dom:document.getelementsbytagnamens see also properly using css and javascript in xhtml documents ...
Building up a basic demo with PlayCanvas editor - Game development
when you are
ready to continue with our tutorial, go to your canvas homepage — for example mine is https://playcanvas.com/end3r.
...even though it's a blank new project we don't have to start entirely from scratch — the camera and directional light are prepared al
ready, so you don't have to worry about them.
... note: yes, you
read that right — you need to enter the hex value without the hash/pound symbol.
...as you can see, the file contains some boilerplate code al
ready: pc.script.create('boxanimation', function (app) { // creates a new boxanimation instance var boxanimation = function (entity) { this.entity = entity; }; boxanimation.prototype = { // called once after all resources are loaded and before the first update initialize: function () { }, // called every frame, dt is time in seconds since last...
WebVR — Virtual Reality for the Web - Game development
vr devices with the popularity of oculus rift and a lot of other devices in production coming soon to the market, the future looks bright — we al
ready have sufficient technology to make the vr experience "good enough" for playing games.
... note: for more information,
read our webvr concepts article.
... there's also a markup framework called a-frame that offers simple building blocks for webvr, so you can rapidly build and experiment with vr websites and games:
read the building up a basic demo with a-frame tutorial for more details.
... the future of webvr it's happening — consumer devices are reaching the market right now, and we al
ready have javascript apis to support them on the web.
MDN Web Docs Glossary: Definitions of Web-related terms
asynchronous atag attribute b bandwidth base64 baseline beacon bézier curve bidi bigint blink block block (css) block (scripting) block cipher mode of operation boolean boot2gecko bootstrap bounding box b
readcrumb brotli browser browsing context buffer c cache cacheable caldav call stack callback function canonical order canvas card sorting carddav caret cdn certificate authority certified challenge-response authentication ...
... key keyword l latency layout viewport lazy load lgpl ligature local scope local variable locale localization long task loop lossless compression lossy compression ltr (left to right) m main axis main th
read markup mathml media media (audio-visual presentation) media (css) metadata method microsoft edge microsoft internet explorer middleware mime mime type minification mitm mixin mobile first modem modern web apps modularity ...
... ril robots.txt round trip time (rtt) routers rss rtcp (rtp control protocol) rtf rtl (right to left) rtp (real-time transport protocol) and srtp (secure rtp) rtsp: real-time streaming protocol ruby s safe same-origin policy scm scope screen
reader script-supporting element scroll container scrollport sctp sdp search engine second-level domain secure sockets layer (ssl) selector (css) self-executing anonymous function semantics seo serialization server server timing session hijacking sgml...
...typing strict mode string stun style origin stylesheet svg svn symbol symmetric-key cryptography synchronous syntax syntax error synthetic monitoring t tag tcp tcp handshake tcp slow start telnet texel th
read three js time to first byte time to interactive tld tofu transmission control protocol (tcp) transport layer security (tls) tree shaking trident truthy ttl turn type type coercion type conversion u udp (user datagram protocol) ui ...
Fundamental CSS comprehension - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through all the articles in this module.
... as a last little touch, give the paragraph inside the <article> an appropriate padding value so that its left edge lines up with the <h2> and footer paragraph, and set its color to be fairly light so it is easy to
read.
...this could affect the values you need, although in this simple example this is not an issue.) other things to think about: you'll get bonus marks if you write your css for maximum
readability, with a separate declaration on each line.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Pseudo-classes and pseudo-elements - Learn web development
inserting strings of text from css isn't really something we do very often on the web however, as that text is inaccessible to some screen
readers and might be hard for someone to find and edit in the future.
... a more valid use of these pseudo-elements is to insert an icon, for example the little arrow added in the example below, which is a visual indicator that we wouldn't want
read out by a screen
reader: these pseudo-elements are also frequently used to insert an empty string, which can then be styled just like any element on the page.
... :
read-only matches an element if it is not user-alterable.
... :
read-write matches an element if it is user-alterable.
Grids - Learn web development
>seven</div> </div> .container { display: grid; grid-template-columns: repeat(auto-fill, minmax(200px, 1fr)); grid-auto-rows: minmax(100px, auto); grid-gap: 20px; } this works because grid is creating as many 200 pixel columns as will fit into the container, then sharing whatever space is leftover between all of the columns — the maximum is 1fr which, as we al
ready know, distributes space evenly between tracks.
...it has a grid defined al
ready, and a simple article outlined.
... a css grid, grid framework grid "frameworks" tend to be based around 12 or 16 column grids and with css grid, you don’t need any third party tool to give you such a framework — it's al
ready there in the spec.
...to dig further into the specification,
read our guides to grid layout, which can be found below.
Introduction to CSS layout - Learn web development
overview: css layout next this article will recap some of the css layout features we've al
ready touched upon in previous modules — such as different display values — and introduce some of the concepts we'll be covering throughout this module.
...this worked at the time, but it has many problems — table layouts are inflexible, very heavy on markup, difficult to debug, and semantically wrong (e.g., screen
reader users have problems navigating table layouts).
...while
reading up and down columns is less useful in a web context as you don’t want to force users to scroll up and down, arranging content into columns can be a useful technique.
...
read on for more information on each individual technology!
Legacy layout methods - Learn web development
if you
read our previous article about flexbox, you might think that flexbox is the ideal solution for creating a grid system.
... there are many flexbox-based grid systems available and flexbox can solve many of the issues that we’ve al
ready discovered when creating our grid above.
...class="col">8</div> <div class="col">9</div> <div class="col">10</div> <div class="col">11</div> <div class="col">12</div> </div> <div class="row"> <div class="col">13</div> <div class="col">14</div> <div class="col">15</div> <div class="col">16</div> </div> </div> to start using skeleton we need to give the wrapper <div> a class of container — this is al
ready included in our html.
...we've done this al
ready as well.
Responsive design - Learn web development
the liquid site resulted in a squashed design on smaller screens (as seen below) and un
readably long line lengths on larger ones.
... the first was the idea of fluid grids, something which was al
ready being explored by gillenwater, and can be
read up on in marcotte's article, fluid grids (published in 2009 on a list apart).
...the media queries level 3 specification became a candidate recommendation in 2009, meaning that it was deemed
ready for implementation in browsers.
...for example, if the line lengths become un
readably long as the screen size increases, or a box becomes squashed with two words on each line as it narrows.
What is a URL? - Learn web development
because the browser al
ready has the document's own url, it can use this information to fill in the missing parts of any url available inside that document.
...here we want to reach this url: https://developer.mozilla.org/docs/learn/../css/display, which can be simplified to: https://developer.mozilla.org/docs/css/display semantic urls despite their very technical flavor, urls represent a human-
readable entry point for a web site.
...but there are many advantages to creating human-
readable urls: it is easier for you to manipulate them.
... it clarifies things for users in terms of where they are, what they're doing, what they're
reading or interacting with on the web.
What is a web server? - Learn web development
prerequisites: you should al
ready know how the internet works, and understand the difference between a web page, a web site, a web server, and a search engine.
...upon finding the file, the server
reads it, processes it as-needed, and sends it to the browser.
... textual all commands are plain-text and human-
readable.
... next steps now that you are familiar with web servers, you could:
read up on how much it costs to do something on the web learn more about various software you need to create a website move on to something practical like how to upload files on a web server.
HTML forms in legacy browsers - Learn web development
learn about the issues to understand common patterns, it helps to
read browser documentation.
... if you are
reading this on mdn, you are at the right place to start.
...please
read the modernizr documentation.
... if you
read all the articles of this html forms guide, you should now be at ease with using forms.
Test your skills: Advanced styling - Learn web development
we've al
ready provided you with a basic reset to build upon.
... we've al
ready provided you with a basic reset to build upon.
... advanced form styling 3 in our final task for this assessment series, we provide you with a feedback form that is al
ready nicely-styled — you've al
ready seen something similar if you've worked through our ui pseudo-classes article, and now we want you to come up with your own solution.
... details of what you have al
ready tried, and what you would like us to do, e.g.
CSS basics - Learn web development
(if you haven't been following our project, pause here to
read dealing with files and html basics.) open your index.html file.
...finally, let's expand the second ruleset (below) with settings for line height and letter spacing to make body content more
readable.
...(keep
reading to learn more) to continue, let's add more css.
...that might seem like a bad idea, but the intent is to provide basic
readability for unstyled pages.
Installing basic software - Learn web development
maybe that sounds obvious to some people, but some of you are
reading this article on your phone or a library computer.
...a library tends to be an existing javascript or css file that provides
ready-rolled functionality for you to make use of in your code.
... installing a text editor you probably al
ready have a basic text editor on your computer.
... before going on, you should install at least two of these browsers and have them
ready for testing.
The web and web standards - Learn web development
for a more detailed explanation of how some of them work together,
read our article how the web works.
... browsers you are probably
reading these words inside a web browser in this very moment (unless you've printed it out, or are using assistive technology, such as a screen
reader to
read it out to you).
... "sure thing web browser — here you go" [downloads files and renders web page] the actual syntax for http messages (called requests and responses) is not that human-
readable, but this gives you the basic idea.
... user 3 might be blind, and using a screen
reader to
read the web page out to them.
Advanced text formatting - Learn web development
uotation from the mdn <q> page: <p>the quote element — <code><q></code> — is <q cite="/docs/web/html/element/q">intended for short quotations that don't require paragraph breaks.</q></p> browser default styling will render this as normal text put in quotes to indicate a quotation, like so: citations the content of the cite attribute sounds useful, but unfortunately browsers, screen
readers, etc.
...</p> <p>select all the text with <kbd>ctrl</kbd>/<kbd>cmd</kbd> + <kbd>a</kbd>.</p> <pre>$ <kbd>ping mozilla.org</kbd> <samp>ping mozilla.org (63.245.215.20): 56 data bytes 64 bytes from 63.245.215.20: icmp_seq=0 ttl=40 time=158.233 ms</samp></pre> the above code will look like so: marking up times and dates html also provides the <time> element for marking up times and dates in a machine-
readable format.
...the <time> element allows you to attach an unambiguous, machine-
readable time/date for this purpose.
... the basic example above just provides a simple machine
readable date, but there are many other options that are possible, for example: <!-- standard simple date --> <time datetime="2016-01-20">20 january 2016</time> <!-- just year and month --> <time datetime="2016-01">january 2016</time> <!-- just month and day --> <time datetime="01-20">20 january</time> <!-- just time, hours and minutes --> <time datetime="19:30">19:30</time> <!-- you can do seconds and milliseconds too!
Marking up a letter - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through getting started with html, what's in the head?
... the four dates in the document should be have appropriate elements containing machine-
readable dates.
... details of what you have al
ready tried, and what you would like us to do (if you are stuck and need help, or if you want an assessment).
... a link to the actual task or assessment page, so we can
read the exact wording of the relevant question(s).
Video and audio content - Learn web development
ovps even usually offer
ready-made code for embedding video/audio in your webpages; if you use that route, you can avoid some of the difficulties we discuss in this article.
... the embedded video will look something like this: you can try the example live here (see also the source code.) using multiple source formats to improve compatibility there's a problem with the above example, which you may have noticed al
ready if you've tried to access the live link above with an older browser like internet explorer or even an older version of safari.
... here's an example: <video controls> <source src="example.mp4" type="video/mp4"> <source src="example.webm" type="video/webm"> <track kind="subtitles" src="subtitles_en.vtt" srclang="en"> </video> this will result in a video that has subtitles displayed, kind of like this: for more details, please
read adding captions and subtitles to html5 video.
...note that the third assessment question in this test assumes knowledge of some of the techniques covered in the next article, so you may want to
read that before attempting it.
Making asynchronous programming easier with async and await - Learn web development
these features basically act as syntactic sugar on top of promises, making asynchronous code easier to write and to
read afterwards.
... you are probably al
ready thinking "this is really cool!", and you are right — fewer .then() blocks to wrap around code, and it mostly just looks like synchronous code, so it is really intuitive.
...we've had to wrap all the code in a new async function, displaycontent(), and we've not reduced the code by a lot of lines, but being able to move the bulk of the code out of the .then() block provides a nice, useful simplification, leaving us with a much more
readable program.
... conclusion and there you have it — async/await provide a nice, simplified way to write async code that is simpler to
read and maintain.
Introduction to events - Learn web development
you've al
ready seen events and event handlers used in many of the examples, but let's recap just to cement our knowledge.
...it's just a copy of the simple random color example we've played with al
ready.
...these are a little out of scope for this article, but if you want to
read them, visit the addeventlistener() and removeeventlistener() reference pages.
... if there is anything you didn't understand, feel free to
read through the article again, or contact us to ask for help.
Image gallery - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through all the articles in this module.
... looping through the images we've al
ready provided you with lines that store a reference to the thumb-bar <div> inside a constant called thumbbar, create a new <img> element, set its src attribute to a placeholder value xxx, and append this new <img> element inside thumbbar.
... writing a handler that runs the darken/lighten button that just leaves our darken/lighten <button> — we've al
ready provided a line that stores a reference to the <button> in a constant called btn.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Third-party APIs - Learn web development
if you've al
ready cloned the examples repository, you'll al
ready have a copy of this file, which you can find in the javascript/apis/third-party-apis/mapquest directory.
...if you've al
ready cloned the examples repository, you'll al
ready have a copy of these files, which you can find in the javascript/apis/third-party-apis/nytimes directory.
... the second function works nearly exactly the same way in reverse, but we also have to take the extra step of checking that pagenumber is not al
ready zero before decrementing it — if the fetch request runs with a minus page url parameter, it could cause errors.
... if the pagenumber is al
ready 0, we simply return out of the function, to avoid wasting processing power (if we are al
ready at the first page, we don't need to load the same results again).
Basic math in JavaScript — numbers and operators - Learn web development
we don't cover these in detail in this article because we wanted to keep it as a simple introduction and only cover the real basic essentials for now; however, once you've
read through this module a couple of times it is worth going to the object reference pages and learning more about what's available.
... operator precedence let's look at the last example from above, assuming that num2 holds the value 50 and num1 holds the value 10 (as originally stated above): num2 + num1 / 8 + 2; as a human being, you may
read this as "50 plus 10 equals 60", then "8 plus 2 equals 10", and finally "60 divided by 10 equals 6".
...we have al
ready used the most basic one, =, loads of times — it simply assigns the variable on the left the value stated on the right: let x = 3; // x contains the value 3 let y = 4; // y contains the value 4 x = y; // x now contains the same value y contains, 4 but there are some more complex types, which provide useful shortcuts to keep your code neater and more efficient.
... note: if you do enjoy math and want to
read more about how it is implemented in javascript, you can find a lot more detail in mdn's main javascript section.
Storing the information you need — Variables - Learn web development
previous overview: first steps next after
reading the last couple of articles you should now know what javascript is, what it can do for you, how you use it alongside other web technologies, and what its main features look like from a high level.
...the first line pops a box up on the screen that asks the
reader to enter their name, and then stores the value in a variable.
...we won't go into all the differences now, but you'll start to discover them as you learn more about javascript (if you really want to
read about them now, feel free to check out our let reference page).
... this works because of hoisting —
read var hoisting for more detail on the subject.
What is JavaScript? - Learn web development
apis are
ready-made sets of code building blocks that allow a developer to implement programs that would otherwise be hard or impossible to implement.
... they do the same thing for programming that
ready-made furniture kits do for home building — it is much easier to take
ready-cut panels and screw them together to make a bookshelf than it is to work out the design yourself, go and find the correct wood, cut all the panels to the right size and shape, find the correct-sized screws, and then put them together to make a bookshelf.
...plus, the html is easier to
read without huge chunks of script dumped in it.
... to summarize: async and defer both instruct the browser to download the script(s) in a separate th
read, while the rest of the page (the dom, etc.) is downloading, so the page loading is not blocked by the scripts.
Adding features to our bouncing balls demo - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through all the articles in this module.
...
read the whole assessment before you start coding, and take each step slowly and carefully.
...if it doesn't exist, it has al
ready been eaten by the evil circle, so there is no need to check it again.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Object prototypes - Learn web development
you can use our oojs-class-further-exercises.html example (see also the source code), if you don't al
ready have it from working through the last article.
... note: it is worth
reading our more in-depth guide to "using prototypes in javascript", once you've made sense of this section and wish to know more.
...this makes the code easier to
read, as the constructor only contains the property definitions, and the methods are split off into separate blocks.
... note that this set of tests relies on some of the knowledge taught in the next article, so you might want to
read that first before you try them.
Focus management with Vue refs - Learn web development
since
reading and writing actual dom nodes is often more expensive than virtual nodes, this can result in better performance.
...you don't have to use $nexttick here because the component has al
ready been added to the dom when mounted() is called.
... we're al
ready tracking the number of elements in our list heading — the <h2> in app.vue — and it's associated with our list of to-do items.
...this can be confusing to users, especially those using screen
readers and other assistive technology.
Command line crash course - Learn web development
you can
read a bit of the history on wikipedia’s entry for computer terminal.
... we’ve al
ready looked at ls, which outputs the contents of the current directory: ls but what if we wanted to quickly count the number of files and directories inside the current directory?
...a good deal of commands can also
read content from streamed input (known as "standard input" or stdin).
...stdin is
read if it is piped to prettier and no files are given.
Accessibility information for UI designers and developers
see also: understanding sc 2.4.7: focus visible be
ready for resizing and custom styles on the web, users can use tools in their browser to make font sizes larger, or even provide custom css to meet their specific needs.
...that way, users of screen
readers and screen magnifiers can reliably make assumptions about them and skip over them.
... many screen
readers users navigate by headings.
... newsgroup and mailing list we have two discussion lists, which can be
read via a newsgroup
reader, as a mailing list or via google groups.
Mozilla's Section 508 Compliance
2) java and in-page plugins cannot be used with the keyboard, so they must not be installed for keyboard-only users additional features for the keyboard: 1) find as you type allows for quick navigation to links and convenient text searching 2) browse with caret (f7 key toggles) allows users to select arbitrary content with the keyboard and move through content as if inside a
readonly editor.
...screen
reader access is currently being tested.
...gnopernicus support in beta no screen
reader support on mac os x b) at least one mode of operation and information retrieval that does not require visual acuity greater than 20/70 shall be provided in audio and enlarged print output working together or independently, or support for assistive technology used by people who are visually impaired shall be provided.
...caveat, the document
reading and app
readings modes don't support columnized text.
Mozilla’s UAAG evaluation report
checkpoint title status notes/plans 6.1 dom
read access.
... out-of-process access is needed for it to be truly useful for assistive technology we do support some com interfaces called isimpledomnode, which has a large portion of useful dom
read access 6.2 dom write access.
... out-of-process access is needed for it to be truly useful for assistive technology we do support some com interfaces called isimpledomnode, which has a large portion of useful dom
read access 6.3 programmatic access to non-html/xml content.
...(p1) ni we don't make use of scope, headers, axis, or any other table accessibility features we have nothing under properties, or anywhere else, to orient users
reading a table 10.2 highlight selection and content focus.
Adding a new CSS property
parsing to start implementing the parsing, first
read the syntax line in the property's specification (whose syntax is in turn defined in the css values and units specification) and any prose in the specification that adds additional restrictions to that syntax.
... property if and only if its preference is enabled (and see next point) if you need to check a preference in custom parsing code (e.g., because you're adding a new property to a shorthand, but only conditionally on that property's preference), call nscssprops::isenabled(), which is faster than calling into the preferences code for further understanding of how the parsing code works, you should
read and understand the code in nscssparser.cpp.
... (none of this applies to shorthand properties.) start by
reading and understanding the "computed value:" line in the specification's definition of the property, and any associated prose.
... also, it's very important not to touch the computed style data at all when there's no specified data provided (ecssunit_null); touching the computed style data in this case would break partial computation based on a start struct, which is when we computed style data on the basis of computed data we've al
ready computed from a subset of the style rules that we're currently computing from.
Command line options
firefox -createprofile "joeluser c:\internet\joelusers-moz-profile" note: profile_dir must not exist and you must not al
ready have a profile called profile_name.
...if a private browsing window is al
ready open, a new tab is opened in the existing window.
... execute the specified remote_command in an al
ready running application process.
...useful with those command-line arguments that open their own windows but don't al
ready prevent default windows from opening.
Creating reftest-based unit tests
step 3 create a file named foo.html with the following: <html><head><title>reftest0001</title> <body><strong>hello!</strong></body> </html> step 4 create a file named bar.html with the following: <html><head><title>reftest0001</title> <body><b>hello!</b></body> </html> step 5 create a file named reftest.list with the following: == foo.html bar.html you are now
ready to run the test (but first you must go back to the root of firefox's source code tree): $ ./mach reftest path/to/reftest.list 2>&1 | grep reftest reftest pass: file:///users/ray/mozilla-central/path/to/foo.html $ congratulations!
...more information on this file can be found in the
readme.txt referenced below, which was written by the creator of the reftest tool.
...third, you need to remove 'reftest-wait' from the root element's 'class' attribute to tell the reftest framework that the test is now
ready to have its rendering tested.
... references http://old.nabble.com/please-add-%22in-testsuite-%22-to-layout-bugs-when-resolving-them!-td7787412.html further documentation: layout/tools/reftest/
readme.txt ...
The Firefox codebase: CSS Guidelines
before adding more css it is good practice to check if the css that is being written is needed, it can be the case that a common component has been al
ready written could be reused with or without changes.
... most of the time, the common component al
ready follows the a11y/theme standards defined in this guide.
... colors for common areas of the firefox interface (panels, toolbar buttons, etc.), mozilla-central often comes with some useful css variables that are adjusted with the correct values for different platform configurations, so using those css variables can definitively save some testing time, as you can assume they al
ready work correctly.
... using the currentcolor keyword or inheriting is also good practice, because sometimes the needed value is al
ready in the color or on the parent element.
Reviewer Checklist
be careful when
reading user input, network input, or files on disk.
... [fennec: when writing tests that use paintedsurface, ensure the paintedsurface is closed when you're done with it.] performance impact check for main-th
read io [fennec: android may warn about this with strictmode].
... th
reading issues enormous: correct use of locking and volatility; livelock and deadlock; ownership.
... [fennec: all view methods should be touched only on ui th
read.] [fennec: activity lifecycle awareness (works with "never keep activities").
mozbrowseractivitydone
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserasyncscroll
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowseraudioplaybackchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only boolean indicates whether audio is playing in the browser.
mozbrowsercaretstatechanged
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserclose
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
mozbrowsercontextmenu
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserdocumentfirstpaint
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
mozbrowsererror
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserfindchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserfirstpaint
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
mozbrowsericonchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserloadend
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserloadstart
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
mozbrowserlocationchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowsermanifestchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowsermetachange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowseropensearch
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowseropentab
eropentab event is fired when a new tab is opened within a browser <iframe> as a result of the user issuing a command to open a link target in a new tab (for example ctrl/cmd + click.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowseropenwindow
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserresize
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserscroll
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserscrollareachanged
this can occur on resize and when the page size changes (while loading for example.) general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserscrollviewchange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowsersecuritychange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowserselectionstatechanged
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowsershowmodalprompt
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowsertitlechange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... detail
read only string the title of the document.
mozbrowserusernameandpasswordrequired
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
mozbrowservisibilitychange
general info specification non standard interface customevent bubbles yes cancelable yes target <iframe> default action none properties property type description target
read only eventtarget the browser iframe type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
... details
read only object a custom object.
smartcard-insert
the smartcard-insert event is fired when the insertion of a smart card has been detected specification mozilla specific interface event bubbles no cancelable no target document default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
smartcard-remove
specification mozilla specific interface event bubbles no cancelable no target document default action none properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
How to get a stacktrace with WinDbg
debugging to begin debugging, ensure that firefox is not al
ready running and open windbg from the start menu.
... .logopen /t c:\temp\firefox-debug.log .childdbg 1 .tlist sxn gp lm if you see firefox.exe listed in the output from .tlist more than once, then you are al
ready running the application and need to close the running instance first before you start debugging, otherwise you won't get useful results.
... q: i'm seeing "wow64" on top of each th
read, is that ok ?
... see also symbol server maps addresses to human
readable strings.
AddonManager
state_downloaded an install that has finished downloading and is
ready to install.
...fromwebpage( in string mimetype, in nsidomwindow source, in nsiuri uri, in addoninstall installs[] ) parameters mimetype the mimetype of add-ons being installed source the nsidomwindow that started the installs uri the nsiuri that started the installs installs the array of addoninstalls to be installed addinstalllistener() adds a new installlistener if the listener is not al
ready registered.
... addaddonlistener() adds a new addonlistener if the listener is not al
ready registered.
... void removeaddonlistener( in addonlistener listener ) parameters listener the addonlistener to remove addtypelistener() adds a new typelistener if the listener is not al
ready registered.
DownloadSummary
method overview promise bindtolist(downloadlist alist); promise addview(object aview); promise removeview(object aview); properties attribute type description allhavestopped
read only boolean indicates whether all the downloads are currently stopped.
... progresstotalbytes
read only number indicates the total number of bytes to be transferred before completing all the downloads that are currently in progress.
... progresscurrentbytes
read only number number of bytes currently transferred as part of all the downloads that are currently in progress.
... note: this method is al
ready called internally by the downloads.getsummary() function.
DownloadTarget
method overview promise refresh() properties attribute type description exists
read only boolean indicates whether or not the target file exists.
... path
read only string the path of the target file.
... partfilepath
read only string the path of the ".part" file containing the data downloaded so far, or null to disable the use of a ".part" file to keep partially downloaded data.
... size
read only number the size of the target file, in bytes, or zero if the download has not yet been completed.
Deferred
method overview void resolve([optional] avalue); void reject([optional] areason); properties attribute type description promise
read only promise a newly created promise, initially in the pending state.
...if the associated promise has al
ready been resolved, either to a value, a rejection, or another promise, this method does nothing.
... note: calling this method with a pending promise as the avalue argument, and then calling it again with another value before the promise is resolved or rejected, will have no effect the second time, as the associated promise is al
ready resolved to the pending promise value as its resolution.
...if the promise has al
ready been resolved, either to a value, a rejection, or another promise, this method does nothing.
Localizing with Mozilla Translator
browser |-- locales | |-- en-us | | |--
readme.txt | | |-- chrome | | | |-- branding | | | | |-- brand.dtd | | | | `-- brand.properties | | | |-- browser | | | | |-- aboutdialog.dtd as you see, there is ''link'' point, usually at chrome (in cvs & mozilla-central), sometimes in a deeper point.
...with mercurial, partial checkouts are not possible, so you have your own mozilla repository full copy (there are alternate solutions;
read on).
... when mozilla l10n switched to ''source l10n'', one of the many problems that mt had to solve was how to fit a directory structure in what had been designed for five jars, and the ''patch'' consisted of providing a ''
read from dir instead of jar'' and ''put everything inside platform neutral''.
...it is just instructed to
read directory subtrees and ignore "cvs" and ".svn" directories it finds.
Localizing without a specialized tool
with that document, users can see immediately two localized files in their user interface by following closely and carefully the steps to create a language pack or a binary file that is
ready for installation.
...if you click on the highlighted arrow pointing down while
reading this tutorial on mdc, you will see two string that need to be translated: add "mdc search" manage search engines...
...you are now
ready to start translating!
... (
read more about tools at l10n:tools.) after you have downloaded your editor of choice, type the following command in the same path from above (l10n-mozilla-1.9.2/x-testing/browser/chrome/browser) $ edit l10n-mozilla-1.9.2/x-testing/browser/chrome/browser/aboutcerterror.dtd
read the top of the file to get any context on how to translate contained in the notes written by the developers or l10n-drivers.
Initial setup
you also need to determine if a localization effort al
ready exists for your locale.
... here's what you do: look through the existing localization community directory to see if one al
ready exists for your locale.
... if a community al
ready exists, reach out to them and ask how you can help.
... mozilla ldap you will need a mozilla ldap account once you're
ready to have your localization registered on the main mozilla repositories.
SVN for Localizers
if you're al
ready familiar with this information, skip ahead to mozilla's svn repositories.
...if you al
ready installed cygwin but it didn't include the svn package, run the cygwin installer again and be sure to check the box beside subversion package.
... note: if you do not al
ready have access to svn, visit this wiki page on how to get set up with an svn account before proceeding.
...it's a bit hard to
read, but you can also create a diff file (aka a diff patch) use svn diff > /path/to/output/file.diff to save the output to a file.
mozilla::CondVar
notify() nsresult notify(void); notify one th
read waiting on this condvar.
... notifyall() nsresult notifyall(void); notify all th
reads waiting on this condvar.
... assertcurrentth
readownsmutex() assert that the current th
read has successfully locked the mutex undergirding this condvar.
... assertnotcurrentth
readownsmutex() assert that the current th
read has not successfully locked the mutex undergirding this condvar.
mozilla::Monitor
notify() nsresult notify(void); notify one th
read waiting on this monitor.
... notifyall() nsresult notifyall(void); notify all th
reads waiting on this monitor.
... assertcurrentth
readin() assert that the current th
read is in this monitor.
...assertnotcurrentth
readin() assert that the current th
read is not in this monitor.
Investigating leaks using DMD heap scan mode
first, in toolkit/components/terminator/nsterminator.cpp, delete everything in runwatchdog but the call to ns_setcurrentth
readname.
... the command you need to run firefox will look something like this: xpcom_mem_bloat_log=1 moz_cc_log_shutdown=1 moz_disable_content_sandbox=t moz_cc_log_directory=$logdir moz_cc_log_process=content moz_cc_log_th
read=main moz_dmd_shutdown_log=$logdir moz_dmd_log_process=tab ./mach run --dmd --mode=scan breaking this down: xpcom_mem_bloat_log=1: this reports a list of the counts of every object created and destroyed and tracked by the xpcom leak tracking system.
... moz_cc_log_process=content moz_cc_log_th
read=main: these options specify that we only want cc logs for the main th
read of content processes, to make shutdown less slow.
... if your leak is happening in a different process or th
read, change the options, which are listed in xpcom/base/nscyclecollector.cpp.
Condition Variables
this chapter describes the api for creating and destroying condition variables, notifying condition variables of changes in monitored data, and making a th
read wait on such notification.
... a call to pr_waitcondvar causes a th
read to block until a specified condition variable receives notification of a change of state in its associated monitored data.
... other th
reads may notify the condition variable when changes occur.
... for an introduction to nspr th
read synchronization, including locks and condition variables, see introduction to nspr.
PR_ClearInterrupt
clears the interrupt request for the calling th
read.
... syntax #include <prth
read.h> void pr_clearinterrupt(void); description interrupting is a cooperative process, so it's possible that the th
read passed to pr_interrupt may never respond to the interrupt request.
... for example, the target th
read may reach the agreed-on control point without providing an opportunity for the runtime to notify the th
read of the interrupt request.
... in this case, the request for interrupt is still pending with the th
read and must be explicitly canceled.
PR_CreatePipe
creates an anonymous pipe and retrieves file descriptors for the
read and write ends of the pipe.
... syntax #include <prio.h> prstatus pr_createpipe( prfiledesc **
readpipe, prfiledesc **writepipe); parameters the function has the following parameters:
readpipe a pointer to a prfiledesc pointer.
... on return, this parameter contains the file descriptor for the
read end of the pipe.
...data written into the write end of the pipe can be
read from the
read end of the pipe.
PR_NotifyAllCondVar
notifies all of the th
reads waiting on a specified condition variable.
... description the calling th
read must hold the lock that protects the condition, as well as the invariants that are tightly bound to the condition.
... a call to pr_notifyallcondvar causes all of the th
reads waiting on the specified condition variable to be promoted to a
ready state.
... if no th
reads are waiting, the operation is no-op.
NSS FAQ
because nss provides complete support for all versions of ssl and tls, it is particularly well-suited for applications that need to communicate with the many clients and servers that al
ready support the ssl protocol.
... to provide cross-platform support, nss utilizes netscape portable runtime (nspr) libraries as a portability interface and implementation that provides consistent cross-platform semantics for network i/o and th
reading models.
...mozilla strongly recommends that multith
readed applications use the nspr or native os th
reading model.
... (in recent nspr releases, the nspr th
reading model is compatible with the native th
reading model if the os has native th
reads.) alternatively, you can adapt the open-source nspr implementation to be compatible with your existing application's th
reading models.
HTTP delegation
to learn about all the details, please
read the documentation contained in the nss c header files.
...instead, the parameters are a server session object (that carries host and port information al
ready) and the request path.
...(when issueing get requests, the "?query-string=data" portion should al
ready be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g.
...please
read the source code documentation to learn how to use this api synchronously or asynchronously.
HTTP delegation
to learn about all the details, please
read the documentation contained in the nss c header files.
...instead, the parameters are a server session object (that carries host and port information al
ready) and the request path.
...(when issuing get requests, the "?query-string=data" portion should al
ready be appended to the request path) after creation, nss might call functions to provide additional details of the http request (e.g.
...please
read the source code documentation to learn how to use this api synchronously or asynchronously.
NSS 3.35 release notes
if nss is initialized, in
read-write mode with a database directory provided, it uses database files to store certificates, key, trust, and other information.
...without a prefix, the default database type will be used (dbm in versions prior to 3.35, and sql in version 3.35 and later.) when using the sql type (either explicitly, or because of the new default), with a database directory which al
ready contains a dbm type database, nss will automatically perform a one time migration of the information contained in the dbm files to the newer sql files.
... nss 3.30 had introduced a regression, preventing nss from
reading some aes encrypted data, produced by older versions of nss.
... nss 3.35 fixes this regression and restores the ability to
read affected data.
NSS Sample Code Sample_2_Initialization of NSS
sample code 1 /* nspr headers */ #include <prth
read.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\...
... = null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for
read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprin...
...strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(optstate->value); break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progname); pr_init(pr_user_th
read, pr_priority_normal, 0); /* create the database */ rv = nss_init
readwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup(); exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
... password\n"); } if (slot) { pk11_freeslot(slot); } rvshutdown = nss_shutdown(); if (rvshutdown != secsuccess) { pr_fprintf(pr_stderr, "failed : nss_shutdown()\n"); rv = secfailure; } pr_cleanup(); return rv; } </plainpasswc></plainpasswc></dbdirpath></passwdffile></plainpasswc></dbdirpath></pk11func.h></nss.h></prprf.h></plgetopt.h></prth
read.h> ...
NSS functions
3.2 and later pk11_isfips mxr 3.2 and later pk11_isdisabled mxr 3.4 and later pk11_isfriendly mxr 3.2 and later pk11_ishw mxr 3.2 and later pk11_isinternal mxr 3.2 and later pk11_ispresent mxr 3.2 and later pk11_is
readonly mxr 3.2 and later pk11_isremovable mxr 3.12 and later pk11_ivfromparam mxr 3.2 and later pk11_keygen mxr 3.2 and later pk11_linkgenericobject mxr 3.9.2 and later pk11_listcerts mxr 3.2 and later.
... mxr 3.2 and later pk11_pubunwrapsymkey mxr 3.2 and later pk11_pubunwrapsymkeywithflags mxr 3.6 and later pk11_pubunwrapsymkeywithflagsperm mxr 3.9 and later pk11_pubwrapsymkey mxr 3.2 and later pk11_randomupdate mxr 3.2 and later pk11_
readrawattribute mxr 3.9.2 and later pk11_referencesymkey mxr 3.2 and later pk11_resettoken mxr 3.4 and later pk11_restorecontext mxr 3.2 and later pk11_savecontext mxr 3.2 and later pk11_savecontextalloc mxr 3.6 and later pk11_setforte...
...r hash_resultlen mxr 3.4 and later hash_resultlenbyoidtag mxr 3.10 and later hash_resultlencontext mxr 3.10 and later hash_update mxr 3.4 and later nss_init mxr 3.2 and later nss_initialize mxr 3.2 and later nss_init
readwrite mxr 3.2 and later nss_initwithmerge mxr 3.12 and later nss_isinitialized mxr 3.9.2 and later nss_nodb_init mxr 3.2 and later nss_putenv mxr 3.2 and later nss_registershutdown mxr 3.11.1 and later nss_shutdown mxr 3...
... mxr 3.4 and later nssbase64encoder_create mxr 3.2 and later nssbase64encoder_destroy mxr 3.2 and later nssbase64encoder_update mxr 3.2 and later nssrwlock_destroy mxr 3.2 and later nssrwlock_havewritelock mxr 3.2 and later nssrwlock_lock
read mxr 3.2 and later nssrwlock_lockwrite mxr 3.2 and later nssrwlock_new mxr 3.2 and later nssrwlock_unlock
read mxr 3.2 and later nssrwlock_unlockwrite mxr 3.2 and later nsssmime_versioncheck mxr 3.2.1 and later port_alloc mxr ...
NSS tools : modutil
if any of these databases al
ready exist in a specified directory, modutil returns an error message.
... modutil supports several mechanisms: rsa, dsa, rc2, rc4, rc5, aes, des, dh, sha1, sha256, sha512, ssl, tls, md5, md2, random (for random number generation), and friendly (meaning certificates are publicly
readable).
...certprefix= keyprefix= secmod=secmod.db flags=
readonly " nss="trustorder=75 cipherorder=100 slotparams={0x00000001=[slotflags=rsa,rc4,rc2,des,dh,sha1,md5,md2,ssl,tls,aes,random askpw=any timeout=30 ] } flags=internal,critical" setting a default provider for security mechanisms multiple security modules may provide support for the same security mechanisms.
... user
read: 0400 user write: 0200 user execute: 0100 group
read: 0040 group write: 0020 group execute: 0010 other
read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions.
gtstd.html
other kinds of pkcs #11 modules include the netscape fortezza module, used by the government, and the litronic pkcs #11 module for smart card
readers.
...ssl is built on top of nspr, which handles sockets, th
reads, and related low-level os operations.
... a pkcs #11 module always has one or more slots, which may be implemented as physical hardware slots in some form of physical
reader (for example, for smart cards) or as conceptual slots in software.
...for production deployment, the nss team strongly recommends that you either: use certificates from a competent third-party ca that is al
ready known to your relying party software (e.g.
pkfnc.html
pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_is
readonly pk11_setpasswordfunc pk11_findcertfromnickname finds a certificate from its nickname.
... pk11_is
readonly finds out whether a slot is
read-only.
... syntax #include <pk11func.h> #include <prtypes.h> prbool pk11_is
readonly(pk11slotinfo *slot); parameters this function has the following parameter: slot a pointer to a slot info structure.
... returns the function returns one of these values: if slot is
read-only, pr_true.
NSS Tools certutil
the key database should al
ready exist; if one is not present, this option will initialize one by default.
...the certificate database should al
ready exist; if one is not present, this option will initialize one by default.
... -q pqgfile
read an alternate pqg value from the specified file when generating dsa key pairs.
... -z noise-file
read a seed value from the specified binary file to use in generating a new rsa private and public key pair.
NSS tools : modutil
if any of these databases al
ready exist in a specified directory, modutil returns an error message.
... modutil supports several mechanisms: rsa, dsa, rc2, rc4, rc5, aes, des, dh, sha1, sha256, sha512, ssl, tls, md5, md2, random (for random number generation), and friendly (meaning certificates are publicly
readable).
...certprefix= keyprefix= secmod=secmod.db flags=
readonly " nss="trustorder=75 cipherorder=100 slotparams={0x00000001=[slotflags=rsa,rc4,rc2,des,dh,sha1,md5,md2,ssl,tls,aes,random askpw=any timeout=30 ] } flags=internal,critical" setting a default provider for security mechanisms multiple security modules may provide support for the same security mechanisms.
... user
read: 0400 user write: 0200 user execute: 0100 group
read: 0040 group write: 0020 group execute: 0010 other
read: 0004 other write: 0002 other execute: 0001 some platforms may not understand these permissions.
Rhino Examples
multith
readed script execution dynamicscopes.java is a program that creates a single global scope object and then shares it across multiple th
reads.
... sharing the global scope allows both information to be shared across th
reads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
... implementing host objects first check out the tutorial if you haven't al
ready.
...the file class - an advanced example file.java extends scriptableobject to provide a means of
reading and writing files from javascript.
Creating JavaScript jstest reftests
you should not add tests of the following type: tests of the jit test of jit correctness belong in the jit-test suite,
read more here.
...when importing test262, the test file's in-file metadata is translated from test262 format to a format
readibly by the jstest harness.
... if you are contributing directly to test262, you must submit the tests in the test262 format, which you can see in the test262 git repository and
read about here.
... writing a new test file please
read the high level advice for test writing in the parent article here.
Functions
an algol-like function may
read the local variables and arguments of its immediate enclosing function from the stack, as if by magic.
... (jscontext::display caches the enclosing function's stack frame.) if that function is also algol-like, its child can
read locals and variables from the next enclosing function, and so on.
...suppose a function
reads some variables from enclosing functions but is not algol-like.
... if the function does not assign to any closed-on vars/args, and it only
reads closed-on local variables and arguments that never change value after the function is created, then the function can be implemented as a flat closure.
Exact Stack Rooting
users of the spidermonkey api will want to
read the gc rooting guide instead.
... storing a gcpointer in a gcthing storing your gcpointer inside of a gcthing that is al
ready in the liveset is the easiest way to keep a gcthing to the liveset.
...by using js::handlet in the interface instead of direct gcpointers, we ensure that the gcthing is al
ready rooted on some previous stack frame, freeing us from having to worry about rooting the gcthing for the duration of the call.
...if you think you do need to do one of these, ask on one of spidermonkey's support forums: maybe we've al
ready solved your problem using a different mechanism.
Tracing JIT
an assembler is the only component of the tracing jit that
reads or writes native code.
... it then imports the set of jsval values from the spidermonkey interpreter that the trace is known to
read or write during its execution.
... the native code of the trace runs, modifying the state structure and native stack, as well as calling native spidermonkey c functions, and
reading from and writing to objects in the spidermonkey heap.
... some other terminology may be helpful when
reading the code: the term guard denotes a condition that is checked by an executing trace to confirm that some assumptions made during recording still hold.
JSPropertyOp
in js_th
readsafe builds, the javascript engine calls this callback only from within an active request on cx.
...this happens when a program sets a property that isn't al
ready an own property of the target object.
... in js_th
readsafe builds, this callback is called with obj locked.
... it is therefore dangerous for the callback to call jsapi functions, particularly if obj may have been visible to more than one th
read.
JS_DefineProperty
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... if obj al
ready has an own property with the given name or id, the existing property is replaced.
... the javascript engine will call the getter or setter callback each time the property is
read or written, whether from javascript code or via jsapi functions like js_getproperty and js_setproperty.
... (exception: if attrs contains the jsprop_
readonly flag, the setter will never be called, as property assignment will fail before it gets that far.
JS_GetGCParameter
syntax uint32_t js_getgcparameter(jsruntime *rt, jsgcparamkey key); void js_setgcparameter(jsruntime *rt, jsgcparamkey key, uint32_t value); uint32_t js_getgcparameterforth
read(jscontext *cx, jsgcparamkey key); // added in spidermonkeysidebar 17 void js_setgcparameterforth
read(jscontext *cx, jsgcparamkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
...jsgc_allocation_threshold_factor_avoid_interrupt is used when a gc is al
ready in progress for other zones and we may wish to avoid interrupting it.
... 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_getgcparameterforth
read js_setgcparameterforth
read 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 ...
Setting up CDT to work on SpiderMonkey
at this point, the indexer starts running and al
ready produces a pretty decent index of much of spidermonkey.
... step 3 - index all the code to let cdt know about the build, it has to invoke make itself (or, as is done in the guide for the whole mozilla codebase on mdn,
read a log of the build), which can be setup with these simple steps: open the project's properties by selecting its root and clicking "properties" in the "file" menu and select "c/c++ build".
... instead, change "build command" to
read make -w (this is required because cdt needs detailed information about which directories make operates on, which using -w causes make to provide).
...for me, that means changing "build directory" to
read ${workspace_loc:/spidermonkey/_dbg.obj}.
Handling Mozilla Security Bugs
for more information
read the rest of this document.
... the bugzilla administrators will technically be in the mozilla security bug group as well, mainly because they al
ready have visibility into all bugzilla data hosted through mozilla.org.
... the criteria for membership in the mozilla security bug group are as follows: the applicant must be trusted by those al
ready in the group.
... however, we will ask all individuals and organizations reporting security bugs through bugzilla to follow the voluntary guidelines below: before making a security bug world-
readable, please provide a few days notice to the mozilla security bug group by sending an email to the private security bug group mailing list.
AT APIs Support
but in the meantime it more up-to-date and contains more details than existed analogues for at-spi and msaa this documentation explains how makers of screen
readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
...if you seriously need to understand msaa, you'll need to
read the docs on msdn and play with the sample apps and code that come with msaa sdk 1.3.
...if you seriously need to understand at-spi, you'll need to
read the docs on gnome.org and play with the available sample apps and code, such as at-poke.
... firebug screen
readers here's a list of screen
readers we are oriented to in the first place.
XPCOM changes in Gecko 2.0
on top of that, with the ongoing work to make firefox multith
readed, content processes either need to register components on a per-process basis, or somehow share a component cache with the chrome process.
...instead of relying on a potentially stale component cache on startup, we
read the application's component registrations out of its manifest file and load those components.
...once that's done, the extensions can then be loaded by simply
reading their manifests, loading their components, and continuing the startup process, all without having to restart the browser.
... electrolysis content processes can simply
read the component registrations during startup.
Finishing the Component
when the component starts up, it populates a list of urls
read in from a file stored next to the gecko binary on the local system.
...the interfaces needed to block certain urls from loading are not frozen, and there is still some debate about how exactly this functionality should be exposed to embedders and component developers, so the apis are not
ready to be published.
...you have al
ready registered as a category to receive startup notification.
...a good place to get an nsiioservice is in the component's observe() method, which al
ready has a pointer to the service manager.
Using XPCOM Utilities to Make Things Easier
« previousnext » this chapter goes back over the code you've al
ready created in the first part of the tutorial (see weblock1.cpp in the previous chapter) and uses xpcom tools that make coding a lot easier and more efficient.
...to avoid these kinds of redundancies, to regulate the way generic code is written, and to save typing, xpcom providesgeneric module macros that expand into the module code you've al
ready seen.
...the four required parts[other-parts] of the structure contain the following information: a human
readable class name the class id (cid) the contract id (an optional but recommended argument) a constructor for the given object static const nsmodulecomponentinfo components[] = { { "pretty class name", cid, contract_id, constructor }, // ...
...for weblock, where the string classes need to be only wrappers around al
ready existing string data, trading advanced functionality for a much smaller footprint is the right way to go.
nsCString
constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
... void nscstring(char) - source parameters char c void nscstring(const char*, pruint32) - source parameters char* data pruint32 length void nscstring(const nscstring&) - source parameters nscstring& str void nscstring(const nscsubstringtuple&) - source parameters nscsubstringtuple& tuple void nscstring(const nsacstring_internal&) - source parameters nsacstring_internal&
readable operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*) - source parameters char* data nsacstring_internal& operator=(const nsacstring_internal&) - source parameters nsacstring_internal& str nsacstring_internal& operator=(const ...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsFixedCString
constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
... methods constructors void nsfixedcstring(char*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string al
ready contained in the buffer parameters char* data pruint32 storagesize void nsfixedcstring(char*, pruint32, pruint32) - source parameters char* data pruint32 storagesize pruint32 length operator= nscstring& operator=(const nscstring&) - source parameters nscstring& str nsacstring_internal& operator=(char) - source parameters char c nsacstring_internal& operator=(const char*...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsFixedString
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
... methods constructors void nsfixedstring(prunichar*, pruint32) - source @param data fixed-size buffer to be used by the string (the contents of this buffer may be modified by the string) @param storagesize the size of the fixed buffer @param length (optional) the length of the string al
ready contained in the buffer parameters prunichar* data pruint32 storagesize void nsfixedstring(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 storagesize pruint32 length operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& op...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsString
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...string(prunichar) - source parameters prunichar c void nsstring(const prunichar*, pruint32) - source parameters prunichar* data pruint32 length void nsstring(const nsstring&) - source parameters nsstring& str void nsstring(const nssubstringtuple&) - source parameters nssubstringtuple& tuple void nsstring(const nsastring_internal&) - source parameters nsastring_internal&
readable operator= nsstring& operator=(const nsstring&) - source parameters nsstring& str nsastring_internal& operator=(prunichar) - source parameters prunichar c nsastring_internal& operator=(const prunichar*) - source parameters prunichar* data nsastring_internal& operator=(const nsastring_internal&) - source parameters nsastring_internal& str nsastring_internal& opera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
mozIStorageError
the mozistorageerror interface represents errors returned by the storage api, offering attributes to obtain the error code as well as a human-
readable error message corresponding to the error that occurred.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports attributes attribute type description message autf8string a human
readable error string with details; this may be null if no details are available.
...
read only.
...
readonly 8 attempted to write to a
read-only database.
mozIStorageFunction
there are a number of al
ready defined functions provided by sqlite.
... note this callback is executed on the th
read that the statement or trigger is executing on.
... if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different th
read from the rest of your code.
... likewise, if you execute sql on a different th
read, this callback will be executed on that th
read.
nsIAccessibleRelation
read only.
...
read only.
... note: the label and description (see relation_described_by) relations may be used to prevent redundant information from being presented by the screen
reader, since the label and description can occur both on their own, and in the name or description fields of an nsiaccessible.
... note: the label (see relation_labelled_by) and description relations may be used to prevent redundant information from being presented by the screen
reader, since the label and description can occur both on their own, and in the name or description fields of an nsiaccessible.
nsIAnnotationService
to use this service, use: var annotationservice = components.classes["@mozilla.org/browser/annotation-service;1"] .getservice(components.interfaces.nsiannotationservice); note: the annotation service is not th
read-safe.
... you should only use it from the main th
read.
...if the destination al
ready has an annotation with the same name as one on the source, it will be overwritten if aoverwritedest is set.
...if the destination al
ready has an annotation with the same name as one on the source, it will be overwritten if aoverwritedest is set.
nsIAsyncStreamCopier
atarget specifies the th
read on which the copy will occur.
... a null value is permitted and causes the copy to occur on an unspecified background th
read.
... asourcebuffered true if asource implements nsiinputstream.
readsegments().
...achunksize specifies how many bytes to
read and write at a time.
nsIBrowserSearchService
read only.
...
read only.
... init() initialize the service, or if the service is al
ready initialized, do nothing.
... void init( [optional] in nsibrowsersearchinitobserver observer ); parameters observer if specified, a callback called once initialization is complete, or immediately, if the service has al
ready been initialized.
nsIComponentRegistrar
this method may only be called from the main th
read.
...this method may only be called from the main th
read.
...this value is intended as a human-
readable name for the class and need not be globally unique.
...this value is intended as a human-
readable name for the class and need not be globally unique.
nsIContentViewer
read only.
... istabmodalpromptallowed boolean
read only.
... prescontext nsprescontextptr
read only.
... presshell nsipresshellptr
read only.
nsIDBChangeListener
does nothing): var mylistener = { onhdrflagschanged: function(ahdrchanged, aoldflags, anewflags, ainstigator) {}, onhdrdeleted: function(ahdrchanged, aparentkey, aflags, ainstigator) {}, onhdradded: function(ahdrchanged, aparentkey, aflags, ainstigator) {}, onparentchanged: function(akeychanged, oldparent, newparent, ainstigator) {}, onannouncergoingaway: function(ainstigator) {}, on
readchanged: function(ainstigator) {}, onjunkscorechanged: function(ainstigator) {}, onhdrpropertychanged: function(ahdrtochange, aprechange, astatus, ainstigator) {}, onevent: function(adb, aevent) {}, queryinterface: function(aiid) { if (!aiid.equals(components.interfaces.nsidbchangelistener) && !aiid.equals(components.interfaces.nsisupports)) throw components.results.ns_e...
...flags, in nsidbchangelistener ainstigator); void onhdradded(in nsimsgdbhdr ahdrchanged, in nsmsgkey aparentkey, in long aflags, in nsidbchangelistener ainstigator); void onparentchanged(in nsmsgkey akeychanged, in nsmsgkey oldparent, in nsmsgkey newparent, in nsidbchangelistener ainstigator); void onannouncergoingaway(in nsidbchangeannouncer instigator); void on
readchanged(in nsidbchangelistener ainstigator); void onjunkscorechanged(in nsidbchangelistener ainstigator); void onhdrpropertychanged(in nsimsgdbhdr ahdrtochange, in unsigned long aoldflags, in prbool aprechange, inout pruint32 astatus, in nsidbchangelistener ainstigator); void onevent(in nsimsgdatabase adb, in string aevent); methods onhdrflagschanged() called wh...
... on
readchanged() called when the
read state of news messages changes.
... void on
readchanged(in nsidbchangelistener ainstigator); parameters ainstigator the caller who changed the
read state.
nsIDOMGeoPosition
read only.
...
read only.
... timestamp domtimestamp the time at which the
reading was taken.
...
read only.
nsIDOMProgressEvent
read only.
...
read only.
...
read only.
... loadedarg the number of bytes al
ready transferred.
nsIFilePicker
exceptions thrown ns_error_failure if you try to
read this attribute.
...
read only.
...
read only.
...
read only.
nsIGeolocationProvider
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) this must be called on the main th
read interface provides location information to the nsgeolocator via the nsidomgeolocationcallback interface.
...method overview boolean is
ready(); obsolete since gecko 1.9.2 void shutdown(); void startup(); void watch(in nsigeolocationupdate callback); methods is
ready() obsolete since gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) reports whether or not the device is
ready and has a position.
... boolean is
ready(); parameters none.
... return value true if the device is
ready and has a position available to return; otherwise false.
nsIJSID
method overview boolean equals(in nsijsid other); const nsid* getid(); violates the xpcom interface guidelines void initialize(in string idstring); string tostring(); attributes attribute type description id nsidptr
read only.
... name string
read only.
... number string
read only.
... valid boolean
read only.
nsIJumpListBuilder
read only.
...indicates if a commit has al
ready occurred in this session.
...
read only.
...
read only.
nsIMimeConverter
encoderdestroy() marks this header as
read.
... thunderbird provides a utility function which performs this for the currently selected message: markcurrentmessageas
read().
... void mark
read(in boolean
read); parameters
read if true, mark as
read.
... if false mark as und
read.
nsIMsgFilterCustomAction
* recommended form: extensionname@example.com#actionname */
readonly attribute acstring id; /* action name to display in action list.
...*/
readonly attribute astring name; /** * is this custom action valid for a particular filter type?
... */
readonly attribute boolean isasync; /// does this action need the message body?
...
readonly attribute boolean needsbody; }; ...
nsINetworkLinkService
for example, the link is down during dhcp configuration (unless there is another usable interface al
ready configured).
...
read only.
...
read only.
...
read only.
nsIPrefService
inherits from: nsisupports last changed in gecko 1.7 method overview nsiprefbranch getbranch(in string aprefroot); nsiprefbranch getdefaultbranch(in string aprefroot); void
readuserprefs(in nsifile afile); void resetprefs(); void resetuserprefs(); void savepreffile(in nsifile afile); methods getbranch() call to get a preferences "branch" which accesses user preference data.
...
readuserprefs() called to
read in the preferences specified in a user preference file.
... note: if nsnull is passed in for the afile parameter the default preferences file(s) [prefs.js, user.js] will be
read and processed.
... void
readuserprefs( in nsifile afile ); parameters afile the file to be
read.
nsIProtocolHandler
read only.
...
read only.
...
read only.
...typically, this flag is used by protocols that show highly untrusted content in a viewing area that the user expects to have a lot of control over, such as an email
reader.
nsIRequest
read only.
...
read only.
... validate_once_per_session 1 << 13 disables validation of expired content, provided it has al
ready been validated (at least once) since the start of this session.
... note: some implementations are unable to immediately suspend, and may continue to deliver events al
ready posted to an event queue.
nsISHistory
read only.
...
read only.
...
read only.
...
read only.
nsIServerSocket
read only.
...the listener's onsocketaccepted() method will be called on the same th
read that called asynclisten() (the calling th
read must have an nsieventtarget).
... the listener will be passed a reference to an al
ready connected socket transport (nsisockettransport).
...this does not affect al
ready connected client sockets (i.e., the nsisockettransport instances created from this server socket).
nsITaskbarPreviewController
read only.
...
read only.
...
read only.
... note: although these attributes are
read only, that indicates that the previews controlled by an nsitaskbarpreviewcontroller cannot alter these values.
nsITextInputProcessor
read only.
...this means that the clause is al
ready converted.
...this means that the clause is al
ready converted and is selected to convert.
... if the instance has a composition al
ready, this throws an exception.
nsITimer
xpcom/th
reads/nsitimer.idlscriptable please add a summary to this article.
...
read only.
...
read only.
... note: re-setting the delay on a one-shot timer that has al
ready fired doesn't restart the timer.
nsIToolkit
inherits from: nsisupports last changed in gecko 1.0 method overview void init(in prth
read ath
read); methods init() initialize this toolkit with ath
read.
... void init( in prth
read ath
read ); parameters ath
read the th
read passed in runs the message pump.
... null can be passed in, in which case a new th
read gets created and a message pump will run in that th
read.
... see also prth
read ...
nsIURI
read only.
...
read only.
...
read only.
...
read only.
nsIUploadChannel
read only.
...most implementations of this interface require that the stream: implement th
readsafe addref and release implement nsiinputstream.
readsegments() implement nsiseekablestream.seek().
... history here is that we need to support both streams that al
ready have headers (for example, content-type and content-length) information prepended to the stream (by plugins) as well as clients (composer, uploading application) that want to upload data streams without any knowledge of protocol specifications.
...acontenttype if acontenttype is empty, the protocol will assume that no content headers are to be added to the uploaded stream and that any required headers are al
ready encoded in the stream.
nsIUserInfo
attributes attribute type description linux mac osx os/2 windows domain string
read only.
... emailaddress string
read only.
... fullname wstring
read only.
... username string
read only.
nsIWorkerGlobalScope
dom/interfaces/th
reads/nsidomworkers.idlscriptable this interface is an abstract interface representing the 'inside' of a worker.
... 1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) attributes attribute type description location nsiworkerlocation
read only.
... navigator nsiworkernavigator
read only.
...
read only.
nsIWorkerMessageEvent
dom/interfaces/th
reads/nsidomworkers.idlscriptable this interface represents an event in a web worker th
read's event queue.
...
read only.
...
read only.
...
read only.
nsIXULTemplateQueryProcessor
a b
readth-first search of the first action is performed to find this element.
...only fatal errors should be thrown, or ns_error_unexpected if generateresults() has al
ready been called.
... exceptions thrown ns_error_unexpected if generateresults() has al
ready been called.
...ns_error_unexpected if generateresults() has al
ready been called.
XPCOM Interface Reference
nsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfile
readernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidom...
...fieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgmessageservicensimsgprotocolinfonsimsgruleactionnsimsgsearchcustomtermnsimsgsearchnotifynsimsgsearchscopetermnsimsgsearchsessionnsimsgsearchtermnsimsgsearchvaluensimsgsendlaternsimsgth
readnsimsgwindownsimsgwindowcommandsnsimutablearraynsinavbookmarkobservernsinavbookmarksservicensinavhistorybatchcallbacknsinavhistorycontainerresultnodensinavhistoryfullvisitresultnodensinavhistoryobservernsinavhistoryquerynsinavhistoryqueryoptionsnsinavhistoryqueryresultnodensinavhistoryresultnsinavhistoryresultnodensinavhistoryresultobservernsinavhistoryresulttreeviewernsinavhistoryresultviewobserv...
...ortspruint64nsisupportsprimitivensisupportsprioritynsisupportsstringnsisupportsvoidnsisupportsweakreferencensisyncjpakensisyncmessagesendernsitxttohtmlconvnsitaggingservicensitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsitaskbarwindowpreviewnsitelemetrynsitextinputprocessornsitextinputprocessorcallbacknsitextinputprocessornotificationnsith
readnsith
readeventfilternsith
readinternalnsith
readmanagernsith
readobservernsith
readpoolnsith
readpoollistenernsitimernsitimercallbacknsitoolkitnsitoolkitprofilensitoolkitprofileservicensitraceablechannelnsitransactionnsitransactionlistnsitransactionlistenernsitransactionmanagernsitransferablensitransportnsitransporteventsinknsitransportsecurityinfonsitreeboxobjectnsitreecolumnnsitreecolumnsnsitreeconte...
...nsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizip
readernsizip
readercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypevaluensmsgsearchvaluensmsgsearchwidgetvaluenspipromptservice see also interfaces grouped by function ...
nsMsgMessageFlags
constants name value description
read 0x00000001 indicates whether or not the message is
read.
... elided 0x00000020 indicates whether or not the th
read rooted at this message is open or closed in the ui.
... watched 0x00000100 indicates whether or not this th
read is being watched.
... ignored 0x00040000 indicates whether or not the (sub-)th
read has been ignored.
XPCOM reference
for example to mark a message
read, you would call:nsmsgviewflagstypethe nsmsgviewflagstype interface contains constants used for view flags in thunderbird.
...for example, the 'un
read only' view would use the flag:nsmsgviewsortorderthe nsmsgviewsortorder interface contains constants used for sort direction in thunderbird.
...for example to sort by date you would pass a function the value:nsmsgviewsorttypethe nsmsgviewsorttype interface contains constants used for sorting the thunderbird th
readpane.
...for example, to request the 'show all th
reads' view use the constant:nsstaticmoduleinfothis data structure is used by ns_initxpcom3 to specify static xpcom modules.standard xpcom componentsthere are a number of components provided in the standard implementation of xpcom; these are as follows.xpcom glue classesthese "glue" classes are provided to make it easier to use xpcom from c++ code.xpcom interface referencethis is a reference to the xpcom interfaces provided by the mozilla platform.xpcom ...
Using the clipboard
for
reading from the clipboard you can call the init method of the transferable with null as nsiloadcontext, but you have to call it.
... // import the services module for future use, if we're not in // a browser window where it's al
ready loaded.
...the transferable object will hold all of the data that you want until you're
ready to put it on the clipboard.
...call setdata only when you're
ready to copy to the system clipboard.
Creating a gloda message query
query.
read(true/false): add the constraint that the message must be (or not be) marked as
read.
... let mylistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function mylistener_onitemsadded(aitems, acollection) { }, /* called when items that are al
ready in our collection get re-indexed */ onitemsmodified: function mylistener_onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function mylistener_onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function mylistener_onquerycompleted(acollection)...
...
read: a boolean indicating whether this message is
read or not.
... want a glodamessage when you al
ready have an nsimsgdbhdr?
Creating a Custom Column
if you are unfamiliar with the setup and creation of an extension please
read building a thunderbird extension.
...looking in messenger.xul reveals that the columns reside inside a tree with the id "th
readtree" whose columns (treecols) reside in "th
readcols".
... our replyto_col_overlay.xul should now contain something similar to this: <?xml version="1.0"?> <overlay id="sample" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <tree id="th
readtree"> <treecols id="th
readcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unth
readed" flex="2" label="reply-to" tooltiptext="click to sort by the reply-to header" /> </treecols> </tree> <!-- include our javascript file --> <script type="text/javascript" src="chrome://replyto_col/content/rep...
...our new column exists and is
ready to be used.
Standard OS Libraries
they are al
ready available on the operating system for you.
... windowy.address(), mask.address() ); xclosedisplay(display); components.utils.reporterror(rootx.value + "," + rooty.value); x11.close(); resources for x11 extended window manager hints githubgists :: noitidart / search · x11 - x11 js-ctypes snippets that can be copied and pasted to scratchpad xcb all the above methods, gdk, gtk, and x11/xlib are meant to be used on the main th
read.
... if you would like to do stuff off of the main th
read, in chromeworker's, then you should use xcb.
... xcb is th
read safe.
Accessibility Inspector - Firefox Developer Tools
assistive technologies like screen
readers use this information to find out what's on a web page, tell their users what's there, and enable them to interact with the page.
... accessing the accessibility inspector when you first open any of the other developer tools, the accessibility features are turned off (unless you've al
ready got them turned on in another browser tab, or got the firefox accessibility engine started al
ready, e.g., you might be a screen
reader user or tester).
... color contrast contrast ratio information is particularly useful when you are designing the color palette for your website because if the contrast is not sufficient,
readers with visual impairments such as low vision or color blindness will be unable to
read the text.
... for example: the color contrast in the image above is 2.86, so potentially not enough contrast to make it easy to
read.
Debugger.Source - Firefox Developer Tools
although the main script of a worker th
read is introduced by a call to worker or sharedworker, these accessors always return undefined on such script’s sources.
... a worker’s main script source and the call that created the worker are always in separate th
reads, but debugger is an inherently single-th
readed facility: its debuggees must all run in the same th
read.
... since the global that created the worker is in a different th
read, it is guaranteed not to be a debuggee of the debugger instance that owns this source; and thus the creating call is never “in debuggee code”.
... relating a worker to its creator, and other multi-th
readed debugging concerns, are out of scope for debugger.
Debugger - Firefox Developer Tools
it is an accessor property with a getter and setter: assigning to it enables or disables this debugger instance;
reading it produces true if the instance is enabled, or false otherwise.
... handler functions run in the same th
read in which the event occurred.
...if the designated global is al
ready a debuggee, this has no effect.
... getnewestframe() return a debugger.frame instance referring to the youngest visible frame currently on the calling th
read’s stack, or null if there are no visible frames on the stack.
Animation.updatePlaybackRate() - Web APIs
in some cases, an animation may run on a separate th
read or process and will continue updating even while long-running javascript delays the main th
read.
... in such a case, setting the playbackrate on the animation directly may cause the animation's playback position to jump since its playback position on the main th
read may have drifted from the playback position where it is currently running.
...it will be updated once the animation's
ready promise is resolved.
... examples a speed selector component would benefit from smooth updating of updateplaybackrate(), as demonstrated below: speedselector.addeventlistener('input', evt => { cartoon.updateplaybackrate(parsefloat(evt.target.value)); cartoon.
ready.then(() => { console.log(`playback rate set to ${cartoon.playbackrate}`); }); }); specifications specification status comment web animationsthe definition of 'updateplaybackrate()' in that specification.
AudioBuffer - Web APIs
properties audiobuffer.samplerate
read only returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
... audiobuffer.length
read only returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
... audiobuffer.duration
read only returns a double representing the duration, in seconds, of the pcm data stored in the buffer.
... audiobuffer.numberofchannels
read only returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
AudioWorkletGlobalScope - Web APIs
properties currentframe
read only returns an integer that represents the ever-increasing current sample-frame of the audio block being processed.
... currenttime
read only returns a double that represents the ever-increasing context time of the audio block being processed.
... samplerate
read only returns a float that represents the sample rate of the associated baseaudiocontext.
...// test-processor.js class testprocessor extends audioworkletprocessor { constructor () { super() // current sample-frame and time at the moment of instantiation // to see values change, you can put these two lines in process method console.log(currentframe) console.log(currenttime) } // the process method is required - simply output silence, // which the outputs are al
ready filled with process (inputs, outputs, parameters) { return true } } // the sample rate is not going to change ever, // because it's a
read-only property of a baseaudiocontext // and is set only during its instantiation console.log(samplerate) // you can declare any variables and use them in your processors // for example it may be an arraybuffer with a wavetable const usefulvariable = ...
AudioWorkletProcessor.process - Web APIs
the method is called synchronously from the audio rendering th
read, once for each block of audio (also known as a rendering quantum) being directed through the processor's corresponding audioworkletnode.
... in other words, every time a new block of audio is
ready for your processor to manipulate, your process() function is invoked to do so.
...however, plans are al
ready in place to revise the specification to allow the size of the audio blocks to be changed depending on circumstances (for example, if the audio hardware or cpu utilization is more efficient with larger block sizes).
...parameters['customgain'][i] : parameters['customgain'][0]) } }) // as this is a source node which generates its own output, // we return true so it won't accidentally get garbage-collected // if we don't have any references to it in the main th
read return true } // define the customgain parameter used in process method static get parameterdescriptors () { return [{ name: 'customgain', defaultvalue: 1, minvalue: 0, maxvalue: 1, automationrate: 'a-rate' }] } } specifications specification status comment web audio apithe definition of 'process()' in that specification...
AuthenticatorAssertionResponse - Web APIs
properties authenticatorassertionresponse.clientdatajson secure context
read only the client data for the authentication, such as origin and challenge.
... authenticatorassertionresponse.authenticatordata secure context
read only an arraybuffer containing information from the authenticator such as the relying party id hash (rpidhash), a signature counter, test of user presence and user verification flags, and any extensions processed by the authenticator.
... authenticatorassertionresponse.signature secure context
read only an assertion signature over authenticatorassertionresponse.authenticatordata and authenticatorresponse.clientdatajson.
... authenticatorassertionresponse.userhandle secure context
read only an arraybuffer containing an opaque user identifier.
BatteryManager - Web APIs
properties batterymanager.charging
read only a boolean value indicating whether or not the battery is currently being charged.
... batterymanager.chargingtime
read only a number representing the remaining time in seconds until the battery is fully charged, or 0 if the battery is al
ready fully charged.
... batterymanager.dischargingtime
read only a number representing the remaining time in seconds until the battery is completely discharged and the system will suspend.
... batterymanager.level
read only a number representing the system's battery charge level scaled to a value between 0.0 and 1.0.
BluetoothRemoteGATTService - Web APIs
interface interface bluetoothremotegattservice : serviceeventhandlers {
readonly attribute uuid uuid;
readonly attribute boolean isprimary;
readonly attribute bluetoothdevice device; promise<bluetoothgattcharacteristic> getcharacteristic(bluetoothcharacteristicuuid characteristic); promise<sequence<bluetoothgattcharacteristic>> getcharacteristics(optional bluetoothcharacteristicuuid characteristic); promise<bluetoothgattservice> getincludedservice(bluetoothserviceuuid service); promise<sequence<bluetoothgattservice>> getincludedservices(optional bluetoothserviceu...
...uid service); }; properties bluetoothremotegattservice.device
read only returns information about a bluetooth device through an instance of bluetoothdevice.
... bluetoothremotegattservice.isprimary
read only returns a boolean indicating whether this is a primary or secondary service.
... bluetoothremotegattservice.uuid
read only returns a domstring representing the uuid of this service.
Body.body - Web APIs
the body
read-only property of the body mixin is a simple getter used to expose a
readablestream of the body contents.
... syntax var stream = response.body; value a
readablestream.
... example in our simple stream pump example we fetch an image, expose the response's stream using response.body, create a
reader using
readablestream.get
reader(), then enqueue that stream's chunks into a second, custom
readable stream — effectively creating an identical copy of the image.
... const image = document.getelementbyid('target'); // fetch the original image fetch('./tortoise.png') // retrieve its body as
readablestream .then(response => response.body) .then(body => { const
reader = body.get
reader(); return new
readablestream({ start(controller) { return pump(); function pump() { return
reader.
read().then(({ done, value }) => { // when no more data needs to be consumed, close the stream if (done) { controller.close(); return; } // enqueue the next data chunk into our target stream controller.enqueue(value); return pump(); }); } } }) }) .then(stream => new response(stream)) .then(response => response.blob()) .then(blob => url.createobjec...
CSSStyleSheet - Web APIs
cssrules
read only returns a live cssrulelist which maintains an up-to-date list of the cssrule objects that comprise the stylesheet.
... ownerrule
read only if this stylesheet is imported into the document using an @import rule, the ownerrule property returns the corresponding cssimportrule; otherwise, this property's value is null.
... rules
read only the rules property is functionally identical to the standard cssrules property; it returns a live cssrulelist which maintains an up-to-date list of all of the rules in the style sheet.
...as the stylesheet list cannot be modified directly, there's no useful way to create a new cssstylesheet object manually (although constructable stylesheet objects is coming to the web platform soon and is al
ready supported in blink).
CloseEvent - Web APIs
closeevent.code
read only returns an unsigned short containing the close code sent by the server.
... closeevent.reason
read only returns a domstring indicating the reason the server closed the connection.
... closeevent.wasclean
read only returns a boolean that indicates whether or not the connection was cleanly closed.
...if the event has al
ready being dispatched, this method does nothing.
DOMPoint.fromPoint() - Web APIs
the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompoint
readonly.
... although this interface is based on dompoint
readonly, it is not
read-only; the properties within may be changed at will.
... syntax var point = dompoint.frompoint(sourcepoint); properties sourcepoint a dompointinit-compliant object, which includes both dompoint and dompoint
readonly, from which to take the values of the new point's properties.
... examples creating a mutable point from a
read-only point if you have a dompoint
readonly object, you can easily create a mutable copy of that point: var mutablepoint = dompoint.frompoint(
readonlypoint); creating a 2d point this sample creates a 2d point, specifying an inline object that includes the values to use for x and y.
DOMPointInit - Web APIs
the dompointinit dictionary is used to provide the values of the coordinates and perspective when creating and jsonifying a dompoint or dompoint
readonly object.
... it's used as an input parameter to the dompoint/dompoint
readonly method frompoint().
...this same code will work to create a dompoint
readonly object; just change the interface name in the code.
... const pointdesc = { x: window.screenx, y: window.screeny, z: 5.0 }; const windtopleft = dompoint.frompoint(pointdesc) specifications specification status comment geometry interfaces module level 1the definition of 'dompoint
readonly.frompoint()' in that specification.
DeviceMotionEvent - Web APIs
properties devicemotionevent.acceleration
read only an object giving the acceleration of the device on the three axis x, y and z.
... devicemotionevent.accelerationincludinggravity
read only an object giving the acceleration of the device on the three axis x, y and z with the effect of gravity.
... devicemotionevent.rotationrate
read only an object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
... devicemotionevent.interval
read only a number representing the interval of time, in milliseconds, at which data is obtained from the device.
DocumentFragment - Web APIs
parentnode.children
read only returns a live htmlcollection containing all objects of type element that are children of the documentfragment object.
... parentnode.firstelementchild
read only returns the element that is the first child of the documentfragment object, or null if there is none.
... parentnode.lastelementchild
read only returns the element that is the last child of the documentfragment object, or null if there is none.
... parentnode.childelementcount
read only returns an unsigned long giving the amount of children that the documentfragment has.
DocumentOrShadowRoot - Web APIs
properties documentorshadowroot.activeelement
read only returns the element within the shadow tree that has focus.
... documentorshadowroot.fullscreenelement
read only returns the element that's currently in full screen mode for this document.
... documentorshadowroot.pointerlockelement
read only returns the element set as the target for mouse events while the pointer is locked.
... documentorshadowroot.stylesheets
read only returns a stylesheetlist of cssstylesheet objects for stylesheets explicitly linked into, or embedded in a document.
Element.scrollHeight - Web APIs
the element.scrollheight
read-only property is a measurement of the height of an element's content, including content not visible on the screen due to overflow.
... - element.scrolltop === element.clientheight when the container does not scroll, but has overflowing children, these checks determine if the container can scroll: window.getcomputedstyle(element).overflowy === 'visible' window.getcomputedstyle(element).overflowy !== 'hidden' scrollheight demo associated with the onscroll event, this equivalence can be useful to determine whether a user has
read a text or not (see also the element.scrolltop and element.clientheight properties).
.../> <label for="agree">i agree</label> <input type="submit" id="nextstep" value="next" /> </p> </form> css #notice { display: inline-block; margin-bottom: 12px; border-radius: 5px; width: 600px; padding: 5px; border: 2px #7fdf55 solid; } #rules { width: 600px; height: 130px; padding: 5px; border: #2a9f00 solid 2px; border-radius: 5px; } javascript function check
reading () { if (check
reading.
read) { return; } check
reading.
read = this.scrollheight - this.scrolltop === this.clientheight; document.registration.accept.disabled = document.getelementbyid("nextstep").disabled = !check
reading.
read; check
reading.noticebox.innerhtml = check
reading.
read ?
... "thank you." : "please, scroll and
read the following text."; } onload = function () { var otobe
read = document.getelementbyid("rules"); check
reading.noticebox = document.createelement("span"); document.registration.accept.checked = false; check
reading.noticebox.id = "notice"; otobe
read.parentnode.insertbefore(check
reading.noticebox, otobe
read); otobe
read.parentnode.insertbefore(document.createelement("br"), otobe
read); otobe
read.onscroll = check
reading; check
reading.call(otobe
read); } specifications specification status comment css object model (cssom) view modulethe definition of 'element.scrollheight' in that specification.
EventTarget.addEventListener() - Web APIs
simply because by the time the event listener would execute, the scope in which it was defined would have al
ready finished executing.
...ure (will be ignored) */) { var self=this; var wrapper=function(e) { e.target=e.srcelement; e.currenttarget=self; if (typeof listener.handleevent != 'undefined') { listener.handleevent(e); } else { listener.call(self,e); } }; if (type=="domcontentloaded") { var wrapper2=function(e) { if (document.
readystate=="complete") { wrapper(e); } }; document.attachevent("on
readystatechange",wrapper2); eventlisteners.push({object:this,type:type,listener:listener,wrapper:wrapper2}); if (document.
readystate=="complete") { var e=new event(); e.srcelement=window; wrapper2(e); } } else { this.attachevent(...
... } }; var removeeventlistener=function(type,listener /*, usecapture (will be ignored) */) { var counter=0; while (counter<eventlisteners.length) { var eventlistener=eventlisteners[counter]; if (eventlistener.object==this && eventlistener.type==type && eventlistener.listener==listener) { if (type=="domcontentloaded") { this.detachevent("on
readystatechange",eventlistener.wrapper); } else { this.detachevent("on"+type,eventlistener.wrapper); } eventlisteners.splice(counter, 1); break; } ++counter; } }; element.prototype.addeventlistener=addeventlistener; element.prototype.removeeventlistener=removeeventlistener; if (htmldocument) { htmldocument...
...however, this introduces the potential for event listeners handling certain touch events (among others) to block the browser's main th
read while it is attempting to handle scrolling, resulting in possibly enormous reduction in performance during scroll handling.
FileException - Web APIs
when errors occur, forward them to the main app using postmessage() as in the following: function onerror(e) { postmessage('error:' + e.tostring()); } try { //error is thrown if "log.txt" al
ready exists.
...for example, the state that was cached in an interface object has changed since it was last
read from disk.
... not_
readable_err 4 the file or directory cannot be
read, typically due to permission problems that occur after a reference to a file has been acquired (for example, the file or directory is concurrently locked by another application).
... path_exists_err 12 the file or directory with the same path al
ready exists.
FileSystemFileEntry.file() - Web APIs
the filesystemfileentry interface's method file() returns a file object which can be used to
read data from the file represented by the directory entry.
... example this example establishes a method,
readfile(),
reads a text file and calls a specified callback function with the received text (in a string object) once the
read is completed.
... function
readfile(entry, successcallback, errorcallback) { entry.file(function(file) { let
reader = new file
reader();
reader.onload = function() { successcallback(
reader.result); };
reader.onerror = function() { errorcallback(
reader.error); }
reader.
readastext(file); }, errorcallback); } this function calls file(), specifying as its success callback a method which proceeds to use a file
reader to
read the file as text.
... the file
reader's load event handler is set up to deliver the loaded string to the successcallback specified when the
readfile() method was called; similarly, its error handler is set up to call the errorcallback specified.
HTMLMediaElement.load() - Web APIs
appropriate events will be sent to the media element itself as the load process proceeds: if the element is al
ready in the process of loading media, that load process is aborted and the abort event is sent.
... if the element has al
ready been initialized with media, the emptied event is sent.
... if resetting the playback position to the beginning of the media actually changes the playback position (that is, it was not al
ready at the beginning), a timeupdate event is sent.
... once media has been selected and loading is
ready to begin, the loadstart event is delivered.
HTMLTableRowElement - Web APIs
htmltablerowelement.cells
read only returns a live htmlcollection containing the cells in the row.
... htmltablerowelement.rowindex
read only returns a long value which gives the logical position of the row within the entire table.
... htmltablerowelement.sectionrowindex
read only returns a long value which gives the logical position of the row within the table section it belongs to.
... obsolete the cells, rowindex, and selectionrowindex properties are now
read-only.
Headers.append() - Web APIs
the append() method of the headers interface appends a new value onto an existing header inside a headers object, or adds the header if it does not al
ready exist.
... the difference between set() and append() is that if the specified header al
ready exists and accepts multiple values, set() will overwrite the existing value with the new one, whereas append() will append the new value onto the end of the set of values.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using append(): myheaders.append('content-type', 'image/jpeg'); myheaders.get('content-type'); // returns 'image/jpeg' if the specified header al
ready exists, append() will change its value to the specified value.
... if the specified header al
ready exists and accepts multiple values, append() will append the new value to the end of the value set: myheaders.append('accept-encoding', 'deflate'); myheaders.append('accept-encoding', 'gzip'); myheaders.get('accept-encoding'); // returns 'deflate, gzip' to overwrite the old value with a new one, use headers.set.
Headers.set() - Web APIs
the set() method of the headers interface sets a new value for an existing header inside a headers object, or adds the header if it does not al
ready exist.
... the difference between set() and headers.append is that if the specified header al
ready exists and accepts multiple values, set() overwrites the existing value with the new one, whereas headers.append appends the new value to the end of the set of values.
... example creating an empty headers object is simple: var myheaders = new headers(); // currently empty you could add a header to this using headers.append, then set a new value for this header using set(): myheaders.append('content-type', 'image/jpeg'); myheaders.set('content-type', 'text/html'); if the specified header does not al
ready exist, set() will create it and set its value to the specified value.
... if the specified header does al
ready exist and does accept multiple values, set() will overwrite the existing value with the new one: myheaders.set('accept-encoding', 'deflate'); myheaders.set('accept-encoding', 'gzip'); myheaders.get('accept-encoding'); // returns 'gzip' you'd need headers.append to append the new value onto the values, not overwrite it.
Headers - Web APIs
note: you can find more out about the available headers by
reading our http headers reference.
... methods headers.append() appends a new value onto an existing header inside a headers object, or adds the header if it does not al
ready exist.
... headers.set() sets a new value for an existing header inside a headers object, or adds the header if it does not al
ready exist.
... note: to be clear, the difference between headers.set() and headers.append() is that if the specified header does al
ready exist and does accept multiple values, headers.set() will overwrite the existing value with the new one, whereas headers.append() will append the new value onto the end of the set of values.
IDBMutableFile - Web APIs
summary the idbmutablefile interface provides access in
read or write mode to a file, dealing with all the necessary locks.
... properties mutablefile.name
read only the name of the handled file.
... mutablefile.type
read only the mime type of the handled file.
... methods mutablefile.open() returns a lockedfile object to
read or write the associated file safely.
IDBObjectStore.clear() - Web APIs
the clear() method of the idbobjectstore interface creates and immediately returns an idbrequest object, and clears this object store in a separate th
read.
... exceptions this method may raise a domexception of one of the following types: exception description
readonlyerror the transaction associated with this operation is in
read-only mode.
... example in the following code snippet, we open a
read/write transaction on our database and clear all the current data out of the object store using clear().
... // this is used a lot below db = dbopenrequest.result; // clear all the data form the object store cleardata(); }; function cleardata() { // open a
read/write db transaction,
ready for clearing the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due...
IDBObjectStore.delete() - Web APIs
the delete() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, deletes the specified record or records.
...
readonlyerror the object store's transaction mode is
read-only.
... example in the following code snippet, we open a
read/write transaction on our database and delete one specific record out of our object store using delete() — a sample record with the key "walk dog".
...this is used a lot below db = dbopenrequest.result; // run the deletedata() function to delete a record from the database deletedata(); }; function deletedata() { // open a
read/write db transaction,
ready for deleting the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due...
IDBRequest.error - Web APIs
the error
read-only property of the idbrequest interface returns the error in the event of an unsuccessful request.
...you get this error, for example, if you try to add a new key that al
ready exists in the record.
... versionerror if you try to open a database with a version lower than the one it al
ready has.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "
readwrite").objectstore('todolist'); // get the do-do list with the specified title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another request that inserts...
IDBTransaction.oncomplete - Web APIs
previously in a
readwrite transaction idbtransaction.oncomplete was fired only when all data was guaranteed to have been flushed to disk.
...you're storing critical data that cannot be recomputed later) you can force a transaction to flush to disk before delivering the complete event by creating a transaction using the experimental (non-standard)
readwriteflush mode (see idbdatabase.transaction.) this is currently experimental, and can only be used if the dom.indexeddb.experimental pref is set to true in about:config.
...}; example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
InputEvent - Web APIs
inputevent.data
read only returns a domstring with the inserted characters.
... inputevent.datatransfer
read only returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editable content.
... inputevent.inputtype
read only returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.
... inputevent.iscomposing
read only returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
Timing element visibility with the Intersection Observer API - Web APIs
since it's theoretically possible to get called multiple times, we only proceed if we haven't al
ready paused the timers and saved the visibility states of the existing ads.
... function loadrandomad(replacebox) { let ads = [ { bgcolor: "#cec", title: "eat green beans", body: "make your mother proud—they're good for you!" }, { bgcolor: "aquamarine", title: "millionsoffreebooks.whatever", body: "
read classic literature online free!" }, { bgcolor: "lightgrey", title: "3.14 shades of gray: a novel", body: "love really does make the world go round..." }, { bgcolor: "#fee", title: "flexbox florist", body: "when life's layout gets complicated, send flowers." } ]; let adbox, title, body, timerelem; let ad = ads[math.floor(math.random()*...
...if we're replacing an ad, it's al
ready there, with its contents replaced with the new ad's.
...this ensures that when we
read its totalviewtime, we see the exact final value for how long the ad was visible to the user.
KeyboardEvent.key - Web APIs
the keyboardevent interface's key
read-only property returns the value of the key pressed by the user, taking into consideration the state of modifier keys such as shift as well as the keyboard locale and layout.
...if the key is held down further and the key produces a character key, then the event continues to be emitted in a platform implementation dependent interval and the keyboardevent.repeat
read only property is set to true.
...when they occur, the key's value is checked to see if it's one of the keys the code is interested in, and if it is, it gets processed in some way (possibly by steering a spacecraft, perhaps by changing the selected cell in a sp
readsheet).
... window.addeventlistener("keydown", function (event) { if (event.defaultprevented) { return; // do nothing if the event was al
ready processed } switch (event.key) { case "down": // ie/edge specific value case "arrowdown": // do something for "down arrow" key press.
MediaDeviceInfo - Web APIs
properties mediadeviceinfo.deviceid
read only returns a domstring that is an identifier for the represented device that is persisted across sessions.
... mediadeviceinfo.groupid
read only returns a domstring that is a group identifier.
... mediadeviceinfo.kind
read only returns an enumerated value that is either "videoinput", "audioinput" or "audiooutput".
... mediadeviceinfo.label
read only returns a domstring that is a label describing this device (for example "external usb webcam").
MediaKeySession - Web APIs
properties mediakeysession.closed
read only returns a promise signaling when a mediakeysession closes.
... mediakeysession.expiration
read only the time after which the keys in the current session can no longer be used to decrypt media data, or nan if no such time exists.
... mediakeysession.keystatuses
read only contains a reference to a
read-only mediakeystatusmap of the current session's keys and their statuses.
... mediakeysession.sessionid
read only contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
MediaRecorder - Web APIs
properties mediarecorder.mimetype
read only returns the mime type that was selected as the recording container for the mediarecorder object when it was created.
... mediarecorder.state
read only returns the current state of the mediarecorder object (inactive, recording, or paused.) mediarecorder.stream
read only returns the stream that was passed into the constructor when the mediarecorder was created.
... mediarecorder.videobitspersecond
read only returns the video encoding bit rate in use.
... mediarecorder.audiobitspersecond
read only returns the audio encoding bit rate in use.
MediaSource.addSourceBuffer() - Web APIs
invalidstateerror the mediasource is not in the "open"
readystate.
... notsupportederror the specified mimetype isn't supported by the user agent, or is not compatible with the mime types of other sourcebuffer objects that are al
ready included in the media source's sourcebuffers list.
...ew the full demo live, or download the source for further investigation.) var asseturl = 'frag_bunny.mp4'; // need to be specific for blink regarding codecs // ./mp4info frag_bunny.mp4 | grep codec var mimecodec = 'video/mp4; codecs="avc1.42e01e, mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //console.log(mediasource.
readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sou...
...rcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'addsourcebuffer()' in that specification.
NDEFWriter.write() - Web APIs
options optional ignore
read -- boolean specifying whether or not to skip
reading for the activated
reader objects.
... notallowederror the permission for this operation was rejected or overwrite is false and there are al
ready records on the tag.
... not
readableerror the ua is not allowed to access underlying nfc adapter (e.g., due to user preference).
... networkerror transfer failed after it al
ready started (e.g., the tag was removed from the
reader).
Node.nodeName - Web APIs
the nodename
read-only property returns the name of the current node as a string.
...nstruction the value of processinginstruction.target text "#text" example given the following markup: <div id="d1">hello world</div> <input type="text" id="t"> and the following script: var div1 = document.getelementbyid("d1"); var text_field = document.getelementbyid("t"); text_field.value = div1.nodename; in xhtml (or any other xml format), text_field's value would
read "div".
... however, in html, text_field's value would
read "div", because nodename and tagname return in upper case on html elements in doms flagged as html documents.
...
read more details on nodename case sensitivity in different browsers.
OrientationSensor - Web APIs
methods orientationsensor.populatematrix() populates the given object with the rotation matrix based on the latest sensor
reading.
...on each
reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
... const options = { frequency: 60, referenceframe: 'device' }; const sensor = new absoluteorientationsensor(options); sensor.addeventlistener('
reading', () => { // model is a three.js object instantiated elsewhere.
... model.quaternion.fromarray(sensor.quaternion).inverse(); }); sensor.addeventlistener('error', error => { if (event.error.name == 'not
readableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requsting permissions for multiple device sensors.
ParentNode - Web APIs
properties parentnode.childelementcount
read only returns the number of children of this parentnode which are elements.
... parentnode.children
read only returns a live htmlcollection containing all of the element objects that are children of this parentnode, omitting all of its non-element nodes.
... parentnode.firstelementchild
read only returns the first node which is both a child of this parentnode and is also an element, or null if there is none.
... parentnode.lastelementchild
read only returns the last node which is both a child of this parentnode and is an element, or null if there is none.
PerformanceEntry - Web APIs
properties performanceentry.name
read only a value that further specifies the value returned by the performanceentry.entrytype property.
... performanceentry.entrytype
read only a domstring representing the type of performance metric such as, for example, "mark".
... performanceentry.starttime
read only a domhighrestimestamp representing the starting time for the performance metric.
... performanceentry.duration
read only a domhighrestimestamp representing the time value of the duration of the performance event.
Plugin - Web APIs
properties plugin.description
read only a human
readable description of the plugin.
... plugin.filename
read only the filename of the plugin file.
... plugin.name
read only the name of the plugin.
... plugin.version
read only the plugin's version number string.
PublicKeyCredential - Web APIs
properties publickeycredential.type
read only secure context inherited from credential.
... publickeycredential.id
read only secure context inherited from credential and overridden to be the base64url encoding of publickeycredential.rawid.
... publickeycredential.rawid
read only secure context an arraybuffer that holds the globally unique identifier for this publickeycredential.
... publickeycredential.response
read only secure context an instance of an authenticatorresponse object.
RTCRtpTransceiver - Web APIs
properties currentdirection
read only a string from the enum rtcrtptransceiverdirection which indicates the transceiver's current directionality, or null if the transceiver is stopped or has never participated in an exchange of offers and answers.
... mid
read only the media id of the m-line associated with this transceiver.
... receiver
read only the rtcrtpreceiver object that handles receiving and decoding incoming media.
... sender
read only the rtcrtpsender object responsible for encoding and sending data to the remote peer.
RTCSctpTransport - Web APIs
properties also inherits properties from: eventtarget rtcsctptransport.maxchannels
read only an integer value indicating the maximum number of rtcdatachannels that can be open simultaneously.
... rtcsctptransport.maxmessagesize
read only an integer value indicating the maximum size, in bytes, of a message which can be sent using the rtcdatachannel.send() method.
... rtcsctptransport.state
read only a domstring enumerated value indicating the state of the sctp transport.
... rtcsctptransport.transport
read only an rtcdtlstransport object representing the dtls transport used for the transmission and receipt of data packets.
RTCTrackEvent - Web APIs
receiver
read only the rtcrtpreceiver used by the track that's been added to the rtcpeerconnection.
... streams
read only optional an array of mediastream objects, each representing one of the media streams to which the added track belongs.
... track
read only the mediastreamtrack which has been added to the connection.
... transceiver
read only the rtcrtptransceiver being used by the new track.
ResizeObserverEntry - Web APIs
properties resizeobserverentry.borderboxsize
read only an object containing the new border box size of the observed element when the callback is run.
... resizeobserverentry.contentboxsize
read only an object containing the new content box size of the observed element when the callback is run.
... resizeobserverentry.contentrect
read only a domrect
readonly object containing the new size of the observed element when the callback is run.
... resizeobserverentry.target
read only a reference to the element or svgelement being observed.
SVGElement - Web APIs
t-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties also inherits properties from: documentandelementeventhandlers, element, elementcssinlinestyle, globaleventhandlers, htmlorforeignelement, svgelementinstance svgelement.dataset
read only a domstringmap object which provides a list of key/value pairs of named data attributes which correspond to custom data attributes attached to the element.
... svgelement.classname
read only an svganimatedstring that reflects the value of the class attribute on the given element, or the empty string if class is not present.
... svgelement.ownersvgelement
read only an svgsvgelement referring to the nearest ancestor <svg> element.
... svgelement.viewportelement
read only the svgelement, which established the current viewport.
SVGEllipseElement - Web APIs
svgellipseelement.cx
read only this property returns a svganimatedlength reflecting the cx attribute of the given <ellipse> element.
... svgellipseelement.cy
read only this property returns a svganimatedlength reflecting the cy attribute of the given <ellipse> element.
... svgellipseelement.rx
read only this property returns a svganimatedlength reflecting the rx attribute of the given <ellipse> element.
... svgellipseelement.ry
read only this property returns a svganimatedlength reflecting the ry attribute of the given <ellipse> element.
SVGEvent - Web APIs
properties property type description target
read only eventtarget the event target (the topmost target in the dom tree).
... type
read only domstring the type of event.
... bubbles
read only boolean whether the event normally bubbles or not.
... cancelable
read only boolean whether the event is cancellable or not.
SVGFEGaussianBlurElement - Web APIs
svgfegaussianblurelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfegaussianblurelement.stddeviationx
read only an svganimatednumber corresponding to the (possibly automatically computed) x component of the stddeviation attribute of the given element.
... svgfegaussianblurelement.stddeviationy
read only an svganimatednumber corresponding to the (possibly automatically computed) y component of the stddeviation attribute of the given element.
... svgfegaussianblurelement.edgemode
read only an svganimatedenumeration corresponding to the edgemode attribute of the given element.
SVGFEMorphologyElement - Web APIs
svgfemorphologyelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfemorphologyelement.operator
read only an svganimatedenumeration corresponding to the operator attribute of the given element.
... svgfemorphologyelement.radiusx
read only an svganimatednumber corresponding to the x component of the radius attribute of the given element.
... svgfemorphologyelement.radiusy
read only an svganimatednumber corresponding to the y component of the radius attribute of the given element.
SVGForeignObjectElement - Web APIs
svgforeignobjectelement.x
read only an svganimatedlength corresponding to the x attribute of the given <foreignobject> element.
... svgforeignobjectelement.y
read only an svganimatedlength corresponding to the x attribute of the given <foreignobject> element.
... svgforeignobjectelement.width
read only an svganimatedlength corresponding to the width attribute of the given <foreignobject> element.
... svgforeignobjectelement.height
read only an svganimatedlength corresponding to the height attribute of the given <foreignobject> element.
SVGLineElement - Web APIs
svglineelement.x1
read only returns an svganimatedlength that corresponds to attribute x1 on the given <line> element.
... svglineelement.y1
read only returns an svganimatedlength that corresponds to attribute y1 on the given <line> element.
... svglineelement.x2
read only returns an svganimatedlength that corresponds to attribute x2 on the given <line> element.
... svglineelement.y2
read only returns an svganimatedlength that corresponds to attribute y2 on the given <line> element.
SVGLinearGradientElement - Web APIs
svglineargradientelement.x1
read only an svganimatedlength corresponding to the x1 attribute of the given <lineargradient> element.
... svglineargradientelement.y1
read only an svganimatedlength corresponding to the y1 attribute of the given <lineargradient> element.
... svglineargradientelement.x2
read only an svganimatedlength corresponding to the x2 attribute of the given <lineargradient> element.
... svglineargradientelement.y2
read only an svganimatedlength corresponding to the y2 attribute of the given <lineargradient> element.
SVGTests - Web APIs
properties svgtests.requiredfeatures
read only an svgstringlist corresponding to the requiredfeatures attribute of the given element.
... svgtests.requiredextensions
read only an svgstringlist corresponding to the requiredextensions attribute of the given element.
... svgtests.systemlanguage
read only an svgstringlist corresponding to the systemlanguage attribute of the given element.
... methods svgtests.hasextension()
read only returns true if the browser supports the given extension, specified by a uri.
Sensor - Web APIs
accelerometer ambientlightsensor gyroscope linearaccelerationsensor magnetometer orientationsensor properties sensor.activated
read only returns a boolean indicating whether the sensor is active.
... sensor.has
reading
read only returns a boolean indicating whether the sensor has a
reading.
... sensor.timestamp
read only returns the time stamp of the latest sensor
reading.
... sensor.on
reading called when a
reading is taken on one of the child interfaces of the sensor interface.
SpeechRecognitionEvent - Web APIs
speechrecognitionevent.emma
read only returns an extensible multimodal annotation markup language (emma) — xml — representation of the result.
... speechrecognitionevent.interpretation
read only returns the semantic meaning of what the user said.
... speechrecognitionevent.resultindex
read only returns the lowest index value result in the speechrecognitionresultlist "array" that has actually changed.
... speechrecognitionevent.results
read only returns a speechrecognitionresultlist object representing all the speech recognition results for the current session.
SpeechSynthesis - Web APIs
speechsynthesis.paused
read only a boolean that returns true if the speechsynthesis object is in a paused state.
... speechsynthesis.pending
read only a boolean that returns true if the utterance queue contains as-yet-unspoken utterances.
... speechsynthesis.speaking
read only a boolean that returns true if an utterance is currently in the process of being spoken — even if speechsynthesis is in a paused state.
... speechsynthesis.resume() puts the speechsynthesis object into a non-paused state: resumes it if it was al
ready paused.
SpeechSynthesisEvent - Web APIs
speechsynthesisevent.charindex
read only returns the index position of the character in the speechsynthesisutterance.text that was being spoken when the event was triggered.
... speechsynthesisevent.elapsedtime
read only returns the elapsed time in milliseconds after the speechsynthesisutterance.text started being spoken that the event was triggered at.
... speechsynthesisevent.name
read only returns the name associated with certain types of events occuring as the speechsynthesisutterance.text is being spoken: the name of the ssml marker reached in the case of a mark event, or the type of boundary reached in the case of a boundary event.
... speechsynthesisevent.utterance
read only returns the speechsynthesisutterance instance that the event was triggered on.
TaskAttributionTiming - Web APIs
201" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="306" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">taskattributiontiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties taskattributiontiming.containertype
read only returns the type of frame container, one of iframe, embed, or object.
... taskattributiontiming.containersrc
read only returns the container's src attribute.
... taskattributiontiming.containerid
read only returns the container's id attribute.
... taskattributiontiming.containername
read only returns the container's name attribute.
Text - Web APIs
text.iselementcontentwhitespace
read only returns a boolean flag indicating whether or not the text node contains only whitespace.
... text.wholetext
read only returns a domstring containing the text of all text nodes logically adjacent to this node, concatenated in document order.
... text.assignedslot
read only returns the htmlslotelement object associated with the element.
... slotable.assignedslot
read only returns a htmlslotelement representing the <slot> the node is inserted in.
TextRange - Web APIs
properties textrange.boundingheight
read only returns the height of the rectangle bound to the textrange object.
... textrange.boundingleft
read only returns the distance between the left edge of the rectangle that binds the textrange object and the left edge that completely contains the textrange object.
... textrange.boundingtop
read only returns the distance between the top edge of the rectangle that binds the textrange object and the top edge that completely contains the textrange object.
... textrange.boundingwidth
read only returns the width of the rectangle bound to the textrange object.
TransformStream - Web APIs
properties transformstream.
readable
read only the
readable end of a transformstream.
... transformstream.writable
read only the writable end of a transformstream.
... class jstextdecoderstream extends transformstream { constructor(encoding = 'utf-8', {...options} = {}) { let t = {...tds, encoding, options} super(t) _jstes_wm.set(this, t) } get encoding() {return _jstds_wm.get(this).decoder.encoding} get fatal() {return _jstds_wm.get(this).decoder.fatal} get ignorebom() {return _jstds_wm.get(this).decoder.ignorebom} } chaining multiple
readablestreams together this is a useful one, where multiple streams can be conjoined.
... let responses = [ /* conjoined response tree */ ] let {
readable, writable} = new transformstream responses.reduce( (a, res, i, arr) => a.then(() => res.pipeto(writable, {preventclose: (i+1) !== arr.length})), promise.resolve() ) note that this is not resilient to other influences.
TreeWalker - Web APIs
treewalker.root
read only returns a node representing the root node as specified when the treewalker was created.
... treewalker.whattoshow
read only returns an unsigned long being a bitmask made of constants describing the types of node that must be presented.
... treewalker.filter
read only returns a nodefilter used to select the relevant nodes.
... treewalker.expandentityreferences
read only is a boolean indicating, when discarding an entityreference its whole sub-tree must be discarded at the same time.
URL - Web APIs
it works by providing properties which allow you to easily
read and modify the components of a url.
...you can then easily
read the parsed components of the url or make changes to the url.
... origin
read only returns a usvstring containing the origin of the url, that is its scheme, its domain and its port.
... searchparams
read only a urlsearchparams object which can be used to access the individual query parameters found in search.
USBInterface - Web APIs
properties usbinterface.interfacenumber
read only returns the interface number of this interface.
... usbinterface.alternate
read only returns the currently selected alternative configuration of this interface.
... usbinterface.alternates
read only returns an array containing instances of the usbalternateinterface interface describing each of the alternative configurations possible for this interface.
... usbinterface.claimed
read only returns whether or not this interface has been claimed by the current page by calling usbdevice.claiminterface().
WebGL2RenderingContext.getBufferSubData() - Web APIs
the webgl2renderingcontext.getbuffersubdata() method of the webgl 2 api
reads data from a buffer binding point and writes them to an arraybuffer or sharedarraybuffer.
... gl.copy_
read_buffer: buffer for copying from one buffer object to another.
... srcbyteoffset a glintptr specifying the byte offset from which to start
reading from the buffer.
... srcoffset optional a gluint specifying the element index offset where to start
reading the buffer.
WebGLRenderingContext - Web APIs
the webgl context the following properties and methods provide general information and functionality to deal with the webgl context: webglrenderingcontext.canvas a
read-only back-reference to the htmlcanvaselement.
... webglrenderingcontext.drawingbufferwidth the
read-only width of the current drawing buffer.
... webglrenderingcontext.drawingbufferheight the
read-only height of the current drawing buffer.
... webglrenderingcontext.
readpixels()
reads a block of pixels from the webglframebuffer.
Establishing a connection: The WebRTC perfect negotiation pattern - Web APIs
if we al
ready have video coming in from the remote peer (which we can see if the remote view's <video> element's srcobject property al
ready has a value), we do nothing.
...since a peer can only accept offers when in the stable state, the peer has thus rescinded its offer and is
ready to receive the offer from the remote (impolite) peer.
...ch(err) { if (!ignoreoffer) { throw err; } } } } catch(err) { console.error(err); } }; since rollback works by postponing changes until the next negotiation (which will begin immediately after the current one is finished), the polite peer needs to know when it needs to throw away a received offer if it's currently waiting for a reply to an offer it's al
ready sent.
...if the received message is an offer and the local peer is the impolite peer, and a collision is occurring, we ignore the offer because we want to continue to try to use the offer that's al
ready in the process of being sent.
Writing WebSocket client applications - Web APIs
var examplesocket = new websocket("wss://www.example.com/socketserver", "protocolone"); on return, examplesocket.
readystate is connecting.
... the
readystate will become open once the connection is
ready to transfer data.
... if you want to open a connection and are flexible about the protocols you support, you can specify an array of protocols: var examplesocket = new websocket("wss://www.example.com/socketserver", ["protocolone", "protocoltwo"]); once the connection is established (that is,
readystate is open), examplesocket.protocol will tell you which protocol the server selected.
... examplesocket.send(json.stringify(msg)); // blank the text input element,
ready to receive the next line of text from the user.
Inputs and input sources - Web APIs
let inputsourcelist = xrsession.inputsources; due to the fact that the contents of the xrinputsource objects representing each input source in the list are
read-only, changes to these inputs are made by the webxr system by deleting the source's record and adding a new one to replace it.
...picking up an object involves first looking to see if the hand represented by dropping any object al
ready being held in the hand represented by avatar.heldobject[hand].
... if an object is al
ready held in that hand, it's dropped by calling the dropobject() function.
...since we're al
ready rendering the scene on a schedule, we can just add the code to apply these changes there, along with preparing and drawing the scene.
Starting up and shutting down a WebXR session - Web APIs
assuming you're al
ready familiar with 3d graphics in general and webgl in particular, taking that next bold step into mixed reality—the idea of presenting artificial scenery or objects in addition to or in place of the real world—is not overly complicated.
... be sure to
read the
readme carefully; the polyfill comes in several versions depending on what degree of compatibility with newer javascript features your target browsers include.
...again, carefully
read the
readme file and make sure you're aware of the limitations before you begin.
...when you're
ready to create your reference space, you can try for a local space, and if that fails, fall back to a viewer reference space, which all devices are required to support.
Web Animations API Concepts - Web APIs
sp
read along that timeline according to their durations are our animations.
... all the animation's playback relies on this timeline: seeking the animation moves the animation’s position along the timeline; slowing down or speeding up the playback rate condenses or expands its sp
read across the timeline; repeating the animation lines up additional iterations of it along the timeline.
...in fact, group effects and sequence effects have al
ready been outlined in the currently-in-progress level 2 spec of the web animations api.
...(
read more about how to use element.animate() in using the web animations api.) uses the api allows for the creation of dynamic animations that can be updated on the fly as well as more straightforward, declarative animations like those css creates.
Advanced techniques: Creating and sequencing audio - Web APIs
let bandpass = audioctx.createbiquadfilter(); bandpass.type = 'bandpass'; bandpass.frequency.value = bandhz; // connect our graph noise.connect(bandpass).connect(audioctx.destination); noise.start(); } "dial up" — loading a sound sample it's straightforward enough to emulate phone dial (dtmf) sounds, by playing a couple of oscillators together using the methods we've al
ready looked at, however, in this section, we'll load in a sample file instead so we can take a look at what's involved.
...}); when the sample is
ready to play, the program sets up the ui so it is
ready to go.
... we could schedule our voices to play within a for loop, however the biggest problem with this is updating whilst it is playing, and we've al
ready implemented ui controls to do so.
...there's no point repeating it all here, but it's highly recommended to
read this article and use this method.
Using the Web Storage API - Web APIs
refox e.code === 22 || // firefox e.code === 1014 || // test name field too, because code might not be present // everything except firefox e.name === 'quotaexceedederror' || // firefox e.name === 'ns_error_dom_quota_reached') && // acknowledge quotaexceedederror only if there's something al
ready stored (storage && storage.length !== 0); } } and here is how you would use it: if (storageavailable('localstorage')) { // yippee!
... testing whether your storage has been populated to start with, in main.js, we test whether the storage object has al
ready been populated (i.e., the page was previously accessed): if(!localstorage.getitem('bgcolor')) { populatestorage(); } else { setstyles(); } the storage.getitem() method is used to get a data item from storage; in this case, we are testing to see whether the bgcolor item exists; if not, we run populatestorage() to add the existing customization values to the storage.
... if there are al
ready values there, we run setstyles() to update the page styling with the stored values.
... setting values in storage storage.setitem() is used both to create new data items, and (if the data item al
ready exists) update existing values.
WheelEvent - Web APIs
wheelevent.deltax
read only returns a double representing the horizontal scroll amount.
... wheelevent.deltay
read only returns a double representing the vertical scroll amount.
... wheelevent.deltaz
read only returns a double representing the scroll amount for the z-axis.
... wheelevent.deltamode
read only returns an unsigned long representing the unit of the delta* values' scroll amount.
Worker.prototype.postMessage() - Web APIs
the worker can send back information to the th
read that spawned it using the dedicatedworkerglobalscope.postmessage method.
... transfer example this example shows a firefox add-on that transfers an arraybuffer from the main th
read to the chromeworker, and then the chromeworker transfers it back to the main th
read.
... main th
read code: var myworker = new chromeworker(self.path + 'myworker.js'); function handlemessagefromworker(msg) { console.log('incoming message from worker, msg:', msg); switch (msg.data.atopic) { case 'do_sendmainarrbuff': sendmainarrbuff(msg.data.abuf) break; default: throw 'no atopic on incoming message to chromeworker'; } } myworker.addeventlistener('message', handlemessagefromworker); // ok lets create the buffer and send it var arrbuf = new arraybuffer(8); console.info('arrbuf.bytelength pre transfer:', arrbuf.bytelength); myworker.postmessage( { atopic: 'do_sendworkerarrbuff', abuf: arrbuf // the array buffer that we passed to the transferrable section 3 lines below }, [ arrbuf...
...} bootstrap.js:20 got back buf in main th
read, abuf.bytelength: 8 bootstrap.js:12 from worker, post send back abuf.bytelength: 0 myworker.js:7:2 bytelength goes to 0 as it is transferred.
Sending and Receiving Binary Data - Web APIs
this example
reads an image as a binary file and creates an 8-bit unsigned integer array from the raw bytes.
... note that this will not decode the image and
read the pixels.
...(); oreq.open("get", "/myfile.png", true); oreq.responsetype = "arraybuffer"; oreq.onload = function (oevent) { var arraybuffer = oreq.response; // note: not oreq.responsetext if (arraybuffer) { var bytearray = new uint8array(arraybuffer); for (var i = 0; i < bytearray.bytelength; i++) { // do something with each byte in the array } } }; oreq.send(null); you can also
read a binary file as a blob by setting the string "blob" to the responsetype property.
... submitting forms and uploading files please,
read this paragraph.
XRRenderState - Web APIs
baselayer
read only the xrwebgllayer from which the browser's compositing system obtains the image for the xr session.
... depthfar
read only the distance, in meters, of the far clip plane from the viewer.
... depthnear
read only the distance, in meters, of the near clip plane from the viewer.
... inlineverticalfieldofview
read only the default vertical field of view, defined in radians, to use when the session is in inline mode.
XRRigidTransform - Web APIs
attributes xrrigidtransform.position
read only a dompoint
readonly specifying a 3-dimensional point, expressed in meters, describing the translation component of the transform.
... xrrigidtransform.orientation
read only a dompoint
readonly which contains a unit quaternion describing the rotational component of the transform.
... xrrigidtransform.matrix
read only returns the transform matrix in the form of a 16-member float32array.
... xrrigidtransform.inverse
read only returns a xrrigidtransform which is the inverse of this transform.
XRSession - Web APIs
environmentblendmode
read only returns this session's blend mode which denotes how much of the real-world environment is visible through the xr device and how the device will blend the device imagery with it.
... inputsources
read only returns a list of this session's xrinputsources, each representing an input device used to control the camera and/or scene.
... renderstate
read only an xrrenderstate object which contains options affecting how the imagery is rendered.
... visibilitystate
read only a domstring whose value is one of those found in the xrvisibilitystate enumerated type, indicating whether or not the session's imagery is visible to the user, and if so, if it's being visible but not currently the target for user events.
XRViewport - Web APIs
properties height
read only the height, in pixels, of the viewport.
... width
read only the width, in pixels, of the viewport.
... x
read only the offset from the origin of the destination graphics surface (typically a xrwebgllayer) to the left edge of the viewport, in pixels.
... y
read only the offset from the origin of the viewport to the bottom edge of the viewport; webgl's coordinate system places (0, 0) at the bottom left corner of the surface.
ARIA: tabpanel role - Accessibility
the first rule of aria use is you can use a native feature with the semantics and behavior you require al
ready built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
... added benefits any additional benefits this feature has for non-typical screen
reader users, like google or mobile speech recognition.
... working draft precedence order what are the related properties, and in what order will this attribute or property be
read (which property will take precendence over this one, and which property will be overwritten.
... screen
reader support tbd ...
ARIA: Complementary role - Accessibility
using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... <aside id="sidebar" aria-label="sponsors"> <!-- content --> </aside> redundant descriptions screen
readers will announce the type of role the landmark is.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen
reader users to also quickly identify and navigate to large sections of the document.
... working draft screen
reader support tbd ...
ARIA: contentinfo role - Accessibility
using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... <footer aria-label="footer"> <!-- footer content --> </footer> </body> redundant descriptions screen
readers will announce the type of role the landmark is.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen
reader users to also quickly identify and navigate to large sections of the document.
... working draft screen
reader support ...
ARIA: form role - Accessibility
using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... using role="form" <div role="form" id="gift-cards" aria-label="purchase a gift card"> <!-- form content --> </div> redundant descriptions screen
readers will announce the type of role the landmark is.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen
reader users to also quickly identify and navigate to large sections of the document.
... working draft screen
reader support tbd ...
ARIA: grid role - Accessibility
aria-
readonly if the user can navigate the grid but not change the value or values of the grid, the aria-
readonly should be set to true.
... for many use cases, an html table element is sufficient as it and its elements al
ready include many aria roles.
... examples calendar example html <table role="grid" aria-labelledby="calendarheader" aria-
readonly=true> <caption id="calendarheader">september 2018</caption> <thead role="rowgroup"> <tr role="row"> <td></td> <th role="columnheader" aria-label="sunday">s</th> <th role="columnheader" aria-label="monday">m</th> <th role="columnheader" aria-label="tuesday">t</th> <th role="columnheader" aria-label="wednesday">w</th> <th role="columnheader" aria-labe...
... working draft screen
reader support tbd ...
ARIA: search role - Accessibility
using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... <footer> <form id="site-search-bottom" role="search" aria-label="sitewide"> <!-- search input --> </form> </footer> redundant descriptions screen
readers will announce the type of role the landmark is.
... added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen
reader users to also quickly identify and navigate to large sections of the document.
... working draft screen
reader support tbd ...
WAI-ARIA Roles - Accessibility
screen
readers will instantly start
reading out the updated content when the role is added.
...adding role="button" will make an element appear as a button control to a screen
reader.
...dialogs can be either non-modal (it's still possible to interact with content outside of the dialog) or modal (only the content in the dialog can be interacted with).aria: document rolegenerally used in complex composite widgets or applications, the document role can inform assistive technologies to switch context to a
reading mode: the document role tells assistive technologies with
reading or browse modes to use the document mode to
read the content contained within this element.aria: feed rolea feed is a dynamic scrollable list of articles in which articles are added to or removed from either end of the list as the user scrolls.
... a feed enables screen
readers to use the browse mode
reading cursor to both
read and scroll through a stream of rich content that may continue scrolling infinitely by loading more content as the user
reads.aria: figure rolethe aria figure role can be used to identify a figure inside page content where appropriate semantics do not al
ready exist.
Accessibility Information for Web Authors - Accessibility
(...) contrast is extremely important in web design." wheel of color: pump up the contrast, robert hess, msdn "for this year's list of worst design mistakes, (...) i asked
readers of my newsletter to nominate the usability problems they found the most irritating.
...effective color contrast and effective color brightness difference have a decisive importance for
reading, furthermore for people with partial color deficiency (see the excellent examples in effective color contrast by lighthouse international).
... this document tackles such difficulties and shows several interactive desktop-style widgets such as tree views, menu bars and sp
readsheets which are accessible both with the keyboard and assistive technologies such as screen
readers, screen magnifiers and alternative input devices.
... newsgroup and mailing list we have two discussion lists, which can be
read via a newsgroup
reader, as a mailing list or via google groups.
Web accessibility for seizures and physical reactions - Accessibility
in the case of photosensitive epilepsy, seizures are triggered specifically by flashing lights, but other types of reflex epilepsies may be triggered by the act of
reading, or by noises.
...the specifications also note the difference in technology, such as e-ink, which remains
readable in bright daylight, versus liquid crystals, which do not.
...for example, many users have difficulty
reading text that has a small difference in contrast to the text background and would prefer a larger contrast." sometimes there can be such a thing as too much contrast; a halo effect around text can occur in such situations and actually reduce legibility.
... formula to determine brightness of rgb color stack exchange discussion th
read how the color red influences our behavior scientific american by susana martinez-conde, stephen l.
Color contrast - Accessibility
when designing
readable interfaces for different vision capabilities, the wcag guidelines recommend the following contrast ratios: type of content minimum ratio (aa rating) enhanced ratio (aaa rating) body text 4.5 : 1 7 : 1 large-scale text (120-150% larger than body text) 3 : 1 4.5 : 1 active user interface components and graphical objects such as icons and graphs 3 : 1 not defined these ratios do not apply to "incidental" text, such as inactive controls, logotypes, or purely decorative text.
...this is because they don't see bright and dark areas as
readily as those without such conditions, and therefore have trouble seeing edges, borders, and other details.
... it is good to have a cool design on your website, but the design is worthless if your users can't
read your content.
...the "good" <div> has a light purple background, which makes the text easy to
read: example1 <div class="good"> good contrast </div> div { font-family: sans-serif; text-align: center; font-size: 2rem; font-weight: bold; width: 250px; padding: 30px; border-radius: 20px; box-shadow: 1px 1px 1px black; } .good { background-color: #fae6fa; } the "bad" <div> on the other hand has a very dark purple background, which makes the text much harder to
read: ...
Relationship of flexbox to other layout methods - CSS: Cascading Style Sheets
however if you are planning on using writing modes in your layout, carefully testing the results is advisable — not least because it would be easy to make things hard to
read!
...as al
ready described in the basic concepts article, flex items can be allowed to wrap but, once they do so, each line becomes a flex container of its own.
...this will cause the element itself to no longer be announced by screen
reading technology.
...firefox supports display: contents al
ready, and the value is being implemented in chrome.
Adding captions and subtitles to HTML5 video - Developer guides
captions versus subtitles captions and subtitles are not the same thing: they have significantly different audiences, and convey different information, and it is recommended that you
read up on the differences if you are not sure what they are.
... all we need to do is to go through the video's texttracks,
reading their properties and building the menu up from there: var subtitlesmenu; if (video.texttracks) { var df = document.createdocumentfragment(); var subtitlesmenu = df.appendchild(document.createelement('ul')); subtitlesmenu.classname = 'subtitles-menu'; subtitlesmenu.appendchild(createmenuitem('subtitles-off', '', 'off')); for (var i = 0; i < video.texttracks.length; i++) { ...
...first of all an option is added to allow the user to switch all subtitles off, and then buttons are added for each text track,
reading the language and label from each one.
... plugins if, after
reading through this article you decide that you can't be bothered to do all of this and want someone else to do it for you, there are plenty of plugins out there that offer caption and subtitle support that you can use.
Media events - Developer guides
this corresponds to the have_future_data
readystate.
... canplaythrough sent when the
readystate changes to have_enough_data, indicating that the entire media can be played without interruption, assuming the download rate remains at least at the current level.
... emptied the media has become empty; for example, this event is sent if the media has al
ready been loaded (or partially loaded), and the load() method is called to reload it.
... mozaudioavailable sent when an audio buffer is provided to the audio layer for processing; the buffer contains raw audio samples that may or may not al
ready have been played by the time you receive the event.
Using HTML sections and outlines - Developer guides
semantic sectioning elements are specifically designed to communicate structural meaning to browsers and other technologies interpreting the document on behalf of users, such as screen
readers and voice assistants.
...for example, <div class="navigation"> does not suggest any meaning about its content to a browser; only a human
reading the html source can divine the meaning of a class like navigation.
...many accessibility tools as well as
reader views provided by some browsers rely on semantic sectioning elements.
... article element the <article> element indicates self-contained content, meaning that if you removed all the other html except the <article> element, the content would still make sense to a
reader.
Writing forward-compatible websites - Developer guides
this has happened multiple times to various sites al
ready during the evolution of html5.
...or, conversely, that they don't have support for some other feature (e.g., don't assume that a browser that supports onload on script elements will never support on
readystatechange on them).
...if you have a single code path that works in all the top engines, it means that you are either using features where browser behavior has al
ready converged or, if the behavior hasn't quite converged yet, your code works regardless of which engine's behavior standards turn out to uphold.
... don't use unprefixed versions of css properties or apis until at least one browser supports them until there's decently widesp
read support of the unprefixed version of something, its behavior can still change in unexpected ways.
Applying color to HTML elements using CSS - HTML: Hypertext Markup Language
the wrong color choice can render your site unattractive, or even worse, leave the content un
readable due to problems with contrast or conflicting colors.
...by using color to accentuate rather than adding color to everything on the page, you keep your content easy to
read and the colors you do use have far more impact.
...common design practice is to try to find the sweet spot where there's just enough contrast that the text is crisp and
readable but not enough contrast to become harsh for the eyes.
...if the contrast is too low, your text will tend to be washed out by the background, leaving it un
readable, but if your contrast is too high, the user may find your site garish and unpleasant to look at.
HTML attribute: required - HTML: Hypertext Markup Language
note: setting aria-required="true" tells a screen
reader that an element (any element) is required, but has no bearing on the optionality of the element.
... attribute interactions because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
...assistive technology should inform the user that the form control in mandatory based on the required attribute, but adding aria-required="true" doesn't hurt, in case the browser / screen
reader combination does not support required yet.
...ensure the messaging is multi-faceted, such as thru text, color, markings, and attribute, so that all users understand the requirements whether they have color blindness, cognitive differences, or are using a screen
reader.
<img>: The Image Embed element - HTML: Hypertext Markup Language
the alt attribute holds a text description of the image, which isn't mandatory but is incredibly useful for accessibility — screen
readers
read this description out to their users so they know what the image means.
...on browsers supporting srcset, src is treated like a candidate image with a pixel density descriptor 1x, unless an image with this pixel density descriptor is al
ready defined in srcset, or unless srcset contains w descriptors.
... don't <img alt="image" src="penguin.jpg"> do <img alt="a rockhopper penguin standing on a beach." src="penguin.jpg"> when an alt attribute is not present on an image, some screen
readers may announce the image's file name instead.
...doing so may cause some screen
readers to announce the description twice, creating a confusing experience.
<input type="date"> - HTML: Hypertext Markup Language
among browsers with custom interfaces for selecting dates are chrome and opera, whose data control looks like so: the edge date control looks like: and the firefox date control looks like this: value a domstring representing a date in yyyy-mm-dd format, or empty events change and input supported common attributes autocomplete, list,
readonly, and step idl attributes list, value, valueasdate, valueasnumber.
...it then
reads that value back in string and number formats.
...lback nativepicker.style.display = 'none'; fallbackpicker.style.display = 'block'; fallbacklabel.style.display = 'block'; // populate the days and years dynamically // (the months are always the same, therefore hardcoded) populatedays(monthselect.value); populateyears(); } function populatedays(month) { // delete the current set of <option> elements out of the // day <select>,
ready for the next set to be injected while(dayselect.firstchild){ dayselect.removechild(dayselect.firstchild); } // create variable to hold new number of days to inject var daynum; // 31 or 30 days?
...daynum = 29 : daynum = 28; } // inject the right number of new <option> elements into the day <select> for(i = 1; i <= daynum; i++) { var option = document.createelement('option'); option.textcontent = i; dayselect.appendchild(option); } // if previous day has al
ready been set, set dayselect's value // to that day, to avoid the day jumping back to 1 when you // change the year if(previousday) { dayselect.value = previousday; // if the previous day was set to a high number, say 31, and then // you chose a month with less total days in it (e.g.
<input type="email"> - HTML: Hypertext Markup Language
value a domstring representing an e-mail address, or empty events change and input supported common attributes autocomplete, list, maxlength, minlength, multiple, name,pattern, placeholder,
readonly, required, size, and type idl attributes list and value methods select() value the <input> element's value attribute contains a domstring which is automatically validated as conforming to e-mail syntax.
... minlength the minimum number of characters long the input can be and still be considered valid multiple whether or not to allow multiple, comma-separated, e-mail addresses to be entered pattern a regular expression the input's contents must match in order to be valid placeholder an exemplar value to display in the input field whenever it is empty
readonly a boolean attribute indicating whether or not the contents of the input should be
read-only size a number indicating how many characters wide the input field should be list the values of the list attribute is the id of a <datalist> element located in the same document.
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
... note: because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
<input type="month"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list,
readonly, and step.
...n addition to the attributes common to <input> elements, month inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest year and month to accept as a valid input min the earliest year and month to accept as a valid input
readonly a boolean which, if present, indicates that the input's value can't be edited step a stepping interval to use when incrementing and decrementing the value of the input field list the values of the list attribute is the id of a <datalist> element located in the same document.
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
... note: because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
<input type="time"> - HTML: Hypertext Markup Language
events change and input supported common attributes autocomplete, list,
readonly, and step idl attributes value, valueasdate, valueasnumber, and list.
...he attributes common to all <input> elements, time inputs offer the following attributes: attribute description list the id of the <datalist> element that contains the optional pre-defined autocomplete options max the latest time to accept, in the syntax described under time value format min the earliest time to accept as a valid input
readonly a boolean attribute which, if present, indicates that the contents of the time input should not be user-editable step the stepping interval to use both for user interfaces purposes and during constraint validation unlike many data types, time values have a periodic domain, meaning that the values reach the highest possible value, then wrap back around to the beginning ag...
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
... note: because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
<input type="week"> - HTML: Hypertext Markup Language
value a domstring representing a week and year, or empty events change and input supported common attributes autocomplete, list,
readonly, and step idl attributes value, valueasdate, valueasnumber, and list.
...weekcontrol = document.queryselector('input[type="week"]'); weekcontrol.value = '2017-w45'; additional attributes in addition to the attributes common to <input> elements, week inputs offer the following attributes: attribute description max the latest year and week to accept as valid input min the earliest year and week to accept as valid input
readonly a boolean which, if present, indicates that the user cannot edit the field's contents step the stepping interval (the distance between allowed values) to use for both user interface and constraint validation max the latest (time-wise) year and week number, in the string format discussed in the value section above, to accept.
...
readonly a boolean attribute which, if present, means this field cannot be edited by the user.
... note: because a
read-only field cannot have a value, required does not have any effect on inputs with the
readonly attribute also specified.
Standard metadata names - HTML: Hypertext Markup Language
by specification, only dark is not valid, because forcing a document to render in dark mode when it isn't truly compatible with it can result in un
readable content; all major browsers default to light mode if not otherwise configured.
... accessibility concerns with viewport scaling disabling zooming capabilities by setting user-scalable to a value of no prevents people experiencing low vision conditions from being able to
read and understand page content.
... other metadata names the whatwg wiki metaextensions page contains a large set of non-standard metadata names that have not been formally accepted yet; however, some of the names included there are al
ready used quite commonly in practice — including the following: creator: the name of the creator of the document, such as an organization or institution.
... the robot still needs to access the page in order to
read these rules.
Evolution of HTTP - HTTP
these four building blocks were completed by the end of 1990, and the first servers were al
ready running outside of cern by early 1991.
... using http for complex applications the original vision of tim berners-lee for the web wasn't a
read-only medium.
...it can no longer be
read and created manually.
...by july 2016, 8.7% of all web sites[1] were al
ready using it, representing more than 68% of all requests[2].
Redirections in HTTP - HTTP
they imply that the original url should no longer be used, and replaced with the new one.search engine robots, rss
readers, and other crawlers will update the original url for the resource.
...machine-
readable choices are encouraged to be sent as link headers with rel=alternate.
... redirection loops redirection loops happen when additional redirections follow the one that has al
ready been followed.
... sometimes, the server won't detect it: a redirection loop can sp
read over several servers which each don't have the full picture.
Array - JavaScript
and elements, see this example and then refer to the table below: // match one d followed by one or more b's followed by one d // remember matched b's and the following d // ignore case const myre = /d(b+)(d)/i const myarray = myre.exec('cdbbdbsbz') the properties and elements returned from this match are as follows: property/element description example input
read only the original string against which the regular expression was matched.
... "cdbbdbsbz" index
read only the zero-based index of the match in the string.
... 1 [0]
read only the last matched characters.
... "dbbd" [1], ...[n]
read only elements that specify the parenthesized substring matches (if included) in the regular expression.
Atomics.wait() - JavaScript
note: this operation only works with a shared int32array and may not be allowed on the main th
read.
... examples using wait() given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a
reading th
read is sleeping and waiting on location 0 which is expected to be 0.
...however, once the writing th
read has stored a new value, it will be notified by the writing th
read and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing th
read stores a new value and notifies the waiting th
read once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.wait' in that specification.
DataView - JavaScript
the dataview view provides a low-level interface for
reading and writing multiple number types in a binary arraybuffer, without having to care about the platform's endianness.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
...fixed at construction time and thus
read only.
Function.name - JavaScript
a function object's
read-only name property indicates the function's name as specified when it was created, or it may be rather anonymous or ''(an empty string) for functions created anonymously.
...log(f.name); // "f" console.log(object.somemethod.name); // "somemethod" you can define a function with a name in a function expression: let object = { somemethod: function object_somemethod() {} }; console.log(object.somemethod.name); // logs "object_somemethod" try { object_somemethod } catch(e) { console.log(e); } // referenceerror: object_somemethod is not defined the name property is
read-only and cannot be changed by the assigment operator: example below contradicts with what is said at the beginning of this section and doesn't work as described.
... let o = { get foo(){}, set foo(x){} }; var descriptor = object.getownpropertydescriptor(o, "foo"); descriptor.get.name; // "get foo" descriptor.set.name; // "set foo"; function names in classes you can use obj.constructor.name to check the "class" of an object (but be sure to
read the warnings below): function foo() {} // es2015 syntax: class foo {} var fooinstance = new foo(); console.log(fooinstance.constructor.name); // logs "foo" warning: the script interpreter will set the built-in function.name property only if a function does not have an own property called name (see section 9.2.11 of the ecmascript2015 language specification).
...the built-in definition in the absence of a custom static definition is
read-only: foo.name = 'hello'; console.log(foo.name); // logs "hello" if class foo has a static name() property but "foo" if not.
Promise.all() - JavaScript
return value an al
ready resolved promise if the iterable passed is empty.
...note, google chrome 58 returns an al
ready resolved promise in this case.
... if an empty iterable is passed, then this method returns (synchronously) an al
ready resolved promise.
...logs // promise { <state>: "fulfilled", <value>: array[3] } // promise { <state>: "fulfilled", <value>: array[4] } // promise { <state>: "rejected", <reason>: 555 } asynchronicity or synchronicity of promise.all this following example demonstrates the asynchronicity (or synchronicity, if the iterable passed is empty) of promise.all: // we are passing as argument an array of promises that are al
ready resolved, // to trigger promise.all as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.all(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function() { console.log('the stack is now empty'); console.log(p); }); // logs, in o...
WebAssembly.instantiate() - JavaScript
the secondary overload takes an al
ready-compiled webassembly.module and returns a promise that resolves to an instance of that module.
... this overload is useful if the module has al
ready been compiled.
... var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main th
read.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main th
read'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'instantiate()' in that specification.
Recommended Web Performance Timings: How long is too long? - Web Performance
there are different suggested times for initially loading the page versus loading additional assets, responding to user interaction, and ensuring smooth animations: idling goal browsers are single th
readed (though background th
reads are supported for web workers).
... this means that user interaction, painting, and script execution are all on the same th
read.
... if the th
read is busy doing complex javascript execution, the main th
read will not be available to react to user input, such as pressing a button.
...this makes the th
read available for user interactions.
Web Performance
that means not running all your startup code in a single event handler on the app's main th
read.performance budgetsa performance budget is a limit to prevent regressions.
... glossary terms beacon brotli compression client hints code splitting cssom domain sharding effective connection type first contentful paint first cpu idle first input delay first interactive first meaningful paint first paint http http/2 jank latency lazy load long task lossless compression lossy compression main th
read minification network throttling packet page load time page prediction parse perceived performance prefetch prerender quic rail real user monitoring resource timing round trip time (rtt) server timing speculative parsing speed index ssl synthetic monitoring tcp handshake tcp slow start time to first byte time to interactive tls transmission control protocol (tcp) tree sha...
...
reading performance charts developer tools provide information on performance, memory, and network requests.
... knowing how to
read waterfall charts, call trees, traces, flame charts , and allocations in your browser developer tools will help you understand waterfall and flame charts in other performance tools.
Add to Home screen - Progressive web apps (PWAs)
how do you make an app a2hs-
ready?
...you could also decide to include different types of icons so devices can use the best one they are able to (e.g., chrome al
ready supports the webp format).
... note that the type member in each icon's object specifies the icon's mimetype, so the browser can quickly
read what type the icon is, and then ignore it and move to a different icon if it doesn't support it.
... if the user selects install, the app is installed (available as standalone desktop app), and the install button no longer shows (the onbeforeinstallprompt event no longer fires if the app is al
ready installed).
Media - Progressive web apps (PWAs)
for example, you are probably
reading this on a device with a display.
...for example, an element that is disabled or
read-only has the disabled attribute or the
readonly attribute.
... selectors can specify these attributes like any other attributes, by using square brackets: [disabled] or [
readonly].
...
read the @import reference page to find details of how to import the new print-specific css file into your style4.css stylesheet.
Paths - SVG: Scalable Vector Graphics
after that, the parser begins
reading for the next command.
...if the cursor was al
ready somewhere on the page, no line is drawn to connect the two positions.
...you might have al
ready gained practical experience with bézier curves using path tools in inkscape, illustrator or photoshop.
...as the curves move toward the right, the control points become sp
read out horizontally.
Using the WebAssembly JavaScript API - WebAssembly
if you have al
ready compiled a module from another language using tools like emscripten, or loaded and run the code yourself, the next step is to learn more about using the other features of the webassembly javascript api.
... note: if you are unfamiliar with the basic concepts mentioned in this article and need more explanation,
read webassembly concepts first, then come back.
... memory in the low-level memory model of webassembly, memory is represented as a contiguous range of untyped bytes called linear memory that are
read and written by load and store instructions inside the module.
... while memory provides a resizable typed array of raw bytes, it is unsafe for references to be stored in a memory since a reference is an engine-trusted value whose bytes must not be
read or written directly by content for safety, portability, and stability reasons.
Window: deviceproximity event - Archive of obsolete content
bubbles no cancelable no interface deviceproximityevent target defaultview (window) default action none event handler property window.ondeviceproximity specification proximity sensor other properties property type description value
read only double (float) the measured proximity of the distant device (distance in centimetres).
... min
read only double (float) the minimum value in the range the sensor detects (if available, 0 otherwise).
... max
read only double (float) the maximum value in the range the sensor detects (if available, 0 otherwise).
Interacting with page scripts - Archive of obsolete content
the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), on
ready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines an object and assigns it to unsafewindow twice: the first time using cloneinto(), the second time using simple assignment: // content-script.js var contentscriptobject = {"greeting" : "hello from add-on"}; unsafewindow.clonedcontentscrip...
...the "main.js" opens the local file "page.html" and attaches a content script to it: // main.js var tabs = require("sdk/tabs"); var self = require("sdk/self"); tabs.open({ url: self.data.url("page.html"), on
ready: attachscript }); function attachscript(tab) { tab.attach({ contentscriptfile: self.data.url("content-script.js") }); } the content script defines a function greetme() and exports it to the page script context.
...n.js" will create a page-mod that will attach "content-script.js" to the target web page, and will then load the target web page: var tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscriptfile: self.data.url("content-script.js"), contentscriptwhen: "
ready" }) tabs.open(pageurl); the target web page "page.html" includes a button and a page script: <html> <head> <meta charset="utf-8"> </head> <body> <input id="message" type="button" value="send a message"/> <script type="text/javascript" src="page-script.js"></script> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a c...
Loading Content Scripts - Archive of obsolete content
the constructors for content-script-using objects such as panel and page-mod define a group of options for loading content scripts: contentscript string, array contentscriptfile string, array contentscriptwhen string contentscriptoptions object we have al
ready seen the contentscript option, which enables you to pass in the text of the script itself as a string literal.
... "
ready" loads the scripts after the dom for the page has been loaded: that is, at the point the domcontentloaded event fires.
... the contentscriptoptions is a json that is exposed to content scripts as a
read only value under self.options property.
windows - Archive of obsolete content
} }); returns the window that was opened: var windows = require("sdk/windows").browserwindows; var example = windows.open("http://www.example.com"); require("sdk/ui/button/action").actionbutton({ id: "
read", label: "
read", icon: "./
read.png", onclick: function() { example.close(); } }); this example uses the action button api, which is only available from firefox 29 onwards.
...this property is
read-only.
...this property is
read-only.
content/symbiont - Archive of obsolete content
this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "
ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires this property is optional and defaults to "end".
... contentscriptoptions object
read-only value exposed to content scripts under self.options property.
...this may have one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "
ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions
read-only value exposed to content scripts under self.options property.
net/url - Archive of obsolete content
experimental enables you to
read content from a uri.
... globals functions
readuri(uri, options)
reads a uri and returns a promise.
... charset string the character set to use when
read the content of the uri given.
platform/xpcom - Archive of obsolete content
if the factory or service is al
ready registered, this function throws components.results.ns_error_factory_exists.
... so if a factory is registered with the contract id "@me.org/mycomponent", and another factory is al
ready registered with that contract id, then: components.classes["@me.org/mycomponent"] will return the old factory, while: xpcom.factorybycontract("@me.org/mycomponent") will return the new one.
... if the object implements an interface that's al
ready defined in xpcom, you can pass that in here: var about = aboutfactory.createinstance(null, ci.nsiaboutmodule); // you can now access the nsiaboutmodule interface of the 'about' object if you will be getting the wrappedjsobject property from the returned object to access its javascript implementation, pass ci.nsisupports here: var custom = factory.createinstance(null, ci.nsisupports).wrappedjs...
ui/toolbar - Archive of obsolete content
this is
read-only and must be unique.
...this property is
read-only and is not available until after the attach event is emitted.
...this property is
read-only and is not available until after the attach event is emitted.
Low-Level APIs - Archive of obsolete content
io/byte-streams provides streams for
reading and writing bytes.
... io/text-streams provides streams for
reading and writing text.
... net/url enables you to
read content from a uri.
jpm - Archive of obsolete content
you can sign an xpi you've al
ready generated by passing the xpi file in the --xpi argument, like this: jpm sign --api-key ${jwt_issuer} --api-secret ${jwt_secret} --xpi <xpi file> alternatively, you can omit the --xpi argument, in which case jpm sign will generate an xpi from the current directory (or --addon-dir).
... your add-on at this exact version number al
ready exists, so it was not signed.
...you can stop
reading this section.
package.json - Archive of obsolete content
description the add-on's description; this is a human-
readable message describing what the add-on does.
... title the human-
readable title of the package; this can contain spaces.
...but sometimes it should be better reorder it for improve
readability.
Creating Reusable Modules - Archive of obsolete content
urn the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for
reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to
read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false...
...urn the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for
reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to
read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false...
...urn the two-digit hexadecimal code for a byte function tohexstring(charcode) { return ("0" + charcode.tostring(16)).slice(-2); } function md5file(path) { var f = cc["@mozilla.org/file/local;1"] .createinstance(ci.nsilocalfile); f.initwithpath(path); var istream = cc["@mozilla.org/network/file-input-stream;1"] .createinstance(ci.nsifileinputstream); // open for
reading istream.init(f, 0x01, 0444, 0); var ch = cc["@mozilla.org/security/hash;1"] .createinstance(ci.nsicryptohash); // we want to use the md5 algorithm ch.init(ch.md5); // this tells updatefromstream to
read the entire file const pr_uint32_max = 0xffffffff; ch.updatefromstream(istream, pr_uint32_max); // pass false here to get binary data back var hash = ch.finish(false...
Examples and demos from articles - Archive of obsolete content
[article] image preview before upload [html] the file
reader.prototype.
readasdataurl() method is useful, for example, to get a preview of an image before uploading it.
... [article] note: the file
reader() constructor was not supported by internet explorer for versions before 10.
...[article] code snippets and tutorials javascript complete cookies
reader/writer with full unicode support this little framework consists of a complete cookies
reader/writer with unicode support.
Displaying web content in an extension without security issues - Archive of obsolete content
a typical example is an rss
reader extension that would take the content of the rss feed (html code), format it nicely and insert into the extension window.
...note: dynamic changes of the "type" attribute have no effect, the frame type is
read out when the frame element is inserted into the document and never again.
...for example, "chrome://foo/content/foo.xhtml" will have full privileges, "http://example.com/foo.xhtml" will be allowed to access example.com, "file:///c:/foo.xhtml" will be allowed to
read files from disk (with some restrictions).
Appendix A: Add-on Performance - Archive of obsolete content
most add-ons use the load event handler in the main overlay to initialize their objects and sometimes
read files or even fetch remote data.
...the intercepting page loads section details several techniques to do this, and you should
read all of them carefully to figure out which one you need.
... if your add-on needs to perform a heavy operation like sorting or a complex mathematical calculation, you should use dom workers to offload the work to other th
reads.
Appendix C: Avoiding using eval in Add-ons - Archive of obsolete content
closures will ensure the code is still valid, even if your outer function al
ready returned from execution.
... the code is hard to
read and by that hard to maintain and review.
... someexistingobject.someproperty = "abc"; // we al
ready demonstrated with with functions in a previous example alternative: object.defineproperty() for most objects it is possible to (re-)define properties with the object.defineproperty() api, which allows to not override values, but also lets you define getters and setters.
Handling Preferences - Archive of obsolete content
in reality there are thousands of other preferences firefox handles that are not
readily available to the user.
... adding preferences to an extension extensions can
read and write firefox preferences and, most importantly, create and manage their own.
...it does 2 things: check if the preferences window is al
ready open.
Introduction - Archive of obsolete content
most links in this documentation are meant to be clicked and
read.
...you'll sometimes
read terms like "xul applications" and "xul extensions", but rarely will they refer to projects that are exclusively built with xul.
...you can
read and copy the user agent string of any firefox window, choosing "help > troubleshooting information" from the main menu.
JavaScript Object Management - Archive of obsolete content
in case you're using javascript code modules or xpcom objects, where a window object is not
readily available, use an nsitimer instead.
...there are a few workarounds for this, and we use the ones we have found to be the most elegant and clear to
read.
... to use xpcom components in our code, so instead of doing this: this.obsservice = components.classes["@mozilla.org/observer-service;1"].getservice(components.interfaces.nsiobserverservice); it's better to do this: this.obsservice = cc["@mozilla.org/observer-service;1"].getservice(ci.nsiobserverservice); these 2 constants don't need to be defined in the overlay because they are al
ready defined globally in the browser.js file in firefox.
The Box Model - Archive of obsolete content
also, if the user has a screen
reader, the label will be
read when the focus is placed on the textbox.
...one possibility is to use special markup in a locale property so that the link can be easily recognized: xulschoolhello.linkedtext.label = go to <a>our site</a> for more information the syntax is similar to html because it's easier to
read this way, but string bundles won't do anything special with it.
... if you're not familiar with css, you should
read this css getting started guide and other online resources before continuing with this tutorial.
User Notifications and Alerts - Archive of obsolete content
users will find them annoying and probably will learn to dismiss them as quickly as possible without even
reading what they have to say.
... this kind on notification is very easy to implement, it doesn't interrupt the user and is easy to
read and dismiss, so it is our recommended way of displaying alerts and notifications.
... the bottom right corner of the browser is the recommended location for an alert, because it normally doesn't block the part of the content where the user is
reading, or the most important parts of page content, such as menus and titles.
Tabbed browser - Archive of obsolete content
current: true}); gsessionstore.settabstate(tab, json.stringify({ entries: [ { title: url } ], usertypedvalue: url, usertypedclear: 2, lastaccessed: tab.lastaccessed, index: 1, hidden: false, attributes: {}, image: null })); reusing tabs rather than open a new browser or new tab each and every time one is needed, it is good practice to try to re-use an existing tab which al
ready displays the desired url--if one is al
ready open.
...the following code demonstrates how to re-use an existing tab that al
ready displays the desired url/uri.
....hasmoreelements()) { var browserwin = browserenumerator.getnext(); var tabbrowser = browserwin.gbrowser; // check each tab of this browser instance var numtabs = tabbrowser.browsers.length; for (var index = 0; index < numtabs; index++) { var currentbrowser = tabbrowser.getbrowseratindex(index); if (url == currentbrowser.currenturi.spec) { // the url is al
ready opened.
Localizing an extension - Archive of obsolete content
if you haven't al
ready created an extension, or would like to refresh your memory, take a look at the previous articles in this series: creating a status bar extension creating a dynamic status bar extension adding preferences to an extension download the sample you can download this article's sample code so you can look at it side-by-side with the article, or to use it as a basis for your own extension.
...we do this by creating a string bundle, using the following code: <stringbundleset id="stringbundleset"> <stringbundle id="string-bundle" src="chrome://stockwatcher2/locale/stockwatcher2.properties"/> </stringbundleset> this establishes a new string bundle, referenced by the id "string-bundle", whose keys and values are to be loaded from the stockwatcher2.properties file we've al
ready created.
...id="myextensionname-filename") update the javascript code now we're
ready to revise the javascript code to load the strings from the string bundle instead of using literal strings.
Same-origin policy for file: URIs - Archive of obsolete content
in other words, any html file on your local disk can
read any other file on your local disk.
... starting in gecko 1.9, files are allowed to
read only certain other files.
... specifically, a file can
read another file only if the parent directory of the originating file is an ancestor directory of the target file.
Embedding FAQ - Archive of obsolete content
however, there is a stripped down, uncommented code with eclipse libraries in this th
read.
... public void changed(progressevent event) { } public void completed(progressevent event) { nsidomdocument doc = browser.getdocument(); system.out.println(doc); } }); while (!shell.isdisposed()) { if (!display.
readanddispatch()) { display.sleep(); } } } how to map a javascript function to a c++ function define an xpcom class defining the function you'll be doing in javascript.
...you can find a better quality answer repeated and with an example in this newsgroup th
read.
Simple Storage - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...open()as described above, the jetpack.storage.simple object is automatically populated when a feature is loaded, but a feature may force the object to
read from disk by calling jetpack.storage.simple.open().
...jetpack.future.import("menu");jetpack.future.import("selection");jetpack.future.import("storage.simple");// create the persistent notes array if it doesn't al
ready exist.jetpack.storage.simple.notes = jetpack.storage.simple.notes || [];var notes = jetpack.storage.simple.notes;// updates the jetpack menu with the current notes.
Tabs - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring on
ready()when the inherited document is fully loaded.
...tp://www.example.com/"); blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring on
ready()when the inherited document is fully loaded.
slideBar - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...jetpack.future.import("slidebar"); methods append(iconurihtmlhtml/xmlurluriwidthintpersistboolautoreloadboolonclickfunctiononselectfunctionon
readyfunction)this is a list of options to specify modifications to your slidebar instance.
...iconhref oficon to show in the slidebaruri htmlhtml content for the featurehtml/xml urlurl to load content for the featureuri widthwidth of the content area and the selected slide sizeint persistdefault slide behavior when being selectedbool autoreloadautomatically reload content on selectbool onclickcallback when the icon is clickedfunction onselectcallback when the feature is selectedfunction on
readycallback when featured is loadedfunction an example: jetpack.slidebar.append({ url: "http://mozilla.com", width: 150, onclick: function(slide){ slide.icon.src = "chrome://branding/content/icon48.png"; }}); ...
Microsummary XML grammar reference - Archive of obsolete content
for an introduction to how to create a microsummary,
read the article creating a microsummary.
...xmlns="http://www.mozilla.org/microsummaries/0.1" name="firefox download count"> <template> <transform xmlns="http://www.w3.org/1999/xsl/transform" version="1.0"> <output method="text"/> <template match="/"> <value-of select="id('download-count')"/> <text> fx downloads</text> </template> </transform> </template> <pages> <include>http://(www\.)?sp
readfirefox\.com/(index\.php)?</include> </pages> </generator> namespace the namespace uri for microsummary generator xml documents is: http://www.mozilla.org/microsummaries/0.1 all elements in a microsummary generator document should be in this namespace except the descendants of the <template> element, which should be in the xslt namespace: http://www.w3.org/1999/xsl/transform the <generator> e...
...attributes: name (required) a descriptive, human-
readable name for the microsummary created by the generator.
Mozilla Crypto FAQ - Archive of obsolete content
also note that mozilla support for pgp and other security schemes may also be made available by commercial security vendors or by independent developers, using the various public apis al
ready present in mozilla.
... however, in an advisory opinion issued in reference to the bernstein case, the bureau of export administration (bxa) has stated the following: "concerning the posting onto a mirror or archive site of al
ready-posted source code, notification is required only for the initial posting." bxa and nsa have al
ready been notified of the posting of encryption-related source code on the mozilla site, and in light of this opinion we have therefore decidednot to ask mirror sites to provide notification themselves.
...export controls on encryption software al
ready been ruled unconstitutional?
BundleLibrary - Archive of obsolete content
bundles gmail: gmail.webapp google calendar: gcalendar.webapp google docs: gdocs.webapp google groups: groups.webapp google analytics: ganalytics.webapp google
reader: g
reader.webapp facebook: facebook.webapp twitter: twitter.webapp user contributed bundles gmail w/gtalk: gmail.webapp (note: work with latest version of prism!) 32 online todo lists: zip file with web apps for 32 online todo lists anywhere.fm: anywhere.fm@prism.app.webapp a service that lets you upload your entire music library to their servers and listen from anywhere through a slick flash ...
...aol email : aolemail.webapp bbc radio player bbcradioplayer.webapp bloglines : bloglines.webapp bloglines beta: beta.bloglines.webapp chandler: chandler.webapp flash earth (integrates all major mapping sites) flashearth.webapp flickr: flickr.webapp gollum wikipedia browser in english:gollum_en.webapp google notebook: gnote.webapp google page creator: google_pagecreator.webapp google
reader + gtalk : prism-bundle-google-
reader-with-gtalk.webapp google webmaster tools: google_webmastertools.webapp grandcentral inbox: grandc.webapp (note: grandcentral requires the flash plugin.
...slimtimer client slimtimer.webapp a very useful time-tracking tool with a "slim" client spagobi spagobi.webapp a web collaborative business intelligence platform streamy streamy.webapp ( streamy is a pretty powerful, next-gen online rss feed
reader.
RDF Datasource How-To - Archive of obsolete content
typically, you provide a parser for
reading in some sort of static storage (e.g., a data file); the parser translates the datafile into a series of calls to assert() to set up the in-memory datasource.
...this can be useful if your datasource is "
read-only", and you aren't worried about modification using assert(), etc.
... constructing a dll for a component is beyond the scope of this document; the
reader is referred to the rdf factory as a guideline.
Frequently Asked Questions - Archive of obsolete content
to help us make the best use of our time, please first search in the svg component of our bug database to check that the issue hasn't al
ready been reported.
...however, mozilla's implementation al
ready supports some things that adobe's lacks, particularly parts of the xml and svg doms.
...if you don't have an irc client then install chatzilla into mozilla/mozilla firefox (note it may al
ready be built in).
Running Tamarin performance tests - Archive of obsolete content
if you've correctly edited and run the android-vars.sh script mentioned on the tamarin build documentation page you should al
ready be pathed to the adb executable in the public sdk/ndk, but if not it exists at /android-public/android-sdk-mac_86/platform-tools.
...the shell can be named variously in the build but on the phone the executable must be 'avmshell' $ adb push avmshell /data/app/avmshell $ adb shell chmod 777 /data/app/avmshell copy android_runner.sh, if it doesn't al
ready exist on the phone in /data/app $ adb push tamarin-redux/platform/android/android_runner.sh /data/app/android_runner.s $ adb shell chmod 777 /data/app/android_runner.sh test it out with a simple .abc or no args for usage (should return exitcode=0) $ tamarin-redux/platform/android/android_shell.h hello.abc hello exitcode=0 running performance tests to run performance tests on android you don't ne...
...ed to pass --androidth
reads or --th
reads=1 as with the acceptance tests; in fact, a usage error will result.
Venkman Internals - Archive of obsolete content
as with any complex application, aspects of the design may not be clear for new
readers of the source.
... these notes are written by such
readers: as you learn please correct any errors.
... venkman-msg.js localization code,
reads venkman.properties from a subdirectory of "locale" and injects variables.
Anonymous Content - Archive of obsolete content
focus events should also be stopped if the bound element is al
ready focused.
... for example, if the user has al
ready focused the textfield within an html file upload control, then the file upload control is now also focused.
... if the user then focuses the button inside the file upload control, the focus event generated for the button is stopped before it reaches the file control, since the file control is al
ready focused.
Mac stub installer - Archive of obsolete content
copy the license and
readme from the "mozilla installer" folder" to the "macbuild" folder itself.
... once you have the mac installer built and
ready to debug you may want to debug the xpinstall engine in the context of the installer rather than in the context of the browser.
...
read the top of the packages-mac file for it's simple syntax and semantics.
Uploading and Downloading Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...meanwhile you can
read this.
Moving, Copying and Deleting Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
...for instance, the following example renames a file within the same directory: file.moveto(null, "hello.txt"); if the destination file al
ready exists, nsifile.moveto() replaces the existing file.
MenuModification - Archive of obsolete content
the appenditem method will create a menupopup element if it doesn't al
ready exist.
... if the menu al
ready has a menupopup, the new menuitem will be appended to this existing one.
...the first time the function is called, the haschildnodes method will return false, however the second time, the method will return true as the items have al
ready been added to the menu.
PopupEvents - Archive of obsolete content
the popupshown event the popupshown event is fired once a popup is al
ready visible.
...you also cannot cancel the hiding of a menupopup when a user has made a selection from a menu, as it is al
ready too late to do so.
... in this situation the command event has al
ready been sent to the selected menuitem and the operation al
ready carried out.
RDF Modifications - Archive of obsolete content
when parsing, any triples that al
ready exist are not added again.
...assuming that the 'obelisk' photo doesn't have a description al
ready, adding the triple listed above should cause a new result to be available for this photo.
...the only extra complication to deal with in the multiple query case is when a particular result's member resource al
ready matches a query, yet the new rdf triple would cause an earlier query to match.
Creating toolbar buttons (Customize Toolbar Window) - Archive of obsolete content
explaining overlays is beyond the scope of this tutorial -- you can
read about them in the xul tutorial.
...if you're unfamiliar with how that works,
read the skinning section of jonah bishop's excellent toolbar tutorial.
... how to adjust toolbar button's label position a forum th
read about adding an item to the toolbar (instead of just adding it to palette) right after an extension is installed.
Adding Properties to XBL-defined Elements - Archive of obsolete content
readonly attribute you can make a field or property
read-only by adding a
readonly attribute to the field tag or property tag and setting it to true.
... attempting to set the value of a
read-only property will fail.
... note: the
readonly attribute did not work correctly on fields until gecko 2.0.
Skinning XUL Files by Hand - Archive of obsolete content
if you want to use the classes al
ready defined in mozilla's global skin to style your elements, you may do so.
...
reading the global skin it's very important to familiarize yourself with the basic style definitions in the global skin before you set out creating your own stylesheet.
... xul's technologies are interoperable, consistent, cross-platform, free, and
readily available.
iframe - Archive of obsolete content
contentdocument type: document this
read-only property contains the document object in the element.
... contentwindow type: todo use the contentwindow.wrappedjsobject to obtain a dom(html) window object docshell type: nsidocshell this
read-only property contains the nsidocshell object for the document.
... webnavigation type: nsiwebnavigation this
read-only property contains the nsiwebnavigation object for the document.
panel - Archive of obsolete content
<panel id="thepanel"> <hbox align="start"> <image src="warning.png"/> <vbox> <description value="you have 6 new messages."/> <hbox> <button label="
read mail"/> <button label="new message"/> </hbox> </vbox> </hbox> </panel> <description value="6 new messages" popup="thepanel"/> attributes backdrag type: boolean setting the backdrag attribute on a xul panel lets the user move the panel by clicking and dragging anywhere on its background area.
... popupboxobject type: nsipopupboxobject this
read-only property holds the nsipopupboxobject that implements the popup.
... state type: string this
read only property indicates whether the popup is open or not.
radiogroup - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
... itemcount type: integer
read only property holding the number of child items.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
Debugging a XULRunner Application - Archive of obsolete content
if .autoreg al
ready exists, then edit it to force the last modified time to be updated.
... "new in firefox 3" attribute "contentaccessible" on https://developer.mozilla.org/en/chrome_registration so as per http://markmail.org/message/ezbomhkw3bgqjllv#query:x-jsd+page:1+mid:xvlr7odilbyhn6v7+state:results change the manifest to have this line: content venkman jar:venkman.jar!/content/venkman/ contentaccessible=yes i get errors about not being able to open contentareautils.js, contenta
readd.js, findutils.js, or contentareautils.js...
...n\content\venkman\venkman-scripts.xul and changed: @@ -54,11 +54,11 @@ <script src="chrome://global/content/nstransferable.js" /> <script src="chrome://global/content/nsclipboard.js" /> <script src="chrome://global/content/nsdraganddrop.js" /> - <script src="chrome://communicator/content/contentareautils.js" /> - <script src="chrome://communicator/content/contenta
readd.js" /> - <script src="chrome://communicator/content/findutils.js" /> - <script src="chrome://browser/content/contentareautils.js" /> + <script src="chrome://global/content/contentareautils.js" /> + <script src="chrome://global/content/contenta
readd.js" /> <script src="chrome://global/content/findutils.js" /> + <script src="chrome://global/content/contentarea...
Gecko Compatibility Handbook - Archive of obsolete content
for more solutions to common problems please continue
reading this handbook.
... problem: site certified on netscape 6.x looks incorrect in other browsers if your site is al
ready gecko-compatible, try switching back to a netscape 6 user-agent string.
... for more detail on this issue, please
read notes on tls - ssl 3.0 intolerant servers.
2006-10-06 - Archive of obsolete content
read more...
...
read more...
... other links of interest: roadmap for accessible rich internet applications (wai-aria roadmap) roles for accessible rich internet applications (wai-aria roles) states and properties module for accessible rich internet applications (wai-aria states and properties) making ajax work with screen
readers meetings accessibility hackfest 2006 - october 10-12 in cambridge, ma (more details) participants include the mozilla foundation, ibm, sun and novell to name a few.
2006-11-10 - Archive of obsolete content
harry is looking for help with create th
read in javascript using nsith
read.
... he wants to know how to create new th
reads using javascript for background download operations.
... neil deakin points out that "downloads and other network operations are always done in another th
read so you shouldn't be creating one yourself".
NPByteRange - Archive of obsolete content
the only plug-in api call that uses the npbyterange type is npn_request
read(), which lets the plug-in
read specified parts of a file without downloading it.
...the browser makes a copy if it needs to keep the objects beyond the call to npn_request
read().
... see also npn_request
read() ...
Why use RSS - Archive of obsolete content
if you are
reading this, you probably al
ready have your own reasons for wanting to use rss.
... software that
reads and can make use of rss is also everywhere.
...(too many to list.) and if you syndicate using rss, then all those desktop and web-based rss aggregators will be able to make use of and
read your rss feed.
Introduction to Public-Key Cryptography - Archive of obsolete content
figure 4 assumes the following: the user has al
ready decided to trust the server, either without authentication or on the basis of server authentication via ssl.
... like figure 4, figure 5 assumes that the user has al
ready decided to trust the server and has requested a resource, and that the server has requested client authentication in the process of evaluating whether to grant access to the requested resource.
... here are the data and signature sections of a certificate in human-
readable format: certificate: data: version: v3 (0x2) serial number: 3 (0x3) signature algorithm: pkcs #1 md5 with rsa encryption issuer: ou=ace certificate authority, o=ace industry, c=us validity: not before: fri oct 17 18:36:25 1997 not after: sun oct 17 18:36:25 1999 subject: cn=jane doe, ou=finance, o=ace industry, c=us subject public key info: algorithm: pkcs #1 rsa encryption p...
XForms Custom Controls - Archive of obsolete content
var control = this; var refreshstub = function() { control.refresh(); } this.ref1.refresh = refreshstub; this.ref2.refresh = refreshstub; </constructor> <property name="ref1"
readonly="true" onget="return this.ownerdocument.getanonymouselementbyattribute(this, 'anonid', 'ref1');"/> <property name="ref2"
readonly="true" onget="return this.ownerdocument.getanonymouselementbyattribute(this, 'anonid', 'ref2');"/> </implementation> new host language the mozilla xforms implementation currently only supports xforms hosted in xhtml or xul documents.
... */ void setvalue(in domstring value); /** * return true if the instance node is
readonly as determined by the mdg.
... */ boolean is
readonly(); /** * return true if the instance node is relevant as determined by the mdg.
Mozilla XForms Specials - Archive of obsolete content
), except for :
read-only and :
read-write, because of non-specified behaviour of these for (x)html.
... instead you have to use :-moz-
read-only and :-moz-
read-write for now.
...if you are wondering why we have this restriction, here is a simple example of why: <xforms:model> <xforms:instance src="http://intranetserver/addrbook.xml"/> <xforms:submission id="sub" action="http://megaspammer.com/gather" method="post"/> <xforms:send submission="sub" ev:event="xforms-
ready"/> </xforms:model> this imaginary would fetch something that is only accessible for you (f.x.
Window: devicelight event - Archive of obsolete content
bubbles no cancelable no interface sensorcallback target defaultview (window) other properties property type description value
read only double (float) the sensor data for ambient light in lux.
... min
read only double (float) the minimum value in the range the sensor detects (if available, 0 otherwise).
... max
read only double (float) the maximum value in the range the sensor detects (if available, 0 otherwise).
Styling Abbreviations and Acronyms - Archive of obsolete content
this is to be encouraged, and according to guideline 4 of the web content accessibility guidelines, both elements should be given a title attribute to improve "
readability of the web for all people, including those with learning disabilities, cognitive disabilities, or people who are deaf." the problem authors have discovered that any abbr or acronym that has a title attribute is rendered with a dotted underline, per the following rule in resource://gre-resources/html.css abbr[title], acronym[title] { text-decoration: dotted underline; } the solution ...
...the underline tells
readers that the word in question has extra information associated with it.
...removing the underline from these elements will rob
readers of an indication that there is extra information available.
The Business Benefits of Web Standards - Archive of obsolete content
improved user experience: less bandwidth and fast loads html code is often much more compact (therefore easier to
read and maintain) when used in conjunction with css.
...dynamic effects such as those created by javascript are not taken into account, and text rendered with graphics cannot be
read and parsed either.
...although in some ways a controversial move - the announcement has attracted widesp
read support from leading developers and standards advocates, led by jeffrey zeldman.
Game distribution - Game development
self-hosting if you are a front-end developer, you may al
ready know what to do.
... the chrome web store is also an attractive option — again, having a manifest file
ready, zipping your game and filling in the online submission form is about all that's required.
...native stores are al
ready filled with established devs selling great games, so you have to be talented and lucky to get noticed.
Game monetization - Game development
if your work is a serious endeavour on the path to becoming an independent game developer able to make a living,
read on and see what your options are.
... add-ons and dlcs add-ons and downloadable content are a good way to provide extra value to an al
ready released game, but remember that you'll have to offer decent, entertaining content to attract people to buy it.
...game promotion and monetization at the same time is a win-win, and if you don't abuse it with too much advertising the
readers will enjoy
reading them and as well as learning a thing or two.
Game promotion - Game development
when the time comes your community will help you sp
read the word about your shiny little game.
...and you can use your own game as an example, especially in a tutorial when you're showing how to do something you've implemented al
ready.
...when writing a tutorial remember to focus on delivering something valuable to the
reader.
Collision detection - Game development
we have the bricks appearing on the screen al
ready, but the game still isn't that interesting as the ball goes through them.
...for better
readability of the code we will define the b variable for storing the brick object in every loop of the collision detection: function collisiondetection() { for(var c=0; c<brickcolumncount; c++) { for(var r=0; r<brickrowcount; r++) { var b = bricks[c][r]; // calculations } } } if the center of the ball is inside the coordinates of one of our bricks, we...
...we have to figure out a way to get rid of the ones we've al
ready hit with the ball.
Visual typescript game engine - Game development
al
ready implemented: -video chat webrtc (sip) chat and data communication.
...├── externals/ | ├── templates/ | ├── imgs/ | ├── styles/ | | └── favicon.ico | ├── visualjs2.js | ├── app.html ├── src/ | ├── style/ | | ├── styles.css | ├── libs/ | | ├── class/ | | | ├── networking/ | | | | ├── rtc-multi-connection/ | | | | | ├── filebuffer
reader.js | | | | | ├── rtcmulticonnection2.js | | | | | ├── rtcmulticonnection3.js | | | | | ├── linkify.js | | | | | ├── gethtmlmediaelement.js | | | | | ├── socket.io.js | | | | ├── broadcaster-media.ts | | | | ├── broadcaster.ts | | | | ├── connector.ts | | | | ├─�...
... -run services database server (locally and leave it alive to develop process): npm run dataserver looks like this : mongod --dbpath ./server/database/data fix: "failed: address al
ready in use" : netstat -ano | findstr :27017 taskkill /pid typeyourpidhere /f also important "run visual studio code as administrator".
Hoisting - MDN Web Docs Glossary: Definitions of Web-related terms
no hoisting happens so trying to
read the variable results in referenceerror exception.
... // example 1 // only y is hoisted x = 1; // initialize x, and if not al
ready declared, declare it - but no hoisting as there is no var in the statement.
... console.log(x + " " + y); // '1 undefined' // this prints value of y as undefined as javascript only hoists declarations var y = 2; // declare and initialize y // example 2 // no hoisting, but since initialization also causes declaration (if not al
ready declared), variables are available.
IDL - MDN Web Docs Glossary: Definitions of Web-related terms
these are the attributes you can
read or set using javascript properties like element.foo.
...when using idl attributes, you
read or set values of the desired type, so input.maxlength is always going to return a number and when you set input.maxlength ,it wants a number.
...html specifications try to make this as developer-friendly as possible, but for various reasons (mostly historical), some attributes behave oddly (select.size, for example) and you should
read the specifications to understand how exactly they behave.
Speculative parsing - MDN Web Docs Glossary: Definitions of Web-related terms
traditionally in browsers the html parser ran on the main th
read and was blocked after a </script> tag until the script has been retrieved from the network and executed.
... some html parser, such as firefox since firefox 4, support speculative parsing off of the main th
read.
...the upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was al
ready scanned for scripts, style sheets and images.
A cool-looking box - Learn web development
prerequisites: before attempting this assessment, you should have al
ready worked through all the articles in this module.
... the same color for the text; make it
readable using a black text shadow.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Cascade and inheritance - Learn web development
source order we have al
ready seen how source order matters to the cascade.
...we al
ready know that an element selector has low specificity and can be overwritten by a class.
... the effect of css location finally, it is also useful to note that the importance of a css declaration depends on what stylesheet it is specified in — it is possible for users to set custom stylesheets to override the developer's styles, for example the user might be visually impaired, and want to set the font size on all web pages they visit to be double the normal size to allow for easier
reading.
The box model - Learn web development
note: to
read more about the values of display, and how boxes work in block and inline layout, take a look at the mdn guide to block and inline layout.
... margins, padding, and borders you've al
ready seen the margin, padding, and border properties at work in the example above.
... an element with display: inline-block does a subset of the block things we al
ready know about: the width and height properties are respected.
Normal Flow - Learn web development
starting with a solid, well-structured document that is
readable in normal flow is the best way to begin any webpage.
... it ensures that your content is
readable, even if the user is using a very limited browser or a device such as a screen
reader that
reads out the content of the page.
... in addition, as normal flow is designed to make a
readable document, by starting in this way you are working with the document rather than fighting against it as you make changes to the layout.
Supporting older browsers - Learn web development
some of your users might be hearing your content
read out to them by a screen
reader, or have zoomed in on the page to be able to
read it.
...a user with a very limited feature phone might not get much of your css, but the content will flow in a way that makes
reading easy.
...couple this information with the knowledge that browsers ignore css that they don’t understand, and you have a way to create simple layouts using the legacy techniques we have al
ready covered, which are then overwritten by your grid layout in modern browsers that understand it.
CSS layout - Learn web development
at this point we've al
ready looked at css fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside.
... get started prerequisites before starting this module, you should al
ready: have basic familiarity with html, as discussed in the introduction to html module.
... introduction to css layout this article will recap some of the css layout features we've al
ready touched upon in previous modules — such as different display values — and introduce some of the concepts we'll be covering throughout this module.
What is CSS? - Learn web development
these documents will be
readable in a web browser.
...what you are seeing is the browser's default styles — very basic styles that the browser applies to html to make sure it will be basically
readable even if no explicit styling is specified by the author of the page.
... as a newcomer to css, it is likely that you will find the css specs overwhelming — they are intended for engineers to use to implement support for the features in user agents, not for web developers to
read to understand css.
Styling links - Learn web development
visited: a link when it has al
ready been visited (exists in the browser's history), styled using the :visited pseudo class.
... you've reached the end of this article, and al
ready did some skill testing in our active learning sections, but can you remember the most important information going forward?
... this assessment tests all the knowledge discussed in this module, so you might want to
read the next article before moving on to it.
Web fonts - Learn web development
go to font squirrel and choose two fonts — a nice interesting font for the headings (maybe a nice display or slab serif font), and slightly less flashy and more
readable font for the paragraphs.
...they are somewhat advanced for our beginner's course, but if you fancy stretching yourself and looking into them,
read our variable fonts guide.
... you've reached the end of this article, and al
ready did some skill testing in our active learning sections, but can you remember the most important information going forward?
What text editors are available? - Learn web development
prerequisites: you should al
ready know about various software you need to build a website.
...your computer may al
ready be installed with one of the editors suggested above (e.g.
... try digging through the settings of your editor and
read the manual or documentation to see what its capabilities are.
What are browser developer tools? - Learn web development
if the tools are al
ready displayed, click on the debugger tab.
...(opera works the same way.) edge and internet explorer 11: press f12 and then, ctrl + 3, or if the tools are al
ready displayed, click on the debugger tab.
...to access the console in any browser: if the developer tools are al
ready open, click or press the console tab.
What are hyperlinks? - Learn web development
the web's original purpose was to provide an easy way to reach,
read, and navigate through text documents.
...being human-
readable, urls al
ready made things easier, but it's hard to type a long url whenever you want to access a document.
... links influence how
readily a search engine will link to your site.
How do you set up a local testing server? - Learn web development
this is because of security restrictions (for more on web security,
read website security).
...if you are using linux or macos, it should be available on your system al
ready.
... note: if you al
ready have something running on port 8000, you can choose another port by running the server command followed by an alternative port number, e.g.
Client-side form validation - Learn web development
read website security for an idea of what could happen; implementing server-side validation is somewhat beyond the scope of this module, but you should bear it in mind.
...the aria-live attribute is set on that <span> to make sure that our custom error message will be presented to everyone, including it being
read out to screen
reader users.
...if you want to dig into form validation ui requirements, here are some useful articles you should
read: smashingmagazine: form-field validation: the errors-only approach smashingmagazine: web form validation: best practices and tutorials six revision: best practices for hints and validation in web forms a list apart: inline validation in web forms an example that doesn't use the constraint validation api in order to illustrate this, the following is a simplified version of the pre...
Other form controls - Learn web development
block and inline: experimental values that allow resizing in the block or inline direction only (this varies depending on the directionality of your text;
read handling different text directions if you want to find out more.) play with the interactive example at the top of the resize reference page for a demonstration of how these work.
... other form features there are a few other form features that are not as obvious as the ones we have al
ready mentioned, but still useful in some situations, so we thought it would be worth giving them a brief mention.
... the content inside the <progress> element is a fallback for browsers that don't support the element and for screen
readers to vocalize it.
Publishing your website - Learn web development
then it steps through one method that can work right away for many
readers.
... check the "initialize this repository with a
readme" box.
... further
reading what is a web server understanding domain names how much does it cost to do something on the web?
Add a hitmap on top of an image - Learn web development
prerequisites: you should al
ready know how to create a basic html document and how to add accessible images to a webpage.
... text links (perhaps styled with css) are preferable to image maps for several reasons: text links are lightweight, maintainable, often more seo-friendly, and support accessibility needs (e.g., screen
readers, text-only browsers, translation services).
... you may write alt="" if the href attribute is blank and the entire image al
ready has an alt attribute.
Define terms with HTML - Learn web development
to deal with these use cases, html provides tags to mark descriptions and words described, so that your meaning gets across properly to your
readers.
... special case: abbreviations it's best to mark abbreviations specially with <abbr>, so that screen
readers
read them appropriately and so that you can operate on all abbreviations uniformly.
...the css font-weight property is what you need here: dt { font-weight: bold; } this produces the slightly more
readable result below: learn more <dfn> <dl> <dt> <dd> how to use the aria-describedby attribute ...
Debugging HTML - Learn web development
debugging isn't scary when writing code of some kind, everything is usually fine, until that d
readed moment when an error occurs — you've done something wrong, so your code doesn't work — either not at all, or not quite how you wanted it to.
... <ul> <li>unclosed elements: if an element is <strong>not closed properly, then its effect can sp
read to areas you didn't intend <li>badly nested elements: nesting elements properly is also very important for code behaving correctly.
... first, load the markup validation service in one browser tab, if it isn't al
ready open.
Getting started with HTML - Learn web development
however, it is best practice to write all tags in lowercase for consistency,
readability, and other reasons.
...it avoids such problems, and results in more
readable code.
...the answer is
readability.
Structuring a page of content - Learn web development
previous overview: introduction to html structuring a page of content
ready for laying it out using css is a very important skill to master, so in this assessment you'll be tested on your ability to think about how a page might end up looking, and choose appropriate structural semantics to build a layout on top of.
... prerequisites: before attempting this assessment you should have al
ready worked through the rest of the course, with a particular emphasis on document and website structure.
... details of what you have al
ready tried, and what you would like us to do, e.g.
What’s in the head? Metadata in HTML - Learn web development
adding a title we've al
ready seen the <title> element in action — this can be used to add a title to the document.
...there are actually a number of ways to handle loading javascript on your page, but this is the most foolproof one to use for modern browsers (for others,
read script loading strategies).
...your html document will be indexed more effectively by search engines if its language is set (allowing it to appear correctly in language-specific results, for example), and it is useful to people with visual impairments using screen
readers (for example, the word "six" exists in both french and english, but is pronounced differently.) you can also set subsections of your document to be recognised as different languages.
Mozilla splash page - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through the rest of the multimedia and embedding module.
...then save pattern.png in the same directory (right click on the image to get an option to save it.) access the different images in the originals directory and save them in the same way; you'll want to save them in a different directory for now, as you'll need to manipulate (some of) them using a graphics editor before they're
ready to be used.
... details of what you would like us to do — for example what you have al
ready tried, if you are stuck and need help,.
Making decisions in your code — conditionals - Learn web development
this code is pretty human-
readable — it is saying "if the condition returns true, run code a, else run code b" you should note that you don't have to include the else and the second curly brace block — the following is also perfectly legal code: if (condition) { code to run if condition is true } run some other code however, you need to be careful here — in this case, the second block of code is not controlled by t...
... as a final point, you may sometimes see if...else statements written without the curly braces, in the following shorthand style: if (condition) code to run if condition is true else run some other code instead this is perfectly valid code, but using it is not recommended — it is much easier to
read the code and work out what is going on if you use the curly braces to delimit the blocks of code, and use multiple lines and indentation.
...if there is anything you didn't understand, feel free to
read through the article again, or contact us to ask for help.
Manipulating documents - Learn web development
it is more complex than html, and creating your content with javascript also has other issues attached to it (such as not being
readable by search engines).
... the input should be emptied and focused
ready for you to enter another item.
... finally, use the focus() method to focus the input element
ready for entering the next shopping list item.
JavaScript object basics - Learn web development
overview: objects next in this article, we'll look at fundamental javascript object syntax, and revisit some javascript features that we've al
ready seen earlier in the course, reiterating the fact that many of the features you've al
ready dealt with are objects.
...while working with this example you should have your developer tools javascript console open and
ready to type in some commands.
...try entering the following line below the javascript code that's al
ready in your file, then saving and refreshing: const person = {}; now open your browser's javascript console, enter person into it, and press enter/return.
Perceived performance - Learn web development
how a user perceives your performance is as important, or perhaps more important, than any objective statistic, but it's subjective, and not as
readily measurable.
...even if an operation is going to take a long time (because of latency or or inavailability of the main th
read), it is possible to keep the user engaged while they wait by showing a loading spinner, or a series of useful hints and tips (or jokes, or whatever else you think might be appropriate).
...if some assets are going to be slower to load than others, with elements loading after other content has al
ready been painted to the screen, plan ahead and leave space in the layout for them so that content doesn't jump or resize, especially after the site has become interactive.
Introduction to the server side - Learn web development
after
reading this article you'll understand the additional power available to websites through server-side coding.
...for "dynamic requests" the server interprets the request,
reads required information from the database (3), combines the retrieved data with html templates (4), and sends back a response containing the generated html (5,6).
... amazon regularly sends product e-mails that suggest products similar to those al
ready bought or viewed that you might be interested in.
Website security - Learn web development
as you
read, note how threats are most successful when the web application either trusts, or is not paranoid enough about the data coming from the browser.
...the requests may simply be numerous, or they may individually consume large amounts of resource (e.g., slow
reads or uploading of large files).
...we hope you've enjoyed learning these fundamental concepts, and you're now
ready to select a web framework and start programming.
Server-side website programming first steps - Learn web development
we recommend that you first
read the following topics: what is a web server?
... with that basic understanding, you'll be
ready to work your way through the modules in this section.
...after
reading this article, you'll understand the additional power available to websites through server-side coding.
Componentizing our Svelte app - Learn web development
code along with us git clone the github repo (if you haven't al
ready done it) with: git clone https://github.com/opensas/mdn-svelte-tutorial.git then to get to the current app state, run cd mdn-svelte-tutorial/04-componentizing-our-app or directly download the folder's content: npx degit opensas/mdn-svelte-tutorial/04-componentizing-our-app remember to run npm install && npm run dev to start your app in development mode.
...add the following, again to the bottom of the <script> section: function update(updatedtodo) { todo = { ...todo, ...updatedtodo } // applies modifications to todo dispatch('update', todo) // emit update event } here we are using the sp
read syntax to return the original todo with the modifications applied to it.
...in its <script> section, add this handler: function updatetodo(todo) { const i = todos.findindex(t => t.id === todo.id) todos[i] = { ...todos[i], ...todo } } we find the todo by id in our todos array, and update its content using sp
read syntax.
Embedding API for Accessibility
mozilla al
ready supports some of these options.
... this document lays out what we al
ready have, and what we'll need later, in the embedding api to support accessibility.
...is pref is set, the mouse pointer will always be move to the 0,0 pixel of the current keyboard focus frame */ no browse with caret setboolpref("accessibility.browsewithcaret", usecaret); /* if this pref is set, the caret will be visible in the text of the browser, allowing the user to cursor around the html content as if in a
read-only editor */ moz 0.9 special content notifications the w3c uaag specifies types of content that must be optional.
ZoomText
read the release notes if you're interested.
...you may wish to
read through the current issues on this page before reporting bugs.
... issues for ai squared, from high to low priority doc
reader and app
reader don't respect the structure of the document -- no support for columns.
Index
683 source code submission add-ons, extensions, review policy, distribution to complete the review process at addons.mozilla.org (amo), reviewers must be able to
read the code in your extension.
... some build processes render extension code difficult to
read.
...in this case, when you upload your extension to amo, you will need to provide your source code and instructions for building that source code, where build processes render your extension’s code hard to
read.
Testopia
despite bugzilla 5.0 has al
ready been released a few months ago, we don't plan to release a fix for testopia immediately, because it's currently under heavy work to make testopia a fully self-contained extension, which means that all tr_*.cgi scripts which are currently in the bugzilla/ root directory are being moved into extensions/testopia/lib/.
... the good news is that the current code in the git repository al
ready works with bugzilla 5.0, and so if you upgraded to 5.0 al
ready, and if you don't mind having a work-in-progress extension on your machine, you can decide to pull the code from the git repository.
... links faq wiki docs bugs (please
read the bug reporting guide) official testopia blog irc: #testopia or #bugzilla user help support-webtools@lists.mozilla.org developers dev-apps-webtools@lists.mozilla.org downloads download 2.5 (bugzilla 4.2) download 2.4 (bugzilla 3.6 and 4.0) archived versions developers greg hendricks vance baarda (former developer) ed fuentetaja (former develo...
What to do and what not to do in Bugzilla
resolving bugs as duplicate in general newer bugs should be marked as duplicates of older bugs, except when the newer bug contains more information (bug description clearer, patch al
ready attached, lots of people al
ready cc'ed, etc.).
...reports of problems with specific websites that result from bad coding practices al
ready determined to be “tech evangelism” cases by the module owner or peer, or problems that result from the use of proprietary technology, should be be moved to the tech evangelism product rather than being resolved as invalid.
...this isn't mandatory, but can help prevent accidental filing of duplicates of a bug that's al
ready been fixed.
Creating a spell check dictionary add-on
if you are creating a new dictionary, as opposed to updating an existing one, please make sure that there is not al
ready a dictionary available for your locale.
... if there al
ready is one, try contacting the author to get it updated, or contact amo editors if the author does not respond.
...type = 64 indicates that the add-on is in the restartless format, and unpack is required for hunspell to
read the dictionary.
Capturing a minidump
if firefox is not al
ready running, then open windbg from the start menu (start->all programs->debugging tools for windows->windbg).
... if firefox is al
ready running, open windbg from the start menu (start->all programs->debugging tools for windows->windbg).
... ask in the relevant bug or th
read how best to share this very large file!
Debugging on Windows
you can click "start" button to run firefox then, al
ready attached in the debugger.
...one assemly code instruction
reads "int 3".
... for more details, including a work-around see this blog post or this social.msdn th
read.
Gecko Logging
it is enabled for all builds, th
read-safe, and the preferred alternative to nspr logging.
... logging framework declaring a log module lazylogmodule defers the creation the backing logmodule in a th
read-safe manner and is the preferred method to declare a log module.
... raw print exactly what has been specified in the format string, without the process/th
read/timestamp, etc.
SVG Guidelines
th definitions) excessive whitespace in path or polygon points definition examples this path: <path d=" m5,5 l1,1z "> can be cut down to this: <path d="m5,5 l1,1z"> similarly, this polygon: <polygon points=" 0,0 4,4 4,0 "/> can be cut down to this: <polygon points="0,0 4,4 4,0"/> line breaks you should only use line breaks for logical separation or if they help make the file
readable.
...most of time, cdata isn't needed, for example, the content in <style> tags doesn't need to be wrapped in a cdata section as the content inside the tag is al
ready correctly parsed as css.
... nested groups avoid multiple-level nesting of groups, these make the svg less
readable.
Multiple Firefox profiles
from profile manager inside firefox if you al
ready have firefox instance running, you can open another profile from the integrated profile manager on any platform: type about:profiles into the browser url search bar.
... linux if firefox is al
ready included in your linux distribution, or if you have installed firefox with the package manager of your linux distribution: open a terminal emulator or your shell’s command prompt: alt-f2 if you use gnome shell or kde plasma, consult your desktop environment documentation for other environments.
... type about:profiles into the browser url search bar on the page, click create a new profile button
read the introduction, and click next enter a profile name for your new profile.
Frame script loading and lifetime
passing allowdelayedload is a way to ensure that the script is loaded correctly, in case the tab is not
ready when making the call.
... disable any frame scripts al
ready loaded.
... there is no mechanism to unload frame scripts which are al
ready loaded.
IPDL Type Serialization
each type specializes ipc::paramtraits as follows: namespace ipc { template <> struct paramtraits<mytype> { typedef mytype paramtype; static void write(message* amsg, const paramtype& aparam) { // implement serialization here } static bool
read(const message* amsg, void** aiter, paramtype* aresult) { // implement deserialization here.
... return false if deserialization failed } }; } // namespace ipc the standard ipdl types (integers, floats, and xpcom strings) al
ready have serializers.
...ed in this manner: struct examplestruct { int i; nscstring j; int k[4]; }; namespace ipc { template <> struct paramtraits<examplestruct> { typedef examplestruct paramtype; static void write(message* amsg, const paramtype& aparam) { writeparam(amsg, aparam.i); writeparam(amsg, aparam.j); for (int i = 0; i < 4; ++i) writeparam(amsg, aparam.k[i]); } static bool
read(const message* amsg, void** aiter, paramtype* aresult) { if (!
readparam(amsg, aiter, &(aresult->i)) || !
readparam(amsg, aiter, &(aresult->j))) return false; for (int i = 0; i < 4; ++i) if (!
readparam(amsg, aiter, &(aresult->k[i]))) return false; return true; } }; } // namespace ipc once you have a serializer for a type, you can serialize a collectio...
DownloadError
properties attribute type description result
read only nsresult the result code associated with this error.
... becausesourcefailed
read only boolean indicates an error occurred while
reading from the remote location.
... becausetargetfailed
read only boolean indicates an error occurred while writing to the local target.
DownloadSource
properties attribute type description url
read only string the uri for the download source.
... isprivate
read only boolean indicates whether the download originated from a private window.
... referrer
read only string referrer uri of the download source, or null if no referrer should be sent or the download source is not http.
Downloads.jsm
properties attribute type description error
read only constructor constructor for a downloaderror object.
... when you catch an exception during a download, you can use this to verify if ex instanceof downloads.error, before
reading the exception properties with the error details.
... calling this function may cause the download list to be reloaded from the previous session, if it wasn't loaded al
ready.
Webapps.jsm
importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistry
ready: function notifyappsregistry
ready() sanitizeredirects: function sanitizeredirects(asource) _savewidgetsfullpath: function(amanifest, adestapp) appkind: function(aapp, amanifest) updatepermissionsforapp: function(aid, aispreinstalled) updateofflinecacheforapp: function(aid) installpreinstalledapp: function installpreinstalledapp(aid) removeifhttpsduplicate: function(aid) installsystemapps: functi...
...ndowid) popcontentaction: function(windowid) actioncancelled: function(windowid) denyinstall: function(adata) _setupapp: function(adata, aid) _cloneapp: function(adata, anewapp, alocalemanifest, amanifest, aid, alocalid) _writemanifestfile: function(aid, aispackage, ajsonmanifest) _nextlocalid: function() _appidformanifesturl: function(auri) makeappid: function() _saveapps: function() _
readmanifests: function(adata) _ensuresufficientstorage: function(anewapp) _checkdownloadsize: function(afreebytes, anewapp) _getrequestchannel: function(afullpackagepath, aislocalfileinstall, aoldapp,) _senddownloadprogressevent: function(anewapp, aprogress) _getpackage: function(arequestchannel, aid, aoldapp, anewapp) _computefilehash: function(afilepath) _sendappliedevent: function(aapp) _o...
...penand
readpackage: function(azipfile, aoldapp, anewapp, aislocalfileinstall,) _openpackage: function(azipfile, aapp, aislocalfileinstall) _opensignedpackage: function(ainstallorigin, amanifesturl, azipfile, acertdb) _
readpackage: function(aoldapp, anewapp, aislocalfileinstall, aisupdate,) _checksignature: function(aapp, aissigned, aislocalfileinstall) _saveetag: function(aisupdate, aoldapp, arequestchannel, ahash, amanifest) _checkorigin: function(aissigned, aoldapp, amanifest, aisupdate) _getids: function(aissigned, azip
reader, aconverter, anewapp, aoldapp,) _checkforstoreidmatch: function(aisupdate, anewapp, astoreid, astoreversion) revertdownloadpackage: function(aid, aoldapp, anewapp, aisupdate, aerror) uninstall: function(amanifesturl) _promptforuninstall: function(adata) conf...
Bootstrapping a new locale
(
read more about tools at l10n:tools.) after you have downloaded your editor of choice, type the following command in the same path from above (~/ab-cd/browser/chrome/browser) $ edit ab-cd/browser/chrome/browser/aboutcerterror.dtd
read the top of the file to get any context on how to translate contained in the notes written by the developers or l10n-drivers.
...this is why you need to do hg push, which sends the al
ready made commits to the remote repository (http://bitbucket.org/mozillal10n/ab-cd/ in the example above).
... after you have committed and pushed your initial translation, email the l10n-drivers team to let us know it's
ready.
Localization content best practices
note: if you're a localizer and you want to contribute to the localization of mozilla products, you might want to
read our localization quick start guide for information on localizing mozilla code.
...for example accessibility (a11y) strings: in this case space is less important than clarity, since these strings are not displayed in the ui but used by tools like screen
readers.
...if you al
ready know that your strings are temporary, they shouldn't be exposed to the localization process.
Translation phase
the l10n tools are meant to help you maintain your localized content from release to release and leverage al
ready localized materials when localizing new content.
...
read the guidelines on localizing amo, straight from the amo team.
... you should also
read more information on localizing mozilla web projects.
Uplifting a localization from Central to Aurora
i use kdiff3; you may choose your own based on what you
read at http://mercurial.selenic.com/wiki/mergeprogram a clone of your central repo.
...you can safely push this to l10n-central al
ready, in particular if you don't plan to do further updates on aurora.
...now, if you
read this far, you may be overwhelmed, and that's ok.
Creating localizable web applications
bad: <p id="b
readcrumbs"> <?printf(_("<a href=\"%s\">personas home</a> : <a href=\"%s\">sign in</a> : forgot your password?"), $locale_conf->url('/'), $locale_conf->url('/signin'));?> </p> snippet 6.
... good: <p id="b
readcrumbs"> <?printf("<a href=\"%s\">" .
...
read more about plurals in gettext and about plural rules for different languages.
mozilla::MonitorAutoEnter
constructors monitorautoenter( in mozilla::monitor& monitor; ); this parameter is a reference so as to guarantee that your code has al
ready properly constructed the mozilla::monitor.
...notify() nsresult notify(void); notify one th
read waiting on the underlying monitor.
... notifyall() nsresult notifyall(void); notify all th
reads waiting on the underlying monitor.
JS::PerfMeasurement
nstructions that were not predicted correctly ::bus_cycles .bus_cycles total memory bus cycles ::page_faults .page_faults total page-fault exceptions fielded by the os ::major_page_faults .major_page_faults page faults that required disk access ::context_switches .context_switches context switches involving the profiled th
read ::cpu_migrations .cpu_migrations migrations of the profiled th
read from one cpu core to another these events map directly to "generic events" in the linux 2.6.31+ <linux/perf_event.h> interface, and so unfortunately are a little vague in their specification; for instance, we can't tell you exactly which level of cache you get misses for if you measure cache_misses.
... counter values are accumulated across many start/stop cycles, and you can modify their values if you want; stop simply adds counts
read back from the os to whatever is al
ready in each counter.
...each potentially-measurable event corresponds to a regular old instance variable, which you can
read and even modify.
TimerFirings logging
note: the power profiling overview is worth
reading at this point if you haven't al
ready.
... the first two values identify the th
read.
... sed 's/^[^:]\+: //' # strip th
read ids sed 's/\[[0-9]\+\] //' # strip process ids sed 's/ \+[0-9]\+ ms//' # strip timer periods the following is the previous sample output with all three of these commands added into the pipeline.
powermetrics
note: the power profiling overview is worth
reading at this point if you haven't al
ready.
... user%: percentage of that cpu time spent in user space (as opposed to kernel mode.) deadlines (<2 ms, 2-5 ms): these two columns count how many "short" timers woke up th
reads in the process, per second, during the sample period.
...the first column counts interrupt-level wakeups that resulted in a th
read being dispatched in the process.
Preference reference
the effect is that the source xml file is not
read and re-parsed each time the chrome in question is displayed.
... the xul cache is serialized and saved between mozilla sessions in the xul fastload file, which saves a “compiled” version of the xul and javascript in a document to disk for faster startup the next time the application runs.
reader.parse-on-load.force-enabledthe preference
reader.parse-on-load.force-enabled controls if the
reader mode used in firefox mobile should be enabled independent of the memory available in the device.
... by default, the
reader mode in firefox mobile is only enabled if the memory is greater than 384mb.ui.alertnotificationoriginui.alertnotificationorigin controls the position and direction from which popup notifications invoked by nsialertsservice are sliding in.ui.spellcheckerunderlineui.spellcheckerunderline holds the colour which is used to underline words not recognized by the spellchecker.ui.spellcheckerunderlinestyleui.spellcheckerunderlinestyle holds the style which is used to underline words not recognized by the spellchecker.ui.textselectbackgroundui.textselectbackground saves the color in which the background of a text selection in the user interface or in content will be styled.ui.textselectforegroundui.textselectforeground saves the color in which the text of a text selection in the...
A guide to searching crash reports
please
read the documentation about individual crash reports before
reading this page.
...if the number of matches is large -- in this case it exceeds 1.3 million, just as we saw in the "signature facet" tab -- the results will be sp
read across multiple pages, which you can visit by clicking the links at the top right of the tab.
...one way to learn about them is to
read lots of individual crash reports; note that all fields shown in the details tab of an individual crash report have a tool-tip that indicates its key for search.
McCoy
https://fireclipse.svn.sourceforge.net/svnroot/fireclipse/trunk/fireclipseextensions/chromebug/mccoy/signontheline/ bug 396525 - patch to mccoy https://bugzilla.mozilla.org/show_bug.cgi?id=396525 signing update manifests before you release your add-on in order to verify the update manifests applications need to al
ready have information from you for how to verify it.
... releasing an update once you are
ready to release an updated version of your add-on you must create yourself an update.rdf file.
... the signing is rdf aware, which means that if you reorganized the xml in the file into a more human
readable form but the rdf data remained the same then the signature would still be valid.
Creating a Cookie Log
if you are
reading this, you have probably been directed here from a bug report.
... linux start a command shell (these instructions are for bash, if you use something else, you probably know how to modify these instructions al
ready).
... run firefox by typing "./firefox" and pressing enter mac os x open terminal.app, which is located in the /applications/utilities folder (these instructions are for bash, the default shell in mac os x 10.3 and higher; if you use something else, you probably know how to modify these instructions al
ready).
Locks
lock type lock functions in nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among th
reads.
...prmonitor is intended for use with java and reflects the java approach to th
read synchronization.
... for an introduction to nspr th
read synchronization, including locks and condition variables, see introduction to nspr.
PR_Available
determines the number of bytes (expressed as a 32-bit integer) that are available for
reading beyond the current
read-write pointer in a specified file or socket.
... returns the function returns one of the following values: if the function completes successfully, it returns the number of bytes that are available for
reading.
... see also if the number of bytes available for
reading is out of the range of a 32-bit integer, use pr_available64.
PR_Available64
determines the number of bytes (expressed as a 32-bit integer) that are available for
reading beyond the current
read-write pointer in a specified file or socket.
... returns the function returns one of the following values: if the function completes successfully, it returns the number of bytes that are available for
reading.
... see also if the number of bytes available for
reading is within the range of a 32-bit integer, use pr_available.
PR_CEnterMonitor
if a match is found, then either the calling th
read is al
ready in the monitor (and this is a reentrant call) or another th
read is holding the monitor's mutex.
...in the latter case, the calling th
read is likely to find the monitor locked by another th
read and waits for that th
read to exit before continuing.
... note: pr_centermonitor and pr_cexitmonitor must be paired--that is, there must be an exit for every entry--or the object will never become available for any other th
read.
PR_CallOnce
initially (before any th
reading issues exist), the object must be initialized to all zeros.
... from that time on, the client should consider the object
read-only (or even opaque) and allow the runtime to manipulate its content appropriately.
... while the first th
read executes this function, other th
reads attempting the same initialization will be blocked until it has been completed.
PR_ExitMonitor
the monitor object referenced must be one for which the calling th
read currently holds the lock.
... if unsuccessful (the calling th
read has not entered the monitor), pr_failure.
...th
reads that were blocked trying to enter the monitor will be rescheduled.
PR_OpenSharedMemory
syntax #include <prshm.h> nspr_api( prsharedmemory * ) pr_opensharedmemory( const char *name, prsize size, printn flags, printn mode ); /* define values for pr_opensharememory(...,create) */ #define pr_shm_create 0x1 /* create if not exist */ #define pr_shm_excl 0x2 /* fail if al
ready exists */ parameters the function has the following parameters: name the name of the shared memory segment.
...when parameter create is (pr_shm_excl | pr_shm_create) and the shared memory al
ready exists, the function returns null with the error set to pr_file_exists_error.
... when parameter create is pr_shm_create and the shared memory al
ready exists, a handle to that memory segment is returned.
Process Initialization
implicit initialization should suffice unless a program has specific sequencing requirements or needs to characterize the primordial th
read.
... implicit initialization assumes that the initiator is the primordial th
read and that the th
read is a user th
read of normal priority.
... pr_init pr_initialize pr_initialized pr_cleanup pr_disableclockinterrupts pr_blockclockinterrupts pr_unblockclockinterrupts pr_setconcurrency pr_processexit pr_abort module initialization initialization can be tricky in a th
readed environment, especially initialization that must happen exactly once.
NSPR API Reference
introduction to nspr nspr naming conventions nspr th
reads th
read scheduling setting th
read priorities preempting th
reads interrupting th
reads nspr th
read synchronization locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values th
reads th
reading types and constants th
reading functions creating, joining, and identifying th
reads controlling th
read priorities contr...
...olling per-th
read private data interrupting and yielding setting global th
read concurrency getting a th
read's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o fun...
... pr_setlogfile pr_setlogbuffering pr_logprint pr_logflush pr_log_test pr_log pr_assert pr_assert pr_not_reached use example instrumentation counters named shared memory shared memory protocol named shared memory functions anonymous shared memory anonymous memory protocol anonymous shared memory functions ipc semaphores ipc semaphore functions th
read pools th
read pool types th
read pool functions random number generator random number generator function hash tables hash tables and type constants hash table functions nspr error handling error type error functions error codes ...
NSS 3.31 release notes
allow querying a certificate object for its temporary or permanent storage status in a th
read safe way.
... new functions in cert.h cert_getcertisperm - retrieve the permanent storage status attribute of a certificate in a th
read safe way.
... cert_getcertistemp - retrieve the temporary storage status attribute of a certificate in a th
read safe way.
NSS 3.37 release notes
added hacl* poly1305 32-bit the code to support the npn protocol, which had al
ready been disabled in a previous release, has been fully removed.
... nss supports opening sql databases in
read-only mode.
... with nss 3.37, this alternative implementation for linux has been enhanced to use the glibc function getentropy(), instead of
reading from /dev/urandom directly, if the build and runtime linux platform supports it.
NSS Sample Code Sample1
rappedenckey) secitem_freeitem(mwrappedenckey, pr_true); if (mwrappedmackey) secitem_freeitem(mwrappedmackey, pr_true); if (menckey) pk11_freesymkey(menckey); if (mmackey) pk11_freesymkey(mmackey); } int server::init() { int rv = 0; seckeyprivatekey *prvkey = 0; seckeypublickey *pubkey = 0; pk11slotinfo *slot = 0; pk11rsagenparams rsaparams; secstatus s; // see if there is al
ready a private key with this name.
...int initnss() { int rv = 0; secstatus s; s = nss_init
readwrite("."); if (s != secsuccess) rv = 1; // error // for this example, we don't use database passwords pk11_initpin(pk11_getinternalkeyslot(), "", ""); return rv; } int main(int argc, char *argv[]) { int rv; server *server1 = 0; server *server2 = 0; // initialize nss rv = initnss(); if (rv) { cout << "initnss failed" << endl; goto done; } // create the first "server" ...
... rv = server1->generatekeys(); if (rv) { cout << "generatekeys failed" << endl; goto done; } // now that everything is
ready, start server1.
nss tech note2
to enable this mode, set: nspr_log_modules=nss_mod_log:1 nspr_log_file=<logfile> the output format is: osth
readid[nsprth
readid]: c_xxx osth
readid[nsprth
readid]: 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.
...to enable this mode, set: nspr_log_modules=nss_mod_log:3 nspr_log_file=<logfile> the output format is: osth
readid[nsprth
readid]: c_xxx osth
readid[nsprth
readid]: arg1 = 0xaaaaaaaa ...
... osth
readid[nsprth
readid]: argn = 0xaaaaaaaa osth
readid[nsprth
readid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: pinitargs = 0x4010c938 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: pinfo = 0xbffff340 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: tokenpresent = 0x0 1024[805ef10]: pslotlist = 0x0 1024[805ef10]: pulcount = 0xbffff33c 1024[805ef10]: *pulcount = 0x2 1024[805ef10]: rv = 0x0 note that when a pkcs #11 function takes a pointer argument for which it will set a value (c_getslotlist above), this mode will display the value upon return.
Notes on TLS - SSL 3.0 Intolerant Servers
for up-to-date information, you can
read a bugzilla bug report which keeps track of this problem with mozilla-based browsers.
...) domino-go-webserver/4.6.2.6 (and perhaps some later versions) ibm_http_server/1.3.6.3 or earlier (* update to 1.3.6.4) ibm_http_server/1.3.12.1 or earlier (* update to 1.3.12.2) java web server 2 osu/3.2 - decth
reads http server for openvm stronghold/2.2 webmail v.
...for up-to-date information, you can
read this bug 59321 which keeps a list of tls/ssl 3.0 intolerant servers.
FC_Login
the nss cryptographic module doesn't allow the so to log in if the normal user's pin is al
ready initialized.
... ckr_user_al
ready_logged_in: the user is al
ready logged in.
... usertype is cku_so and the normal user's pin is al
ready initialized.
NSC_Login
the nss cryptographic module doesn't allow the so to log in if the normal user's pin is al
ready initialized.
... ckr_user_al
ready_logged_in: the user is al
ready logged in.
... usertype is cku_so and the normal user's pin is al
ready initialized.
NSPR functions
pr_cleanup error reporting nss uses nspr's th
read-specific error code to report errors.
... users call nspr socket i/o functions to
read from, write to, and shut down an ssl connection, and to close an nspr file descriptor.
... pr_
read pr_write pr_recv pr_send pr_getsocketoption pr_setsocketoption pr_shutdown pr_close ...
NSS tools : pk12util
return codes o 0 - no error o 1 - user cancelled o 2 - usage error o 6 - nls init error o 8 - certificate db open error o 9 - key db open error o 10 - file initialization error o 11 - unicode conversion error o 12 - temporary file creation error o 13 - pkcs11 get slot error o 14 - pkcs12 decoder start error o 15 - error
read from import file o 16 - pkcs12 decode error o 17 - pkcs12 decoder verify error o 18 - pkcs12 decoder validate bags error o 19 - pkcs12 decoder import bags error o 20 - key db conversion version 3 to version 2 error o 21 - cert db conversion version 7 to version 5 error o 22 - cert and key dbs patch error o 23 - get default cert db error o 24 - find cert by nickname error o 25 - create e...
...] [-c certcipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example: # pk12util -o certs.p12 -n server-cert -d sql:/home/my/sharednssdb enter password for pkcs12 file: re-enter password: listing keys and certificates the information in a .p12 file are not human-
readable.
... the certificates and keys in the file can be printed (listed) in a human-
readable pretty-print format that shows information for every certificate and any public keys in the .p12 file.
ssltyp.html
when an application makes a copy of a particular certificate structure that al
ready exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
...when an application makes a copy of a particular key structure that al
ready exists in memory, ssl makes a deep copy--that is, it makes a whole new copy of that object.
...treat the structure as
read only.
NSS tools : pk12util
return codes o 0 - no error o 1 - user cancelled o 2 - usage error o 6 - nls init error o 8 - certificate db open error o 9 - key db open error o 10 - file initialization error o 11 - unicode conversion error o 12 - temporary file creation error o 13 - pkcs11 get slot error o 14 - pkcs12 decoder start error o 15 - error
read from import file o 16 - pkcs12 decode error o 17 - pkcs12 decoder verify error o 18 - pkcs12 decoder validate bags error o 19 - pkcs12 decoder import bags error o 20 - key db conversion version 3 to version 2 error o 21 - cert db conversion version 7 to version 5 error o 22 - cert and key dbs patch error o 23 - get default cert db error o 24 -...
...cipher] [-m|--key_len keylen] [-n|--cert_key_len certkeylen] [-d [sql:]directory] [-p dbprefix] [-k slotpasswordfile|-k slotpassword] [-w p12filepasswordfile|-w p12filepassword] for example: # pk12util -o certs.p12 -n server-cert -d sql:/home/my/sharednssdb enter password for pkcs12 file: re-enter password: listing keys and certificates the information in a .p12 file are not human-
readable.
... the certificates and keys in the file can be printed (listed) in a human-
readable pretty-print format that shows information for every certificate and any public keys in the .p12 file.
Tutorial: Embedding Rhino
all it does it
read a script from the command line, execute it, and print a result.
...this removes the association between the context and the current th
read and is an essential cleanup action.
...for example, we can see how to implement java.lang.runnable in a rhino shell session: js> obj = { run: function() { print("hi"); } } [object object] js> obj.run() hi js> r = new java.lang.runnable(obj); [object object] js> t = new java.lang.th
read(r) th
read[th
read-0,5,main] js> t.start() hi adding java objects the next example is runscript2.
The JavaScript Runtime
contexts and th
reads every th
read that executes javascript must have an associated context.
... multiple th
reads (with multiple associated contexts) may act upon the same set of objects.
... any host objects that are defined are responsible for any synchronization required to run safely from multiple th
reads.
How to embed the JavaScript engine
*/ 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_th
reads); 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.
...bal", jsclass_global_flags, js_propertystub, js_deletepropertystub, js_propertystub, js_strictpropertystub, js_enumeratestub, js_resolvestub, js_convertstub, nullptr, nullptr, nullptr, nullptr, js_globalobjecttracehook }; int main(int argc, const char *argv[]) { js_init(); jsruntime *rt = js_newruntime(8l * 1024 * 1024, js_use_helper_th
reads); 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.
... [mac] clang++ -std=c++11 -i<objdir>/dist/include -l<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz [linux] g++ -std=c++11 -i<objdir>/dist/include -l<objdir>/dist/lib helloworld.cpp -o helloworld -lmozjs-31 -lz -lpth
read -ldl it should print "helloworld, it is time" (here time is the current time).
JIT Optimization Outcomes
icoptstub_genericsuccess icgetpropstub_
readslot icgetpropstub_callgetter icgetpropstub_arraylength icgetpropstub_unboxed
read icgetpropstub_unboxed
readexpando icgetpropstub_unboxedarraylength icgetpropstub_typedarraylength icgetpropstub_domproxyshadowed icgetpropstub_domproxyunshadowed icgetpropstub_genericproxy icgetpropstub_argumentslength icsetpropstub_slot icsetpropstub_genericproxy icsetpropstub_domproxyshadowed icsetprop...
...stub_domproxyunshadowed icsetpropstub_callsetter icsetpropstub_addslot icsetpropstub_setunboxed icgetelemstub_
readslot icgetelemstub_callgetter icgetelemstub_
readunboxed icgetelemstub_dense icgetelemstub_densehole icgetelemstub_typedarray icgetelemstub_argselement icgetelemstub_argselementstrict icsetelemstub_dense icsetelemstub_typedarray icnamestub_
readslot icnamestub_callgetter call inlining outcomes optimization outcomes of attempts to inline function calls.
...the interpreted callee function has a lazy, compiled on-demand script instead of an al
ready compiled script.
JSRuntime
a program typically has only one jsruntime, even if it has many th
reads.
... th
reads only one th
read may use a jscontext or jsruntime.
... earlier versions allowed using js_clearcontextth
read and other functions to move a jscontext from one th
read to another.
JS_ConvertArguments
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... variables for optional parameters must al
ready be initialized, because if an optional parameter is not in argv, js_convertarguments does not modify the corresponding variable.
...instead, use jsval_is_object and js_objectisfunction() to check whether a value is al
ready a function, or use js_convertvalue() to convert a value to jstype_function safely.
JS_DefineConstDoubles
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...the attributes for each property is set to jsprop_
readonly | jsprop_permanent.
...if flags is set to 0, the attributes for the property are automatically set to jsprop_permanent | jsprop_
readonly.
JS_GetClass
in spidermonkey versions prior to spidermonkey 1.8.8, js_getclass took both a jscontext* and a jsobject* as arguments in th
read-safe builds, and in non-th
read-safe builds it took only a jsobject*.
... newer versions have removed the context argument, so that the same signature is used regardless whether or not the build is th
read-safe.
...the application must treat the jsclass as
read-only.
Profiling SpiderMonkey
for the mac, you'll want to
read up on profiling javascript with shark.
...costs of th
read safety currently, th
readsafe spidermonkey costs us 10-15% on some benchmarks vs.
... a non-th
readsafe js shell.
SpiderMonkey 31
changes to introduce handles to the jsapi are not individually documented, because of the b
readth of the changes involved.
... on posix platforms, building a th
readsafe shell no longer requires nspr.
... js_th
readsafe is going away, with future versions supporting only th
read-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 38
changes to introduce handles to the jsapi are not individually documented, because of the b
readth of the changes involved.
...opertyspecnameissymbol (bug 1082672) js::propertyspecnametopermanentid (bug 1082672) js::protokeytoid (bug 987669) js::rootedsymbol (bug 645416) js::truehandlevalue (bug 959787) jsconstintegerspec (bug 1066020) jsid_is_symbol (bug 645416) jsid_to_symbol (bug 645416) jsprop_define_late (bug 825199) jsprop_ignore_enumerate (bug 1037770) jsprop_ignore_permanent (bug 1037770) jsprop_ignore_
readonly (bug 1037770) jsprop_ignore_value (bug 1037770) jsprop_propop_accessors (bug 1088002) jsprop_redefine_nonconfigurable (bug 1101123) js_addfinalizecallback (bug 996785) js_defineconstintegers (bug 1066020) js_getflatstringcharat (bug 1034627) js_getfunctionscript (bug 1069694) js_getlatin1flatstringchars (bug 1037869) js_getlatin1internedstringchars (bug 1037869) js_getlatin1stringch...
... js_th
readsafe is going away, with future versions supporting only th
read-safe builds a new debugging api is on the way to replace jsd.
Mozilla Projects
the various checks needed lead to a lot of copy+pasting, leaving the
reader to wonder....is this specific check necessary for (e.g.) an operating system?
... th
read sanitizer th
read sanitizer (tsan) is a fast data race detector for c/c++ programs.
...more information on how tsan works can be found on the th
read sanitizer wiki.
The Rust programming language
it prevents segmentation faults and guarantees th
read safety, all with an easy-to-learn syntax.
... in addition, rust offers zero-cost abstractions, move semantics, guaranteed memory safety, th
reads with no data races, trait-based generics, pattern matching, type inference, and efficient c bindings, with a minimum runtime size.
...
read the book the rust programming language online.
Gecko Roles
assistive technologies typically respond to the role by
reading the entire onscreen contents of containers advertising this role.
... role_statictext represents
read-only text, such as labels for other controls or instructions in a dialog box.
... role_text_leaf represents selectable text that allows edits or is designated
read-only.
XForms Accessibility
currently we have verified that xforms accessibility is working on the windows platform, and linux testing has not yet been done, although everything should work and is
ready to be tested.
...the first is to use and assistive technology such as a screen
reader, or an accessibility testing tool, to make sure xforms elements have proper accessible objects.
...instance node states are mapped to accessibility state constants declared in nsiaccessiblestates interface like it shown below: relevant - state_unavailable
readonly - state_
readonly required - state_required invalid - state_invalid out of range - state_invalid attributes redefines datatype aria attribute.
Querying Places
basic query search parameters const unsigned long time_relative_epoch = 0 const unsigned long time_relative_today = 1 const unsigned long time_relative_now = 2 attribute prtime begintime attribute unsigned long begintimereference
readonly attribute boolean hasbegintime
readonly attribute prtime absolutebegintime attribute prtime endtime attribute unsigned long endtimereference
readonly attribute boolean hasendtime
readonly attribute prtime absoluteendtime attribute astring searchterms
readonly attribute boolean hassearchterms attribute long minvisits attribute long maxvisits attribute boolean onlybookmarked attribut...
...e boolean domainishost attribute autf8string domain
readonly attribute boolean hasdomain attribute boolean uriisprefix attribute nsiuri uri
readonly attribute boolean hasuri attribute boolean annotationisnot attribute autf8string annotation
readonly attribute boolean hasannotation
readonly attribute unsigned long foldercount basic query configuration options const unsigned short group_by_day = 0 const unsigned short group_by_host = 1 const unsigned short group_by_domain = 2 const unsigned short group_by_folder = 3 const unsigned short sort_by_none = 0 const unsigned short sort_by_title_ascending = 1 const unsigned short sort_by_title_descending = 2 const unsigned short sort_by_date_ascending = 3 const unsigned short sort_by_date_descending = 4 const unsigned short sort_b...
...ion_descending = 16 const unsigned short results_as_uri = 0 const unsigned short results_as_visit = 1 const unsigned short results_as_full_visit = 2 (not yet implemented -- see bug 320831) attribute unsigned short sortingmode attribute autf8string sortingannotation attribute unsigned short resulttype attribute boolean excludeitems attribute boolean excludequeries attribute boolean exclude
readonlyfolders attribute boolean expandqueries attribute boolean includehidden attribute boolean showsessions attribute unsigned long maxresults const unsigned short query_type_history = 0 const unsigned short query_type_bookmarks = 1 const unsigned short query_type_unified = 2 (not yet implemented -- see bug 378798) attribute unsigned short querytype complex queries you can pass one or mo...
Using the Places annotation service
uri's are easier to use for services that want to annotate a web page loaded in the browser, while id's are easier to use for services al
ready working with the places database.
... creating the annotation service the annotation contract id is @mozilla.org/browser/annotation-service;1 var annotationservice = components.classes["@mozilla.org/browser/annotation-service;1"] .getservice(components.interfaces.nsiannotationservice); note that the annotation service is not th
read-safe.
... you should only use it from the main th
read.
extIPreferenceBranch
method overview boolean has(in astring aname) extipreference get(in astring aname) nsivariant getvalue(in astring aname, in nsivariant adefaultvalue) void setvalue(in astring aname, in nsivariant avalue) void reset() attributes attribute type description root
readonly attribute astring the name of the branch root.
... all
readonly attribute nsivariant array of extipreference listing all preferences in this branch.
... events
readonly attribute extievents the events object for the preferences supports: "change" methods has() check to see if a preference exists.
XPCOM glue
this is the case for xpcom components, because they are loaded into mozilla which al
ready has full xpcom loaded and initialized.
...however, when using th
readsafe together with the glue libraries from gecko 1.8 or later, a special step needs to be taken to use ns_impl_th
readsafe_isupportsn.
...extension and application authors currently using internal linkage should
read the guide on migrating from internal linkage to frozen linkage.
How to build an XPCOM component in JavaScript
there are many interfaces al
ready defined in mozilla applications, so you may not need to define a new one.
...you can learn how to get mac, linux, and windows versions of the gecko sdk by
reading the article gecko sdk.
... using xpcom instantiation try { var mycomponent = components.classes['@dietrich.ganx4.com/helloworld;1'] .createinstance(components.interfaces.nsihelloworld); alert(mycomponent.hello()); } catch (anerror) { dump("error: " + anerror); } other resources rm lantwo mozillazine forums th
reads about implementing xpcom components in js with some explanations, example code, and troubleshooting tips: http://forums.mozillazine.org/viewtopic.php?t=308369 http://forums.mozillazine.org/viewtopic.php?t=367298 implementing xpcom components in javascript at kb.mozillazine.org using xpcom in javascript without leaking - a must-
read.
Building the WebLock UI
notice also that when it's clicked, the button executes a javascript function called addthissite(), which we've al
ready defined in the weblock.js file in client code overview above.
...once it's installed and registered, the weblock component itself is
ready to go: xpcom finds it and adds it to the list of registered components, and then weblock observes the xpcom startup event and initializes itself.
...this id is the same one used by the <statusbar/> in navigator.xul, which means that the overlay mechanism will merge the new ui here (i.e., the weblock statusbarpanel) and the ui al
ready defined within that browser <statusbar/> at runtime.
Creating the Component Code
this is very useful if the caller is required to know information about the component like its th
reading module, whether or not it's a singleton, its implementation language, and so forth.
...since xpcom al
ready knows internally what kind of file it has just loaded and called registerself on, passing this value to the registration methods is a shortcut for determining what kind of component is being registered.
...xpcom then loads the component library associated with the cid if it isn't loaded al
ready.
Using XPCOM Components
« previousnext » one of the best ways to begin working with xpcom - especially when you are designing the interface to a component that will be used by others, as we do in starting weblock - is to look at how clients are al
ready using xpcom components.
... the iweblock interface lock lock the browser to the current site (or to the whitelist of approved sites
read from disk).
... sites enumerator for the list of approved sites
read in from the whitelist.
XPCOM guide
the problem would not exist with java's interfaces).making cross-th
read calls using runnablesin the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main th
read.
... however, it may be useful for c++ code in the mozilla platform to run tasks on another th
read.mozilla internal string guidemost of the mozilla code uses a c++ class hierarchy to pass string data, rather than using raw pointers.
... it is not that sequence of characters, though: the characters may not all be available when you
read from the stream.
Components.classes
components.classes is a
read-only object whose properties are classes indexed by contractid.
... introduction components.classes is a
read-only object whose properties implement the nsijscid interface.
... the properties of this object are indexed by the contractid (or human-
readable name) of the component class.
NS_ConvertASCIItoUTF16
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
NS_ConvertUTF16toUTF8
constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
NS_ConvertUTF8toUTF16
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
NS_LossyConvertUTF16toASCII
constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsACString_internal
syconvertutf16toascii" shape="rect" title="ns_lossyconvertutf16toascii"> <area alt="" coords="251,389,435,437" href="http://developer.mozilla.org/en/ns_convertutf16toutf8" shape="rect" title="ns_convertutf16toutf8"> <area alt="" coords="309,293,445,341" href="http://developer.mozilla.org/en/nsadoptingcstring" shape="rect" title="nsadoptingcstring"> </map> method overview constructors begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...parameters nscsubstringtuple& tuple void nsacstring_internal(char*, pruint32, pruint32) - source parameters char* data pruint32 length pruint32 flags begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsAString
methods begin
reading the begin
reading function returns a const pointer to the first element of the string's internal buffer.
... end
reading the end
reading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
...see also nsastring::length, end
reading, ns_stringgetdata, nsembedstring ...
nsAString_internal
rg/en/ns_convertasciitoutf16" shape="rect" title="ns_convertasciitoutf16"> <area alt="" coords="216,389,400,437" href="http://developer.mozilla.org/en/ns_convertutf8toutf16" shape="rect" title="ns_convertutf8toutf16"> <area alt="" coords="277,293,405,341" href="http://developer.mozilla.org/en/nsadoptingstring" shape="rect" title="nsadoptingstring"> </map> method overview constructors begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...parameters nssubstringtuple& tuple void nsastring_internal(prunichar*, pruint32, pruint32) - source parameters prunichar* data pruint32 length pruint32 flags begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsAdoptingCString
r const char* operator[] get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char ...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsAdoptingString
operator const prunichar* operator[] get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char ...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsAutoString
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsCAutoString
ndcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercase...
...n unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& endr...
...eading(ns
readingiterator<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pr...
nsDependentCString
lid rebind operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsDependentCSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const...
... methods constructors void nsdependentcsubstring(const nsacstring_internal&, pruint32, pruint32) - source parameters nsacstring_internal& str pruint32 startpos pruint32 length void nsdependentcsubstring(const char*, const char*) - source parameters char* start char* end void nsdependentcsubstring(const ns
readingiterator<char>&, const ns
readingiterator<char>&) - source parameters ns
readingiterator<char>& start ns
readingiterator<char>& end void nsdependentcsubstring() - source rebind void rebind(const nsacstring_internal&, pruint32, pruint32) - source parameters nsacstring_internal& <anonymous> pruint32 startpos pruint32 length void rebind(const char*, const char*) - source paramete...
...rs char* start char* end begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterator<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter ...
nsDependentString
assertvalid rebind operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsDependentSubstring
names: nsdependentsubstring for wide characters nsdependentcsubstring for narrow characters method overview constructors rebind begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const...
... methods constructors void nsdependentsubstring(const nsastring_internal&, pruint32, pruint32) - source parameters nsastring_internal& str pruint32 startpos pruint32 length void nsdependentsubstring(const prunichar*, const prunichar*) - source parameters prunichar* start prunichar* end void nsdependentsubstring(const ns
readingiterator<short unsigned int>&, const ns
readingiterator<short unsigned int>&) - source parameters ns
readingiterator<short unsigned int>& start ns
readingiterator<short unsigned int>& end void nsdependentsubstring() - source rebind void rebind(const nsastring_internal&, pruint32, pruint32) - source parameters nsastring_internal& <anonymous> pruint32 startpos pruint32 length void...
... rebind(const prunichar*, const prunichar*) - source parameters prunichar* start prunichar* end begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() const - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting p...
nsPromiseFlatCString
constructors operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsPromiseFlatString
overview constructors operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat operator[] first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignlitera...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsXPIDLCString
operator[] operator= get find rfind rfindchar findcharinset rfindcharinset compare equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char ...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading char* begin
reading() const - source
reading iterators ns
readingiterator<char>& begin
reading(ns
readingiterator<char>&) const - source deprecated
reading iterators parameters ns
readingiterator<char>& iter char*& begin
reading(const char*&) const - source parameters char*& iter end
reading char* end
reading() const - source ns
readingiterator<char>& end
reading(ns
readingiterat...
...or<char>&) const - source parameters ns
readingiterator<char>& iter char*& end
reading(const char*&) const - source parameters char*& iter beginwriting char* beginwriting() - source writing iterators nswritingiterator<char>& beginwriting(nswritingiterator<char>&) - source deprecated writing iterators parameters nswritingiterator<char>& iter char*& beginwriting(char*&) - source parameters char*& iter endwriting char* endwriting() - source nswritingiterator<char>& endwriting(nswritingiterator<char>&) - source parameters nswritingiterator<char>& iter char*& endwriting(char*&) - source parameters char*& iter data char* data() const - source accessors length pruint32 length() const - source isempty prbool isempty() const - source ...
nsXPIDLString
prunichar* operator[] operator= get find rfind rfindchar findcharinset rfindcharinset equalsignorecase tofloat tointeger mid left right setcharat stripchars stripwhitespace replacechar replacesubstring trim compresswhitespace assignwithconversion appendwithconversion appendint appendfloat begin
reading end
reading beginwriting endwriting data length isempty isvoid isterminated charat first last countchar findchar equals equalsascii equalsliteral(const char equalsliteral(char lowercaseequalsascii lowercaseequalsliteral(const char lowercaseequalsliteral(char assign assignascii assignliteral(const char ...
...2, print32) - source append the given unsigned integer to this string parameters pruint32 ainteger print32 aradix void appendint(print64, print32) - source parameters print64 ainteger print32 aradix appendfloat void appendfloat(float) - source append the given float to this string parameters float afloat void appendfloat(double) - source parameters double afloat begin
reading prunichar* begin
reading() const - source
reading iterators ns
readingiterator<short unsigned int>& begin
reading(ns
readingiterator<short unsigned int>&) const - source deprecated
reading iterators parameters ns
readingiterator<short unsigned int>& iter prunichar*& begin
reading(const prunichar*&) const - source parameters prunichar*& iter end
reading prunichar* end
reading() co...
...nst - source ns
readingiterator<short unsigned int>& end
reading(ns
readingiterator<short unsigned int>&) const - source parameters ns
readingiterator<short unsigned int>& iter prunichar*& end
reading(const prunichar*&) const - source parameters prunichar*& iter beginwriting prunichar* beginwriting() - source writing iterators nswritingiterator<short unsigned int>& beginwriting(nswritingiterator<short unsigned int>&) - source deprecated writing iterators parameters nswritingiterator<short unsigned int>& iter prunichar*& beginwriting(prunichar*&) - source parameters prunichar*& iter endwriting prunichar* endwriting() - source nswritingiterator<short unsigned int>& endwriting(nswritingiterator<short unsigned int>&) - source parameters nswritingiterator<sho...
nsIAccessibleProvider
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) attributes attribute type description accessible nsiaccessible
read only.
...
read only.
... constants common use constants constant value description noaccessible 0 do not create an accessible for this object this is useful if an ancestor binding al
ready implements nsiaccessibleprovider, but no accessible is desired for the inheriting binding.
nsIAccessibleRole
assistive technologies typically respond to the role by
reading the entire on screen contents of containers advertising this role.
... role_statictext 41 represents
read-only text, such as labels for other controls or instructions in a dialog box.
... role_text_leaf 42 represents selectable text that allows edits or is designated
read-only.
nsIAccessibleText
charactercount long
read only.
...
read only.
... selectioncount long
read only.
nsIAccessibleValue
inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview boolean setcurrentvalue(in double value); obsolete since gecko 1.9 attributes attribute type description currentvalue double maximumvalue double
read only.
... minimumincrement double
read only.
... minimumvalue double
read only.
nsIApplicationCacheChannel
exceptions thrown ns_error_al
ready_opened if set after calling asyncopen() on the channel.
...exceptions thrown ns_error_al
ready_opened if set after calling asyncopen() on the channel.
...
read only.
nsIBrowserHistory
read only.
...
read only.
... remarks visits are removed synchronously, but pages are expired asynchronously, off the main th
read.
nsICachingChannel
read only.
...depending on the value of nsirequest.loadflags(), the cache entry may be validated, overwritten, or simply
read.
...the implementation of nsicachingchannel would be expected to only
read from the cache entry identified by the cache token and not try to validate it.
nsIClipboardCommands
cancutselection() returns whether there is a selection and it is not
read-only.
...canpaste() returns whether the current contents of the clipboard can be pasted and if the current selection is not
read-only.
...return value true if there is data to paste on the clipboard and the current selection is not
read-only, false otherwise.
nsIContentPref
nsicontentpref dom/interfaces/base/nsicontentprefservice2.idlscriptable a content preference 1.0 66 introduced gecko 20.0 inherits from: nsisupports last changed in gecko 20.0 (firefox 20.0 / thunderbird 20.0 / seamonkey 2.17) attributes attribute type description domain astring
read only.
... name astring
read only.
... value nsivariant
read only.
nsIConverterInputStream
this allows
reading unicode strings from a stream, automatically converting the bytes from a selected character encoding.
...void init( in nsiinputstream astream, in string acharset, in long abuffersize, in prunichar areplacementchar ); parameters astream the source stream which is
read and converted.
... see also nsiconverteroutputstream see
reading textual data for an example.
nsICryptoHMAC
return value a hash of the data that was
read by this object.
...void updatefromstream( in nsiinputstream astream, in unsigned long alen ); parameters astream an input stream to
read from.
... alen how much to
read from the given astream.
nsIDBFolderInfo
as a service: var dbfolderinfo = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.nsidbfolderinfo); method overview long andflags(in long flags); void changeexpungedbytes(in long delta); void changenummessages(in long delta); void changenumun
readmessages(in long delta); boolean getbooleanproperty(in string propertyname, in boolean defaultvalue); void getcharacterset(out acstring charset, out boolean overriden); void getcharactersetoverride(out boolean charactersetoverride); obsolete since gecko 1.8 string getcharptrcharacterset(); string getcharptrproperty(in ...
... folderdate unsigned long foldername string foldersize unsigned long highwater nsmsgkey imaphierarchyseparator wchar imaptotalpendingmessages long imapuidvalidity long imapun
readpendingmessages long knownartsset string locale astring mailboxname astring nummessages long numun
readmessages long sortorder nsmsgviewsortordervalue sorttype nsmsgviewsorttypevalue ...
...ption changeexpungedbytes() void changeexpungedbytes( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenummessages() void changenummessages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description changenumun
readmessages() void changenumun
readmessages( in long delta ); parameters delta missing description exceptions thrown missing exception missing description getbooleanproperty() boolean getbooleanproperty( in string propertyname, in boolean defaultvalue ); parameters propertyname missing description defaultvalue missing description re...
nsIPluginHost
attributes attribute type description plugincount unsigned long
read only.
... apluginname returns a pointer to a shared
read-only string value, it's only valid for the lifetime of the plugin instance - you must copy the string value if you need it longer than that.
...it may or may not be al
ready opened when this function is called.
Component; nsIPrefBranch
me, in utf8string avalue); void setcomplexvalue(in string aprefname, in nsiidref atype, in nsisupports avalue); void setintpref(in string aprefname, in long avalue); void unlockpref(in string aprefname); attributes attribute type description root string called to get the root on which this branch is based, such as "browser.startup."
read only.
... note: the preferences system is not designed to store large amounts of data: all preferences are stored in a single file, which is
read at the application startup.
... note: the preferences system is not designed to store large amounts of data: all preferences are stored in a single file, which is
read at the application startup.
nsIServiceManager
return value true if the service has al
ready been created.
... return value true if the service has al
ready been created.
... because services are instantiated lazily, methods are provided to test whether or not a service has al
ready been instantiated.
nsISmsDatabaseService
etemessage(in long messageid, in long requestid, [optional] in unsigned long long processid); void createmessagelist(in nsidommozsmsfilter filter, in boolean reverse, in long requestid, [optional] in unsigned long long processid); void getnextmessageinlist(in long listid, in long requestid, [optional] in unsigned long long processid); void clearmessagelist(in long listid); void markmessage
read(in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid) methods savereceivedmessage() void savereceivedmessage( in domstring asender, in domstring abody, in unsigned long long adate ); parameters asender a domstring with the sender of the text message.
... markmessage
read() requires gecko 15.0(firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) void markmessage
read( in long messageid, in boolean value, in long requestid, [optional] in unsigned long long processid ); parameters messageid a number representing the id of the message.
... value a boolean indicating whether a message is
read or un
read.
nsISmsService
to create an instance, use: var smsservice = components.classes["@mozilla.org/sms/smsservice;1"] .createinstance(components.interfaces.nsismsservice); method overview [implicit_jscontext] nsidommozsmsmessage createsmsmessage(in long id, in domstring delivery, in domstring sender, in domstring receiver, in domstring body, in jsval timestamp, in bool
read ); unsigned short getnumberofmessagesfortext(in domstring text); boolean hassupport(); void send(in domstring number, in domstring message, in long requestid, [optional] in unsigned long long processid); methods createsmsmessage() [implicit_jscontext] nsidommozsmsmessage createsmsmessage( in long id, in domstring delivery, in domstring sender, in domstr...
...ing receiver, in domstring body, in jsval timestamp, in bool
read ); parameters id a number representing the id of the message.
...
read a boolean indicating whether a message is marked as
read or un
read.
nsISpeculativeConnect
the code implementing this method may use this information to start a tcp and/or ssl level handshake for that resource immediately so that it is
ready (or at least in the process of becoming
ready) when the transaction is actually submitted.
...atarget the th
read on which the release of the callbacks will occur.
... may be null for "any th
read".
nsITelemetry
canrecordreleasedata
readonly boolean a flag indicating whether telemetry is recording release data.
... canrecordprereleasedata
readonly boolean a flag indicating whether telemetry is recording pre-release data.
...
read only.
nsITreeView
read only.
... cyclecell() called on the view when a cell in a non-selectable cycling column (for example, un
read/flag/and so on.) is clicked.
... getparentindex() methods used by the tree to draw th
read lines in the tree.
nsIWebBrowserPersist
read only.
...
read only.
... persist_state_
ready 1 persister is
ready to save data.
nsIWebProgress
read only.
...
read only.
...ns_error_failure indicates that alistener was al
ready registered.
nsIWinTaskbar
read only.
...
read only.
...fails if a jump list build operation has al
ready been initiated, developers should make use of a single instance of nsijumplistbuilder for building lists within an application.
nsIWindowWatcher
note: this method may dispatch a "toplevel-window-
ready" notification via nsiobserverservice if the window did not al
ready exist.
...must al
ready be escaped, if applicable.
...if a window with this name al
ready exists, the openwindow call may just load aurl in it (if aurl is not null) and return it.
nsIWorkerFactory
dom/interfaces/th
reads/nsidomworkers.idlscriptable creates and returns a new worker 1.0 66 introduced gecko 2.0 obsolete gecko 8.0 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) this interface was removed in gecko 8.0.
... implemented by: th
reads/workerfactory;1.
... to create an instance, use: var workerfactory = components.classes['@mozilla.org/th
reads/workerfactory;1'] .createinstance(components.interfaces.nsiworkerfactory); method overview nsiworker newchromeworker(in domstring ascripturl); methods newchromeworker() returns a new chromeworker that will run a specified script.
XPCOM Interface Reference by grouping
clipboard nsiclipboard nsiclipboardcommands nsiclipboarddragdrophooklist nsiclipboarddragdrophooks nsiclipboardhelper nsiclipboardowner core action nsitransactionmanager process nsiprocess nsiprocess2 th
read nsith
read nsith
readeventfilter nsith
readinternal nsith
readmanager nsith
readobserver nsith
readpool nsith
readpoollistener nsitoolkit util nsiversioncomparator nsiweakreference nsifactory nsiinterfacereq...
...amcallback nsioutputstream nsioutputstreamcallback nsiscriptableinputstream nsistreamlistener url nsiioservice nsistandardurl user nsiprompt nsipromptservice zipfile nsizipentry nsizip
reader nsizip
readercache nsizipwriter file nsifilepicker nsifileprotocolhandler nsifilespec nsifilestreams nsifileutilities nsifileview memory nsimemory network channel ...
... element nsieditormailsupport message nsidbchangeannouncer nsidbchangelistener nsimessenger nsimsgcompfields nsimsgcustomcolumnhandler nsimsgdatabase nsimsgdbhdr nsimsgdbview nsimsgdbviewcommandupdater nsimsgfolder nsimsgidentity nsimsgmessageservice nsimsgsendlater nsimsgth
read nsimsgwindow nsimsgwindowcommands user history nsibrowserhistory nsibrowsersearchservice nsimicrosummary nsimicrosummarygenerator nsimicrosummaryobserver nsimicrosummaryservice nsimicrosummaryset ...
Frequently Asked Questions
this section will help you if you're fixing a broken build, or have what you think is a quick obvious question, and you don't have time to
read the reference manual.
...omptr to a raw xpcom interface pointer declaring an nscomptr to a forward-declared class not linking to xpcom not including nscomptr.h different settings of nscap_feature_debug_ptr_types runtime errors ns_assertion "queryinterface needed" may be caused by a class that derives from a given interface, when you forgetting to also specify the interface name in the ns_impl_isupports / ns_impl_th
readsafe_isupports macro.
... any xpcom function that returns an interface pointer, i.e., a `getter', must have al
ready addrefed that pointer.
XPCOM tasks
p1 various th
reading issues, e.g., too many locks.
...a first step is moving all qi implementations to the table-like macros al
ready in place (and some slight modifications to those macros).
... building ownership models that work (see xpcom ownership guidelines), using raw pointers, nscomptr (see the nscomptr user's manual), nsiweakreference (see nsiweakreference), nscweakreference, and (across th
reads) proxies (see nsisupports proxies).
Gloda examples
a) show all messages in a conversation regardless of the folder in which they are stored, b) search messages by subject assuming that you have a message (glodamessage) in the conversation al
ready, this is straight forward using glodamessage.conversation.getmessagescollection() alistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are al
ready in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items...
... searches for all messages within a date range id_q=gloda.newquery(gloda.noun_message); // define a date range form yesterday to now id_q.daterange([new date() - 86400000, new date()]); var mylistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are al
ready in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function _onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function _onquerycompleted(acollection) { var i...
...y(gloda.noun_message) msg_q.involves(id) msg_q.getcollection({ /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function _onitemsadded(aitems, acollection) { }, /* called when items that are al
ready in our collection get re-indexed */ onitemsmodified: function _onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function _onitemsremoved(aitems, acollection) { }, ...
Main Windows
you’ll sometimes see reimplementations of things that are al
ready in toolkit, written specially for thunderbird.
...its main focus is on handling the folderpane, th
readpane, and the message preview sections shown above.
...its almost exactly the same as messenger.xul in terms of overlays, but just lacks the folder and th
readpanes normally shown.
Using COM from js-ctypes
on(jsarr_pieces) { let guid = guid(); // clsid and iid are same they are guid guid.data1 = parseint(jsarr_pieces[0], 16); guid.data2 = parseint(jsarr_pieces[1], 16); guid.data3 = parseint(jsarr_pieces[2], 16); let j = 2; for (let i=0; i<8; i++) { j++; guid.data4[i] = parseint(jsarr_pieces[j], 16); }; return guid; } // constants let coinit_multith
readed = 0; let coinit_apartmentth
readed = 2; let clsctx_all = 0x17; let clsid_spvoice = clsidfromarr(['0x96749377', '0x3391', '0x11d2', '0x9e', '0xe3', '0x00', '0xc0', '0x4f', '0x79', '0x73', '0x96']); let iid_ispvoice = iidfromarr(['0x6c44df74', '0x72b9', '0x4992', '0xa1', '0xec', '0xef', '0x99', ...
... '0x6e', '0x04', '0x22', '0xd4']); let spf_default = 0; function main() { let spvoice; let spvoiceptr; try { // msdn docs tell us ot use coinitex instead of coinit, and default is 0 // which is coinit_multith
readed but it wouldnt work so i used // coinit_apartmentth
readed and it worked checkhresult would throw a bad // hresult of rpc_e_changed_mode which is 0x80010106 which is // -2147417850.
... primative_hr = coinitializeex(null, coinit_apartmentth
readed); checkhresult(primative_hr, "coinitializeex"); spvoiceptr = ispvoice.ptr(); primative_hr = cocreateinstance(clsid_spvoice.address(), null, clsctx_all, iid_ispvoice.address(), spvoiceptr.address()); checkhresult(primative_hr, "cocreateinstance"); spvoice = spvoiceptr.contents.lpvtbl.contents; let atext = 'hello firefox!'; let aflags = spf_default; primative_hr = spvoice.speak(spvoiceptr, atext, aflags, 0); checkhresult(primative_hr, "cocreateinstance"); } catch (ex) { console.error('ex occured:', ex); } finally { if (spvoice) { spvoice.r...
Using Objective-C from js-ctypes
typedef struct objc_selector *sel; in this example, we need to send alloc, its selector can be retrieved with the following code: sel alloc = sel_registername("alloc"); sending a message once target class and selector are
ready, you can send a message.
... types types can be
readily declared.
...
reading the apple developer :: programming with objective-c - working with blocks you can learn more about blocks.
CType
read only.
...
read only.
...
read only.
Browser Side Plug-in API - Plugins
warning: you must only call these from the main th
read; calling them from other th
reads is not supported and may have unpredictable results.
... npn_pluginth
readasynccall th
read-safe way to request that the browser calls a plug-in function on the browser or plug-in th
read (the th
read on which the plug-in was initiated).
... npn_request
read requests a range of bytes for a seekable stream.
Drawing and Event Handling - Plugins
if the plug-in needs to receive periodic time messages (for example, for animation), it should use a timer or a separate th
read.
...if the plug-in needs to receive periodic time messages, it should install a timer or fork a th
read.
...before generating a paint message for the plug-in, the browser makes sure that the background is al
ready drawn into the area to be updated.
Scripting plugins - Plugins
the new nppvariable enumeration is defined in npapi.h as: nppvpluginscriptablenpobject = 15 th
reading model this api is not designed to be th
read safe.
... the th
reading model for this api is such that all calls through this api are synchronous and calls from a plugin to methods in this api must come from the th
read on which the plugin was initiated, and likewise all calls to methods in this api by the browser are guaranteed to come from the same th
read.
... future revisions to this api might provide a mechanism for proxying calls from one th
read to another to aid in using this api from other th
reads.
URLs - Plugins
if the target parameter is set to null, the application creates a new stream and delivers the data to the plug-in instance, through calls to npp_newstream, npp_write
ready and npp_write, and npp_destroystream.
...the default is _self, if the plug-in instance document is al
ready at the top.
... npn_geturl
reads data from the url and either displays it in the target window or delivers it to the plug-in.
Debugger-API - Firefox Developer Tools
it is an intra-th
read debugging api.
... both the debuggee and the code using debugger to observe it must run in the same th
read.
... cross-th
read, cross-process, and cross-device tools must use debugger to observe the debuggee from within the same th
read, and then handle any needed communication themselves.
Index - Firefox Developer Tools
115 debug worker th
reads debugger, service workers, web workers, debug th
reads the debugger shows the source code for all running worker th
reads — web workers, service workers, etc.
...you can open the javascript file for the worker process and set breakpoints and logpoints just as you can with javascript code running on the main th
read.
...for example: 133 use watchpoints firefox, guide, tools when debugging javascript code, it can be useful to know when properties on objects are
read or modified.
All keyboard shortcuts - Firefox Developer Tools
+ return f2 / ctrl + enter copy the selected node's outer html ctrl + c cmd + c ctrl + c scroll the selected node into view s s s find the next match in the markup, when searching is active enter return enter find the previous match in the markup, when searching is active shift + enter shift + return shift + enter b
readcrumbs bar these shortcuts work when the b
readcrumbs bar is focused.
... command windows macos linux move to the previous element in the b
readcrumbs bar left arrow left arrow left arrow move to the next element in the b
readcrumbs bar right arrow right arrow right arrow focus the html pane shift + tab shift + tab shift + tab focus the css pane tab tab tab css pane these shortcuts work when you're in the inspector's css pane.
... clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not al
ready being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, when a property or value is being edited) enter or tab retur...
Page inspector keyboard shortcuts - Firefox Developer Tools
+ return f2 / ctrl + enter copy the selected node's outer html ctrl + c cmd + c ctrl + c scroll the selected node into view s s s find the next match in the markup, when searching is active enter return enter find the previous match in the markup, when searching is active shift + enter shift + return shift + enter b
readcrumbs bar these shortcuts work when the b
readcrumbs bar is focused.
... command windows macos linux move to the previous element in the b
readcrumbs bar left arrow left arrow left arrow move to the next element in the b
readcrumbs bar right arrow right arrow right arrow focus the html pane shift + tab shift + tab shift + tab focus the css pane tab tab tab css pane these shortcuts work when you're in the inspector's css pane.
... clear search box content (only when the search box is focused, and content has been entered) esc esc esc step forward through properties and values tab tab tab step backward through properties and values shift + tab shift + tab shift + tab start editing property or value (rules view only, when a property or value is selected, but not al
ready being edited) enter or space return or space enter or space cycle up and down through auto-complete suggestions (rules view only, when a property or value is being edited) up arrow , down arrow up arrow , down arrow up arrow , down arrow choose current auto-complete suggestion (rules view only, when a property or value is being edited) enter or tab retur...
Console messages - Firefox Developer Tools
however, if some javascript code
reads a style that has been modified, then the browser must perform a synchronous reflow in order to calculate the computed style to return.
... for example, code like this will cause an immediate, synchronous, reflow, when it calls window.getcomputedstyle(thing).height: var thing = document.getelementbyid("the-thing"); thing.style.display = "inline-block"; var thingheight = window.getcomputedstyle(thing).height; because of this, it's a good idea to avoid interleaving write and
read calls to an element's styles when manipulating the dom, because every time you
read back a style that has been invalidated by a previous write call, you force a synchronous reflow.
...this prevents errors that have al
ready been loged from reappearing when you reopen the console.
about:debugging (before Firefox 68) - Firefox Developer Tools
note that this feature isn't that immediately useful to debugging desktop tabs — you can open up a toolbox to debug a tab easily enough al
ready — but this will become far more useful when about:debugging starts to support remote debugging, and this page can begin to list tabs available for debugging on mobile device browsers, simulators, etc.
... debugging workers for a service worker, if it is al
ready running, you'll see two buttons next to it, labeled "debug" and "push".
... if it's not al
ready running, you'll see one button, labeled "start": click this to start the service worker.
AbsoluteOrientationSensor - Web APIs
on each
reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
... const options = { frequency: 60, referenceframe: 'device' }; const sensor = new absoluteorientationsensor(options); sensor.addeventlistener('
reading', () => { // model is a three.js object instantiated elsewhere.
... model.quaternion.fromarray(sensor.quaternion).inverse(); }); sensor.addeventlistener('error', error => { if (event.error.name == 'not
readableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requesting permissions for multiple device sensors.
Accelerometer.x - Web APIs
the x
read-only property of the accelerometer interface returns a double precision integer containing the acceleration of the device along the its x axis.
... example acceleration is typically
read in the sensor.on
reading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('
reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Accelerometer.y - Web APIs
the y
read-only property of the accelerometer interface returns a double precision integer containing the acceleration of the device along the its y axis.
... example acceleration is typically
read in the sensor.on
reading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('
reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Accelerometer.z - Web APIs
the z
read-only property of the accelerometer interface returns a double precision integer containing the acceleration of the device along the its z axis.
... example acceleration is typically
read in the sensor.on
reading event callback.
... let accelerometer = new accelerometer({frequency: 60}); accelerometer.addeventlistener('
reading', e => { console.log("acceleration along the x-axis " + accelerometer.x); console.log("acceleration along the y-axis " + accelerometer.y); console.log("acceleration along the z-axis " + accelerometer.z); }); accelerometer.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
AnimationEvent - Web APIs
animationevent.animationname
read only is a domstring containing the value of the animation-name that generated the animation.
... animationevent.elapsedtime
read only is a float giving the amount of time the animation has been running, in seconds, when this event fired, excluding any time the animation was paused.
... animationevent.pseudoelement
read only is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on.
AudioParam - Web APIs
properties audioparam.defaultvalue
read only represents the initial volume of the attribute as defined by the specific audionode creating the audioparam.
... audioparam.maxvalue
read only represents the maximum possible value for the parameter's nominal (effective) range.
... audioparam.minvalue
read only represents the minimum possible value for the parameter's nominal (effective) range.
AudioWorkletNode - Web APIs
it has an associated audioworkletprocessor, which does the actual audio processing in a web audio rendering th
read.
... audioworkletnode.port
read only returns a messageport used for bidirectional communication between the node and its associated audioworkletprocessor.
... audioworkletnode.parameters
read only returns an audioparammap — a collection of audioparam objects.
AudioWorkletProcessor - Web APIs
it lives in the audioworkletglobalscope and runs on the web audio rendering th
read.
... in turn, an audioworkletnode based on it runs on the main th
read.
... properties port
read only returns a messageport used for bidirectional communication between the processor and the audioworkletnode which it belongs to.
Blob.text() - Web APIs
usage notes the file
reader method
readastext() is an older method that performs a similar function.
...there are two key differences: blob.text() returns a promise, whereas file
reader.
readastext() is an event based api.
... blob.text() always uses utf-8 as encoding, while file
reader.
readastext() can use a different encoding depending on the blob's type and a specified encoding name.
Bluetooth - Web APIs
interface interface bluetooth : eventtarget { promise<boolean> getavailability(); attribute eventhandler onavailabilitychanged; [sameobject]
readonly attribute bluetoothdevice?
... bluetooth.referringdevice
read only returns a reference to the device, if any, from which the user opened the current page.
... bluetooth.getdevices() returns a promise that resolved to an array of bluetoothdevices which the origin al
ready obtained permission for via a call to bluetooth.requestdevice().
Body.bodyUsed - Web APIs
the bodyused
read-only property of the body mixin contains a boolean that indicates whether the body has been
read yet.
...when the fetch is successful, we
read a blob out of the response using blob(), put it into an object url using url.createobjecturl, and then set that url as the source of an <img> element to display the image.
...this returns false before and true afterwards, as at that point the body has been
read.
CSSStyleDeclaration - Web APIs
via window.getcomputedstyle(), which exposes the cssstyledeclaration object as a
read-only interface.
... cssstyledeclaration.length
read only the number of properties.
... cssstyledeclaration.parentrule
read only the containing cssrule.
CharacterData - Web APIs
characterdata.length
read only returns an unsigned long representing the size of the string contained in characterdata.data.
... nondocumenttypechildnode.nextelementsibling
read only returns the element immediately following the specified one in its parent's children list, or null if the specified element is the last one in the list.
... nondocumenttypechildnode.previouselementsibling
read only returns the element immediately prior to the specified one in its parent's children list, or null if the specified element is the first one in the list.
Client - Web APIs
properties client.id
read only the universally unique identifier of the client as a string.
... client.type
read only the client's type as a string.
... client.url
read only the url of the client as a string.
ClipboardItem.types - Web APIs
the
read-only types property of the clipboarditem interface returns an array of mime types available within the clipboarditem syntax var types = clipboarditem.types; value an array of available mime types.
... examples in the below example, we're returning all items on the clipboard via the clipboard.
read() method.
... async function getclipboardcontents() { try { const clipboarditems = await navigator.clipboard.
read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
Constraint validation API - Web APIs
her interfaces the constraint validation api extends the interfaces for the form-associated elements listed below with a number of new properties and methods (elements that can have a form attribute that indicates their form owner): htmlbuttonelement htmlfieldsetelement htmlinputelement htmlobjectelement htmloutputelement htmlselectelement htmltextareaelement properties validity a
read-only property that returns a validitystate object, whose properties represent validation errors for the value of that element.
... validationmessage a
read-only property that returns an empty string if the element is not a candidate for constraint validation, or if the element's value is valid.
... willvalidate a
read-only boolean property that returns true if the element is a candidate for constraint validation; and false otherwise.
DOMPointInit.w - Web APIs
the dompointinit dictionary's w property is used to specify the w perspective value of a point in space when either creating or serializing to json a dompoint or dompoint
readonly object.
... there are two methods which use dompointinit: the static function dompoint
readonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... the dompoint
readonly.tojson() method returns a dompointinit object that describes the same point as the original point.
DOMPointInit.y - Web APIs
the dompointinit dictionary's y property is used to specify the y-coordinate of a point in 2d or 3d space when either creating or serializing to json a dompoint or dompoint
readonly object.
... there are two methods which use dompointinit: the static function dompoint
readonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... the dompoint
readonly.tojson() method returns a dompointinit object that describes the same point as the original point.
DOMPointInit.z - Web APIs
the dompointinit dictionary's z property is used to specify the z-coordinate of a point in 2d or 3d space when either creating or serializing to json a dompoint or dompoint
readonly object.
... there are two methods which use dompointinit: the static function dompoint
readonly.frompoint() takes an object that complies with dompointinit as its sole input parameter, to specify the coordinates and perspective value of the new point to be created.
... the dompoint
readonly.tojson() method returns a dompointinit object that describes the same point as the original point.
DeviceMotionEventRotationRate - Web APIs
properties devicemotioneventrotationrate.alpha
read only the amount of rotation around the z axis, in degrees per second.
... devicemotioneventrotationrate.beta
read only the amount of rotation around the x axis, in degrees per second.
... devicemotioneventrotationrate.gamma
read only the amount of rotation around the y axis, in degrees per second.
DeviceProximityEvent - Web APIs
properties deviceproximityevent.max
read only the maximum sensing distance the sensor is able to report, in centimeters.
... deviceproximityevent.min
read only the minimum sensing distance the sensor is able to report, in centimeters.
... deviceproximityevent.value
read only the current device proximity, in centimeters.
Document: DOMContentLoaded event - Web APIs
</script> checking whether loading is al
ready complete domcontentloaded may fire before your script has a chance to run, so it is wise to check before adding a listener.
... function dosomething() { console.info('dom loaded'); } if (document.
readystate === 'loading') { // loading hasn't finished yet document.addeventlistener('domcontentloaded', dosomething); } else { // `domcontentloaded` has al
ready fired dosomething(); } live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload ...
...t: 2rem; } js const log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('
readystatechange', (event) => { log.textcontent = log.textcontent + `
readystate: ${document.
readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment html living standardthe definition of 'domcontentloaded' in that specification.
Document.location - Web APIs
the document.location
read-only property returns a location object, which contains information about the url of the document and provides methods for changing that url and loading another url.
... though document.location is a
read-only location object, you can also assign a domstring to it.
... to retrieve just the url as a string, the
read-only document.url property can also be used.
EffectTiming.endDelay - Web APIs
the animation's end time—the time at which an iteration is considered to have finished—is the time at which the animation finishes an iteration (its initial delay, animationeffecttiming
readonly.delay, plus its duration,duration, plus its end delay.
... element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including enddelay.
... the value of enddelay corresponds directly to animationeffecttiming
readonly.enddelay in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
Element.classList - Web APIs
the element.classlist is a
read-only property that returns a live domtokenlist collection of the class attributes of the element.
... the domtokenlist itself is
read-only, although you can modify it using the add() and remove() methods.
...// if visible is set remove it, otherwise add it div.classlist.toggle("visible"); // add/remove visible, depending on test conditional, i less than 10 div.classlist.toggle("visible", i < 10 ); console.log(div.classlist.contains("foo")); // add or remove multiple classes div.classlist.add("foo", "bar", "baz"); div.classlist.remove("foo", "bar", "baz"); // add or remove multiple classes using sp
read syntax const cls = ["foo", "bar"]; div.classlist.add(...cls); div.classlist.remove(...cls); // replace class "foo" with class "bar" div.classlist.replace("foo", "bar"); versions of firefox before 26 do not implement the use of several arguments in the add/remove/toggle methods.
Element.computedStyleMap() - Web APIs
the computedstylemap() method of the element interface returns a stylepropertymap
readonly interface which provides a
read-only representation of a css declaration block that is an alternative to cssstyledeclaration.
... syntax var stylepropertymap
readonly = element.computedstylemap() parameters none.
... return value a stylepropertymap
readonly interface.
Element.getBoundingClientRect() - Web APIs
the result is the smallest rectangle which contains the entire element, with
read-only left, top, right, bottom, x, y, width, and height properties describing the overall border-box in pixels.
...this was not true with older versions which effectively returned domrect
readonly.
...moreover, and unexpectedly, the es2015 and newer features such as object.assign() and object rest/sp
read will fail to copy returned properties.
FileSystemFileEntry - Web APIs
it offers properties describing the file's attributes, as well as the file() method, which creates a file object that can be used to
read the file.
... methods file() creates a new file object which can be used to
read the file.
...to
read a file, obtain a file object representing its contents by calling file().
FileSystemFlags - Web APIs
methods which accept an options parameter of this type may specify zero or more of these flags as fields in an object, like this: datadirectoryentry.getdirectory("workspace", { create: true }, function(entry) { }); here, we see that the create property is provided, with a value of true, indicating that the directory should be created if it's not al
ready there.
...the parent directory must al
ready exist.
... values and results the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path al
ready exists.
File and Directory Entries API support in Firefox - Web APIs
cation the largest compatibility issue still remaining is that chrome is still using older names for many of the interfaces in the api, since they implemented a related but different specification: name in specification name in google chrome filesystemdirectoryentry directoryentry filesystemdirectoryentrysync directoryentrysync filesystemdirectory
reader directory
reader filesystemdirectory
readersync directory
readersync filesystementry entry filesystementrysync entrysync filesystemfileentry fileentry filesystemfileentrysync fileentrysync be sure to account for this in your code by allowing for both names.
...there are only two ways to get access to file system entries at this time: the <input> element, using the htmlinputelement.webkitentries property to access an array of filesystementry objects describing file system entries you can then
read.
... firefox only supports
reading from files in the file system.
FontFace - Web APIs
fontface.display a cssomstring that determines how a font face is displayed based on whether and when it is downloaded and
ready to use.
... fontface.loaded
read only returns a promise that resolves with the current fontface object when the font specified in the object's constructor is done loading or rejects with a syntaxerror.
... fontface.status
read only returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error".
GestureEvent - Web APIs
gestureevent.rotation
read only change in rotation (in degrees) since the event's beginning.
...initial value: 0.0 gestureevent.scale
read only distance between two digits since the event's beginning.
...if the event has al
ready being dispatched, this method does nothing.
Gyroscope.Gyroscope() - Web APIs
the gyroscope constructor creates a new gyroscope object which provides on each
reading the angular velocity of the device along all three axes.
... syntax var gyroscope = new gyroscope([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends device hardware and consequently may be less than requested.
Gyroscope.x - Web APIs
the x
read-only property of the gyroscope interface returns a double precision integer containing the angular velocity of the device along the its x axis.
... example the gyroscope is typically
read in the sensor.on
reading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('
reading', e => { console.log("angular velocity along the x-axis " + gyroscope.x); console.log("angular velocity along the y-axis " + gyroscope.y); console.log("angular velocity along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Gyroscope.y - Web APIs
the y
read-only property of the gyroscope interface returns a double precision integer containing the angular velocity of the device along the its y axis.
... example the gyroscope is typically
read in the sensor.on
reading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('
reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Gyroscope.z - Web APIs
the z
read-only property of the gyroscope interface returns a double precision integer containing the angular velocity of the device along the its z axis.
... example the gyroscope is typically
read in the sensor.on
reading event callback.
... let gyroscope = new gyroscope({frequency: 60}); gyroscope.addeventlistener('
reading', e => { console.log("angular velocety along the x-axis " + gyroscope.x); console.log("angular velocety along the y-axis " + gyroscope.y); console.log("angular velocety along the z-axis " + gyroscope.z); }); gyroscope.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
HTMLCanvasElement.mozGetAsFile() - Web APIs
examples this example creates an image file from the <canvas> element on the page, then uses a file
reader to
read the image data from the file.
... html <canvas id="canvas" width="100" height="100"></canvas> <p><a href="#" id="link">click here to try out mozgetasfile()</a>.</p> javascript the following code uses mozgetasfile() to create a file object from the canvas and appends it as an image to the page by loading it as a data url using the
readasdataurl() method.
...('canvas'); var ctx = canvas.getcontext('2d'); ctx.fillstyle = 'rgb(200, 0, 0)'; ctx.fillrect(10, 10, 55, 50); ctx.fillstyle = 'rgba(0, 0, 200, 0.5)'; ctx.fillrect(30, 30, 55, 50); var link = document.getelementbyid('link'); link.addeventlistener('click', copy); } function copy() { var canvas = document.getelementbyid('canvas'); var f = canvas.mozgetasfile('test.png'); var
reader = new file
reader();
reader.
readasdataurl(f);
reader.onloadend = function() { var newimg = document.createelement('img'); newimg.src =
reader.result; document.body.appendchild(newimg); } } window.addeventlistener('load', draw); specifications not part of any specification.
HTMLCanvasElement.toBlob() - Web APIs
var canvas = document.getelementbyid('canvas'); canvas.toblob(function(blob) { var newimg = document.createelement('img'), url = url.createobjecturl(blob); newimg.onload = function() { // no longer need to
read the blob so it's revoked url.revokeobjecturl(url); }; newimg.src = url; document.body.appendchild(newimg); }); note that here we're creating a png image; if you add a second parameter to the toblob() call, you can specify the image type.
... var canvas = document.getelementbyid('canvas'); var d = canvas.width; ctx = canvas.getcontext('2d'); ctx.beginpath(); ctx.moveto(d / 2, 0); ctx.lineto(d, d); ctx.lineto(0, d); ctx.closepath(); ctx.fillstyle = 'yellow'; ctx.fill(); function blobcallback(iconname) { return function(b) { var r = new file
reader(); r.onloadend = function () { // r.result contains the arraybuffer.
...ants.path.desktopdir, iconname + '.ico'); var promise = os.file.writeatomic(writepath, new uint8array(r.result), {tmppath:writepath + '.tmp'}); promise.then( function() { console.log('successfully wrote file'); }, function() { console.log('failure writing file') } ); }; r.
readasarraybuffer(b); } } canvas.toblob(blobcallback('passthisstring'), 'image/vnd.microsoft.icon', '-moz-parse-options:format=bmp;bpp=32'); specifications specification status comment html living standardthe definition of 'htmlcanvaselement.toblob' in that specification.
HTMLFieldSetElement - Web APIs
htmlfieldsetelement.elements
read only the elements belonging to this field set.
... htmlfieldsetelement.form
read only an htmlformcontrolscollection or htmlcollection referencing the containing form element, if this element is in a form.
... htmlfieldsetelement.type
read only the domstring "fieldset".
HTMLFormElement - Web APIs
htmlformelement.elements
read only a htmlformcontrolscollection holding all form controls belonging to this form element.
... htmlformelement.length
read only a long reflecting the number of controls in the form.
...p><label><input type="checkbox" name="vehicle" value="bike">i have a bike</label></p> <p><label><input type="checkbox" name="vehicle" value="car">i have a car</label></p> </fieldset> <p><button>submit</button></p> </form> </body> </html> submitting forms and uploading files using xmlhttprequest if you want to know how to serialize and submit a form using the xmlhttprequest api, please
read this paragraph.
HTMLIFrameElement - Web APIs
htmliframeelement.contentdocument
read only returns a document, the active document in the inline frame's nested browsing context.
... htmliframeelement.contentwindow
read only returns a windowproxy, the window proxy for the nested browsing context.
... htmliframeelement.featurepolicy
read only returns the featurepolicy interface which provides a simple api for introspecting the feature policies applied to a specific document.
HTMLImageElement.crossOrigin - Web APIs
keep
reading this paragraph.
... okay, now you can stop
reading this paragraph.
... thanks for
reading me.</p> </div> css body { font: 1.125rem/1.5, helvetica, sans-serif; } .container { display: flow-root; width: 37.5em; border: 1px solid #d2d2d2; } img { float: left; padding-right: 1.5em; } output { background: rgba(100, 100, 100, 0.1); font-family: courier, monospace; width: 95%; } result specifications specification status comment html living standardthe definition of 'htmlimageelement.crossorigin' in that specification.
HTMLLinkElement - Web APIs
htmllinkelement.rellist
read only is a domtokenlist that reflects the rel html attribute, as a list of tokens.
... htmllinkelement.sizes
read only is a domsettabletokenlist that reflects the sizes html attribute, as a list of tokens.
... linkstyle.sheet
read only returns the stylesheet object associated with the given element, or null if there is none.
HTMLMediaElement: loadedmetadata event - Web APIs
bubbles no cancelable no interface event target element default action none event handler property globaleventhandlers.onloadedmetadata specification html5 media additional properties property type description mozchannels
read only int the number of channels.
... mozsamplerate
read only int the sample rate per second.
... mozframebufferlength
read only int the number of samples collected in all channels.
HTMLOrForeignElement.dataset - Web APIs
the dataset
read-only property of the htmlorforeignelement interface provides
read/write access to all the custom data attributes (data-*) set on the element.
...note that the dataset property itself can be
read, but not directly written.
... accessing values attributes can be set and
read by using the camelcase name (the key) like an object property of the dataset, as in element.dataset.keyname attributes can also be set and
read using the bracket syntax, as in element.dataset[keyname] the in operator can be used to check whether a given attribute exists.
HTMLTrackElement - Web APIs
htmltrackelement.label is a domstring that reflects the label html attribute, indicating a user-
readable title for the track.
... htmltrackelement.
readystate
read only returns an unsigned short that show the
readiness state of the track: constant value description none 0 indicates that the text track's cues have not been obtained.
... htmltrackelement.track
read only returns texttrack is the track element's text track data.
HTMLVideoElement.videoHeight - Web APIs
the htmlvideoelement interface's
read-only videoheight property indicates the intrinsic height of the video, expressed in css pixels.
...if the element's
readystate is htmlmediaelement.have_nothing, then the value of this property is 0, because neither video nor poster frame size information is yet available.
... if at any time the intrinsic size of the media changes and the element's
readystate isn't have_nothing, a resize event will be sent to the <video> element.
HTMLVideoElement.videoWidth - Web APIs
the htmlvideoelement interface's
read-only videowidth property indicates the intrinsic width of the video, expressed in css pixels.
...if the element's
readystate is htmlmediaelement.have_nothing, then the value of this property is 0, because neither video nor poster frame size information is yet available.
... if at any time the intrinsic size of the media changes and the element's
readystate isn't have_nothing, a resize event will be sent to the <video> element.
Working with the History API - Web APIs
reading the current state when your page loads, it might have a non-null state object.
...however, if you
read the history.state property, you'll get back the state object you would have gotten if a popstate had fired.
... you can
read the state of the current history entry without waiting for a popstate event using the history.state property like this: let currentstate = history.state ...
IDBCursor.delete() - Web APIs
the delete() method of the idbcursor interface returns an idbrequest object, and, in a separate th
read, deletes the record at the cursor's position, without changing the cursor's position.
...
readonlyerror the transaction mode is
read-only.
...for a complete working example, see our idbcursor example (view example live.) function deleteresult() { list.innerhtml = ''; var transaction = db.transaction(['rushalbumlist'], '
readwrite'); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { if(cursor.value.albumtitle === 'grace under pressure') { var request = cursor.delete(); request.onsuccess = function() { console.log('deleted that mediocre album from 1984.
IDBCursor.direction - Web APIs
the direction
read-only property of the idbcursor interface is a domstring that returns the direction of traversal of the cursor (set using idbobjectstore.opencursor for example).
...within each iteration we log the direction of the cursor, something like this: prev note: we can't change the direction of travel of the cursor using the direction property, as it is
read-only.
...for a complete working example, see our idbcursor example (view example live.) function backwards() { list.innerhtml = ''; var transaction = db.transaction(['rushalbumlist'], '
readonly'); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor(null,'prev').onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); con...
IDBCursor.update() - Web APIs
the update() method of the idbcursor interface returns an idbrequest object, and, in a separate th
read, updates the value at the current position of the cursor in the object store.
...
readonlyerror the transaction mode is
read only.
...for a complete working example, see our idbcursor example (view example live.) function updateresult() { list.innerhtml = ''; const transaction = db.transaction(['rushalbumlist'], '
readwrite'); const objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { const cursor = event.target.result; if (cursor) { if (cursor.value.albumtitle === 'a farewell to kings') { const updatedata = cursor.value; updatedata.year = 2050; const request = cursor.update(updatedata); request.onsucce...
IDBDatabase: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle al
ready exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours...
... 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const db = dbopenrequest.result; db.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); const objectstore = transaction.objectstore('todolist'); const objectstorerequest = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenre...
...ateindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const db = dbopenrequest.result; db.onerror = () => { console.log(`error adding new item: ${newitem.tasktitle}`); }; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); const objectstore = transaction.objectstore('todolist'); const objectstorerequest = objectstore.add(newitem); }; ...
IDBObjectStore.autoIncrement - Web APIs
the autoincrement
read-only property of the idbobjectstore interface returns the value of the auto increment flag for this object store.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store using add().
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(...
IDBObjectStore.get() - Web APIs
the get() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, returns the object store selected by the specified key.
... example in the following code snippet, we open a
read/write transaction on our database and get one specific record from object store using get() — a sample record with the key "walk dog".
... // this is used a lot below db = dbopenrequest.result; // run the getdata() function to get the data from the database getdata(); }; function getdata() { // open a
read/write db transaction,
ready for retrieving the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened d...
IDBObjectStore.indexNames - Web APIs
the indexnames
read-only property of the idbobjectstore interface returns a list of the names of indexes on objects in this object store.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store using add().
... // this is used a lot below db = this.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(...
IDBObjectStore.keyPath - Web APIs
the keypath
read-only property of the idbobjectstore interface returns the key path of this object store.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store using add().
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(...
IDBObjectStore.name - Web APIs
constrainterror an object store is al
ready using the specified name.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store using add().
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(...
IDBObjectStore.transaction - Web APIs
the transaction
read-only property of the idbobjectstore interface returns the transaction object to which this object store belongs.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store using add().
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready to insert into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of the transaction completing, when everything is done transaction.oncomplete = function(...
IDBRequest: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle al
ready exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data ...
...x('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }); dbopenrequest.addeventlistener('success', event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); objectstorerequest.addeventlistener('error', () => { conso...
...tstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = objectstore.add(newitem); objectstorerequest.onerror = () => { console.log(`error ad...
IDBTransaction.abort() - Web APIs
syntax transaction.abort(); exceptions this method may raise a domexception of the following type: exception description invalidstateerror the transaction has al
ready been committed or aborted.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
...this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IDBTransaction.db - Web APIs
the db
read-only property of the idbtransaction interface returns the database connection with which this transaction is associated.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IDBTransaction: error event - Web APIs
bubbles yes cancelable no interface event event handler property onerror examples this example opens a database and tries to add a record, listening for the error event for the add() operation (this will occur if, for example, a record with the given tasktitle al
ready exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain objectstore.createindex('hours', 'hours...
...', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); transaction.addeventlistener('error', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectstorerequest = ob...
...tore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); transaction.onerror = () => { console.log(`error adding new item: ${newitem.tasktitle}`); }; const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 2020 }; const objectst...
IDBTransaction.objectStore() - Web APIs
the objectstore() method of the idbtransaction interface returns an object store that has al
ready been added to the scope of this transaction.
... example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IDBTransactionSync - Web APIs
void abort( ) raises (idbdatabaseexception); exceptions this method can raise an idbdatabaseexception with the following code: non_transient_err if this transaction has al
ready been committed or aborted.
... void commit( ) raises (idbdatabaseexception); exceptions this method can raise an idbdatabaseexception with the following codes: non_transient_err if this transaction has al
ready been committed or aborted.
... objectstore() returns an object store that has al
ready been added to the scope of this transaction.
IDBVersionChangeEvent - Web APIs
idbversionchangeevent.oldversion
read only returns the old version of the database.
... idbversionchangeevent.newversion
read only returns the new version of the database.
... deprecated properties idbversionchangeevent.version
read only the new version of the database in a versionchange transaction.
ImageData - Web APIs
properties imagedata.data
read only is a uint8clampedarray representing a one-dimensional array containing the data in the rgba order, with integer values between 0 and 255 (inclusive).
... imagedata.height
read only is an unsigned long representing the actual height, in pixels, of the imagedata.
... imagedata.width
read only is an unsigned long representing the actual width, in pixels, of the imagedata.
IndexedDB API - Web APIs
read more about the concepts behind indexeddb.
...you create a transaction on a database, specify the scope (such as which object stores you want to access), and determine the kind of access (
read only or
readwrite) that you want.
... examples elibri: a powerful library and ebook
reader application, written by marco castelluccio, winner of the indexeddb mozilla devderby.
IntersectionObserver - Web APIs
properties intersectionobserver.root
read only the element or document whose bounds are used as the bounding box when testing for intersection.
... intersectionobserver.rootmargin
read only an offset rectangle applied to the root's bounding box when calculating intersections, effectively shrinking or growing the root for calculation purposes.
... intersectionobserver.thresholds
read only a list of thresholds, sorted in increasing numeric order, where each threshold is a ratio of intersection area to bounding box area of an observed target.
LinearAccelerationSensor.LinearAccelerationSensor() - Web APIs
the linearaccelerationsensor constructor creates a new linearaccelerationsensor object which provides on each
reading the acceleration applied to the device along all three axes, but without the contribution of gravity.
... syntax var linearaccelerationsensor = new linearaccelerationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends on device hardware and consequently may be less than requested.
LinearAccelerationSensor.x - Web APIs
the x
read-only property of the linearaccelerationsensor interface returns a double precision integer containing the linear acceleration of the device along the device's x axis.
... example linear acceleration is typically
read in the sensor.on
reading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('
reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
LinearAccelerationSensor.y - Web APIs
the y
read-only property of the linearaccelerationsensor interface returns a double precision integer containing the acceleration of the device along the device's y axis.
... example linear acceleration is typically
read in the sensor.on
reading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('
reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
LinearAccelerationSensor.z - Web APIs
the z
read-only property of the linearaccelerationsensor interface returns a double precision integer containing the acceleration of the device along the device's z axis.
... example linear acceleration is typically
read in the sensor.on
reading event callback.
... let lasensor = new linearaccelerationsensor({frequency: 60}); lasensor.addeventlistener('
reading', e => { console.log("linear acceleration along the x-axis " + lasensor.x); console.log("linear acceleration along the y-axis " + lasensor.y); console.log("linear acceleration along the z-axis " + lasensor.z); }); lasensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
LockedFile.location - Web APIs
summary the location property is a zero-based index representing the position of the
read/write pointer within the file.
... its value indicates at which bytes within the file any write or
read operation will start.
... this value is changed automatically after every
read and write operation.
MIDIAccess - Web APIs
properties midiaccess.inputs
read only returns an instance of midiinputmap which provides access to any available midi input ports.
... midiaccess.outputs
read only returns an instance of midioutputmap which provides access to any available midi output ports.
... midiaccess.sysexenabled
read only a boolean attribute indicating whether system exclusive support is enabled on the current midiaccess instance.
Magnetometer.x - Web APIs
the x
read-only property of the magnetometer interface returns a double precision integer containing the magnetic field around the device's x axis.
... example the magnetometer is typically
read in the sensor.on
reading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('
reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Magnetometer.y - Web APIs
the y
read-only property of the magnetometer interface returns a double precision integer containing the magnetic field around the device's y axis.
... example the magnetometer is typically
read in the sensor.on
reading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('
reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Magnetometer.z - Web APIs
the z
read-only property of the magnetometer interface returns a double-precision integer containing the magnetic field around the device's z axis.
... example the magnetometer is typically
read in the sensor.on
reading event callback.
... let magsensor = new magnetometer({frequency: 60}); magsensor.addeventlistener('
reading', e => { console.log("magnetic field along the x-axis " + magsensor.x); console.log("magnetic field along the y-axis " + magsensor.y); console.log("magnetic field along the z-axis " + magsensor.z); }); magsensor.start(); specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
MediaSource.activeSourceBuffers - Web APIs
the activesourcebuffers
read-only property of the mediasource interface returns a sourcebufferlist object containing a subset of the sourcebuffer objects contained within sourcebuffers — the list of objects providing the selected video track, enabled audio tracks, and shown/hidden text tracks.
... example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); console.log(mediasource.activesourcebuffers); // will contain the source buffer that was added above, // as it is selected for playing in the video player video.
...play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaSource.endOfStream() - Web APIs
return value undefined exceptions exception explanation invalidstateerror mediasource.
readystate is not equal to open, or one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e.
...ew the full demo live, or download the source for further investigation.) var asseturl = 'frag_bunny.mp4'; // need to be specific for blink regarding codecs // ./mp4info frag_bunny.mp4 | grep codec var mimecodec = 'video/mp4; codecs="avc1.42e01e, mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //console.log(mediasource.
readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sou...
...rcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'endofstream()' in that specification.
Using the MediaStream Recording API - Web APIs
checkbox hack for showing/hiding this is fairly well documented al
ready, but we thought we'd give a mention to the checkbox hack, which abuses the fact that you can click on the <label> of a checkbox to toggle it checked/unchecked.
...this is your entry point into using the mediarecorder api — the stream is now
ready to be captured into a blob, in the default encoding format of your browser.
... lastly, we use the mediarecorder.stop() method to stop the recording when the stop button is pressed, and finalize the blob
ready for use somewhere else in our application.
MediaStream Recording API - Web APIs
the data is delivered by a series of dataavailable events, al
ready in the format you specify when creating the mediarecorder.
... once the source media is playing and you've reached the point where you're
ready to record video, call mediarecorder.start() to begin recording.
... your dataavailable event handler gets called every time there's data
ready for you to do with as you will; the event has a data attribute whose value is a blob that contains the media data.
MouseWheelEvent - Web APIs
properties attribute type description wheeldelta
read only long the distance in pixels (defined as so by msdn, but the actual usage is different, see mousewheel).
... wheeldeltax
read only long?
... wheeldeltay
read only long?
navigator.hardwareConcurrency - Web APIs
the navigator.hardwareconcurrency
read-only property returns the number of logical processors available to run th
reads on the user's computer.
... modern computers have multiple physical processor cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one th
read at a time using advanced scheduling techniques.
...the number of logical processor cores can be used to measure the number of th
reads which can effectively be run at once without them having to context switch.
NavigatorConcurrentHardware - Web APIs
the number of logical processor cores is a way to measure the number of th
reads which can effectively be run at once without them having to share cpus.
... modern computers have multiple physical cores in their cpu (two or four cores is typical), but each physical core is also usually able to run more than one th
read at a time using advanced scheduling techniques.
...the browser may, however, choose to reduce the number in order to represent more accurately the number of workers that can run at once properties navigatorconcurrenthardware.hardwareconcurrency
read only returns the number of logical processors which may be available to the user agent.
NavigatorPlugins - Web APIs
properties navigatorplugins.mimetypes
read only returns an mimetypearray listing the mime types supported by the browser.
... navigatorplugins.plugins
read only returns a pluginarray listing the plugins installed in the browser.
... navigatorplugins.javaenabled()
read only returns a boolean flag indicating whether the host browser is java-enabled or not.
Notation - Web APIs
represents a dtd notation (
read-only).
... properties notation.publicid
read only is a domstring.
... notation.systemid
read only is a domstring.
Notification.requestPermission() - Web APIs
read using the notifications api for a good example of how to feature detect this and run code as appropriate.
... function notifyme() { // let's check if the browser supports notifications if (!("notification" in window)) { alert("this browser does not support desktop notification"); } // let's check whether notification permissions have al
ready been granted else if (notification.permission === "granted") { // if it's okay let's create a notification var notification = new notification("hi there!"); } // otherwise, we need to ask the user for permission else if (notification.permission !== "denied") { notification.requestpermission().then(function (permission) { // if the user accepts, let's create a notificat...
...firefox is al
ready doing this from version 72, for example.
NotificationAction - Web APIs
notificationaction.action
read only the name of the action, which can be used to identify the clicked action similar to input names.
... notificationaction.title
read only the string describing the action that is displayed to the user.
... notificationaction.icon
read only the url of the image used to represent the notification when there is not enough space to display the notification itself.
NotificationEvent.notification - Web APIs
the notification
read-only property of the notificationevent interface returns the instance of the notification that was clicked to fire the event.
... the notification provides
read-only access to many properties that were set at the instantiation time of the notification such as tag and data attributes that allow you to store information for defered use in the notificationclick event.
... console.log('notification tag:', event.notification.tag); console.log('notification data:', event.notification.data); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications spe...
NotificationEvent - Web APIs
notificationevent.notification
read only returns a notification object representing the notification that was clicked to fire the event.
... notificationevent.action
read only returns the string id of the notification button the user clicked.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications spe...
OverconstrainedError - Web APIs
properties overconstrainederror.constraint
read only returns the constraint that was supplied in the constructor, meaning the constraint that was not satisfied.
... overconstrainederror.message
read only returns the text supplied in the constructor.
... overconstrainederror.name
read only will always return overconstrainederror.
PasswordCredential - Web APIs
passwordcredential.iconurl
read only secure context a usvstring containing a url pointing to an image for an icon.
... passwordcredential.name
read only secure context a usvstring containing a human-
readable public name for display in a credential chooser.
... passwordcredential.password
read only secure context a usvstring containing the password of the credential.
PaymentRequest.show() - Web APIs
if your architecture doesn't necessarily have all of the data
ready to go at the moment it instantiates the payment interface by calling show(), specify the detailspromise parameter, providing a promise that is fulfilled once the data is
ready.
... exceptions aborterror the returned promise rejects with an aborterror if the user agent is al
ready showing a payment panel.
... invalidstateerror the promise rejects with an invalidstateerror if the same payment has al
ready been shown for this request (its state is interactive because it is being shown al
ready).
PerformanceNavigation - Web APIs
an object of this type can be obtained by calling the performance.navigation
read-only attribute.
... performancenavigation.type
read only an unsigned short which indicates how the navigation to this page was done.
... performancenavigation.redirectcount
read only an unsigned short representing the number of redirects done before reaching the page.
Using the Permissions API - Web APIs
depending on the value of the state property of the permissionstatus object returned when the promise resolves, it reacts differently: "granted" the "enable geolocation" button is hidden, as it isn't needed if geolocation is al
ready active.
... "denied" the "enable geolocation" button is revealed (this code needs to be here too, in case the permission state is al
ready set to denied for this origin when the page is first loaded).
... conclusion and future work at the moment this doesn't offer much more than what we had al
ready.
ProgressEvent - Web APIs
progressevent.lengthcomputable
read only is a boolean flag indicating if the total work to be done, and the amount of work al
ready done, by the underlying process is calculable.
... progressevent.loaded
read only is an unsigned long long representing the amount of work al
ready performed by the underlying process.
... progressevent.total
read only is an unsigned long long representing the total amount of work that the underlying process is in the progress of performing.
PromiseRejectionEvent.promise - Web APIs
the promiserejectionevent interface's promise
read-only property indicates the javascript promise which was rejected.
... examples this example listens for unhandled promises and, if the reason is an object with a code field containing the text "module not
ready", it sets up an idle callback that will retry the task that failed to execute correctly.
... window.onunhandledrejection = function(event) { if (event.reason.code && event.reason.code == "module not
ready") { window.requestidlecallback(function(deadline) { loadmodule(event.reason.modulename) .then(performstartup); }); event.preventdefault(); } } specifications specification status comment html living standardthe definition of 'promiserejectionevent.promise' in that specification.
RTCDataChannel: bufferedamountlow event - Web APIs
in other words, we'll try to keep at least 64kb of data in the buffer,
reading 64kb at a time from the source.
... let pc = new rtcpeerconnection(); let dc = pc.createdatachannel("sendfile"); let source = /* source data object */ dc.bufferedamountlowthreshold = 65536; pc.addeventlistener("bufferedamountlow", ev => { if (source.position <= source.length) { dc.send(source.
readfile(65536)); } }, false); after creating the rtcpeerconnection, this calls rtcpeerconnection.createdatachannel() to create the data channel.
... you can also set up a listener for bufferedamountlow using its event handler property, onbufferedamountlow: pc.onbufferedamountlow = ev => { if (source.position <= source.length) { dc.send(source.
readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'bufferedamountlow' in that specification.
RTCIdentityErrorEvent - Web APIs
rtcidentityerrorevent.idp
read only is a domstring describing the domain name of the identity provider (idp) generating the error response.
... rtcidentityerrorevent.loginurl
read only is a domstring giving the url where the user can complete the authentication.
... rtcidentityerrorevent.protocol
read only is a domstring describing the idp protocol in use.
RTCPeerConnection.addTrack() - Web APIs
the specified track doesn't necessarily have to al
ready be part of any of the specified streams.
... exceptions invalidaccesserror the specified track (or all of its underlying streams) is al
ready part of the rtcpeerconnection.
...compatible reusable rtcrtpsender instances meet these criteria: there is no track al
ready associated with the sender.
RTCPeerConnection.createDataChannel() - Web APIs
syntax datachannel = rtcpeerconnection.createdatachannel(label[, options]); parameters label a human-
readable name for the channel.
... resourceinuse an id was specified, but another rtcdatachannel is al
ready using the same value.
... operationerror either the specified id is al
ready in use or, if no id was specified, the webrtc layer was unable to automatically generate an id because all ids are in use.
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks al
ready attached to the webrtc session, codec, and options supported by the browser, and any candidates al
ready gathered by the ice agent, for the purpose of being sent over the signaling channel to a potential peer to request a connection or to update the configuration of an existing connection.
...this will cause the returned offer to have different credentials than those al
ready in place.
... not
readableerror no certificate or set of certificates was provided for securing the connection, and createoffer() was unable to create a new one.
RTCPeerConnection.setConfiguration() - Web APIs
you cannot change the identity information for a connection once it's al
ready been set.
... invalidmodificationerror the configuration includes changed identity information, but the connection al
ready has identity information specified.
... example in this example, it has al
ready been determined that ice restart is needed, and that negotiation needs to be done using a different ice server.
RTCRtpSender - Web APIs
properties rtcrtpsender.dtmf
read only an rtcdtmfsender which can be used to send dtmf tones using telephone-event payloads on the rtp session represented by the rtcrtpsender object.
... rtcrtpsender.track
read only the mediastreamtrack which is being handled by the rtcrtpsender.
... rtcrtpsender.transport
read only the rtcdtlstransport over which the sender is exchanging the rtp and rtcp packets used to manage transmission of media and control data.
RelativeOrientationSensor - Web APIs
on each
reading it uses orientationsensor.quaternion to rotate a visual model of a phone.
... const options = { frequency: 60, referenceframe: 'device' }; const sensor = new relativeorientationsensor(options); sensor.addeventlistener('
reading', () => { // model is a three.js object instantiated elsewhere.
... model.quaternion.fromarray(sensor.quaternion).inverse(); }); sensor.addeventlistener('error', error => { if (event.error.name == 'not
readableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requsting permissions for multiple device sensors.
Report - Web APIs
properties report.body
read only the body of the report, which is a reportbody object containing the detailed report information.
... report.type
read only the type of report generated, e.g.
... report.url
read only the url of the document that generated the report.
SVGCircleElement - Web APIs
svgcircleelement.cx
read only this property defines the x-coordinate of the center of the <circle> element.
... svgcircleelement.cy
read only this property defines the y-coordinate of the center of the <circle> element.
... svgcircleelement.r
read only this property defines the radius of the <circle> element.
SVGFEBlendElement - Web APIs
svgfeblendelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfeblendelement.in2
read only an svganimatedstring corresponding to the in2 attribute of the given element.
... svgfeblendelement.mode
read only an svganimatedenumeration corresponding to the mode attribute of the given element.
SVGFEColorMatrixElement - Web APIs
svgfecolormatrixelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfecolormatrixelement.type
read only an svganimatedenumeration corresponding to the type attribute of the given element.
... svgfecolormatrixelement.values
read only an svganimatednumberlist corresponding to the values attribute of the given element.
SVGFECompositeElement - Web APIs
svgfecompositeelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfecompositeelement.type
read only an svganimatedenumeration corresponding to the type attribute of the given element.
... svgfecompositeelement.values
read only an svganimatednumberlist corresponding to the values attribute of the given element.
SVGFEOffsetElement - Web APIs
svgfeoffsetelement.in1
read only an svganimatedstring corresponding to the in attribute of the given element.
... svgfeoffsetelement.dx
read only an svganimatednumber corresponding to the dx attribute of the given element.
... svgfeoffsetelement.dy
read only an svganimatednumber corresponding to the dy attribute of the given element.
SVGFEPointLightElement - Web APIs
svgfepointlightelement.x
read only an svganimatednumber corresponding to the x attribute of the given element.
... svgfepointlightelement.y
read only an svganimatednumber corresponding to the y attribute of the given element.
... svgfepointlightelement.z
read only an svganimatednumber corresponding to the z attribute of the given element.
SVGMatrix - Web APIs
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... warning: svg 2 replaced the svgmatrix interface by the more general dommatrix and dommatrix
readonly interfaces.
... exceptions a domexception with the code no_modification_allowed_err is raised when attempting updating a
read-only attribute or when the object itself is
read-only.
SVGScriptElement - Web APIs
t="_top"><rect x="321" y="65" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="401" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">svgscriptelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgscriptelement.type
read only a domstring corresponding to the type attribute of the given <script> element.
... a domexception is raised with the code no_modification_allowed_err on an attempt to change the value of a
read only attribut.
... svgscriptelement.crossorigin
read only a domstring corresponding to the crossorigin attribute of the given <script> element.
SVGStyleElement - Web APIs
svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a
read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a
read-only attribute.
... svg 1.1 defined that a domexception is raised with code no_modification_allowed_err on an attempt to change the value of a
read-only attribute.
SVGTextPathElement - Web APIs
svgtextpathelement.startoffset
read only an svganimatedlength corresponding to the x component of the startoffset attribute of the given element.
... svgtextpathelement.method
read only an svganimatedenumeration corresponding to the method attribute of the given element.
... svgtextpathelement.spacing
read only an svganimatedenumeration corresponding to the spacing attribute of the given element.
ServiceWorker - Web APIs
serviceworker.scripturl
read only returns the serviceworker serialized script url defined as part of serviceworkerregistration.
... serviceworker.state
read only returns the state of the service worker.
... event handlers serviceworker.onstatechange
read only an eventlistener property called whenever an event of type statechange is fired; it is basically fired anytime the serviceworker.state changes.
ServiceWorkerGlobalScope - Web APIs
361" y="1" width="240" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="481" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">serviceworkerglobalscope</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties serviceworkerglobalscope.clients
read only contains the clients object associated with the service worker.
... serviceworkerglobalscope.registration
read only contains the serviceworkerregistration object that represents the service worker's registration.
... serviceworkerglobalscope.caches
read only contains the cachestorage object associated with the service worker.
ServiceWorkerMessageEvent.data - Web APIs
the data
read-only property of the serviceworkermessageevent interface returns the event's data.
... examples when the following code is used inside the main th
read to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... navigator.serviceworker.
ready.then(function(reg) { ...
ServiceWorkerMessageEvent.lastEventId - Web APIs
the lasteventid
read-only property of the serviceworkermessageevent interface represents, in server-sent events, the last event id of the event source.
... examples when the following code is used inside the main th
read to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... navigator.serviceworker.
ready.then(function(reg) { ...
ServiceWorkerMessageEvent.origin - Web APIs
the origin
read-only property of the serviceworkermessageevent interface returns the origin of the service worker's environment settings object.
... examples when the following code is used inside the main th
read to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... navigator.serviceworker.
ready.then(function(reg) { ...
ServiceWorkerMessageEvent.ports - Web APIs
the ports
read-only property of the serviceworkermessageevent interface returns an array of messageport objects connected with the message channel the message is being sent through.
... examples when the following code is used inside the main th
read to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... navigator.serviceworker.
ready.then(function(reg) { ...
ServiceWorkerMessageEvent.source - Web APIs
the source
read-only property of the serviceworkermessageevent returns a reference to the serviceworker object of the associated service worker that sent the message.
... examples when the following code is used inside the main th
read to set up a message channel between it and a service worker for sending messages between the two, the event object of onmessage will be a serviceworkermessageevent.
... navigator.serviceworker.
ready.then(function(reg) { ...
SharedWorkerGlobalScope.onconnect - Web APIs
the onconnect property of the sharedworkerglobalscope interface is an event handler representing the code to be called when the connect event is raised — that is, when a messageport connection is opened between the associated sharedworker and the main th
read.
...}; examples this example shows a shared worker file — when a connection to the worker occurs from a main th
read via a messageport, the onconnect event handler fires.
... the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to send messages back to the main th
read using the worker.
SpeechSynthesisVoice - Web APIs
properties speechsynthesisvoice.default
read only a boolean indicating whether the voice is the default voice for the current app language (true), or not (false.) speechsynthesisvoice.lang
read only returns a bcp 47 language tag indicating the language of the voice.
... speechsynthesisvoice.localservice
read only a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) speechsynthesisvoice.name
read only returns a human-
readable name that represents the voice.
... speechsynthesisvoice.voiceuri
read only returns the type of uri and location of the speech synthesis service for this voice.
Storage Access API - Web APIs
the storage access api is intended to solve this problem; embedded cross-origin content can request unrestricted access to its first-party storage on a site-by-site basis via the document.requeststorageaccess() method, and check whether it al
ready has access via the document.hasstorageaccess() method.
...specifics regarding the lifetime of a storage grant and the circumstances under which the browser may decide to inform the user are currently being worked through and will be announced once
ready.
...design properties unique to firefox are summarized here: if the embedded origin tracker.example has al
ready obtained first-party storage access on the top-level origin foo.example, and the user visits a page from foo.example embedding a page from tracker.example again in less than 30 days, the embedded origin will have storage access immediately when loading.
TextDecoder - Web APIs
textdecoder.prototype.encoding
read only is a domstring containing the name of the decoder, that is a string describing the method the textdecoder will use.
... textdecoder.prototype.fatal
read only is a boolean indicating whether the error mode is fatal.
... textdecoder.prototype.ignorebom
read only is a boolean indicating whether the byte order marker is ignored.
TransitionEvent - Web APIs
transitionevent.propertyname
read only is a domstring containing the name css property associated with the transition.
... transitionevent.elapsedtime
read only is a float giving the amount of time the transition has been running, in seconds, when this event fired.
... transitionevent.pseudoelement
read only is a domstring, starting with ::, containing the name of the pseudo-element the animation runs on.
USBConfiguration - Web APIs
properties usbconfiguration.configurationvalue
read only returns the configuration value of this configuration.
... usbconfiguration.configurationname
read only returns the name provided by the device to describe this configuration.
... usbconfiguration.interfaces
read only returns an array containing instances of the usbinterface describing each interface supported by this configuration.
VRStageParameters - Web APIs
properties vrstageparameters.sittingtostandingtransform
read only contains a matrix that transforms the sitting-space view matrices of vrframedata to standing-space.
... vrstageparameters.sizex
read only returns the width of the play-area bounds in meters.
... vrstageparameters.sizey
read only returns the depth of the play-area bounds in meters.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
syntax //
read from the buffer bound to gl.pixel_unpack_buffer void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, imagesize, offset); void gl.compressedtexsubimage3d(target, level, xoffset, yoffset, zoffset, width, height, depth, format, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); parameters target a glenum specifying the binding point (target) of the active texture.
...ible values: gl.compressed_r11_eac gl.compressed_signed_r11_eac gl.compressed_rg11_eac gl.compressed_signed_rg11_eac gl.compressed_rgb8_etc2 gl.compressed_rgba8_etc2_eac gl.compressed_srgb8_etc2 gl.compressed_srgb8_alpha8_etc2_eac gl.compressed_rgb8_punchthrough_alpha1_etc2 gl.compressed_srgb8_punchthrough_alpha1_etc2 imagesize a glint specifying the number of bytes to
read from the buffer bound to gl.pixel_unpack_buffer.
... offset a glint specifying the offset in bytes from which to
read from the buffer bound to gl.pixel_unpack_buffer.
WebGL2RenderingContext.texImage3D() - Web APIs
possible values: gl.alpha: discards the red, green and blue components and
reads the alpha component.
... gl.rgb: discards the alpha components and
reads the red, green and blue components.
... gl.rgba: red, green, blue and alpha components are
read from the color buffer.
WebGL2RenderingContext.texSubImage3D() - Web APIs
possible values: gl.alpha: discards the red, green and blue components and
reads the alpha component.
... gl.rgb: discards the alpha components and
reads the red, green and blue components.
... gl.rgba: red, green, blue and alpha components are
read from the color buffer.
WebGL2RenderingContext - Web APIs
webgl2renderingcontext.getbuffersubdata()
reads data from a buffer and writes them to an arraybuffer or sharedarraybuffer.
... framebuffers webgl2renderingcontext.blitframebuffer() transfers a block of pixels from the
read framebuffer to the draw framebuffer.
... webgl2renderingcontext.invalidatesubframebuffer() invalidates portions of the contents of attachments in a framebuffer webgl2renderingcontext.
readbuffer() selects a color buffer as the source for pixels.
WebGLActiveInfo - Web APIs
properties webglactiveinfo.name the
read-only name of the requested variable.
... webglactiveinfo.size the
read-only size of the requested variable.
... webglactiveinfo.type the
read-only type of the requested variable.
WebGLRenderingContext.bindFramebuffer() - Web APIs
gl.
read_framebuffer: used as a source for
reading operations.
... exceptions a gl.invalid_enum error is thrown if target is not gl.framebuffer, gl.draw_framebuffer, or gl.
read_framebuffer.
... adds: gl.draw_framebuffer and gl.
read_framebuffer opengl es 3.0the definition of 'glbindframebuffer' in that specification.
WebGLRenderingContext.bufferSubData() - Web APIs
when using a webgl 2 context, the following values are available additionally: gl.copy_
read_buffer: buffer for copying from one buffer object to another.
... srcoffset a gluint specifying the element index offset where to start
reading the buffer.
... adds new target buffers: gl.copy_
read_buffer, gl.copy_write_buffer, gl.transform_feedback_buffer, gl.uniform_buffer, gl.pixel_pack_buffer, gl.pixel_unpack_buffer.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
pixels); // additionally available in webgl 2: //
read from buffer bound to gl.pixel_unpack_buffer void gl.compressedteximage2d(target, level, internalformat, width, height, border, glsizei imagesize, glintptr offset); void gl.compressedteximage2d(target, level, internalformat, width, height, border, arraybufferview srcdata, optional srcoffset, optional srclengthoverride); //
read from buffer bound to gl.pixel_unpack_bu...
... imagesize a glsizei specifying the number of bytes to
read from the buffer bound to gl.pixel_unpack_buffer.
... offset a glintptr specifying the offset in bytes from which to
read from the buffer bound to gl.pixel_unpack_buffer.
WebGLRenderingContext.copyTexImage2D() - Web APIs
possible values: gl.alpha: discards the red, green and blue components and
reads the alpha component.
... gl.rgb: discards the alpha components and
reads the red, green and blue components.
... gl.rgba: red, green, blue and alpha components are
read from the color buffer.
WebGLRenderingContext.getBufferParameter() - Web APIs
when using a webgl 2 context, the following values are available additionally: gl.copy_
read_buffer: buffer for copying from one buffer object to another.
... when using a webgl 2 context, the following values are available additionally: gl.static_
read, gl.dynamic_
read, gl.stream_
read, gl.static_copy, gl.dynamic_copy, gl.stream_copy.
... adds new target buffers: gl.copy_
read_buffer, gl.copy_write_buffer, gl.transform_feedback_buffer, gl.uniform_buffer, gl.pixel_pack_buffer, gl.pixel_unpack_buffer adds new usage hints: gl.static_
read, gl.dynamic_
read, gl.stream_
read, gl.static_copy, gl.dynamic_copy, gl.stream_copy.
WebGLRenderingContext.getParameter() - Web APIs
gl.green_bits glint gl.implementation_color_
read_format glenum gl.implementation_color_
read_type glenum gl.line_width glfloat gl.max_combined_texture_image_units glint gl.max_cube_map_texture_size glint gl.max_fragment_uniform_vectors glint gl.max_renderbuffer_size glint gl.max_texture_image_units glint gl.max_texture_...
... constant returned type description gl.copy_
read_buffer_binding webglbuffer or null see bindbuffer.
... gl.rasterizer_discard glboolean gl.
read_buffer glenum gl.
read_framebuffer_binding webglframebuffer or null null corresponds to a binding to the default framebuffer.
WebGLRenderingContext.makeXRCompatible() - Web APIs
the webglrenderingcontext method makexrcompatible() ensures that the rendering context described by the webglrenderingcontext is
ready to render the scene for the immersive webxr device on which it will be displayed.
... if necessary, the webgl layer may reconfigure the context to be
ready to render to a different device than it originally was.
... return value a promise which successfully resolves once the webgl context is
ready to be used for rendering webxr content.
WebGLRenderingContext.texImage2D() - Web APIs
ui16 ● rgba32i rgba i32 i32 i32 i32 ● rgba32ui rgba ui32 ui32 ui32 ui32 ● possible values in webgl2 for the versions of teximage2d that take a texture an htmlimageelement, htmlcanvaselement, htmlvideoelement, imagebitmap, or imagedata gl.alpha: discards the red, green and blue components and
reads the alpha component.
... gl.rgb: discards the alpha components and
reads the red, green and blue components.
... gl.rgba: red, green, blue and alpha components are
read from the color buffer.
WebGLRenderingContext.texSubImage2D() - Web APIs
possible values: gl.alpha: discards the red, green and blue components and
reads the alpha component.
... gl.rgb: discards the alpha components and
reads the red, green and blue components.
... gl.rgba: red, green, blue and alpha components are
read from the color buffer.
WebGLShaderPrecisionFormat - Web APIs
properties webglshaderprecisionformat.rangemin
read only the base 2 log of the absolute value of the minimum value that can be represented.
... webglshaderprecisionformat.rangemax
read only the base 2 log of the absolute value of the maximum value that can be represented.
... webglshaderprecisionformat.precision
read only the number of bits of precision that can be represented.
Using textures in WebGL - Web APIs
// function loadtexture(gl, url) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // because images have to be download over the internet // they might take a moment until they are
ready.
... // load texture const texture = loadtexture(gl, 'cubetexture.png'); mapping the texture onto the faces at this point, the texture is loaded and
ready to use.
... once we've set up the texture mapping array, we pass the array into the buffer, so that webgl has that data
ready for its use.
WebRTC connectivity - Web APIs
when
reading the description (returned by rtcpeerconnection.localdescription and rtcpeerconnection.remotedescription), the returned value is the value of pendinglocaldescription/pendingremotedescription if there's a pending description (that is, the pending description isn't null); otherwise, the current description (currentlocaldescription/currentremotedescription) is returned.
... the pendinglocaldescription contains not just the offer or answer under consideration, but any local ice candidates which have al
ready been gathered since the offer or answer was created.
... ice rollbacks when renegotiating a connection that's al
ready active and a situation arises in which the negotiation fails, you don't really want to kill the al
ready-running call.
A simple RTCDataChannel sample - Web APIs
they make it very easy to chain the steps of the connection process together; if you haven't al
ready
read up on this functionality of ecmascript 2015, you should
read up on them.
... when the local peer experiences an open or close event, the handlesendchannelstatuschange() method is called: function handlesendchannelstatuschange(event) { if (sendchannel) { var state = sendchannel.
readystate; if (state === "open") { messageinputbox.disabled = false; messageinputbox.focus(); sendbutton.disabled = false; disconnectbutton.disabled = false; connectbutton.disabled = true; } else { messageinputbox.disabled = true; sendbutton.disabled = true; connectbutton.disabled = false; disconnectbutton.disabled =...
... our example's remote peer, on the other hand, ignores the status change events, except for logging the event to the console: function handlereceivechannelstatuschange(event) { if (receivechannel) { console.log("receive channel's status has changed to " + receivechannel.
readystate); } } the handlereceivechannelstatuschange() method receives as an input parameter the event which occurred; this will be an rtcdatachannelevent.
Viewpoints and viewers: Simulating cameras in WebXR - Web APIs
there are a few articles about the fundamental math, geometry, and other concepts behind webgl and webxr which may be useful to
read before or while
reading this one, including: explaining basic 3d theory matrix math for the web webgl model view projection geometry and reference spaces in webxr ed.
...see multiplying two matrices in the article matrix math for the web for a clear but
readable function that does this or use your preferred matrix math library such as glmatrix to do the work.
... with the constraints so established and everything else we need
ready, we call a custom function, myrenderscene(), to actually perform the computations and webgl rendering to render the frame.
Migrating from webkitAudioContext - Web APIs
please consult the
readme file for that library to see a list of apis that are automatically handled by it.
... to the standard audiocontext api: // old webkitaudiocontext code: var osc = context.createoscillator(); var table = context.createwavetable(realarray, imaginaryarray); osc.setwavetable(table); // new standard audiocontext code: var osc = context.createoscillator(); var table = context.createperiodicwave(realarray, imaginaryarray); osc.setperiodicwave(table); removal of some of the audioparam
read-only attributes the following
read-only attributes have been removed from audioparam: name, units, minvalue, and maxvalue.
... the minvalue and maxvalue attributes are
read-only values representing the nominal range for the audioparam.
Example and tutorial: Simple synth keyboard - Web APIs
osclist is set up to be
ready to contain a list of all currently-playing oscillators.
... finally, the oscillator list is initialized to ensure that it's
ready to receive information identifiying which oscillators are associated with which keys.
...we look for a data-pressed attribute; if there isn't one (which indicates that the note isn't al
ready playing), we call playtone() to start playing the note, passing in the value of the element's data-frequency attribute.
Window: popstate event - Web APIs
note: when writing functions that process popstate event it is important to take into account that properties like window.location will al
ready reflect the state change (if it affected the current url), but document might still not.
... if the goal is to catch the moment when the new document state is al
ready fully in place, a zero-delay settimeout() method call should be used to effectively put its inner callback function that does the processing at the end of the browser event loop: window.onpopstate = () => settimeout(dosomething, 0); when popstate is sent when the transition occurs, either due to the user triggering the browser's "back" button or otherwise, the popstate event is near the end of the process to transition to the new location.
... if new-entry's document is al
ready fully loaded and
ready—that is, its
readystate is complete—and the document is not al
ready visible, it's made visible and the pageshow event is fired at the document with the pagetransitionevent's persisted attribute set to true.
WindowClient - Web APIs
windowclient.focused
read only a boolean that indicates whether the current client has focus.
... windowclient.visibilitystate
read only indicates the visibility of the current client.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { client.focus(); break; } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'windowclient' in that specificati...
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
gecko started to treat setinterval() like this in version 56 (it al
ready did this with settimeout(); see below).
...one important case to note is that the function or code snippet cannot be executed until the th
read that called settimeout() has terminated.
... firing is deferred until the mainth
read is deemed idle (similar to window.requestidlecallback()), or until the load event is fired.
Worklet - Web APIs
chrome: main th
read gecko: paint th
read css painting api audioworklet for audio processing with custom audionodes.
... web audio render th
read web audio api animationworklet for creating scroll-linked and other high performance procedural animations.
... compositor th
read css animation worklet api layoutworklet for defining the positioning and dimensions of custom elements.
WritableStreamDefaultWriter.WritableStreamDefaultWriter() - Web APIs
exceptions typeerror the provided stream value is not a writablestream, or it is locked to another writer al
ready.
... const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
How to check the security state of an XMLHTTPRequest over SSL - Web APIs
the channel property becomes available only after the request is sent and the connection was established, that is, on
readystate loaded, interactive or completed.
... // sec_error_expired_certificate, sec(11) errname = 'securityexpiredcertificateerror'; break; case 12: // sec_error_revoked_certificate, sec(12) errname = 'securityrevokedcertificateerror'; break; // per bsmith, we will be unable to tell these errors apart very soon, // so it makes sense to just folder them all together al
ready.
...bug 867872 has been filed to implement this and // contains a documented tcperror.webidl that maps all the error codes we use in // this file to slightly more
readable explanations.
XMLHttpRequest.response - Web APIs
the value is null if the request is not yet complete or was unsuccessful, with the exception that when
reading text data using a responsetype of "text" or the empty string (""), the response can contain the response so far while the request is still in the loading
readystate (3).
...it works by creating an xmlhttprequest object and creating a listener for
readystatechange events such that that when
readystate changes to done (4), the response is obtained and passed into the callback function provided to load().
... var url = 'somepage.html'; //a local page function load(url, callback) { var xhr = new xmlhttprequest(); xhr.on
readystatechange = function() { if (xhr.
readystate === 4) { callback(xhr.response); } } xhr.open('get', url, true); xhr.send(''); } specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.responseText - Web APIs
the
read-only xmlhttprequest property responsetext returns the text received from a server following a request being sent.
... you know the entire content has been received when the value of
readystate becomes xmlhttprequest.done (4), and status becomes 200 ("ok").
... example var xhr = new xmlhttprequest(); xhr.open('get', '/server', true); // if specified, responsetype must be empty string or "text" xhr.responsetype = 'text'; xhr.onload = function () { if (xhr.
readystate === xhr.done) { if (xhr.status === 200) { console.log(xhr.response); console.log(xhr.responsetext); } } }; xhr.send(null); specifications specification status comment xmlhttprequest living standard whatwg living standard ...
XMLHttpRequest.send() - Web APIs
exceptions exception description invalidstateerror send() has al
ready been invoked for the request, and/or the request is complete.
...}; xhr.send(null); // xhr.send('string'); // xhr.send(new blob()); // xhr.send(new int8array()); // xhr.send(document); example: post var xhr = new xmlhttprequest(); xhr.open("post", '/server', true); //send the proper header information along with the request xhr.setrequestheader("content-type", "application/x-www-form-urlencoded"); xhr.on
readystatechange = function() { // call a function when the state changes.
... if (this.
readystate === xmlhttprequest.done && this.status === 200) { // request finished.
XRInputSourcesChangeEvent - Web APIs
properties added
read only an array of zero or more xrinputsource objects, each representing an input device which has been newly connected or enabled for use.
... removed
read only an array of zero or more xrinputsource objects representing the input devices newly connected or enabled for use.
... session
read only the xrsession to which this input source change event is being directed.
XRInputSourcesChangeEventInit - Web APIs
properties added
read only an array of zero or more xrinputsource objects, each representing one input device which is newly available to use.
... removed
read only an array of zero or more xrinputsource objects representing the input devices which are no longer available.
... session
read only the xrsession to which the event applies.
XRRigidTransform.matrix - Web APIs
the
read-only xrrigidtransform property matrix returns the transform matrix represented by the object.
... creating the matrix in this section, intended for more advanced
readers, we cover how the api calculates the matrix for the specified transform.
...here px, py, and pz are the values of the x, y, and z members of the dompoint
readonly position.
XRSystem: isSessionSupported() - Web APIs
if it is, we set up a button to
read "enter xr", to call a method onbuttonclicked(), and enable the button.
... if no session is al
ready underway, we request the vr session and, if successful, set up the session in a method called onsessionstarted(), not shown.
... if a session is al
ready underway when the button is clicked, we call the xrsession object's end() method to shut down the webxr session.
XRSystem - Web APIs
onsessionstarted(xrsession); }); } else { // shut down the al
ready running xrsession xrsession.end() .then(() => xrsession = null); } } this code starts by checking to see if webxr is available by looking for the navigator.xr property.
... the onbuttonclicked() function checks to see if there's al
ready a session running.
... if, on the other hand, there is al
ready an ongoing xr session, we instead call end() to end the current session.
XRView - Web APIs
properties eye
read only which of the two eyes (left) or (right) for which this xrview represents the perspective.
... projectionmatrix
read only the projection matrix that will transform the scene to appear correctly given the point-of-view indicated by eye.
... transform
read only an xrrigidtransform which describes the current position and orientation of the viewpoint in relation to the xrreferencespace specified when getviewerpose() was called on the xrframe being rendered.
Using the progressbar role - Accessibility
it is not possible for the user to alter the value of a progressbar because it is always
readonly.
... note: elements with the role progressbar have an implicit aria-
readonly value of true.
... possible effects on user agents and assistive technology screen
readers should announce the progress updates as they occur.
ARIA: Main role - Accessibility
screen
readers use landmark roles to provide keyboard navigation to important sections of a page.
... <body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <div id="main-content" role="main"> <!-- main page content --> </div> </body> webaim: "skip navigation" links added benefits certain technologies such as browser extensions can generate lists of all landmark roles present on a page, allowing non-screen
reader users to also quickly identify and navigate to large sections of the document.
... working draft screen
reader support tbd ...
ARIA: Mark role - Accessibility
<p>the last half of the song is a slow-rising crescendo that peaks at the <span role="mark" aria-details="th
read-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="th
read-1" data-author="chris"> <h3>chris said</h3> <p class="comment-text">i really think this moment could use more cowbell.</p> <p><time datetime="2019-03-30t19:29">march 30 2019, 19:29</time></p> </div> the related comment is marked up using an html structure wrapped with a <div> containing role="...
...using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... screen
reader support tbd ...
ARIA: Suggestion role - Accessibility
examples when you’ve got a content change that involves an insertion and a deletion, there is no way for a screen
reader user to work out if the two are related or not.
...using too many landmark roles can create "noise" in screen
readers, making it difficult to understand the overall layout of the page.
... screen
reader support tbd ...
ARIA: switch role - Accessibility
aria-
readonly attribute the aria-
readonly attribute is supported by the switch role.
...text in these elements remains visible to the user agent and may be
read or otherwise delivered to the user, unless it's expressly hidden using display: none or aria-hidden="true".
... the assistive technology, if it supports the switch role, responds by doing the following: screen
readers should announce the element as a switch, optionally providing instructions as to how to activate the switch.
ARIA: heading role - Accessibility
screen
readers would
read the text and indicate that it is formatted like a heading.
...although theoretically you can go higher, and some screen
readers may support it, the results can be unpredictable with other browser/screen
reader combinations.
... screen
reader support tbd ...
Basic form hints - Accessibility
when a screen
reader user navigates a page, the screen
reader will describe form controls.
... without a direct association between the control and its label, the screen
reader has no way of knowing which label is the correct one.
...ntry would look something like this: var validate = function () { var emailelement = document.getelementbyid(emailfieldid); var valid = emailvalid(formdata.email); // returns true if valid, false otherwise emailelement.setattribute("aria-invalid", !valid); setelementbordercolour(emailelement, valid); // sets the border to red if second arg is false }; providing helpful error messages
read how to use aria alerts to enhance forms.
Accessibility: What users can do to browse more safely - Accessibility
use
reader mode on browsers enable content blockers; gets rid of ads, reduces and/or removes distractions enables text-to-speech in certain browsers, enable fonts by choice enable page zoom turn off animated gifs in the browser browsers offer much power to their users; it's just a matter of knowing where to go.
...there is a github repository for it at https://github.com/0ui/gif-scrubber beeline
reader beeline
reader has a browser extension that allows you to set up for grayscale and dyslexi font, among other things take advantage operating system accessibility features most operating systems such as windows 10, have accessibility options that are surprisingly powerful.
...an interesting discussion by users on the benefits of using grayscale may be found in the discussion th
read, "what is the “grayscale” setting for in accessibility options?".
HTML To MSAA - Accessibility
e name value states relations actions events notes a role_system_ link n/a value of @href attribute state_system_ selectable if @name attribute is presented state_system_ linked if @href attribute is presented or click event listener is registered state_system_ traversed if link is traversed n/a "jump" if @href is valid n/a br role_system_ whitespace '\n' (new line char) state_system_
readonly n/a n/a n/a button role_system_ pushbutton from child nodes n/a state_system_ focusable state_system_ default if @type attribute has value "submit" n/a "press" n/a caption bstr role n/a n/a n/a description_for (0x100f), points to table element div bstr role n/a n/a n/a n/a n/a n/a fieldset role_system_ grouping text equivalent from child legend element n/a n/a labelled...
...ttribute is used then image accessible has children for each map item input @type=button, submit, reset role_system_ pushbutton from @value attribute, @alt attribute, default label, @src attribute, @data attribute n/a state_system_ default if @type attribute has value "submit" n/a "press" n/a input @type=text, textarea role_system_ text n/a value property of input dom element state_system_
readonly if @
readonly attribute is used n/a "activate" n/a input @type=password role_system_ text n/a n/a state_system_
readonly if @
readonly attribute is used state_system_ protected n/a "activate" n/a input type="checkbox" role_system_ checkbutton n/a n/a state_system_ marqueed used as state checkable state_system_ mixed for html 5 if intermediate property of dom element returns true stat...
... marqueed used as state checkable state_system_ checked if checked property of dom element returns true n/a "select" event_object_ statechange when state is changed label role_system_ statictext from child nodes n/a n/a n/a n/a n/a legend role_system_ statictext n/a n/a n/a label_for (0x1002), points to caption element n/a n/a li and others role_system_ listitem n/a n/a state_system_
readonly n/a n/a n/a contains child accessible for list bullet ol, ul and others role_system_ list n/a n/a state_system_
readonly n/a n/a n/a optgroup bstr role n/a n/a n/a n/a n/a n/a option role_system_ listitem from @label attribute, from child text nodes n/a state_system_ selected if option is selected n/a "select" event_object_ selectionwithin event_object_ selectionadd if selected eve...
Robust - Accessibility
note: to
read the w3c definitions for robust and its guidelines and success criteria, see principle 4: robust — content must be robust enough that it can be interpreted reliably by a wide variety of user agents, including assistive technologies.
... success criteria how to conform to the criteria practical resource 4.1.1 parsing (a) content should be well-formed so it can be parsed successfully by browsers and other user agents such as screen
readers.
...not only by sighted mouse users, but also by screen
reader users, keyboard-only users, etc.
::placeholder - CSS: Cascading Style Sheets
it is important to ensure that the contrast ratio between the color of the placeholder text and the background of the input is high enough that people experiencing low vision conditions will be able to
read it while also making sure there is enough of a difference between the placeholder text and input text color that users do not mistake the placeholder for inputed data.
...most screen
reading technology will use aria-describedby to
read the hint after the input's label text is announced, and the person using the screen
reader can mute it if they find the extra information unnecessary.
...without a label that has been programmatically associated with an input using a combination of the for and id attributes, assistive technology such as screen
readers cannot parse <input> elements.
Block and inline layout in normal flow - CSS: Cascading Style Sheets
by default block elements will consume all of the space in the inline direction, so our paragraphs sp
read out and get as big as they can inside their containing block.
... you can
read more about margin collapsing in our article mastering margin collapsing.
...due to the default behaviour of these elements, an html document with no css styling at all, will display in a
readable way.
OpenType font features guide - CSS: Cascading Style Sheets
the answer lies in the specific features that will make a site more useful,
readable, and polished: ligatures like 'ff' or 'fi' make letter spacing and
reading more even and smooth.
... fractions can make home improvement and recipe sites much easier to
read and understand.
... sometimes it's substance, not just style there are some cases — like with font-variant-east-asian — that opentype features are directly tied to using different forms of certain glyphs, which can impact meaning and
readability.
Relationship of grid layout to other layout methods - CSS: Cascading Style Sheets
in this guide, i will explain how a grid fits together with other techniques you may al
ready be using.
...the two specifications share some common features, however, and if you have al
ready learned how to use flexbox, the similarities should help you get to grips with grid.
...-color: #ffd8a8; padding: 1em; color: #d9480f; } <div class="wrapper"> <div class="box1">one</div> <div class="box2">two</div> <div class="box3">three</div> </div> .wrapper { display: grid; grid-template-columns: repeat(3,1fr); align-items: end; grid-auto-rows: 200px; } .box1 { align-self: stretch; } .box2 { align-self: start; } the fr unit and flex-basis we have al
ready seen how the fr unit works to assign a proportion of available space in the grid container to our grid tracks.
Pagination - CSS: Cascading Style Sheets
to ensure that the pagination is understandable by people using a screen
reader, we mark the items up as a list inside a <nav> element, and then use css to display the layout visually as a row.
... .pagination { list-style: none; margin: 0; padding: 0; display: flex; column-gap: 2px; } accessibility concerns we want to ensure that a person using a screen
reader understands what this navigation does, and where they will go when clicking a link.
... we have also added some additional content that would be
read by a screen
reader but is hidden visually, and set the aria-hidden attribute on the paging arrows.
Visual formatting model - CSS: Cascading Style Sheets
when
reading specifications you will often find references to the model as defined in css2, so an understanding of the model and the terms used to describe it in css2 is valuable when
reading other layout specifications.
...
read more about flow layout in css.
...
read about css positioned layout.
conic-gradient() - CSS: Cascading Style Sheets
the above is hard to
read.
...this is important primarily for screen
readers, as a screen
reader will not announce its presence and therefore convey nothing to its users.
... while it is possible to create pie charts, checkerboards, and other effects with conic gradients, css images provide no native way to assign alternative text, and therefore the image represented by the conic gradient will not be accessible to screen
reader users.
grid-template-columns - CSS: Cascading Style Sheets
[ <fixed-size> | <fixed-repeat> ] ]* <line-names>?<line-name-list> = [ <line-names> | <name-repeat> ]+where <line-names> = '[' <custom-ident>* ']'<track-size> = <track-b
readth> | minmax( <inflexible-b
readth> , <track-b
readth> ) | fit-content( [ <length> | <percentage> ] )<track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)<fixed-size> = <fixed-b
readth> | minmax( <fixed-b
readth> , <track-b
readth> ) | minmax( <inflexible-b
readth> , <fixed-b
readth> )<fixed-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)where <track-b
readth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-b
readth> = <length> | <percentage> | min-content | max-content | auto<fixed-b
readth> = <length-percentage>where <length-percentage> = <length> | <percentage> examples specifying grid column sizes html <div id="grid"> <div id="areaa">a</div> <div id="areab">b</div> </div> css #grid { display: grid; width: 100%; grid-template-columns: 50px 1fr; } #areaa { background-color: lime; } #areab { background-color: yellow; } result specifications specification status comment css grid layoutthe definition of 'grid-template-co...
grid-template-rows - CSS: Cascading Style Sheets
[ <fixed-size> | <fixed-repeat> ] ]* <line-names>?<line-name-list> = [ <line-names> | <name-repeat> ]+where <line-names> = '[' <custom-ident>* ']'<track-size> = <track-b
readth> | minmax( <inflexible-b
readth> , <track-b
readth> ) | fit-content( [ <length> | <percentage> ] )<track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)<fixed-size> = <fixed-b
readth> | minmax( <fixed-b
readth> , <track-b
readth> ) | minmax( <inflexible-b
readth> , <fixed-b
readth> )<fixed-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)where <track-b
readth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-b
readth> = <length> | <percentage> | min-content | max-content | auto<fixed-b
readth> = <length-percentage>where <length-percentage> = <length> | <percentage> examples specifying grid row sizes html <div id="grid"> <div id="areaa">a</div> <div id="areab">b</div> </div> css #grid { display: grid; height: 100px; grid-template-rows: 30px 1fr; } #areaa { background-color: lime; } #areab { background-color: yellow; } result specifications specification status comment css grid layoutthe definition of 'grid-template-rows' ...
Guide to scroll anchoring - CSS: Cascading Style Sheets
you browse to a long page on a slow connection and begin to scroll to
read the content; while you are busy
reading, the part of the page you are looking at suddenly jumps.
... scroll anchoring is a browser feature that aims to solve this problem of content jumping, which happens if content loads in after the user has al
ready scrolled to a new part of the document.
... in bug 1584285 the layout.css.scroll-anchoring.suppressions.enabled flag was added to firefox nightly in order to allow the disabling of these triggers further
reading explainer document on the wicg site scroll anchoring for web developers on the chromium blog implement a pin-to-bottom scrolling element using scroll anchoring ...
repeating-conic-gradient() - CSS: Cascading Style Sheets
it makes css hard to
read.
...this is important primarily for screen
readers, as a screen
reader will not announce its presence and therefore convey nothing to its users.
... while it is possible to create pie charts, checkerboards, and other effects with conic gradients, css images provide no native way to assign alternative text, and therefore the image represented by the conic gradient will not be accessible to screen
reader users.
HTML5 - Developer guides
there also is file
reader.
... performance and integration web workers allows delegation of javascript evaluation to background th
reads, allowing these activities to prevent slowing down interactive events.
...you can learn more about these by
reading advanced box effects.
Index - Developer guides
14 web audio playbackrate explained apps, audio, media, video, playbackrate the playbackrate property of the <audio> and <video> elements allows us to change the speed, or rate, at which a piece of web audio or video is playing 15 writing web audio api code that works in every browser api you probably have al
ready
read the announcement on the web audio api coming to firefox, and are totally excited and
ready to make your until-now-webkit-only sites work with firefox, which uses the unprefixed version of the spec.
... 16 audio and video manipulation audio, canvas, examples, guide, html5, media, video, web audio api, webgl, developer recommendation the ability to
read the pixel values from each frame of a video can be very useful.
...once we're
ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded.
HTML attribute: pattern - HTML: Hypertext Markup Language
if a non-null value doesn't conform to the constraints set by the pattern value, the validitystate object's
read-only patternmismatch property will be true.
...if the pattern attribute isn't present, and the value doesn't match the expected syntax for that value type, the validitystate object's
read-only typemismatch property will be true.
...additionally, assistive technology may
read the title aloud when the control gains focus, but this should not be relied upon for accessibility.
<a>: The Anchor element - HTML: Hypertext Markup Language
they also convey incorrect semantics to assistive technologies, like screen
readers.
... people experiencing low vision conditions, navigating with the aid of screen
reading technology, or with cognitive concerns may be confused when a new tab, window, or application opens unexpectedly.
... older screen-
reading software may not even announce the behavior.
<br>: The Line Break element - HTML: Hypertext Markup Language
evelyn avenue<br> mountain view, ca<br> 94041<br> usa<br> the result looks like so: accessibility concerns creating separate paragraphs of text using <br> is not only bad practice, it is problematic for people who navigate with the aid of screen
reading technology.
... screen
readers may announce the presence of the element, but not any content contained within <br>s.
... this can be a confusing and frustrating experience for the person using the screen
reader.
<label> - HTML: Hypertext Markup Language
this means that, for example, a screen
reader will
read out the label when the user is focused on the form input, making it easier for an assistive technology user to understand what data should be entered.
...you can apply styling to them in any way you want, as long as you don't cause the text to become difficult to
read.
... don't <label for="tac"> <input id="tac" type="checkbox" name="terms-and-conditions"> i agree to the <a href="terms-and-conditions.html">terms and conditions</a> </label> do <label for="tac"> <input id="tac" type="checkbox" name="terms-and-conditions"> i agree to the terms and conditions </label> <p> <a href="terms-and-conditions.html">
read our terms and conditions</a> </p> headings placing heading elements within a <label> interferes with many kinds of assistive technology, because headings are commonly used as a navigation aid.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
although the death star has been destroyed, <mark class="match">imperial</mark> troops have driven the rebel forces from their hidden base and pursued them across the galaxy.</p> <p>evading the d
readed <mark class="match">imperial</mark> starfleet, a group of freedom fighters led by luke skywalker has established a new secret base on the remote ice world of hoth.</p> to help distinguish the use of <mark> for search results from other potential usage, this example applies the custom class "match" to each match.
... the results look like this: accessibility concerns the presence of the mark element is not announced by most screen
reading technology in its default configuration.
... mark::before, mark::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } mark::before { content: " [highlight start] "; } mark::after { content: " [highlight end] "; } some people who use screen
readers deliberately disable announcing content that creates extra verbosity.
<table>: The Table element - HTML: Hypertext Markup Language
ion</p> <table> <caption>awesome caption</caption> <tr> <td>awesome data</td> </tr> </table> table { border-collapse: collapse; border-spacing: 0px; } table, th, td { padding: 5px; border: 1px solid black; } accessibility concerns captions by supplying a <caption> element whose value clearly and concisely describes the table's purpose, it helps the people decide if they need to
read the rest of the table content or skip over it.
... this helps people navigating with the aid of assistive technology such as a screen
reader, people experiencing low vision conditions, and people with cognitive concerns.
... mdn tables for visually impaired users tables with two headers • tables • w3c wai web accessibility tutorials tables with irregular headers • tables • w3c wai web accessibility tutorials h63: using the scope attribute to associate header cells and data cells in data tables | w3c techniques for wcag 2.0 complicated tables assistive technology such as screen
readers may have difficulty parsing tables that are so complex that header cells can’t be associated in a strictly horizontal or vertical way.
<time> - HTML: Hypertext Markup Language
it may include the datetime attribute to translate dates into machine-
readable format, allowing for better search engine results or custom features such as reminders.
... usage notes this element is for presenting dates and times in a machine
readable format.
... the datetime value (the machine-
readable value of the datetime) is the value of the element’s datetime attribute, which must be in the proper format (see below).
<tr>: The Table Row element - HTML: Hypertext Markup Language
there are also several deprecated attributes, which you should avoid but may need to know when
reading older code.
...because the other columns are al
ready occupied by first-row cells that span into the second row, these wind up correctly positioned under the "membership dates" heading.
... color every body other row differently it's common to help improve
readability of table data by alternating row colors.
HTML elements reference - HTML: Hypertext Markup Language
<head> the html <head> element contains machine-
readable information (metadata) about the document, like its title, scripts, and style sheets.
... <b> the html bring attention to element (<b>) is used to draw the
reader's attention to the element's contents, which are not otherwise granted special importance.
... <data> the html <data> element links a given piece of content with a machine-
readable translation.
Common MIME types - HTTP
a textual file should be human-
readable and must not contain binary data.
...l interface (midi) audio/midi audio/x-midi .mjs javascript module text/javascript .mp3 mp3 audio audio/mpeg .mpeg mpeg video video/mpeg .mpkg apple installer package application/vnd.apple.installer+xml .odp opendocument presentation document application/vnd.oasis.opendocument.presentation .ods opendocument sp
readsheet document application/vnd.oasis.opendocument.sp
readsheet .odt opendocument text document application/vnd.oasis.opendocument.text .oga ogg audio audio/ogg .ogv ogg video video/ogg .ogx ogg application/ogg .opus opus audio audio/opus .otf opentype font font/otf .png portable network graphics...
...bm webm video video/webm .webp webp image image/webp .woff web open font format (woff) font/woff .woff2 web open font format (woff) font/woff2 .xhtml xhtml application/xhtml+xml .xls microsoft excel application/vnd.ms-excel .xlsx microsoft excel (openxml) application/vnd.openxmlformats-officedocument.sp
readsheetml.sheet .xml xml application/xml if not
readable from casual users (rfc 3023, section 3) text/xml if
readable from casual users (rfc 3023, section 3) .xul xul application/vnd.mozilla.xul+xml .zip zip archive application/zip .3gp 3gpp audio/video container video/3gpp audio/3gpp if it doesn't contain video .3g2 3gp...
Configuring servers for Ogg media - HTTP
this information may also be useful if you encounter other media types your server isn't al
ready configured to recognize.
...the data in media files is al
ready compressed, so you won't get any real benefit from compression, and the use of compression makes it impossible for the browser to properly seek the video or determine its duration.
... it's important to note that it appears that oggz-info makes a
read pass of the media in order to calculate its duration, so it's a good idea to store the duration value in order to avoid lengthy delays while the value is calculated for every http request of your ogg media.
HTTP Public Key Pinning (HPKP) - HTTP
when the client visits the server again, it expects at least one certificate in the certificate chain to contain a public key whose fingerprint is al
ready known via hpkp.
...this allows for changing the server's public key without breaking accessibility for clients that have al
ready noted the pins.
... setenv.add-response-header = ( "public-key-pins" => "pin-sha256=\"base64+primary==\"; pin-sha256=\"base64+backup==\"; max-age=5184000; includesubdomains") note: this requires the mod_setenv server.module loaded which can be included by the following if not al
ready loaded.
HTTP response status codes - HTTP
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 al
ready finished.
... 208 al
ready reported (webdav) used inside a <dav:propstat> response element to avoid repeatedly enumerating the internal members of multiple bindings to the same collection.
... 503 service unavailable the server is not
ready to handle the request.
A re-introduction to JavaScript (JS tutorial) - JavaScript
you could just rewrite the function as follows: function avgarray(arr) { var sum = 0; for (var i = 0, j = arr.length; i < j; i++) { sum += arr[i]; } return sum / arr.length; } avgarray([2, 3, 4, 5]); // 3.5 but it would be nice to be able to reuse the function that we've al
ready created.
... you can achieve the same result using the sp
read operator in the function call.
...this allows more optimizations to be done by the engine and results in more
readable code.
JavaScript data types and data structures - JavaScript
bit masking also tends to make the code more difficult to
read, understand, and maintain.
... false obsolete attributes (as of ecmascript 3, renamed in ecmascript 5) attribute type description
read-only boolean reversed state of the es5 [[writable]] attribute.
... please
read the reference page for more details and edge cases.
Memory Management - JavaScript
memory life cycle regardless of the programming language, the memory life cycle is pretty much always the same: allocate the memory you need use the allocated memory (
read, write) release the allocated memory when it is not needed anymore the second part is explicit in all languages.
... using values using values basically means
reading and writing in allocated memory.
... this can be done by
reading or writing the value of a variable or an object property or even passing an argument to a function.
SyntaxError: unterminated string literal - JavaScript
examples multiple lines you can't split a string across multiple lines like this in javascript: var longstring = 'this is a very long string which needs to wrap across multiple lines because otherwise my code is un
readable.'; // syntaxerror: unterminated string literal instead, use the + operator, a backslash, or template literals.
... the + operator variant looks like this: var longstring = 'this is a very long string which needs ' + 'to wrap across multiple lines because ' + 'otherwise my code is un
readable.'; or you can use the backslash character ("\") at the end of each line to indicate that the string will continue on the next line.
...that form looks like this: var longstring = 'this is a very long string which needs \ to wrap across multiple lines because \ otherwise my code is un
readable.'; another possibility is to use template literals, which are supported in ecmascript 2015 environments: var longstring = `this is a very long string which needs to wrap across multiple lines because otherwise my code is un
readable.`; ...
JavaScript error reference - JavaScript
list of errors in this list, each page is listed by name (the type of error) and message (a more detailed human-
readable error message).
...missing } after property listsyntaxerror: redeclaration of formal parameter "x"syntaxerror: return not in functionsyntaxerror: test for equality (==) mistyped as assignment (=)?syntaxerror: unterminated string literaltypeerror: "x" has no propertiestypeerror: "x" is (not) "y"typeerror: "x" is not a constructortypeerror: "x" is not a functiontypeerror: "x" is not a non-null objecttypeerror: "x" is
read-onlytypeerror: 'x' is not iterabletypeerror: more arguments neededtypeerror: reduce of empty array with no initial valuetypeerror: x.prototype.y called on incompatible typetypeerror: can't access dead objecttypeerror: can't access property "x" of "y"typeerror: can't assign to property "x" on "y": not an objecttypeerror: can't define property "x": "obj" is not extensibletypeerror: can't delete non...
...d array.prototype.sort argumenttypeerror: invalid argumentstypeerror: invalid assignment to const "x"typeerror: property "x" is non-configurable and can't be deletedtypeerror: setting getter-only property "x"typeerror: variable "x" redeclares argumenturierror: malformed uri sequencewarning: 08/09 is not a legal ecma-262 octal constantwarning: -file- is being assigned a //# sourcemappingurl, but al
ready has onewarning: date.prototype.tolocaleformat is deprecatedwarning: javascript 1.6's for-each-in loops are deprecatedwarning: string.x is deprecated; use string.prototype.x insteadwarning: expression closures are deprecatedwarning: unreachable code after return statement ...
Atomics.notify() - JavaScript
examples using notify given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a
reading th
read is sleeping and waiting on location 0 which is expected to be 0.
...however, once the writing th
read has stored a new value, it will be notified by the writing th
read and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing th
read stores a new value and notifies the waiting th
read once it has written: console.log(int32[0]); // 0; atomics.store(int32, 0, 123); atomics.notify(int32, 0, 1); specifications specification ecmascript (ecma-262)the definition of 'atomics.notify' in that specification.
DataView.prototype.getBigInt64() - JavaScript
syntax dataview.getbigint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to
read the data from.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such that it would
read beyond the end of the view.
DataView.prototype.getBigUint64() - JavaScript
syntax dataview.getbiguint64(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to
read the data from.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such that it would
read beyond the end of the view.
DataView.prototype.getFloat32() - JavaScript
syntax dataview.getfloat32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getFloat64() - JavaScript
syntax dataview.getfloat64(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getInt16() - JavaScript
syntax dataview.getint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getInt32() - JavaScript
syntax dataview.getint32(byteoffset [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getUint16() - JavaScript
syntax dataview.getuint16(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getUint32() - JavaScript
syntax dataview.getuint32(byteoffset [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
...if false or undefined, a big-endian value is
read.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
Date.prototype.toTimeString() - JavaScript
the totimestring() method returns the time portion of a date object in human
readable form in american english.
... syntax dateobj.totimestring() return value a string representing the time portion of the given date in human
readable form in american english.
...calling tostring() will return the date formatted in a human
readable form in american english.
Object.defineProperty() - JavaScript
s in the o object and its value is 38 // the value of o.b is now always identical to bvalue, // unless o.b is redefined // you cannot try to mix both: object.defineproperty(o, 'conflict', { value: 0x9f91102, get() { return 0xdeadbeef; } }); // throws a typeerror: value appears // only in data descriptors, // get appears only in accessor descriptors modifying a property when the property al
ready exists, object.defineproperty() attempts to modify the property according to the values in the descriptor and the object's current configuration.
... // strict mode (function() { 'use strict'; var o = {}; object.defineproperty(o, 'b', { value: 2, writable: false }); o.b = 3; // throws typeerror: "b" is
read-only return o.b; // returns 2 without the line above }()); as seen in the example, trying to write into the non-writable property doesn't change it but doesn't throw an error either.
... enumerable attribute the enumerable property attribute defines whether the property is picked by object.assign() or sp
read operator.
Promise.race() - JavaScript
if the iterable contains one or more non-promise value and/or an al
ready settled promise, then promise.race will resolve to the first of these values found in the iterable.
... examples asynchronicity of promise.race this following example demonstrates the asynchronicity of promise.race: // we are passing as argument an array of promises that are al
ready resolved, // to trigger promise.race as soon as possible var resolvedpromisesarray = [promise.resolve(33), promise.resolve(44)]; var p = promise.race(resolvedpromisesarray); // immediately logging the value of p console.log(p); // using settimeout we can execute code after the stack is empty settimeout(function(){ console.log('the stack is now empty'); console.log(p); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "fulfilled", <value>: 33 } an empty iterable causes the returned promise to be forever pending: var foreverpendingpromise = promis...
...e.race([]); console.log(foreverpendingpromise); settimeout(function(){ console.log('the stack is now empty'); console.log(foreverpendingpromise); }); // logs, in order: // promise { <state>: "pending" } // the stack is now empty // promise { <state>: "pending" } if the iterable contains one or more non-promise value and/or an al
ready settled promise, then promise.race will resolve to the first of these values found in the array: var foreverpendingpromise = promise.race([]); var al
readyfulfilledprom = promise.resolve(100); var arr = [foreverpendingpromise, al
readyfulfilledprom, "non-promise value"]; var arr2 = [foreverpendingpromise, "non-promise value", promise.resolve(100)]; var p = promise.race(arr); var p2 = promise.race(arr2); console.log(p); console.log(p2); settimeout(funct...
Promise.prototype.then() - JavaScript
return value once a promise is fulfilled or rejected, the respective handler function (onfulfilled or onrejected) will be called asynchronously (scheduled in the current th
read loop).
... returns an al
ready fulfilled promise, the promise returned by then gets fulfilled with that promise's value as its value.
... returns an al
ready rejected promise, the promise returned by then gets rejected with that promise's value as its value.
SharedArrayBuffer - JavaScript
var sab = new sharedarraybuffer(1024); worker.postmessage(sab); updating and synchronizing shared memory with atomic operations shared memory can be created and updated simultaneously in workers or the main th
read.
...with a few security measures, postmessage() will no longer throw for sharedarraybuffer objects and shared memory across th
reads will be available: as a baseline requirement, your document needs to be in a secure context.
...
read only.
String - JavaScript
method 1 you can use the + operator to append multiple strings together, like this: let longstring = "this is a very long string which needs " + "to wrap across multiple lines because " + "otherwise my code is un
readable." method 2 you can use the backslash character (\) at the end of each line to indicate that the string will continue on the next line.
... that form looks like this: let longstring = "this is a very long string which needs \ to wrap across multiple lines because \ otherwise my code is un
readable." both of the above methods result in identical strings.
...
read-only.
WebAssembly.Module - JavaScript
a webassembly.module object contains stateless webassembly code that has al
ready been compiled by the browser — this can be efficiently shared with workers, and instantiated multiple times.
... var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main th
read.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main th
read'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); }; specifications specification webassembly javascript interfacethe definition of 'webassembly.module()' in that specification.
async function - JavaScript
this runs 2 seconds after 1., immediately after 2., since fast is al
ready resolved } function concurrentpromise() { console.log('==concurrent start with promise.all==') return promise.all([resolveafter2seconds(), resolveafter1second()]).then((messages) => { console.log(messages[0]) // slow console.log(messages[1]) // fast }) } async function parallel() { console.log('==parallel with await promise.all==') // start 2 "jobs" in parallel and wait for ...
...the second timer is not created until the first has al
ready fired, so the code finishes after 3 seconds.
...ows: async function getprocesseddata(url) { let v try { v = await downloaddata(url) } catch(e) { v = await downloadfallbackdata(url) } return processdatainworker(v) } in the above example, notice there is no await statement after the return keyword, although that would be valid too: the return value of an async function is implicitly wrapped in promise.resolve - if it's not al
ready a promise itself (as in this example).
Web video codec guide - Web media technologies
lost sharpness can make text in the image difficult to
read, as text—especially small text—is very detail-oriented content, where minor alterations can significantly impact legibility.
... ringing is another type of artifact that can make it particularly difficult to
read text contained in your images.
... for the time being, because of these factors, av1 is not yet
ready to be your first choice of video codec, but you should watch for it to be
ready to use in the future.
Progressive loading - Progressive web apps (PWAs)
we could go even further and move everything from style.css to the <style> tag in the <head> of index.html — this would improve performance even more, but for the
readability of the example we will skip that approach too.
...it's not unusual to have megabytes of image data to download before announcing the site is
ready, but this again creates a bad perception of performance.
...you could try to make your apps more bulletproof by making them work without javascript — either using <noscript> to show the image with final src al
ready assigned, or by wrapping <img> tags with <a> elements pointing at the target images, so the user can click and access them when desired.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
as mentioned before, to be able to receive push messages, you have to have a service worker, the basics of which are al
ready explained in the making pwas work offline with service workers article.
... in the registration part, the code looks like this: if(subscription) { return subscription; } if the user has al
ready subscribed, we then return the subscription object and move to the subscription part.
...to learn more about vapid keys you can
read the sending vapid identified webpush notifications via mozilla’s push service blog post.
Progressive web apps (PWAs)
to find out more about what these mean,
read progressive web app advantages.
... to find out how to implement pwas,
read through our pwa developer guide.
... hacker news
readers as progressive web apps.
<use> - SVG: Scalable Vector Graphics
html,body,svg { height:100% } <svg viewbox="0 0 30 10" xmlns="http://www.w3.org/2000/svg"> <circle id="mycircle" cx="5" cy="5" r="4" stroke="blue"/> <use href="#mycircle" x="10" fill="blue"/> <use href="#mycircle" x="20" fill="white" stroke="red"/> <!-- stroke="red" will be ignored here, as stroke was al
ready set on mycircle.
... most attributes on use do not override those al
ready on the element referenced by use.
..., aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:href, xlink:title usage notes categoriesgraphics element, graphics referencing element, structural elementpermitted contentany number of the following elements, in...
Gradients in SVG - SVG: Scalable Vector Graphics
the only other one i want to mention here is the sp
readmethod attribute.
... sp
readmethod <?xml version="1.0" standalone="no"?> <svg width="220" height="220" version="1.1" xmlns="http://www.w3.org/2000/svg"> <defs> <radialgradient id="gradientpad" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" sp
readmethod="pad"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> <radialgradi...
...ent id="gradientrepeat" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" sp
readmethod="repeat"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> <radialgradient id="gradientreflect" cx="0.5" cy="0.5" r="0.4" fx="0.75" fy="0.75" sp
readmethod="reflect"> <stop offset="0%" stop-color="red"/> <stop offset="100%" stop-color="blue"/> </radialgradient> </defs> <rect x="10" y="10" rx="15" ry="15" width="100" height="100" fill="url(#gradientpad)"/> <rect x="10" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradientrepeat)"/> <rect x="120" y="120" rx="15" ry="15" width="100" height="100" fill="url(#gradientreflect)"/> <text x="15" y="30" fi...
Types of attacks - Web security
the browser executes the code because it assumes the response is from a "trusted" server which the user has al
ready interacted with.
... session fixation a third party is able to determine a user’s session identifier (i.e., by
reading it or setting it), and therefore interact with the server as that user.
... session fixation should primarily be mitigated by regenerating session cookie values when the user authenticates (even if a cookie al
ready exists) and by tieing any csrf token to the user.
Using templates and slots - Web Components
al quick example: <template id="my-paragraph"> <p>my paragraph</p> </template> this won't appear in your page until you grab a reference to it with javascript and then append it to the dom, using something like the following: let template = document.getelementbyid('my-paragraph'); let templatecontent = template.content; document.body.appendchild(templatecontent); although trivial, you can al
ready start to see how this could be useful.
...however, it is generally more practical to add slots within a <template> element, since you are unlikely to need to define a pattern based on an al
ready-rendered element.
... in addition, even if it is not al
ready rendered, the purpose of the container as a template should be more semantically clear when using the <template>.
Compiling from Rust to WebAssembly - WebAssembly
reads your cargo.toml and produces an equivalent package.json.
... copies your
readme.md (if you have one) into the package.
...it's
ready for use from javascript, and doesn't require the user to have rust installed; the code included was the webassembly code, not the rust source.
self - Archive of obsolete content
self properties options content-scripting apis such as tab.attach(), page-mod, and page-worker let you pass
read-only data to the content script as a json object via the contentscriptoptions option.
... if you do this, the data is available to the content script in the options property of self: // main.js const tabs = require("sdk/tabs"); tabs.open({ url: "./page.html", on
ready: function(tab) { tab.attach({ contentscriptfile: "./content-script.js", contentscriptoptions: { a: "blah" } }); } }); // content-script.js alert(self.options.a); port you can use port to receive messages from, and send messages to, the main add-on code.
Communicating using "port" - Archive of obsolete content
here's a simple add-on that sends a message to a content script using port: var tabs = require("sdk/tabs"); var alertcontentscript = "self.port.on('alert', function(message) {" + " window.alert(message);" + "})"; tabs.on("
ready", function(tab) { worker = tab.attach({ contentscript: alertcontentscript }); worker.port.emit("alert", "message from the add-on"); }); tabs.open("http://www.mozilla.org"); in total, the port object defines four functions: emit(): emit a message.
... due to bug 816272 the page-mod's removelistener() function does not prevent the listener from receiving messages that are al
ready queued.
Content Processes - Archive of obsolete content
neither content or add-on proceses were ever actually implemented, but by the time they were cancelled, the sdk was al
ready designed with them in mind.
... to understand this article, it's probably best to
read it as if content and add-on processes actually exist.
Private Properties - Archive of obsolete content
it is possible to
read this section on its own, but to fully appreciate how namespaces work, and the problem they set out to solve, it is recommended to
read the entire article.
... to make a private property
readable/writable from any function, it's common to define getter/setter functions for the property, respectively: point.prototype.getx = function () { return this._x; }; point.prototype.setx = function (x) { this._x = x; }; point.prototype.gety = function () { return this._y; }; point.prototype.sety = function (y) { this._y = y; }; the above technique is simple and clearly expresses intent.
Contributor's Guide - Archive of obsolete content
neither content or add-on proceses were ever actually implemented, but by the time they were cancelled, the sdk was al
ready designed with them in mind.
... to understand this article, it's probably best to
read it as if content and add-on processes actually exist.
request - Archive of obsolete content
oncomplete function this function will be called when the request has received a response (or in terms of xhr, when
readystate == 4).
... all members of a response object are
read-only.
self - Archive of obsolete content
parameters name : string the filename to be
read, relative to the package's data directory.
...so you can rewrite the above code like this: var mypanel = require("sdk/panel").panel({ contenturl: "./myfile.html" }); mypanel.show(); parameters name : string the filename to be
read, relative to the package's data directory.
content/loader - Archive of obsolete content
e/hidden-frame"); var { loader } = require("sdk/content/content"); var pageloader = loader.compose({ constructor: function pageloader(options) { options = options || {}; if (options.contenturl) this.contenturl = options.contenturl; this.on('propertychange', this._onchange = this._onchange.bind(this)); let self = this; hiddenframes.add(hiddenframes.hiddenframe({ on
ready: function on
ready() { let frame = self._frame = this.element; self._emit('propertychange', { contenturl: self.contenturl }); } })); }, _onchange: function _onchange(e) { if ('contenturl' in e) this._frame.setattribute('src', this._contenturl); } }); loader properties contentscriptfile the local file urls of content scripts to load.
...this may take one of the following values: "start": load content scripts immediately after the document element for the page is inserted into the dom, but before the dom content itself has been loaded "
ready": load content scripts once dom content has been loaded, corresponding to the domcontentloaded event "end": load content scripts once all the content (dom, js, css, images) for the page has been loaded, at the time the window.onload event fires contentscriptoptions
read-only value exposed to content scripts under self.options property.
net/xhr - Archive of obsolete content
usage security concerns by default, the xmlhttprequest object grants full access to any protocol scheme, which means that it can be used to
read from (but not write to) the host system's entire filesystem.
...this can probably be done most securely by white-listing the protocols that can be used in the url passed to the open() method, and limiting them to http:, https:, and possibly a special scheme that can be used to access the add-on's packaged,
read-only resources.
Creating annotations - Archive of obsolete content
updating main.js go back to main.js and add the code to create the selector into the main function: var selector = pagemod.pagemod({ include: ['*'], contentscriptwhen: '
ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('selector.js')], onattach: function(worker) { worker.postmessage(annotatorison); selectors.push(worker); worker.port.on('show', function(data) { console.log(data); }); worker.on('detach', function () { detachworker(this, selectors); }); } }); make sure the name you use...
...so edit the message handler assigned to the selector so that on receiving the show message we assign the content of the message to the panel using a new property annotationanchor, and show the panel: var selector = pagemod.pagemod({ include: ['*'], contentscriptwhen: '
ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('selector.js')], onattach: function(worker) { worker.postmessage(annotatorison); selectors.push(worker); worker.port.on('show', function(data) { annotationeditor.annotationanchor = data; annotationeditor.show(); }); worker.on('detach', function () { detachworker(this, s...
Storing annotations - Archive of obsolete content
var annotationlist = panels.panel({ width: 420, height: 200, contenturl: data.url('list/annotation-list.html'), contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('list/annotation-list.js')], contentscriptwhen: '
ready', onshow: function() { this.postmessage(simplestorage.storage.annotations); }, onmessage: function(message) { require('sdk/tabs').open(message); } }); since this panel's content script uses jquery we will pass that in too: again, make sure the name of it matches the version of jquery you downloaded.
... finally we need to connect this to the widget's right-click message: var widget = widgets.widget({ id: 'toggle-switch', label: 'annotator', contenturl: data.url('widget/pencil-off.png'), contentscriptwhen: '
ready', contentscriptfile: data.url('widget/widget.js') }); widget.port.on('left-click', function() { console.log('activate/deactivate'); widget.contenturl = toggleactivation() ?
Getting started (cfx) - Archive of obsolete content
navigate to it, type cfx init, and hit enter: mkdir my-addon cd my-addon cfx init you'll see some output like this: * lib directory created * data directory created * test directory created * doc directory created *
readme.md written * package.json written * test/test-main.js written * lib/main.js written * doc/main.md written your sample add-on is now
ready for testing: try "cfx test" and then "cfx run".
... packaging the add-on when you've finished the add-on and are
ready to distribute it, you'll need to package it as an xpi file.
Listen for Page Load - Archive of obsolete content
the following add-on listens to the tab's built-in
ready event and just logs the url of each tab as the user loads it: require("sdk/tabs").on("
ready", logurl); function logurl(tab) { console.log(tab.url); } you will find this console output in the browser console, not the web console.
...the script adds a red border to the tab's document: require("sdk/tabs").on("
ready", runscript); function runscript(tab) { tab.attach({ contentscript: "if (document.body) document.body.style.border = '5px solid red';" }); } (this example is only to show the idea: to implement something like this, you should instead use page-mod, and specify "*" as the match-pattern.) learning more to learn more about working with tabs in the sdk, see the tabs api reference.
Modifying Web Pages Based on URL - Archive of obsolete content
in particular, the pagemod constructor takes several additional options to control its behavior: by default, content scripts are not attached to any tabs that are al
ready open when the page-mod is created, and are attached to iframes as well as top-level documents.
... define
read-only values accessible to content scripts using the contentscriptoptions option.
Open a Web Page - Archive of obsolete content
the callback is assigned to the on
ready property, and will be passed the tab as an argument: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", on
ready: function on
ready(tab) { console.log(tab.title); } }); even then, you don't get direct access to any content hosted in the tab.
...this add-on loads a page, then attaches a script to the page which adds a red border to it: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", on
ready: runscript }); function runscript(tab) { tab.attach({ contentscript: "document.body.style.border = '5px solid red';" }); } learning more to learn more about working with tabs in the sdk, see the tabs api reference.
Unit Testing - Archive of obsolete content
at this point your add-on ought to look like this: /base64 /data icon-16.png package.json
readme.md index.js base64.js /test test-base64.js now execute jpm --verbose test from the add-on's root directory.
... obviously, you don't have to pass the --verbose option to jpm if you don't want to; doing so just makes the output easier to
read.
Bootstrapped extensions - Archive of obsolete content
there are three changes you must make: you have to change the html file's extension to be .xhtml the doctype must be defined point to a dtd file in your locale folder such as: <!doctype html system "chrome://l10n/locale/mozilla.dtd"> must add xmlns attribute to html tag for example: <html xmlns="http://www.w3.org/1999/xhtml"> if you have multiple dtd files
read on here: using multiple dtds the bare minimum needed is: file: install.rdf file: chrome.manifest file: bootstrap.js folder: locale folder: valid_locale_here file: anything.dtd the chrome.manifest file must include a definition for content for example: content name_of_your_addon ./ the chrome.manifest file must also include a line pointing to the locale, ju...
... further
reading how to convert an overlay extension to restartless a step by step guide.
Bookmarks - Archive of obsolete content
checking to see if a uri is bookmarked if you want to see if a given uri is al
ready bookmarked -- for example, to avoid creating a new bookmark for a site that's al
ready bookmarked -- you can use the nsinavbookmarksservice.isbookmarked() method.
... var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("http://mozilla.com/", null, null); if (!bmsvc.isbookmarked(uri)) { bmsvc.insertbookmark(bmsvc.toolbarfolder, uri, bmsvc.default_index, "mozilla"); } this example looks to see if the user al
ready has a bookmark for the mozilla web site, and, if not, creates one, adding it to the user's bookmarks toolbar.
Canvas code snippets - Archive of obsolete content
function savecanvas(canvas, path, type, options) { return task.spawn(function *() { var
reader = new file
reader; var blob = yield new promise(accept => canvas.toblob(accept, type, options));
reader.
readasarraybuffer(blob); yield new promise(accept => {
reader.onloadend = accept }); return yield os.file.writeatomic(path, new uint8array(
reader.result), { tmppath: path + '.tmp' }); }); } loading a remote page o...
...then(accept => { canvas.width = this.width; canvas.height = this.height; ctxt.clearrect(0, 0, this.width, this.height); ctxt.drawimage(this, 0, 0); accept(canvas.todataurl()); }); } usage: loadimagefile('myimage.jpg').then(string64 => { alert(string64); }); if you want to get instead the base64 content of a local file using the file <input> element, you must use the file
reader object.
JavaScript timers - Archive of obsolete content
using javascript timers within workers workers can use timeouts and intervals just like the main th
read can.
... this can be useful, for example, if you want to have your worker th
read run code periodically instead of nonstop.
Toolbar - Archive of obsolete content
adding a toolbar button there are two tutorials available: an elaborate step by step tutorial for beginners: custom toolbar button a tutorial describing the steps needed to add a toolbar button assuming you al
ready have a working extension and know the basics of extension development: creating toolbar buttons adding button by default when you create and deploy your extension and include a toolbar button for it by overlaying the customize toolbarpalette, it is not available by default.
... /** * installs the toolbar button with the given id into the given * toolbar, if it is not al
ready present in the document.
Communication between HTML and your extension - Archive of obsolete content
communication between an html page and and extension after building a sample extension by
reading carefully and following the complete instructions for building an extension i was able to get an extension that could display something on the status bar.
...the on
readystatechange was set to another little javascript function that would update a specific element on the html page with the result.
Default Preferences - Archive of obsolete content
setting default preferences while most of an extension's directories can be named arbitrarily and mapped using a chrome manifest, default preferences must be in very particular spot: | extension root +--|content +--|skin +--|defaults +--|preferences to add preferences simply drop a .js file into that directory and mozilla will
read it and set the appropriate preferences.
...inside your file you set preferences using the pref() function: pref("name", "value") example: pref('extensions.defaultprefs.example.int', 1); pref('extensions.defaultprefs.example.float', 0.1); pref('extensions.defaultprefs.example.string', 'fadf'); pref('extensions.defaultprefs.example.bool', true); notice that unlike when you're
reading preferences, writing default preferences uses the same function no matter the data type of the preference.
Extension Etiquette - Archive of obsolete content
it assumes that you are al
ready familiar with building an extension.
... theming if you have xul buttons in your extension that do functions similar to ones that al
ready exist in a browser — for example, a feed
reader that reloads and stops — use icons from the browser's theme.
Adding Events and Commands - Archive of obsolete content
please
read appendix a for recommendations on how to use the load event to initialize your add-on without having a negative performance impact on firefox.
... for more advanced event handling, you should
read about event propagation.
Signing an extension - Archive of obsolete content
these instructions assume you're working on mac and you've al
ready got a valid certificate from ca.
...for production, use such a code: echo "enter password for object signing:"
read mypassword nss-signtool \ -d /volumes/codesign/keystore \ -k "my company's verisign, inc.
Firefox addons developer guide - Archive of obsolete content
there should be some introductory text on the table of contents page at https://developer.mozilla.org/en/firefox_addons_developer_guide obviously there are a number of fixme items in the content that need dealing with, but those are al
ready known.
...there al
ready is a tutorial for beginners: building an extension.
Adding preferences to an extension - Archive of obsolete content
as before, concepts covered in the previous articles in this series won't be rehashed here, so if you haven't al
ready seen them: creating a status bar extension creating a dynamic status bar extension also, for reference, you may want to take a look at preferences system and the preferences api.
...for details on how observers work,
read up on the nsiobserver interface.
Creating a status bar extension - Archive of obsolete content
human-
readable information in this sample, we have four pieces of human-
readable information; that is, information that is displayed to the user within the firefox interface.
... for details on the format of an install manifest,
read the install manifests section.
chargingchange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be
read from the batterymanager object received from the navigator.getbattery method.
...
read only.
chargingtimechange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be
read from the batterymanager object received from the navigator.getbattery method.
...
read only.
dischargingtimechange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be
read from the batterymanager object received from the navigator.getbattery method.
...
read only.
levelchange - Archive of obsolete content
general info specification battery interface event bubbles no cancelable no target batterymanager default action none properties the event callback doesn't receive any event objects, but properties can be
read from the batterymanager object received from the navigator.getbattery method.
...
read only.
List of Former Mozilla-Based Applications - Archive of obsolete content
applications that switched to another technology name description additional information angelsoft tools for startups, vcs, and angel investors switched from xulrunner-based client to a web application autodesk maya 3d modeling tool switched off of gecko for help browser in version 8.5 blam feed
reader switched to webkit in version 1.8.6 boxee media center software switched to webkit in version 1.0 epiphany browser switched from gecko to webkit flock social browsing flock switched from being firefox-based to chromium-based when it released a new beta on june 16, 2010 jolicloud web operating system as of march 2010, rw/w reports jo...
...zen p2p file delivery (email attachment replacement) site not updated since 2006 compuserve client internet software no longer available doczilla sgml/xml/html browser last release on site from july 2005 fabula language learning application inactive galeon browser last news item on site from september 2006 gencatrss rss
reader domain switched over to domain parking service ghostzilla browser archived version of ghostzilla site from 2005 homebase desktop operating environment for internet computers no longer available hp printer assistant printer utility hall of fame page mentions that this used an embedded version of mozilla at some point but i can't find reference to c...
Creating a Web based tone generator - Archive of obsolete content
<!doctype html> <html> <head> <title>javascript audio write example</title> </head> <body> <input type="text" size="4" id="freq" value="440"><label for="hz">hz</label> <button onclick="start()">play</button> <button onclick="stop()">stop</button> <script type="text/javascript"> function audiodatadestination(samplerate,
readfn) { // initialize the audio output.
... var sounddata = new float32array(parsefloat(available));
readfn(sounddata); // writing the data.
Compiling The npruntime Sample Plugin in Visual Studio - Archive of obsolete content
again note that the resulting dll filename must start with "np", so either call your project like this or rename the file later delete the .cpp and .h and
readme files from the project and disk (if you did not create an empty project) copy the npruntime sample plugin source code into the dir of the new vs project and add the files to the project using the vs gui (.cpp files to "source files", .h files to "header files", .rc file to "resource files").
...they may be al
ready disabled.
Making it into a static overlay - Archive of obsolete content
overlays provide a way to break up a large xul file into several different files (one that describes the overall structure of an application window and the others to implement specific portions of the window) to improve code
readability, maintainability, and extensability.
... <statusbar id="status-bar" class="chromeclass-status" ondragdrop="nsdraganddrop.drop(event, contenta
readndobserver);"> <statusbarpanel id="component-bar"/> <statusbarpanel id="statusbar-display" label="&statustext.label;" flex="1"/> <statusbarpanel class="statusbarpanel-progress"> <progressmeter class="progressmeter-statusbar" id="statusbar-icon" mode="normal" value="0"/> </statusbarpanel> <statusbarpanel class="statusbarpanel-iconic" id="tinderbox-status" statu...
Creating a hybrid CD - Archive of obsolete content
it is used as the creator type for
readme and other text files because it can handle unix and windows linebreaks, but teachtext cannot.
...wie' 'text' "c++ source file" .cpp ascii 'cwie' 'text' "c++ source file" .exp ascii 'cwie' 'text' "symbol export file" .mcp raw 'cwie' 'mmpr' "codewarrior project file" .r ascii 'mps ' 'text' "rez file" .html ascii 'moss' 'text' "html file" .htm ascii 'moss' 'text' "html file" .txt ascii 'moss' 'text' "text file"
readme ascii 'moss' 'text' "text file" changes ascii 'moss' 'text' "text file" install ascii 'moss' 'text' "text file" license ascii 'moss' 'text' "text file" .gif raw 'ogle' 'giff' "gif file" .png raw 'ogle' 'png ' "png file" .jpg raw 'ogle' 'jpeg' "jpeg file" .jpeg raw 'ogle' 'jpeg' "jpeg file" .pl ascii 'mcpl...
Developing New Mozilla Features - Archive of obsolete content
life will be much easier if your team has one or more members who are al
ready familiar with and to the mozilla world.
... if it is not possible to submit your feature in manageable size patches and you submit a 500k patch, be prepared for several months of review and revision before the patch is
ready to be checked in it may not take this long.
importUserCertificates - Archive of obsolete content
however, if this certificate has the same dn as one or more certificates that al
ready exist in the user's certificate store, the nickname associated with the certificate(s) of the same dn in the certificate store is used, and the <tt>"nicknamestring"</tt> parameter is ignored.
...the private key for the certificates must al
ready reside in the user's personal private key database.
Java in Firefox Extensions - Archive of obsolete content
liveconnect gives your extension's javascript code (linked from or contained in xul code) access to 2 objects: java and packages (note that per this th
read, although the new documentation for the liveconnect reimplementation states that these globals will be deprecated (in the context of applets), "firefox and the java plug-in will continue to support the global java/packages keywords, in particular in the context of firefox extensions.").
...see also liveconnect overview https://jdk6.dev.java.net/plugin2/#liveconnect https://jdk6.dev.java.net/plugin2/liveconnect/ http://forums.sun.com/th
read.jspa?th...66932&start=15 ...
Basics - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...blah(lengthstringfocusedstringtostringstringpopstringpushstringreversestringshiftstringsortstringsplicestringunshiftstring)this is some default text lengththe number of open tabsstring focusedthe current tab in your browserstring tostringstuffstring popstuffstring pushstuffstring reversestuffstring shiftstuffstring sortstuffstring splicestuffstring unshiftstuffstring on
ready()when the inherited document is fully loaded.
Me - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...note that this mechanism is independent of the first-run page; in particular, the callback is not a load event listener or jquery
ready callback.
Jetpack Snippets - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...ppendchild(firebug); (function(){if(window.firebug.version){firebug.init();}else{settimeout(arguments.callee);}})();void(firebug); ]]></script> </body></html>, width: 800, //wide enough to use firebug onselect: function(slide) { slide.slide(800, true); }}); calling into a slidebar from the global jetpack scope jetpack.slidebar.append({ on
ready: function (slide) { // call out to a global function, passing the slidebar object exinitslidebar(slide); }, ...});function exinitslidebar(aslidebar) { // this variable will now be global slider = aslidebar;} // then, accessing the slidebar htmlvar tl = slider.contentdocument.getelementbyid("thumblist"); // or calling slidebar api methods or accessing propertiesslider.notify(); ...
Clipboard - Archive of obsolete content
read the experiment report for what we learned from it and the blog post announcing the first sdk release for what we're up to next!
...the namespace associated with this api is jetpack.clipboard which provides both
read and write access to the clipboard.
Simple Storage - Archive of obsolete content
open()as described above, the jetpack.storage.simple object is automatically populated when a feature is loaded, but a feature may force the object to
read from disk by calling jetpack.storage.simple.open().
...jetpack.future.import("menu"); jetpack.future.import("selection"); jetpack.future.import("storage.simple"); // create the persistent notes array if it doesn't al
ready exist.
statusBar - Archive of obsolete content
on
ready (event) occurs when the item was loaded onunload (event) triggers when the item was removed.
... example jetpack.statusbar.append({ html: 'hello <i>world</i>!', on
ready: function(widget){ $(widget).click(function(){ jetpack.tabs.open("http://www.jogkey.de"); }); } }); ...
Monitoring downloads - Archive of obsolete content
omponents.interfaces.nsifile); this.dbfile.append("downloadlogger.sqlite"); // get access to the storage service and open the database this.storageservice = components.classes["@mozilla.org/storage/service;1"] .getservice(components.interfaces.mozistorageservice); var dbconn = this.storageservice.opendatabase(this.dbfile); // now create the table; if it al
ready exists, this fails, but we don't care!
... exercises for the
reader there are some obvious things that could be done to improve this extension.
Nanojit - Archive of obsolete content
figuring out how to compile it is left as an exercise for the
reader; the following works when run in the object directory of an --enable-debug spidermonkey shell: g++ -ddebug -g3 -wno-invalid-offsetof -fno-rtti -include js-confdefs.h -i dist/include/ -i..
... #include <stdio.h> #include <stdint.h> #include "jsapi.h" #include "jstracer.h" #include "nanojit.h" using namespace nanojit; const uint32_t cache_size_log2 = 20; static avmplus::gc gc = avmplus::gc(); static avmplus::avmcore core = avmplus::avmcore(); int main() { logcontrol lc; #ifdef debug lc.lcbits = lc_
readlir | lc_assembly; #else lc.lcbits = 0; #endif // set up the basic nanojit objects.
BlogPosts - Archive of obsolete content
just browsing: mozilla prism update thanscorner: mozilla prism - webrunner with pazzaz mozilla prism - a revolution in web apps thanscorner: mozilla webrunner 0.7 site specific browsers webrunner using webrunner webrunner + gears = offline desktop
reader webrunner 0.5 webrunner 0.5 - mac support webrunner 0.5 - linux install webrunner, google
reader, and google notebook distraction free gtd - 32+ web app files for online todo lists mozilla webrunner: a one-window, tabless browser with no url bar webrunner becomes prism - a mozilla labs project mozilla labs: prism alex faaborg: prism mozilla prism: bringing web apps to the desktop everyone should use site specific browsers mozilla prism portable (spanish) prism, l'avenir des applications web selon mozilla (french) mozilla prism : bundle...
... custom google
reader + talk (french) just browsing: site-specific browsers ...
Hacking wiki - Archive of obsolete content
for example: [snip] include("extensions/b
readcrumbs.php"); include("extensions/titleoverride.php"); include("extensions/abbr.php"); include("extensions/object.php"); include("extensions/kbd.php"); ?> tbd installing/configuring rss and doxygen extensions - anything special needs to be done?
... the title-override / b
readcrumbs extensions need an additional table created.
open - Archive of obsolete content
certain methods of file, such as
read and write should not be used when the file is not open.
... examples example: using open in the following example, myfile is a file object: myfile.open("
read", "text"); see also ...
Tamarin build documentation - Archive of obsolete content
- find the two instances of "android-ndk" and make sure they match your ndk's name (they should al
ready).
... you should be connected and able to see the devices file system in windows explorer in tamarin repository go to the utils/wmremote directory, open the ceremoteshell2008.sln file in visual studio 2008 build all targets in release mode (for more information see utils/wmremote/
readme.txt) copy release/avmremote.dll to the device in the \windows directory export avm=release/ceremoteshell.exe, the ceremoteshell.exe behaves as a proxy copying and running abc files on the windows mobile device build a windows mobile tamarin shell, copy the shell to the windows mobile device in \program files\shell\avmshell.exe (optional) can sanity check the windows mobile shell is functio...
URIs and URLs - Archive of obsolete content
it also might be necessary to implement a new urlparser for a new protocol but that might not be necessary because necko al
ready provides uri implementations that can deal with a number of schemes, by implementing the generic urlparser defined in rfc 2396.
...necko will not escape an al
ready escaped character unless forced by a special mask that can be used if it is known that a string is not escaped.
Using cross commit - Archive of obsolete content
getting the script "make -f client.mk pull_all" from a working copy of the trunk now pulls cross-commit, and that'll work on the 1.8 branch soon, too, so you might al
ready have the script.
...ommon ways to use cross-commit: land something simultaneously on the trunk and mozilla_1_8_branch # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on trunk and branch at once # make sure to use -m "commit message" when doing so tools/cross-commit -m "fix some sort of security bug" layout/base/nscaret.h land something on two other branches that has al
ready landed on the trunk # update to the first branch you want to land on cvs update -rmozilla_1_8_branch layout/base/nscaret.h # modify the files (probably by applying the patch) patch -p0 < ~/caret.patch # commit on all the branches at once # make sure to use -m "commit message" when doing so tools/cross-commit --moz18 --branch mozilla_1_8_0_branch -m "fix some sort of security bug" layou...
Writing textual data - Archive of obsolete content
when the file is to be
read only by the application/extension itself, using utf-8 is often the best choice — it can represent all characters, and ascii characters are represented efficiently.
...using utf-8 in this example */ "utf-8"; // now, convert a string to an nsiinputstream var stream = converter.converttoinputstream("a string with non-ascii characters: \u00fc \u05d0\n"); // stream can now be used as an nsiinputstream see also
reading textual data ...
Creating XPI Installer Modules - Archive of obsolete content
the
reader is referred to jar packaging, which describes the design, goals, and options available for jar packaging in some depth.
...for barley, that installation script should
read as follows: // initinstall(name + version, name, version); var err = initinstall("barley v", "barley", ""); logcomment("initinstall: " + err); addfile("barley grain", // displayname from contents.rdf "barley.jar", // jar source getfolder("chrome"), // target folder ""); // target subdir // registerchrome(type, location, source) registerchr...
Install Wizards (aka: Stub Installers) - Archive of obsolete content
the xpinstall engine processes installer packages by
reading instructions from their install scripts to extract files and take other install actions.
...it then proceeds to extract the xpinstall engine and feed it the downloaded software packages to install.) the stub installer code includes: the logic to display the install wizard widgets and dialogs the code that
reads in the configuration file (config.ini) and dynamically installs from the net or from local xpi modules found next to the installer binary the code that processes user selections the code that calls the xpinstall engine through xpistub the libxpnet code that is statically linked in the stub installers are written in code native to the platform using native widget toolkits including the window...
Install script template - Archive of obsolete content
* you should not stop the install process because the function failed, * you still have a chance to install the plugin for the al
ready * installed gecko browsers.
... * you should not stop the install process because the function failed, * you still have a chance to install the plugin for the al
ready * installed gecko browsers.
Accessing Files - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
TOC - Archive of obsolete content
file and stream guide: [ nsiscriptableio | accessing files | getting file information |
reading from files | writing to files | moving, copying and deleting files | uploading and downloading files | working with directories ] important note: the pages from the file and stream guide use the io object (nsiscriptableio), which was not available in any released version of the platform (pending some fixes).
...other documentation on files and i/o not using the unavailable nsiscriptableio apis: code snippets: file i/o, open and save dialogs,
reading textual data, writing textual data, list of file-related error codes.
How to implement a custom XUL query processor component - Archive of obsolete content
datasource: function(adatasources, arootnode, aistrusted, abuilder, ashoulddelaybuilding) { // todo: parse the adatasources variable // for now, ignore everything and let's just signal that we have data return this._data; }, initializeforbuilding: function(adatasource, abuilder, arootnode) { // perform any initialization that can be delayed until the content builder // is
ready for us to start }, done: function() { // called when the builder is destroyed to clean up state }, compilequery: function(abuilder, aquery, arefvariable, amembervariable) { // outputs a query object.
... // eventually we should
read the <query> to create filters return this._data; }, generateresults: function(adatasource, aref, aquery) { // preform any query and pass the data to the result set return new templateresultset(this._data); }, addbinding: function(arulenode, avar, aref, aexpr) { // add a variable binding for a particular rule, which we aren't using yet }, translateref: function(adatasource, arefstring) { // if we return null, everything stops return new templateresult(null); }, compareresults: function(aleft, aright, avar) { // -1 less, 0 ==, +1 greater var leftvalue = aleft.getbindingfor(avar); var rightvalue = aright.getbindingfor(avar); if (leftvalue < rightvalue) { return -1; } else if (leftvalue > ri...
Introduction to XUL - Archive of obsolete content
we intend to provide a subset of cross-platform functionality suitable for building network applications like browsers, leveraging the cross-platform functionality al
ready built into gecko, mozilla's html layout engine.
... "xul" al
ready introduced, is an application of xml used to describe the layout of most windows in the mozilla browser, including and especially the main, browser window.
listBoxObject - Archive of obsolete content
this property is
read-only.
... most of the features of the list box are al
ready available directly in the listbox, so you will rarely have need to use this box object directly.
Introduction - Archive of obsolete content
if the datasource is al
ready loaded and cached, the template builder can begin work right away.
...if the datasource is al
ready loaded, the builder can construct content all in one step, although even this isn't completely true as we'll see later.
Multiple Queries - Archive of obsolete content
how multiple queries are processed we al
ready know that a query generates a set of results.
...that is, the canal.jpg generated by the second query is removed, since an earlier query (the first query) al
ready generated a match for that result.
Static Content - Archive of obsolete content
instead, it looks to see if a menupopup al
ready exists in the location where it would be generated.
...the builder will treat the element as al
ready present as long as some element with the same tag name exists.
Complete - Archive of obsolete content
this page is for
readers who have followed the custom toolbar button tutorial for firefox, thunderbird and sunbird, or the custom toolbar button:seamonkey tutorial for seamonkey, and who want to learn more about developing extensions.
...restart the application using the command line switch: -uilocale fr-fr (of course, if your application is al
ready in french, specify en-us here to switch the extension to english.) notes: if you use a shortcut or launcher icon to start the application, then you can add the command line switch by editing the icon's properties.
Box Objects - Archive of obsolete content
retrieving position and size the box object provides six
read only properties, x, y, screenx, screeny, width and height, for determining the currently displayed position and size of an element.
...these properties will return an empty string if the width or height attributes or properties were not set al
ready.
Commands - Archive of obsolete content
in addition, text fields and other widgets have a number of commands which they al
ready support that you can invoke.
...you will probably want to use the same id if a command is al
ready being used, however, for your own commands, you can use any command id you wish.
Creating a Skin - Archive of obsolete content
some of the rules conflict with those al
ready in the global stylesheets.
... for example, rules are al
ready defined for buttons and tabs and so on and we defined additional rules for them.
Install Scripts - Archive of obsolete content
that way, it is easier to check if a version of your component is al
ready present and only update it if necessary.
...the syntax of this function is as follows: initinstall( ''packagename'' , ''regpackage'' , ''version'' ); an example initinstall("find files","/xulplanet/find files","0.5.0.0"); the first argument is the name of the package in user-
readable form.
Introduction to RDF - Archive of obsolete content
alternatively, data in other formats can be used and code written that will
read the file and create rdf data from it.
... this is how mozilla works when it
reads data such as bookmarks, the history or mail messages.
Modifying a XUL Interface - Archive of obsolete content
note that for all these functions, the object referred to by the variable referencechild or the variables newchild and oldchild must al
ready exist or an error occurs.
... likewise the object referred to by the variable child which is to be removed must al
ready exist or an error occurs.
RDF Datasources - Archive of obsolete content
this has the effect of
reading the data from all the datasources mentioned.
... <tree datasources="rdf:bookmarks rdf:history animals.rdf" ref="nc:bookmarksroot"> this example
reads the resources from the bookmarks, history and the animals.rdf file.
Tree Box Objects - Archive of obsolete content
redrawing the tree we al
ready saw the rowcountchanged() function of the tree box object in the previous section.
... the ensurerowisvisible() function will scroll to a row just as scrolltorow() does, but does not scroll if the row is al
ready visible.
Tree View Details - Archive of obsolete content
for instance, the caller might al
ready know where the next sibling might possibly be.
...also note the use of the javascript get operator to bind a property to a function, so to have the value of the rowcount property that can change dynamically over time, as rowcount has to be a
read-only attribute as defined in nsitreeview.
Using nsIXULAppInfo - Archive of obsolete content
getting nsixulappinfo to get a component implementing nsixulappinfo use this code: var appinfo = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); (for explanation see this creating xpcom article.) getting application information after you obtained the app info component, you can
read its properties to get the application's id, human-
readable name, version, platform version, etc.
...es["@mozilla.org/xre/app-info;1"] .getservice(components.interfaces.nsixulappinfo); if(appinfo.id == firefox_id) { // running under firefox } else if(appinfo.id == thunderbird_id) { // running under thunderbird } else if(appinfo.id == seamonkey_id) { // running under seamonkey } else { // another app } note: you could also use nsixulappinfo.name, which is a human-
readable name for the application, such as "firefox", "thunderbird" or "seamonkey", but who knows, maybe they'll rename it again!
XUL accessibility tool - Archive of obsolete content
be aware that the report might take a little while to be
ready depending on the complexity of the application being analyzed and the speed of your machine.
... future work the following things have been suggested or are planned for a future version of the tool: new tests: (aaronlev) warning: hardcoded color and pixel sizings (aaronlev) error: duplicate accesskey in a dialog (al
ready have this for menus) (aaronlev) error: form control without accesskey (aaronlev) warning: accesskey as lowercase letter with descender (underlined g,j,y,q,p are hard to
read, not recommended) (aaronandy) list of things to check manually, such as a list oftrees in the document (make sure they have accessible column picker equivs) or a list of toolbarbuttons (make sure they have accessible alternatives).
arrowscrollbox - Archive of obsolete content
scrollincrement type: integer a
read only property that lets you retrieve the number of pixels by which scrolling will occur when the arrowscrollbox is clicked.
...if the item is al
ready visible, no scrolling occurs.
description - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
notification - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
scale - Archive of obsolete content
for user editable menulist elements, the contents, as visible to the user, are
read and set using the menulist.value syntax.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
tabs - Archive of obsolete content
itemcount type: integer
read only property holding the number of child items.
...for textbox and user editable menulist elements, the contents, as visible to the user, are
read and set using the textbox.value and menulist.value syntax.
tooltip - Archive of obsolete content
popupboxobject type: nsipopupboxobject this
read-only property holds the nsipopupboxobject that implements the popup.
... state type: string this
read only property indicates whether the popup is open or not.
treecol - Archive of obsolete content
on firefox 2.x and 3.x, all operating systems other than mac os x al
ready use these styles by default.
...this is used, for example, in a mail window, for a column that indicates that the message is
read or un
read with a small mark in the cell.
XULRunner FAQ - Archive of obsolete content
it is al
ready possible to run firefox on xulrunner now though and certain linux distributions al
ready do this.
...please search to make sure that your bug has not al
ready been reported.
MacFAQ - Archive of obsolete content
here's how to implement command-line trapping when the app is al
ready running, without getting into appleevents or c++ code.
... taking advantage of the core code "openurl" from "nscommandlineservicemac.cpp", you'll see that it looks for "browser.chromeurl" before defaulting to navigator.xul, and this is called when an xulrunner app is al
ready running, so: create a default preference of "browser.chromeurl" that points to your new "hiddenwindow" as such: "chrome://myxul/content/hiddenwindow.xul" next take the code below and drop it in, to create the hiddenwindow.xul (note: the debug function and nsicommandline try/catch can be removed, all you need is the window.arguments[0]) <?xml version="1.0"?> <window xmlns="http://www.mozilla.org/keymaster/...
XULRunner tips - Archive of obsolete content
lerules/popupoverlay.xul overlay chrome://inspector/content/commandoverlay.xul chrome://inspector/content/viewers/dom/commandoverlay.xul to launch dom inspector in your application, you need to open its main window, with a command like this: window.open("chrome://inspector/content/inspector.xul", "", "chrome"); alternatively, the dom inspector may also be added as an extension: (if you al
ready have inspector installed for another application you can skip to the next step) follow the instructions above through "unzip the package." create a file in the extensions directory of your application with the same name as the dom inspector id (inspector@mozilla.org) containing one line of text -- the exact path to the root directory of dom inspector (where the install.rdf is) like this one: ...
...
reading command line arguments see chrome: command line and xulrunner:commandline.
2006-10-06 - Archive of obsolete content
ffx 2 rc2 testing today l10n builds were completed was completed and
ready for test.
... calendar localization update rc1 for sunbird 0.3 is out now and
ready for testing.
2006-12-01 - Archive of obsolete content
he requests blocker bug owners get their patches in asap and since check approval will be granted daily that they be
ready to check their patches in as soon as they are approved.
... discussion november 29th gecko 1.9/gran paradiso status meeting other than annoucing the meeting, this th
read discusses where else can info about what happens at the meetings be found (since the agenda often seems bare).
Browser-side plug-in API - Archive of obsolete content
warning: you must only call these from the main th
read; calling them from other th
reads is not supported and may have unpredictable results.
... npn_destroystream npn_forceredraw npn_getauthenticationinfo npn_geturl npn_geturlnotify npn_getvalue npn_getvalueforurl npn_invalidaterect npn_invalidateregion npn_memalloc npn_memflush npn_memfree npn_newstream npn_pluginth
readasynccall npn_poppopupsenabledstate npn_posturl npn_posturlnotify npn_pushpopupsenabledstate npn_reloadplugins npn_request
read npn_setvalue npn_setvalueforurl npn_status npn_useragent npn_version npn_write ...
NPN_GetURL - Archive of obsolete content
the default is _self, if the plug-in instance's document is al
ready at the top.
...if target is null, the application creates a new stream and delivers the data to the plug-in instance, through calls to npp_newstream(), npp_write
ready() and npp_write(), and npp_destroystream().
NPStream - Archive of obsolete content
url the url that the data in the stream is
read from or written to.
...all api calls that operate on the stream (such as npp_write
ready and npp_write) use a pointer to this stream.
Syndicating content with RSS - Archive of obsolete content
syndication (or web syndication) is a method which lets a web site make its content available for others to
read, listen to, or watch.
... we've al
ready discussed the first step—creating rss feeds— so we'll focus on the other two steps here.
Introduction to SSL - Archive of obsolete content
some red hat products al
ready support tls.
...this allows the rogue program not only to
read all the data that flows between the client and the real server, but also to change the data without being deleted.
Building a Theme - Archive of obsolete content
browser to chrome/browser/ communicator to chrome/communicator/ you should end up with this directory structure: <ext path>/ /install.rdf /chrome.manifest /chrome/ browser/ communicator/ global/ mozapps/ after this, it would be a good idea to
read the article setting up extension development environment and follow the directions there.
... now you should be
ready to test your theme!
Processing XML with E4X - Archive of obsolete content
compatibility issues prior to widesp
read browser support for the <script> element, it was common for javascript embedded in a page to be surrounded by html comment tags to prevent <script> unaware browsers from displaying javascript code to the user.
...while the following is al
ready achievable by iterating an e4x object with for each...in, it demonstrates how a more customized one could be created.
Accessing XML children - Archive of obsolete content
var element1 = <foo/> element1.bar = 1; produces <foo> <bar>1</bar> </foo> if the child node al
ready exists, the .
... list[1] = "green"; changes the xml document to
read <foo> <bar baz="1">red</bar> <bar baz="2">green</bar> </foo> special types of nodes xml objects have methods for accessing xml lists of certain common types of nodes as well.
Introduction - Archive of obsolete content
var a = 2; var b = <foo>{a}</foo>; creates an xml document that
reads <foo>2</foo>.
...for instance var a = {foo: 1}; var b = <bar>{a}</bar>; actually produces a document that
reads <bar>[object object]</bar>.
ECMAScript 2016 to ES.Next support in Mozilla - Archive of obsolete content
ox 47) object.entries() (firefox 47) string.prototype.padstart() (firefox 48) string.prototype.padend() (firefox 48) object.getownpropertydescriptors() (firefox 50) async functions async function (firefox 52) async function expression (firefox 52) asyncfunction (firefox 52) await (firefox 52) trailing commas in function parameter lists (firefox 52) ecmascript 2018 sp
read in object literals and rest parameters (firefox 55) for await...of (firefox 57) global_objects/sharedarraybuffer (firefox 57, with flags) global_objects/promise/finally (firefox 58) global_objects/regexp/dotall (not yet implemented; in other browsers) regexp lookbehind assertions (not yet implemented; in other browsers) regexp unicode property escapes (not yet implemented; in other browsers...
...(may 2019) the following features are al
ready implemented, but only available in the firefox nightly channel and not yet included in a draft edition of an ecmascript specification.
LiveConnect Overview - Archive of obsolete content
unlike array.length, javaarray.length is a
read-only property, because the number of elements in a java array are fixed at the time of creation.
...there are cases where liveconnect will fail to load a class, and you will need to manually load it like this: var widgetry = java.lang.th
read.currentth
read().getcontextclassloader().loadclass("org.mywidgets.widgetry"); in javascript 1.3 and earlier, javaclass objects are not automatically converted to instances of java.lang.class when you pass them as parameters to java methods—you must create a wrapper around an instance of java.lang.class.
Building Mozilla XForms - Archive of obsolete content
firefox 3.5 and up: get the source code if you want to build xforms for firefox up to 3.0, you al
ready have the required source code, it's part of your cvs checkout.
...$topsrcdir/browser/config/mozconfig mk_add_options moz_co_project=browser mk_add_options moz_objdir=@topsrcdir@/obj-@config_guess@ ac_add_options --enable-extensions="default,xforms" ac_add_options --enable-debug ac_add_options --disable-optimize ac_add_options --disable-tests building now that you have everything
ready, you can rebuild mozilla with the same command you used before to build firefox without xforms.
Archive of obsolete content
there are some cases in which the whole content of an xml document must be
read from the javascript interpreter (like for web-apps languages or settings xml documents, for example).
...due to a limitation of the present implementation of nspr io on nt, programs must follow the following guideline: using ssh to connect to cvs using web standards in your web pages using workers in extensions this article shows you how to use worker th
reads in extensions to perform tasks in the background without blocking the user interface.
GLSL Shaders - Game development
be sure to
read three.js tutorial first to grasp the concept of the scene, its objects, and materials.
... before
reading on, copy this code to a new text file and save it in your working directory as index.html.
Audio for Web games - Game development
the advantage is that we can prime one piece of audio and have our sprites
ready to go.
...loading synchronously might mean parts of your music are
ready earlier and you can start playing them while others load.
Implementing controls using the Gamepad API - Game development
api status and browser support the gamepad api is still at the working draft stage in the w3c process, which means its implementation might still change, but saying that the browser support is al
ready quite good.
... if(gamepadapi.buttonsstatus[i] == button) { // set the boolean variable to true newpress = true; // if we want to check the single press if(!hold) { // loop through the cached states from the previous frame for(var j=0,p=gamepadapi.buttonscache.length; j<p; j++) { // if the button was al
ready pressed, ignore new press if(gamepadapi.buttonscache[j] == button) { newpress = false; } } } } } return newpress; }, there are two types of action to consider for a button: a single press and a hold.
Square tilemaps implementation: Scrolling maps - Game development
note: when writing this article, we assumed previous
reader knowledge of canvas basics such as how get a 2d canvas context, load images, etc., which is all explained in the canvas api tutorial, as well as the basic information included in our tilemaps introduction article.
... this article also builds upon implementing static square tilemaps — you should
read that too if you've not done so al
ready.
Tiles and tilemaps overview - Game development
a high-level algorithm could be: for (var column = 0; column < map.columns; column++) { for (var row = 0; row < map.rows; row++) { var tile = map.gettile(column, row); var x = column * map.tilesize; var y = row * map.tilesize; drawtile(tile, x, y); } } you can
read more about this and see an example implementation in square tilemaps implementation: static maps.
... you can
read more about implementing scrolling tilemaps and see some example implementations in square tilemaps implementation: scrolling maps.
asm.js - Game development
this subset of javascript is al
ready highly optimized in many javascript engines using fancy just-in-time (jit) compiling techniques.
... using a subset of javascript asm.js is al
ready supported by major web browsers.
Initialize the framework - Game development
the id of the <canvas> to use for rendering if one al
ready exists on the page (we've specified null because we want phaser to create its own.) the names to use for phaser's three key functions that load and start the game, and update the game loop on every frame; we will use the same names to keep it clean.
... preload takes care of preloading the assets create is executed once when everything is loaded and
ready update is executed on every frame.
2D breakout game using Phaser - Game development
to get the most out of this series of articles you should al
ready have basic to intermediate javascript knowledge.
...if you are not al
ready familiar with pure javascript game development, we would suggest that you first work through this series' counterpart, 2d breakout game using pure javascript.
Gecko FAQ - Gecko Redirect 1
hich is only used in hebrew and arabic (ibm has begun work to add bidi support in a future release) style sheets css 1 - full support, except for: the application of styles to html column elements the ability to turn off author styles the names of certain mozilla extension pseudo-classes lack the moz- prefix css 2 - partial support is expected and has al
ready been built into gecko, including support for css2 positioning, but no commitment has been made to achieve a specific level of support dom level 0 level 1 core: full support making entityreferences available through dom1; per a provision of the dom1 spec for xml implementations, entities will be automatically expanded inline and therefore not available through dom1; our i...
...mplementation extrapolates this provision to apply to entityreferences as well for more information, see the dom in mozilla level 1 html dom 2 - most of it has al
ready been implemented in gecko, including support for dom 2 events, the dom 2 style, and the dom2 core.
Accessibility tree (AOM) - MDN Web Docs Glossary: Definitions of Web-related terms
browsers then create an accessibility tree based on the dom tree, which is used by platform-specific accessibility apis for assistive technologies, such as screen
readers.
...for instance, a link with the text ‘
read more’ will have ‘
read more’ as its name (more on how names are computed in the accessible name and description computation spec).
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
in javascript there are two functions respectively for decoding and encoding base64 strings: btoa(): creates a base-64 encoded ascii string from a "string" of binary data ("btoa" should be
read as "binary to ascii").
... atob(): decodes a base64 encoded string("atob" should be
read as "ascii to binary").
HTTP - MDN Web Docs Glossary: Definitions of Web-related terms
the hypertext transfer protocol (http) is the underlying network protocol that enables transfer of hypermedia documents on the web, typically between a browser and a server so that humans can
read them.
...this property makes it ideal for humans to
read documents (web sites) on the world wide web.
MitM - MDN Web Docs Glossary: Definitions of Web-related terms
they open it,
read it, eventually modify it, and then repackage the letter and only then send it to whom you intended to sent the letter for.
... the original recipient would then mail you a letter back, and the mailman would again open the letter,
read it, eventually modify it, repackage it, and give it to you.
Time to interactive - MDN Web Docs Glossary: Definitions of Web-related terms
time to interactive (tti) is a non-standardized web performance 'progress' metric defined as the point in time when the last long task finished and was followed by 5 seconds of network and main th
read inactivity.
... tti, proposed by the web incubator community group in 2018, is intended to provide a metric that describes when a page or application contains useful content and the main th
read is idle and free to respond to user interactions, including having event handlers registered.
Accessibility - Learn web development
beyond mechanical use, it's important to learn how to use these technologies responsibly so that all
readers might use your creations on the web.
... sites should be accessible to keyboard, mouse, and touch screen users, and any other way users access the web, including screen
readers and voice assistants like alexa and google home.
Backgrounds and borders - Learn web development
you can
read more about the different types of gradients and things you can do with them on the mdn page for the <gradient> data type.
... screen
readers cannot parse background images, therefore they should be purely decoration; any important content should be part of the html page and not contained in a background.
Handling different text directions - Learn web development
writing modes and block and inline layout we have al
ready discussed block and inline layout, and the fact that some things display as block elements and others as inline elements.
... logical properties and values the reason to talk about writing modes and direction at this point in your learning however, is because of the fact we have al
ready looked at a lot of properties which are tied to the physical dimensions of the screen, and make most sense when in a horizontal writing mode.
Type, class, and ID selectors - Learn web development
using the universal selector to make your selectors easier to
read one use of the universal selector is to make selectors easier to
read and more obvious in terms of what they are doing.
...it is selecting any element which is the first-child of any descendant element of <article>: article *:first-child { } although both do the same thing, the
readability is significantly improved.
Test your skills: tables - Learn web development
in this task we are going to style the same table, but using some good practices for table design as outlined in the external article web typography: designing tables to be
read not looked at.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Practical positioning examples - Learn web development
first, add the following rule at the bottom of your css to remove the default padding-left and margin-top from the unordered list: .info-box ul { padding-left: 0; margin-top: 0; } note: we are using descendant selectors with .info-box at the start of the chain throughout this example — this is so that we can insert this feature into a page with other content al
ready on it, without fear of interfering with the styles applied to other parts of the page.
...in addition, the effect is not great in terms of accessibility; the label is not focusable by default, and the non-semantic use of the form elements could cause issues with screen
readers.
Styling lists - Learn web development
>ingredient description list</h2> <p>paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference, paragraph for reference.</p> <dl> <dt>hummus</dt> <dd>a thick dip/sauce generally made from chick peas blended with tahini, lemon juice, salt, garlic, and other ingredients.</dd> <dt>pita</dt> <dd>a soft, slightly leavened flatb
read.</dd> <dt>halloumi</dt> <dd>a semi-hard, unripened, brined cheese with a higher-than-usual melting point, usually made from goat/sheep milk.</dd> <dt>green salad</dt> <dd>that green healthy stuff that many of us just use to garnish kebabs.</dd> </dl> if you go to the live example now and investigate the list elements using browser developer tools, you'll notice a couple of styling defaul...
... in our finished example, we have styled the unordered list like so (on top of what you've al
ready seen above): ul { padding-left: 2rem; list-style-type: none; } ul li { padding-left: 2rem; background-image: url(star.svg); background-position: 0 0; background-size: 1.6rem 1.6rem; background-repeat: no-repeat; } here we've done the following: set the padding-left of the <ul> down from the default 40px to 20px, then set the same amount on the list items.
What is accessibility? - Learn web development
let them pause the video to
read the subtitles or process the information.
... provide an attribute explicitly specifying your content's language, so that screen
readers
read your text properly.
The HTML5 input types - Learn web development
read website security for an idea of what could happen; implementing server-side validation is somewhat beyond the scope of this module, but you should bear it in mind.
...additionally, on devices with dynamic keyboards, the keyboard's enter key may
read "search", or display a magnifying glass icon.
Sending form data - Learn web development
and, since we covered validation in the previous article, we're
ready to submit!
... note: to get a better idea of how client-server architectures work,
read our server-side website programming first steps module.
Your first form - Learn web development
it's beyond the scope of this article to cover the user experience of forms, but if you want to dig into that topic you should
read the following articles: smashing magazine has some good articles about forms ux, including an older but still relevant extensive guide to web form usability article.
... there is great benefit to doing this — it associates the label with the form control, enabling mouse, trackpad, and touch device users to click on the label to activate the corresponding control, and it also provides an accessible name for screen
readers to
read out to their users.
HTML Cheatsheet - Learn web development
that's the whole purpose of the cheatsheet, to give you some quick accurate
ready to use code snippets for common usages.
... a line break line 1<br>line 2 line 1 line 2 suggesting a line break it is used to suggest the browser to cut the text on this site if </wbr>there is not enough space to display it on the same line it is used to suggest the browser to cut the text on this site if there is not enough space to display it on the same line date in
readable form it is used to format the date legibly for the user, such as: <time datetime="2020-05-24" pubdate>published on 23-05-2020</time> it is used to format the date legibly for the user, such as: published on 23-05-2020 text displayed in code format <p>this text is in normal format.</p> <code>this text is in code format.</code> <pre>this text is in predefined fo...
Tips for authoring fast-loading HTML pages - Learn web development
further
reading: understanding cdns reduce domain lookups since each separate domain costs time in a dns lookup, the page load time will grow along with the number of separate domains appearing in css link(s) and javascript and image src(es).
...if you al
ready follow all javascript best practices, there is no need to change your code.
Use JavaScript within a webpage - Learn web development
if you al
ready know something about javascript or if you have a background with other programming languages, we suggest you jump directly into our javascript guide.
...it takes extra time to navigate with the keyboard or hear content
read out.
Test your skills: HTML images - Learn web development
html images 2 in this task you al
ready have a full-featured image, but we'd like you to add a tooltip that appears when the image is moused over.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Responsive images - Learn web development
prerequisites: you should al
ready know the basics of html and how to add static images to a web page.
...by then, the original image would al
ready have been loaded, and you would load the small image as well, which is even worse in responsive image terms.
Build your own function - Learn web development
const panel = document.createelement('div'); panel.setattribute('class', 'msgbox'); html.appendchild(panel); the next two sections make use of the same createelement() and appendchild() functions we've al
ready seen to create two new elements — a <p> and a <button> — and insert them in the page as children of the panel <div>.
...these tests require skills that are covered in the next article, so you might want to
read those first before trying it.
Functions — reusable blocks of code - Learn web development
you've al
ready seen this structure a few times throughout the course, and you'll learn more about and see it in use in the next article.
...these tests require skills that are covered in the next two articles, so you might want to
read those first before trying it.
Function return values - Learn web development
you've al
ready met return values a number of times, although you may not have thought about them explicitly.
... if there is anything you didn't understand, feel free to
read through the article again, or contact us to ask for help.
Silly story generator - Learn web development
prerequisites: before attempting this assessment you should have al
ready worked through all the articles in this module.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Test your skills: Math - Learn web development
math 2 in the second task you are al
ready provided with two calculations, with the results stored in the variables result and result2.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Test your skills: Strings - Learn web development
you al
ready have half of a famous quote inside a variable called quotestart; we would like you to: look up the other half of the quote, and add it to the example inside a variable called quoteend.
... details of what you have al
ready tried, and what you would like us to do, e.g.
Useful string methods - Learn web development
the strings are data items that contain the three-letter station code, followed by some machine-
readable data, followed by a semicolon, followed by the human-
readable station name.
... extract the human-
readable station name using the semicolon character index number as a reference point, and store it in a new variable.
Multimedia: Images - Learn web development
doesn't support progressive display and the image decoding is not hardware accellerated and therefore resource intensive on the browser's main th
read.
... for any background images, it's important you set a background-color value so any content overlaid is still
readable before the image has downloaded.
What is web performance? - Learn web development
how a user perceives your performance is as important, or perhaps more important, than any objective statistic, but it's subjective, and not as
readily measurable.
...you can
read all about this topic at understanding latency.
Learning area release notes - Learn web development
learn why frameworks exist, when you should use one (and when you shouldn't), what kinds of features are common to all frameworks, and how they relate to the vanilla javascript you may al
ready know.
...this is in addition to the longer assessment articles that you'll find in some of the learning modules al
ready.
Server-side website programming - Learn web development
we recommend that you first
read the following topics: what is a web server what software do i need to build a website?
... with that basic understanding, you'll be
ready to work your way through the modules in this section.
Ember interactivity: Events, classes and state - Learn web development
read javascript decorators: what they are and when to use them for more general information on decorators.
...this function's contents are fairly easy to understand — when the function is invoked, a new todo object instance is created with a text value of text, and the todos property value is updated to all of the current items inside the array (accessed conveniently using sp
read syntax), plus the new todo.
Routing in Ember - Learn web development
at the moment, we al
ready have the "all" page, as we are currently not doing any filtering in the page that we've been working with, but we will need to reorganize it a bit to handle a different view for the "active" and "completed" todos.
...it al
ready contains a getter that returns all todos, and a getter that returns incomplete todos.
Ember app structure and componentization - Learn web development
this al
ready exists, and its contents currently look like so: {{!-- the following component displays ember's default welcome message.
...to start with, delete the contents of application.hbs and replace them with the following: <section class="todoapp"> <h1>todos</h1> <input class="new-todo" aria-label="what needs to be done?" placeholder="what needs to be done?" autofocus > </section> note: aria-label provides a label for assistive technology to make use of — for example, for a screen
reader to
read out.
Rendering a list of Vue components - Learn web development
previous overview: client-side javascript frameworks next at this point we've got a fully working component; we're now
ready to add multiple todoitem components to our app.
...while this isn't strictly necessary, it makes it easier for us to manage since we al
ready need to create a unique id for each todo item anyway.
Vue resources - Learn web development
this will create a new dist directory containing all of your production
ready files.
...to
read more about the changes involved with vue 3, refer to this article by vue school which goes over most of the major changes in vue 3.
Implementing feature detection - Learn web development
javascript we al
ready saw an example of a javascript feature detection test earlier on.
... when you are using modernizr in production, you can go to the download page you've al
ready visited and click the plus buttons for only the features you need feature detects for.
Setting up your own test automation environment - Learn web development
to do this, you need to: install the node sauce labs wrapper using the following command (if you've not al
ready done it for this project): npm install saucelabs --save-dev require saucelabs — put this at the top of your sauce_google_test.js file, just below the previous variable declarations: const saucelabs = require('saucelabs'); create a new instance of saucelabs, by adding the following just below that: let saucelabs = new saucelabs({ username : "your-user-name", password : "your...
...if you've not al
ready added the location to your path, do so now (see the setting up selenium in node section).
Learn web development
beyond the basics: if you have a bit of knowledge al
ready, the next step is to learn html and css in detail: start with our introduction to html module and move on to our css first steps module.
... moving onto scripting: if you are comfortable with html and css al
ready, or you are mainly interested in coding, you'll want to move on to javascript or server-side development.
Chrome Worker Modules
this defines a global value require(), that you may now use as follows: // import the module // (here, we import the core of os.file) let core = require("resource://gre/modules/osfile/osfile_shared_allth
reads.jsm"); // we may now use module core.
...that is, the following will not show human-
readable stacks: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.filename) log("stack: " + ex.stack); } rather, you should use properties modulename and modulestack, as follows: try { mymodule.foo(); } catch (ex) { log("exception raised at " + ex.modulename) log("stack: " + ex.modulestack); } subtleties you shouldn’t mix both styles exports.foo = bar ...
Information for users
assistive technology compatibility this is a wiki page which users can edit to provide up to date information on any issues related to compatibility with assistive technologies such as screen
readers, screen magnifiers, voice input software and on screen keyboards.
... newsgroup and mailing list we have two discussion lists, which can be
read via a newsgroup
reader, as a mailing list or via google groups.
Links and Resources
open source assistive technology projects nonvisual desktop access open source screen
reader for windows, written in python.
... lsr open source screen
reader for linux, written in python orca open source screen
reader for linux, written in python accessibility for desktop environments gnome accessibility - gnome accessibility project kde accessibility project - an equally important toolkit on linux apple accessibility - moving forward with os x.
Accessibility and Mozilla
they also define a list of possible object states, such as focused,
read-only, checked, etc.accessibility features in firefoxfirefox works with popular screen
readers, with the best support currently coming from gw micro's window-eyes 5.5.
...in recent articles from both afb's access world and nfb's voice of the nation's blind, reviewers found no significant roadblocks in moving to firefox from internet explorer for screen
reader users.
Frequently Asked Questions for Lightweight themes
preview any theme by clicking "tap to preview"; the design appears in your browser header so you can "try it on." when you're
ready, just click the blue install theme button.
...to get started
read more about how to create a theme.
Adding a new word to the en-US dictionary
the process is pretty straight-forward: get a clone of uxp, if you don't al
ready have one, and make sure you can build it successfully.
...the script only works if you have the environment variable editor set to the executable of an editor program; if you don't have it set, you can do editor=vim sh edit-dictionary to edit using vim (or you can substitute some other editor), or you can just do sh edit-dictionary if you have an editor al
ready specified.
Adding phishing protection data providers
you can find examples of how to
read and write preferences in the article adding preferences to an extension.
... required preferences browser.safebrowsing.provider.idnum.name a human-
readable name for the data provider.
Application cache implementation overview
processnexturi then invokes it self asynchronously via dispatch to a main th
read when not al
ready on the concurrency limit of 15 loads.
... when the manifest is identical, the cache is activated, onupdate
ready event is invoked and the update 'finishes'.
Creating a Language Pack
$ make langpack-x-testing locale_mergedir=$(pwd)/mergedir now go to the dist directory to find your langpack
ready to use!
... mv -f "../../dist/l10n-stage/firefox-3.6b5pre.x-testing.mac.dmg" "../../dist/firefox-3.6b5pre.x-testing.mac.dmg" repackaging done now go to the dist directory to find your repackaged binary
ready to be installed!
Creating Sandboxed HTTP Connections
est: function (arequest, acontext) { this.mdata = ""; }, ondataavailable: function (arequest, acontext, astream, asourceoffset, alength) { var scriptableinputstream = components.classes["@mozilla.org/scriptableinputstream;1"] .createinstance(components.interfaces.nsiscriptableinputstream); scriptableinputstream.init(astream); this.mdata += scriptableinputstream.
read(alength); }, onstoprequest: function (arequest, acontext, astatus) { if (components.issuccesscode(astatus)) { // request was successfull this.mcallbackfunc(this.mdata); } else { // request failed this.mcallbackfunc(null); } gchannel = null; }, // nsichanneleventsink onchannelredirect: function (aoldchannel, anewchannel, aflags) { // if redi...
...| aiid.equals(components.interfaces.nsiprogresseventsink) || aiid.equals(components.interfaces.nsihttpeventsink) || aiid.equals(components.interfaces.nsistreamlistener)) return this; throw components.results.ns_nointerface; } }; quick note: storing the channel in a global (especially in an extension) isn't a good idea, but was done to make the code easier to
read.
Debugging Table Reflow
leaving assignnonpctcolwidths shows that al
ready to all columns a width of 360 twips has been assigned assignnonpctcolwidths ex ***start table dump*** mcolwidths=360 360 360 360 col frame cache -> 0=00b93138 1=00b931f0 2=024dd728 3=024dd780 **start col dump** colindex=0 isanonymous=0 constraint=0 widths=360 540 1230 -1 -1 -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=1 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1...
... -1 -1 -1 -1 360 **end col dump** **start col dump** colindex=2 isanonymous=0 constraint=3 widths=360 540 -1 -1 -1 -1 -1 -1 540 360 **end col dump** **start col dump** colindex=3 isanonymous=0 constraint=0 widths=360 540 -1 -1 -1 -1 -1 -1 -1 360 **end col dump** ***end table dump*** the first column has al
ready the minimum content width, the table column can't shrink below that, the desired content width of 540 twips, that's the space to layout cell 1 without wrapping the text and the 1230 which correspond to the style="width:80px" at the first cell.
Debugging a hang on OS X (Archived)
when it's done parsing the data, click the "show text report" button; a new window will open with a couple of rows with stacktraces for all the th
reads in the sampled application.
... when it's done parsing the data, you should now have a couple of rows with stacktraces for all the th
reads in the sampled application.
HTTP logging
windows if firefox is al
ready running, exit out of it.
... here is an example for the windows platform, on other platforms we accept the same form of the arguments: if firefox is al
ready running, exit out of it.
Working with Mozilla source code
getting a pre-configured mozilla build system virtual machine this is the easiest way to get started: use a virtualbox virtual machine which is al
ready configured with a complete build environment for you to use.
... getting commit access to the source code feel
ready to join the few, the proud, the committers?
Cross Process Object Wrappers
but if the chrome process then tries to use a cpow, the chrome process will block until the content process is
ready to respond.
... suddenly, what looked like a simple property access could block the ui for a noticeable amount of time: there is one scenario, though, in which this is not a problem: when the content process is al
ready blocking on a synchronous message it sent to the chrome process.
Firefox and the "about" protocol
about:privatebrowsing start page when opening a private window about:profiles display and manage firefox profiles about:protections privacy protections report consisting of enhanced tracking protection, firefox monitor and firefox lockwise data about:restartrequired a page users are sent to when firefox requires a restart due to an update about:
reader indicates a web page has firefox
reader view turned on.
... see firefox
reader view for clutter-free web pages about:rights displays rights information about:robots special page showing notes about robots about:serviceworkers displays currently running service workers about:studies lists the shield studies that are installed about:sessionrestore session restoration (displayed after a firefox crash) about:support troubleshooting information (also available through firefox menu > ?
Using the Browser API
in any case, you should at least download the repo and refer to the code as you
read the sections below.
... in addition, the background of the controls ui bar is changed to the background color of the site that has just loaded, to provide a more integrated experience — this can be
read out of the event object's e.detail.backgroundcolor value.
Roll your own browser: An embedding how-to
ns_initembedding() must be called from the main th
read of your application, otherwise it won't work.
... there are many examples of products al
ready using gecko for embedding.
Gecko Keypress Event
xul application developers should use key elements for handling accel keys, so as to make use of the handling logic al
ready provided for these elements.
...it is better to use the logic al
ready in nscontentutils::getaccelkeycandidates() for accel key handling, and nscontentutils::getaccesskeycandidates() for access key handling (see nscontentutils.h and nscontentutils.cpp).
IME handling guide
eselectedrawclause converted clause by ime selection_ime_convertedtext eimeconvertedclause econvertedclause selected clause by the user or ime and also converted by ime selection_ime_selectedconvertedtext eimeselectedclause eselectedclause note that typically, "selected clause of raw text typed by the user" isn't used because when composition string is al
ready separated to multiple clauses, that means that the composition string has al
ready been converted by ime at least once.
...if all sent widgetcompositionevents and widgetselectionevents are al
ready handled in the remote process, contentcacheinparent sending the notifications to widget.
IPC Protocol Definition Language (IPDL)
ipdl, short for "ipc (inter-process communication) protocol definition language", is a mozilla-specific language allowing c++ code to pass messages between processes or th
reads in an organized and secure way.
... current docs ipdl tutorial quick start: creating a new protocol quick start: extending a protocol ipdl type serialization ipdl best practices ipdl glossary pbackground future planned docs ipdl language reference error and shutdown handling in ipdl protocols how ipdl uses processes, th
reads, and sockets ipdl shared memory ...
Implementing QueryInterface
calling an inherited queryinterface sometimes you are just adding one or two new interfaces to an implementation that al
ready supports many other interfaces.
... this technique works because nsbaseimplementation is al
ready a complete class that could have been used on its own.
Introduction to Layout in Mozilla
overview basic data flow key data structures detailed walk-through incrementalism future tech-talks wrap-up, q&a basic data flow source document arrives via network apis incrementally “pumped” through the single-th
readed layout engine parse, compute style, render; repeat css used for rendering all content content theoretically separate from “presentation” key data structures content node elements, attributes, leaves dom frame rectangular formatting primitive geometric information [0..n] per content node 2nd thru nth are “continuations” style context non-geometric information may be shared by adjacent frames reference counted, owned by frame ...
...iewmanager::updateview unless immediate, invalid areas are coalesced and processed asynchronously via os expose event native expose event dispatched to widget; widget delegates to the view manager view manager paints views back-to-front, invoking presshell’s paint method presshell::paint walks from the view to the frame; invokes nsiframe::paint for each layer incrementalism single-th
readed simple (no locking) can’t leave event queue unattended content construction unwinds “at will” parser and content sink do some buffering content sink has “notification limits” efficiency vs.
JavaScript-DOM Prototypes in Mozilla
this means that the next time the name of a class constructor is resolved in the same scope, say htmlanchorelement, the code will resolve the name htmlanchorelement, find the parent name, which is htmlelement, and resolve that, but since we've al
ready resolved htmlelement as a result of resolving the name htmlimageelement earlier, the recursion will stop right there.
...obj.__proto__.__proto__) has been set up al
ready, if it has, then there's nothing left to do in nsdomclassinfo::postcreate().
Add-on Manager
any available update is returned as an addoninstall which is
ready to be downloaded and installed.
...
read more about it at this topic here on mozilla add-ons forum :: how to open an add-on's preference panel?
Add-on Repository
results passed to the searchcallback object only include add-ons that are compatible with the current application and are not al
ready installed or in the process of being installed.
...a new search will immediately fail if the addonrepository is al
ready handling another search request.
Widget Wrappers
properties all of a wrapper's properties are
read-only unless otherwise indicated.
...s property is writable, and will toggle all the widgets' nodes' disabled states label for api-provided widgets, the label of the widget tooltiptext for api-provided widgets, the tooltip of the widget showinprivatebrowsing for api-provided widgets, whether the widget is visible in private browsing single wrapper properties all of a wrapper's properties are
read-only unless otherwise indicated.
DownloadList
if the download was al
ready removed, this method has no effect.
...the newly added view will receive ondownloadadded notifications for all the downloads that are al
ready in the list.
OS.File.Error
these exceptions hold both a human-
readable error message detailing the i/o error and attributes to help determining the cause of the error.
... cross-platform attributes operation the human-
readable name of the failed operation.
PerfMeasurement.jsm
context_switches uint64 the number of context switches that occurred involving the th
read being profiled.
... cpu_migrations uint64 the number of times the profiled th
read migrated from one cpu core to another.
Examples
const {cu} = require("chrome"); const {textdecoder, textencoder, os} = cu.import("resource://gre/modules/osfile.jsm", {}); /* files: an array of file paths */ function
readtextfiles(files) { let promises = [], decoder = new textdecoder(); for (let i = 0; i < files.length; i++) { let promise = os.file.
read(files[i]) promise = promise.then(function onsuccess(array) { return decoder.decode(array); }); promises.push(promise); } return promise.all(promises); } let folder = "/path/to/folder"; let promise =
readtextfiles([ os.path.joi...
...n(folder, "
read.me"), os.path.join(folder, "home.html") ]); promise.then( function onsuccess(filescontent) { // filescontent is an array of strings; each string is the content of one file.
Task.jsm
method overview function async(atask); promise spawn(atask); properties attribute type description result
read only constructor constructs a special exception that, when thrown inside a legacy generator function, allows the associated task to be resolved with a specific value.
... if you specify anything else, you get a promise that is al
ready fulfilled with the specified value.
Using JavaScript code modules
if you're writing an extension for firefox 4 and al
ready have a chrome.manifest with a content instruction in it, you can put the code module in your content folder and reference it like your other content files via chrome://<yourextension>/content/<yourmodule>.jsm.
...for example: // import services.jsm unless in a scope where it's al
ready been imported components.utils.import("resource://gre/modules/services.jsm"); var resprot = services.io.getprotocolhandler("resource") .queryinterface(components.interfaces.nsiresprotocolhandler); var aliasfile = components.classes["@mozilla.org/file/local;1"] .createinstance(components.interfaces.nsilocalfile); aliasfile.initwithpath("/some/abso...
Using workers in JavaScript code modules
this lets you run code in a separate th
read from your jsm.
... to create a chromeworker for this purpose, you need to use the nsiworkerfactory interface: var workerfactory = components.classes['@mozilla.org/th
reads/workerfactory;1'] .createinstance(components.interfaces.nsiworkerfactory); var worker = workerfactory.newchromeworker('script_url.js'); this will create a new chrome worker that will immediately begin to run the script at the specified url (in this case, "script_url.js").
Localizing with Mercurial
the mercurial faq are also worth a
read, should you run into trouble.
... comm-central contains the files for seamonkey and thunderbird which are not al
ready part of firefox.
QA phase
enter the following command to perform the configuration: $ ./mach configure once your command-line finishes spitting out the config command's output, navigate to the newly created directory: $ cd ../firefox-build/browser/locales now you're
ready to build!
... now you're
ready to proceed to the release phase!
Localization sign-off reviews
overview you've done some localization work and are
ready for it to be released.
...so before you request your sign-off review, be sure that it is as
ready as it can be.
Localization formats
as every new web-dev project takes shape, a project manager should ask themselves these questions and have the answers
ready before starting the web l10n process.
...
read more about gettext on wikipedia and on mdc.
Mozilla Framework Based on Templates (MFBT)
therefore this document primarily attempts to direct
readers to the correct file to
read those comments.
... th
readlocal.h implements th
read-local storage, aka "tls", also called th
read-specific storage.
Fonts for Mozilla 2.0's MathML engine
on mac os x lion (10.7) and higher versions, stix fonts are al
ready installed and can be used for mathml.
...all the fonts mentioned above may al
ready be installed by default on your system or can easily be installed via your software manager.
Using the viewport meta tag to control layout on mobile browsers
initially this caused usability and
readability problems on many touch-optimized web sites.
...it is recommended that the reference pixel be the visual angle of one pixel on a device with a pixel density of 96dpi and a distance from the
reader of an arm's length.
Mozilla Development Tools
it is our home-grown web-based tool for watching the up-to-the-minute goings-on in our cvs repository (viewing checkins and log messages,
reading diffs, etc.) tinderbox tinderbox is for knowing when the tree is in flames.
... bugzilla bugzilla is where developers can report bugs in the mozilla source releases, and browse an online database of al
ready-reported bugs.
Mozilla projects on GitHub
project name description pdf.js a portable document format (pdf)
reader written entirely in javascript.
... gecko-dev a
read-only mirror of the mercurial repositories used for mozilla private code.
Mozilla Style System Documentation
for frames: const nsstyledisplay *display; ::getstyledata(frame, &display); or for style contexts: const nsstyledisplay *display; ::getstyledata(sc, &display); these functions cause an appropriate struct to be computed if it hasn't been computed al
ready and then fill in the struct pointer.
...it uses the appropriate declaration struct and has each rule fill in any properties specified by that rule that are not filled in al
ready.
mozilla::Mutex
assertcurrentth
readowns() assert that the current th
read has locked this mutex.
...assertnotcurrentth
readowns() assert that the current th
read does not own this mutex.
Leak-hunting strategies and tips
a good general pattern for finding and fixing leaks is to start with a task that you want not to leak (for example,
reading email).
...then go on to selecting a folder, then selecting a message, and then other activities one does while
reading mail.
Memory reporting
tl;dr: you should
read this document before writing a memory reporter.
... other considerations a number of the existing basic data structures al
ready have sizeof{in,ex}cludingthis functions, e.g.
Profiling with Xperf
it might al
ready be installed by the windows sdk.
... check if c:\program files\microsoft windows performance toolkit al
ready exists.
TraceMalloc
if you run with --trace-malloc -, your code can call ns_tracemallocdumpallocations(pathname) at opportune times, and a human-
readable listing of the current heap, including stack traces for every allocation, will be written to pathname.
... tracemallocdumpallocations(pathname) - dump a human-
readable listing of all traced, live allocations.
tools/power/rapl
tools/power/rapl (or rapl for short) is a command-line utility in the mozilla tree that periodically
reads and prints all available intel rapl power estimates.
... note: the power profiling overview is worth
reading at this point if you haven't al
ready.
Phishing: a short definition
web authentication supports millions of
readily avilable fido u2f usb security keys, and will support the more advanced fido 2.0 keys, once made available.
...at service registration, the provider will often generate a qr code to be
read by an otp app.
A brief guide to Mozilla preferences
a preference is
read from a file, and can call up to four methods: pref(), user_pref(), sticky_pref() and lockpref().
...the exception to this is a preference
read using sticky_pref() - these preference will be written whenever the preference has a user value even when it is the same as the default.
nglayout.debug.disable_xul_cache
the effect is that the source xml file is not
read and re-parsed each time the chrome in question is displayed.
...possible values and their effects: true: do not cache parsed xul documents and do not save the cache to the xul fastload file on exit; re-
read the source files each time the window or dialog needs to be displayed.
Patches and pushes
note that if your team selects a local version of an al
ready default plugin (e.g., wikipedia), the xml filename should include the locale code (e.g., wikipedia-es).
...for example: hg ci -m "bug 654321, copied the comment from the doc without
reading, r=nobody" path-to-changed-files close the bug, copying the url to your change in the closing comment.
Cached Monitors
pr_cnotify notifies a th
read waiting for a change in the state of monitored data.
... pr_cnotifyall notifies all the th
reads waiting for a change in the state of monitored data.
PRCallOnceType
calling th
reads that observe this status block until inprogress is zero.
...this initialization must be accomplished before any th
reading issues exist.
PR_Access
use one of the following values: pr_access_
read_ok.
... test for
read permission.
PR_AtomicSet
description pr_atomicset first
reads the value of var, then updates it with the supplied value.
... the returned value is the value that was
readbefore memory was updated.
PR_AttachSharedMemory
syntax #include <prshm.h> nspr_api( void * ) pr_attachsharedmemory( prsharedmemory *shm, printn flags ); /* define values for pr_attachsharedmemory(...,flags) */ #define pr_shm_
readonly 0x01 parameters the function has these parameters: shm the handle returned from pr_opensharedmemory.
...pr_shm_
readonly causes the memory to be attached
read-only.
PR_GetErrorText
copies the current th
read's current error text without altering the text as stored in the th
read's context.
... syntax #include <prerror.h> print32 pr_geterrortext(char *text); parameters the function has one parameter: text on output, the array pointed to contains the th
read's current error text.
PR_GetOSError
returns the current th
read's last set os-specific error code.
...however, this information is preserved, along with a platform neutral error code, on a per th
read basis.
PR_Init
syntax #include <prinit.h> void pr_init( prth
readtype type, prth
readpriority priority, pruintn maxptds); parameters pr_init has the following parameters: type this parameter is ignored.
... call pr_init as follows: pr_init(pr_user_th
read, pr_priority_normal, 0); ...
PR_Initialized
syntax #include <prinit.h> prbool pr_initialized(void); returns the function returns one of the following values: if pr_init has al
ready been called, pr_true.
... if pr_init has not al
ready been called, pr_false.
PR_Lock
description when pr_lock returns, the calling th
read is "in the monitor," also called "holding the monitor's lock." any th
read that attempts to acquire the same lock blocks until the holder of the lock exits the monitor.
...calling it twice on the same th
read results in undefined behavior.
PR_NewTCPSocket
to receive data, one can call pr_
read or pr_recv.
...pr_accept
read is suitable for use by the server to accept a new client connection and
read the client's first request in one function call.
PR_OpenTCPSocket
to receive data, one can call pr_
read or pr_recv.
...pr_accept
read is suitable for use by the server to accept a new client connection and
read the client's first request in one function call.
PR_QueueJob
queues a job to a th
read pool for execution.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob( prth
readpool *tpool, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_SetErrorText
description the text is copied into the th
read structure and remains there until the next call to pr_seterror.
... if there is error text al
ready present in the th
read, the previous value is first deleted.
Cryptography functions
3.2 and later pk11_isfips mxr 3.2 and later pk11_isdisabled mxr 3.4 and later pk11_isfriendly mxr 3.2 and later pk11_ishw mxr 3.2 and later pk11_isinternal mxr 3.2 and later pk11_ispresent mxr 3.2 and later pk11_is
readonly mxr 3.2 and later pk11_isremovable mxr 3.12 and later pk11_ivfromparam mxr 3.2 and later pk11_keygen mxr 3.2 and later pk11_linkgenericobject mxr 3.9.2 and later pk11_listcerts mxr 3.2 and later.
... mxr 3.2 and later pk11_pubunwrapsymkey mxr 3.2 and later pk11_pubunwrapsymkeywithflags mxr 3.6 and later pk11_pubunwrapsymkeywithflagsperm mxr 3.9 and later pk11_pubwrapsymkey mxr 3.2 and later pk11_randomupdate mxr 3.2 and later pk11_
readrawattribute mxr 3.9.2 and later pk11_referencesymkey mxr 3.2 and later pk11_resettoken mxr 3.4 and later pk11_restorecontext mxr 3.2 and later pk11_savecontext mxr 3.2 and later pk11_savecontextalloc mxr 3.6 and later pk11_setforte...
FIPS Mode - an explanation
(note: mozilla does not distribute a "fips mode"-
ready nss with firefox.) this page attempts to provide an informal explanation of what it is, who would use it, and why.
...some third-parties distribute firefox
ready for fips mode, a partial list can be found at the nss wiki.
Introduction to Network Security Services
figure 1, below, shows a simplified view of the relationships among the three shared libraries listed above and nspr, which provides low-level cross platform support for operations such as th
reading and i/o.
... what you should al
ready know before using nss, you should be familiar with the following topics: concepts and techniques of public-key cryptography the secure sockets layer (ssl) protocol the pkcs #11 standard for cryptographic token interfaces cross-platform development issues and techniques where to find more information for information about pki and ssl that you should understand before using nss, see the ...
4.3.1 Release Notes
documentation documentation for jss 4.3.1 is available as follows: build instructions for jss 4.3.1 javadoc [online] [zipped]
read the instructions on using jss.
...jss only supports the native th
reading model (no green th
reads).
4.3 Release Notes
https://archive.mozilla.org/pub/security/jss/releases/jss_4_3_rtm/ documentation documentation for jss 4.3 is available as follows: build instructions for jss 4.3 javadoc [online] [zipped]
read the instructions on using jss.
... jss only supports the native th
reading model (no green th
reads).
JSS
you might want to
read these documents: introduction to public-key cryptography.
...
read using jss to get you started with development after you've built and downloaded it.
JSS 4.4.0 Release Notes
bugs fixed in jss 4.4.0 this bugzilla query returns all the bugs fixed in nss 4.4.0: https://bugzilla.mozilla.org/buglist.cgi?product=jss&target_milestone=4.4&target_milestone=4.4&bug_status=resolved&resolution=fixed documentation build instructions for jss at https://hg.mozilla.org/projects/jss/file/tip/
readme platform information you can check out the source from mercurial via hg clone -r 055aa3ce8a61 https://hg.mozilla.org/projects/jss jss 4.4.0 works with openjdk versions 1.7 or higher we suggest the latest - openjdk 1.8.
... jss only supports the native th
reading model (no green th
reads).
NSS 3.12.5 release_notes
pk11_
readrawattribute allocates the buffer for returning the attribute value.
... the caller of pk11_
readrawattribute should free the data buffer pointed to by item using a secitem_freeitem(item, pr_false) or port_free(item->data) call.
NSS 3.15.2 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data
read in the event of a decryption failure.
... bug 884178 - add pk11_cipherfinal macro bugs fixed in nss 3.15.2 bug 734007 - sizeof() used incorrectly bug 900971 - nssutil_
readsecmoddb() leaks memory bug 681839 - allow ssl_handshakenegotiatedextension to be called before the handshake is finished.
NSS 3.16.3 release notes
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 al
ready added in nss 3.16.2, however, it wasn't declared in a public header file.
NSS 3.28.1 release notes
cn = symantec class 2 public primary certification authority - g6 sha-256 fingerprint: cb:62:7d:18:b5:8a:d5:6d:de:33:1a:30:45:6b:c6:5c:60:1a:4e:9b:18:de:dc:ea:08:e7:da:aa:07:81:5f:f0 the version number of the updated root ca list has been set to 2.11 a misleading assertion/alert has been removed, when nss tries to flush data to the peer but the connection was al
ready reset.
... bugs fixed in nss 3.28.1 bug 1296697 - december 2016 batch of root ca changes bug 1322496 - internal error assert when the other side closes connection before
reading eoed compatibility nss 3.28.1 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.28.3 release notes
if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library
read the uninitialized attribute.
...nss no longer
reads the attribute, and will always set it to ecpoint_undefined.
NSS 3.29.1 release notes
if an application passed type seckeyecpublickey to nss (as part of seckeypublickey), the nss library
read the uninitialized attribute.
...nss no longer
reads the attribute, and will always set it to ecpoint_undefined.
NSS 3.46 release notes
s in tstcln, selfserv and vfyserv cmds bug 1550636 - upgrade sqlite in nss to a 2019 version bug 1572593 - reset advertised extensions in ssl_constructextensions bug 1415118 - nss build with ./build.sh --enable-libpkix fails bug 1539788 - add length checks for cryptographic primitives (cve-2019-17006) bug 1542077 - mp_set_ulong and mp_set_int should return errors on bad values bug 1572791 -
read out-of-bounds in der_decodetimechoice_util from sslexp_delegatecredential bug 1560593 - cleanup.sh script does not set error exit code for tests that "failed with core" bug 1566601 - add wycheproof test vectors for aes-kw bug 1571316 - curve25519_32.c:280: undefined reference to `pr_assert' when building nss 3.45 on armhf-linux bug 1516593 - client to generate new random during renegotiation ...
...n fips mode if password is an empty string bug 1564727 - use a pss spki when possible for delegated credentials bug 1493916 - fix ppc64 inline assembler for clang bug 1561588 - remove -wmaybe-uninitialized warning in p7env.c bug 1561548 - remove -wmaybe-uninitialized warning in pkix_pl_ldapdefaultclient.c bug 1512605 - incorrect alert description after unencrypted finished msg bug 1564715 -
read /proc/cpuinfo when at_hwcap2 returns 0 bug 1532194 - remove or fix -ddebug_$user from make builds bug 1565577 - visual studio's cl.exe -?
NSS Developer Tutorial
check with nss-dev@ before using a language feature not al
ready used, if you are uncertain.
... if it is necessary to apply private patches, please document them in <tree>/security/patches/
readme.
Initialize NSS database - sample 2
= null; secupwdata *pwdata = (secupwdata *) arg; if (pwdata->source == pw_fromfile) { return filepasswd(slot, retry, pwdata->data); } if (pwdata->source == pw_plaintext) { return pl_strdup(pwdata->data); } /* open terminal */ input = fopen("/dev/tty", "r"); if (input == null) { pr_fprintf(pr_stderr, "error opening input terminal for
read\n"); return null; } /* we have no password, so initialize database with one */ pr_fprintf(pr_stderr, "enter a password which will be used to encrypt your keys.\n" "the password should be at least 8 characters long,\n" "and should contain at least one non-alphabetic character.\n\n"); output = fopen("/dev/tty", "w"); if (output == null) { pr_fprin...
...strdup(optstate->value); break; case 'p': plainpass = strdup(optstate->value); break; case 'f': pwfile = strdup(optstate->value); break; default: usage(progname); break; } } pl_destroyoptstate(optstate); if (!dbdir) usage(progname); pr_init(pr_user_th
read, pr_priority_normal, 0); /* create the database */ rv = nss_init
readwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup(); exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
NSS sources building testing
in order to get started, anonymous
read-only access is sufficient.
...
read the contents of file all.sh to learn how that works.
Build instructions
(the free edition works, and other versions like visual studio 2008 and visual studio 2012 may also work.) use start-shell-msvc2010.bat from mozillabuild to get a bash shell with the path al
ready configured, and execute these instructions from within that bash shell.
... to build with gcc on platforms other than linux and windows, you need to set two more environment variables: ns_use_gcc=1 no_mdupdate=1 for hp-ux, you must set the environment variable use_pth
reads to 1.
FC_GetTokenInfo
ckf_rng (0x00000001): this device has a random number generator ckf_write_protected (0x00000002): this device is
read-only ckf_login_required (0x00000004): this device requires the user to log in to use some of its services ckf_user_pin_initialized (0x00000008): the user's password has been initialized ckf_dual_crypto_operations (0x00000200): a single session with the token can perform dual cryptographic operations ckf_token_initialized (0x00000400): the token has been initialized.
... ulsessioncount: number of sessions that this application currently has open with the token ulrwsessioncount: number of
read/write sessions that this application currently has open with the token hardwareversion: hardware version number, for example, 8.3 (major=0x08, minor=0x03), which are the version numbers of the certificate and key databases, respectively.
FC_InitPIN
fc_initpin() must be called when the pkcs #11 security officer (so) is logged into the token and the session is
read/write, that is, the session must be in the "r/w so functions" state (cks_rw_so_functions).
... ckr_device_error: normal user's pin is al
ready initialized.
FC_Initialize
nss_nodb_init(""), which initializes nss with no databases: "configdir='' certprefix='' keyprefix='' secmod='' flags=
readonly,nocertdb,nomod db,forceopen,optimizespace " mozilla firefox initializes nss with this string (on windows): "configdir='c:\\documents and settings\\wtc\\application data\\mozilla\\firefox\\profiles\\default.7tt' certprefix='' keyprefix='' secmod='secmod.db' flags=optimizespace manufacturerid='mozilla.org' librarydescription='psm internal crypto services' cryptotokendescription='generic cryp...
... ckr_cryptoki_al
ready_initialized: the library is al
ready initialized.
NSS environment variables
variable type description introduced in version nsrandcount integer (byte count) sets the maximum number of bytes to
read from the file named in the environment variable nsrandfile (see below).
... before 3.0 use_pth
reads boolean (1 to enable) on platforms where posix th
reads are available, but are not the os'es preferred th
reads library, this tells nss and nspr to build using pth
reads.
NSS reference
nss initialization and shutdown nss_init nss_init
readwrite nss_nodb_init nss_initialize nss_shutdown utility functions based on "utility functions" in nss public functions.
... secmod_loadusermodule secmod_unloadusermodule secmod_closeuserdb secmod_openuserdb pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_is
readonly pk11_setpasswordfunc ssl functions based on "ssl functions" in the ssl reference and "ssl functions" and "deprecated ssl functions" in nss public functions.
OLD SSL Reference
ssl initialization functions nss_init nss_init
readwrite nss_nodb_init ssl_optionsetdefault ssl_optiongetdefault ssl_cipherprefsetdefault ssl_cipherprefgetdefault ssl_clearsessioncache ssl_configserversessionidcache initializing multi-processing with a shared ssl server cache ssl_con...
... pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_is
readonly pk11_setpasswordfunc chapter 8 nss and ssl error codes nss error codes are retrieved using the nspr function pr_geterror.
Utility functions
r hash_resultlen mxr 3.4 and later hash_resultlenbyoidtag mxr 3.10 and later hash_resultlencontext mxr 3.10 and later hash_update mxr 3.4 and later nss_init mxr 3.2 and later nss_initialize mxr 3.2 and later nss_init
readwrite mxr 3.2 and later nss_initwithmerge mxr 3.12 and later nss_isinitialized mxr 3.9.2 and later nss_nodb_init mxr 3.2 and later nss_putenv mxr 3.2 and later nss_registershutdown mxr 3.11.1 and later nss_shutdown mxr 3...
... mxr 3.4 and later nssbase64encoder_create mxr 3.2 and later nssbase64encoder_destroy mxr 3.2 and later nssbase64encoder_update mxr 3.2 and later nssrwlock_destroy mxr 3.2 and later nssrwlock_havewritelock mxr 3.2 and later nssrwlock_lock
read mxr 3.2 and later nssrwlock_lockwrite mxr 3.2 and later nssrwlock_new mxr 3.2 and later nssrwlock_unlock
read mxr 3.2 and later nssrwlock_unlockwrite mxr 3.2 and later nsssmime_versioncheck mxr 3.2.1 and later port_alloc mxr ...
Network Security Services
if you're a developer and would like to contribute to nss, you might want to
read the documents highlevel overview of internal details of nss and getting started with nss.
... nss api guidelines explains how the libraries and code are organized, and guidelines for developing code (naming conventions, error handling, th
read safety, etc.) nss technical notes links to nss technical notes, which provide latest information about new nss features and supplementary documentation for advanced topics in programming with nss.
Rhino Debugger
the rhino javascript debugger can debug scripts running in multiple th
reads and provides facilities to set and clear breakpoints, control execution, view variables, and evaluate arbitrary javascript code in the current scope of an executing script.
...the loaded script will be run in a new th
read and control will be given to the debugger on its first instruction.
Rhino serialization
they're intended mainly as examples of the use of serialization: $ java org.mozilla.javascript.tools.shell.main js> function f() { return 3; } js> serialize(f, "f.ser") js> quit() $ java org.mozilla.javascript.tools.shell.main js> f = deserialize("f.ser") function f() { return 3;} js> f() 3 js> here we see a simple case of a function being serialized to a file and then
read into a new instance of rhino and called.
...
reading the serialized object back into memory is similarly simple: fileinputstream fis = new fileinputstream(filename); objectinputstream in = new scriptableinputstream(fis, scope); object deserialized = in.
readobject(); in.close(); again, we need the scope to create our serialization stream class.
SpiderMonkey compartments
false sharing occurs when we are trying to operate on an object and we have to
read an entire cache line of data into the cpu cache.
... see also js_newcompartmentandglobalobject() js_entercrosscompartmentcall() js_leavecrosscompartmentcall() jsautocompartment invariants spidermonkey internals: th
read safety andreas gal blog post bobby holley blog post sfink/contexts_and_compartments xpconnect security membranes ...
SpiderMonkey Internals
var sumofdivisors = new exprarray(n + 1, 1); for (var divisor = 2; divisor <= n; divisor++) { for (var j = divisor + divisor; j <= n; j += divisor) { sumofdivisors[j] += " + " + divisor; } // at this point everything up to 'divisor' has its sumofdivisors // expression calculated, so we can determine whether it's perfect // al
ready by evaluating.
... jsutil.cpp, jsutil.h the js_assert macro is used throughout the source as a proof device to make invariants and preconditions clear to the
reader, and to hold the line during maintenance and evolution against regressions or violations of assumptions that it would be too expensive to test unconditionally at run-time.
JIT Optimization Strategies
getprop_constant attempts to optimize
reading a property that contains a uniquely-typed (or "singleton") object.
...unboxed property
reads are possible on properties which satisfy all the characteristics of a definite slot, and additionally have been observed to only store values of one kind of value.
JS::Add*Root
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...this variable must al
ready be initialized.
JSAutoByteString
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...you should call this before calling encode* methods or initbytes method if a string is al
ready owned, otherwise the string will never be freed.
JSConstDoubleSpec
jsprop_
readonly: property is
read-only.
... if this field is 0, js_defineconstdoubles uses the default attributes jsprop_
readonly | jsprop_permanent instead.
JSObjectOps.getRequiredSlot
the jsobjectops.getrequiredslot and setrequiredslot callbacks get and set a required slot—one that should al
ready have been allocated.
... description get and set a required slot, one that should al
ready have been allocated.
JS_Add*Root
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...this variable must al
ready be initialized.
JS_AliasElement
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...if the element is currently out of scope, al
ready exists, or the alias itself cannot be assigned to the element, js_aliaselement does not report an error, but returns js_false.
JS_AliasProperty
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...if the property is currently out of scope, al
ready exists, or the alias itself cannot be assigned to the property, js_aliasproperty does not report an error, but returns js_false.
JS_BufferIsCompilableUnit
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...see also mxr id search for js_bufferiscompilableunit js::evaluate js::compile js::compileoffth
read js::compilefunction js_decompilescript ...
JS_CompileScript
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... mxr id search for js_compilescript mxr id search for js_compileucscript js::evaluate js::compileoffth
read js::compilefunction js_executescript js_decompilescript bug 1143793 -- removed obj parameter ...
JS_CompileUTF8File
compile a script,
reading the source code from a file.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
JS_DeepFreezeObject
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...this will not recurse through non-extensible objects, on the assumption that those are al
ready deep-frozen.
JS_DefineElement
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...while you can assign a setproperty method to a property and set flags to jsprop_
readonly, the setter method will not be called on this property.
JS_DefineObject
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...on error or exception (if the object cannot be created, the property al
ready exists, or the property cannot be created), js_defineobject returns null.
JS_DefinePropertyWithTinyId
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...if the property al
ready exists or cannot be created, they return js_false.
JS_DeleteElement
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... for javascript 1.2 and earlier, if failure occurs because you attempt to delete a permanent or
read-only element, js_deleteelement reports the error before returning false.
JS_DeleteElement2
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... notes per the ecma standard, js_deleteelement2 removes
read-only properties from objects as long as they are not also permanent.
JS_Enumerate
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...therefore a program that loops over the property ids must either root them all, ensure that the properties are not deleted (in a multith
readed program this requires even greater care), or ensure that garbage collection does not occur.
JS_EnumerateResolvedStandardClasses
enumerate any al
ready-resolved standard class ids.
... syntax jsidarray * js_enumerateresolvedstandardclasses(jscontext *cx, jsobject *obj, jsidarray *ida); name type description description js_enumerateresolvedstandardclasses enumerates any al
ready-resolved standard class ids into ida, or into a new jsidarray if ida is null.
JS_FlushCaches
this article covers features introduced in spidermonkey 1.8.5 flushes the code cache for the current th
read.
...in a js_th
readsafe build, the caller must be in a request on this jscontext.
JS_InitStandardClasses
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...as a side effect, js_initstandardclasses establishes obj as the global object for cx, if one is not al
ready established.
JS_InternString
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...if an interned string al
ready exists with the desired value, these functions return the existing string.
JS_LinkConstructorAndPrototype
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... description js_linkconstructorandprototype sets the prototype property of class constructor function, ctor, to prototype object, proto with jsprop_permanent | jsprop_
readonly flags, and sets the constructor property of proto to ctor with no flag.
JS_NewContext
the new jscontext is associated with the calling th
read.
... no other th
read may use it or destroy it.
JS_NewDouble
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...the application must treat the returned pointer as
read-only.
JS_NewUCString
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...the application must not
read, write, or free the buffer.
JS_SetInterruptCallback
in js_th
readsafe builds, the javascript engine calls this callback only from within an active request on cx.
... description these functions allow setting an interrupt callback that will be called from the js th
read some time after any th
read triggered the callback using js_requestinterruptcallback.
JS_SetOperationCallback
in js_th
readsafe builds, the javascript engine calls this callback only from within an active request on cx.
... description these functions allow setting an operation callback that will be called from the js th
read some time after any th
read triggered the callback using js_triggeroperationcallback.
JS_SetParent
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...js_setparent has no way to check that this is the case, but nonetheless, applications must not call js_setparent on an object that has al
ready been exposed to a script.
JS_SetPendingException
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...if an exception is al
ready being thrown, it is replaced with the new one given.
JS_SetProperty
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... otherwise, if the lookup found a
read-only property or obj non-extensible, nothing happens, but this is not an error.
JS_SetPropertyAttributes
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... jsprop_
readonly property is
read only.
JS_ValueToFunction
in a js_th
readsafe build, the caller must be in a request on this jscontext.
...instead, use jsval_is_object and js_objectisfunction() to check whether a value is al
ready a function, or use js_convertvalue() to convert a value to jstype_function safely.
JS_ValueToNumber
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... if v is al
ready a number, conversion succeeds.
JS_ValueToString
in a js_th
readsafe build, the caller must be in a request on this jscontext.
... if v is al
ready a string, conversion succeeds.
SpiderMonkey 1.8.8
removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in th
readsafe builds.
... the team is considering the removal of tinyids js_th
readsafe is going away, with future versions supporting only th
read-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 17
removal of jscontext* parameters to many methods the js_getclass method now takes only a jsobject*, where previously it also required a jscontext* in th
readsafe builds.
... the team is considering the removal of tinyids js_th
readsafe is going away, with future versions supporting only th
read-safe builds a new debugging api is on the way to replace jsd.
SpiderMonkey 24
js_getprototype, takes context as first argument js_encodestringtobuffer takes add context as first argument, js_newruntime adds a js_[use|no]_helper_th
reads flag delete property in jsclass definitions now use js_deletepropertystub garbage collection functions now take runtime argument most garbage collection functions now take a runtime argument instead of a context.
... the team is considering the removal of tinyids js_th
readsafe is going away, with future versions supporting only th
read-safe builds a new debugging api is on the way to replace jsd.
A Web PKI x509 certificate primer
*.yourcompany.com) but you want others outside of your organization to be able to browse to your website using https without having to manually import a root certificate, then you can get an ssl certificate from one of the cas who al
ready have a root certificate included in the major browsers.
...if you wish to do this, you should
read the relevant part of the mozilla ca faq before doing so.
Setting up an update server
most likely, a different maintenance service is al
ready installed, probably at c:\program files (x86)\mozilla maintenance service\maintenanceservice.exe.
... windows/linux: <install dir>/distribution/policies.json macos: <install dir>/contents/resources/distribution/policies.json create the distribution directory, if necessary, and put this in policies.json: { "policies": { "appupdateurl": "http://127.0.0.1:8000/update.xml" } } now you are
ready to update!
Manipulating bookmarks using Places
checking to see if a uri is bookmarked if you want to see if a given uri is al
ready bookmarked -- for example, to avoid creating a new bookmark for a site that's al
ready bookmarked -- you can use the nsinavbookmarksservice.isbookmarked() method.
... var ios = components.classes["@mozilla.org/network/io-service;1"] .getservice(components.interfaces.nsiioservice); var uri = ios.newuri("http://mozilla.com/", null, null); if (!bmsvc.isbookmarked(uri)) { bmsvc.insertbookmark(bmsvc.toolbarfolder, uri, bmsvc.default_index, "mozilla"); } this example looks to see if the user al
ready has a bookmark for the mozilla web site, and, if not, creates one, adding it to the user's bookmarks toolbar.
Using the Places history service
to maintain backwards compatibility, each version has implemented the older interfaces, resulting in functionality sp
read across many interfaces.
... if database initialization completes correctly a "places-init-complete" topic is notified, at this point is possible to look for database status: var databasestatus = historyservice.databasestatus; switch (databasestatus) { case historyservice.database_status_ok: // database did al
ready exist and has been correctly initialized.
Aggregating the In-Memory Datasource
in short, the only case where this technique is useful is when you're implementing a datasource to get "
read-only reflection".
...if you're really interested, i'd recommend
reading about it in a com book.
An Overview of XPCOM
contract id a contract id is a human
readable string used to access a component.
... ns_error_al
ready_initialized returned when an instance is al
ready initialized.
Packaging WebLock
<!doctype html> <html> <title>weblock installation</title> <script> /* * trigger function that downloads the xpi so the * install.js file inside can be
read and executed */ function installweblock() { weblock_xpi = {'weblock extension': 'weblock.xpi'}; installtrigger.install(weblock_xpi); } </script> <h1>install weblock</h1> <p><a href="#" onclick="installweblock();">install weblock</a></p> </html> distributing your component once you have the component packaged properly and the necessary installation and trigger scripts, you are
ready to ...
...we leave this as an exercise for the
reader.
Creating XPCOM components
preface who should
read this book organization of the tutorial following along with the examples conventions acknowledgements an overview of xpcom the xpcom solution gecko components interfaces interfaces and encapsulation the nsisupports base interface xpcom identifiers cid contract id factories xpidl and type libraries xpcom services xpcom types method types reference ...
...e xpidl syntax scriptable interfaces subclassing nsisupports the web locking interface implementing weblock declaration macros representing return values in xpcom xpidl code generation getting the weblock service from a client implementing the iweblock interface the directory service modifying paths with nsifile manipulating files with nsifile using nsilocalfile for
reading data processing the white list data iweblock method by method lock and unlock addsite removesite setsites getnext getsites hasmoreelements finishing the component using frozen interfaces copying interfaces into your build environment implementing the nsicontentpolicy interface receiving notifications implementing the nsicontentpolicy uniform re...
Components.classesByID
components.classesbyid is a
read-only object whose properties are classes indexed by cid.
... introduction components.classesbyid is a
read-only object whose properties implement the nsijscid interface.
Components.interfaces
components.interfaces is a
read-only object whose properties are interfaces indexed by their names.
... introduction components.interfaces is a
read-only object whose properties implement the nsijsiid interface.
Components.interfacesByID
components.interfacesbyid is a
read-only array of classes indexed by iid.
... introduction components.interfacesbyid is a
read-only array of objects which implement the nsijsiid interface.
Components.utils.importGlobalProperties
therefore
readystate must be checked, if it is not complete, then a load listener must be attached.
... once
readystate is complete then the objects can be used.
xpcshell
read xpconnect:using components to get started with that.
...
read xpcshell:profiling for information on how to profile scripts.
nsScriptableInputStream
example code const nsiscriptableinputstream = components.interfaces.nsiscriptableinputstream; function consumestream(inputstream) { var factory = components.classes["@mozilla.org/scriptableinputstream;1"]; var sis = factory.createinstance(nsiscriptableinputstream); sis.init(inputstream); try { while (true) { var chunk = sis.
read(512); if (chunk.length == 0) break; // ok, chunk now contains a portion of the stream's data.
... } } catch (e) { dump("error: failed
reading from stream:\n" + e + "\n"); } } see also nsiscriptableinputstream ...
nsACString
methods begin
reading the begin
reading function returns a const pointer to the first element of the string's internal buffer.
... end
reading the end
reading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
IAccessibleTable
this data is only guaranteed to be valid while the th
read notifying the event continues.
...servers should document their life cycle strategy as this will be of interest to assistive technology or script engines accessing data out of process or from other th
reads.
IAccessibleTable2
this data is only guaranteed to be valid while the th
read notifying the event continues.
...servers should document their life cycle strategy as this will be of interest to assistive technology or script engines accessing data out of process or from other th
reads.
imgIDecoder
modules/libpr0n/public/imgidecoder.idlscriptable base class for a decoder that
reads an image from an input stream and sends it to an imgiloader object.
...unsigned long writefrom( in nsiinputstream instr, in unsigned long count ); parameters instr the stream from which to
read the encoded image data.
mozIStorageAsyncStatement
(mozistoragestatement can be used for both synchronous and asynchronous purposes.) this specialization for asynchronous operation allows us to avoid needing to acquire synchronization primitives also used by the asynchronous execution th
read.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main th
read to lock for extended intervals while the asynchronous th
read performs some long-running operation.
nsIAppStartup
nativeappsupport nsinativeappsupport getter for "native application support."
read only.
... void ensure1window( in nsicmdlineservice acmdlineservice ); parameters acmdlineservice the command line from which startup args can be
read.
nsICategoryManager
exceptions thrown ns_error_invalid_arg this error is returned if areplace is false and the category entry al
ready has a value, or if apersist is true.
... var content_type = 'application/pdf'; // update the category manager in case the plugins are al
ready loaded.
nsICommandLineHandler
the entries in this category are
read in alphabetical order, and each category value is treated as a service contract id implementing this interface.
...
read only.
nsICompositionStringSynthesizer
this means that the clause is al
ready converted.
...this means that the clause is al
ready converted and is selected to convert.
nsIFeed
textinput nsiwritablepropertybag2 information about a text box that can be displayed along with the feed by aggregators that support it, to allow the
reader to send a response back to the source of the feed.
...
read only.
nsIHttpServer
* * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws ns_error_al
ready_initialized * if this server is al
ready started * @throws ns_error_not_available * if the server is not started and cannot be started on the desired port * (perhaps because the port is al
ready in use or because the process does * not have privileges to do so) * @note * behavior is undefined if this method is called after stop() has been * called on this but be...
...*/
readonly attribute nsihttpserveridentity identity; /** * retrieves the string associated with the given key in this, for the given * path's saved state.
nsIInputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void oninputstream
ready(in nsiasyncinputstream astream); methods oninputstream
ready() called to indicate that the stream is either
readable or closed.
... void oninputstream
ready( in nsiasyncinputstream astream ); parameters astream the stream whose nsiasyncinputstream.asyncwait() method was called.
nsILoginManagerStorage
read only.
...void initwithfile( in nsifile ainputfile, in nsifile aoutputfile ); parameters ainputfile the file from which to
read stored logins.
nsIMessenger
attributes attribute type description transactionmanager nsitransactionmanager
readonly: the transaction manager for this nsimessenger instance.
... lastdisplayedmessageuri acstring
readonly: the url of the last displayed message.
nsIMsgAccount
inherits from: nsisupports last changed in gecko 1.7 method overview void addidentity(in nsimsgidentity identity); void clearallvalues(); void init(); void removeidentity(in nsimsgidentity identity); astring tostring(); attributes attribute type description defaultidentity nsimsgidentity identities nsisupportsarray
read only.
...exceptions thrown ns_error_al
ready_opened if it is called more then once removeidentity() removes an identity from this account.
nsIMsgCompFields
properties attribute type description attachments char * obsolete attachments obsolete, do not use anymore attachmentsarray nsisupportsarray
readonly attachvcard prbool bcc astring body astring bodyisasciionly prbool cc astring characterset char * defaultcharacterset char *
readonly drafid char * dsn prbool fcc astring fcc2 astring followupto char * forcemsgencoding prbool forceplaintext...
... prbool from astring hasrecipients prbool
readonly new in thunderbird 23 indicates whether something is filled in in the to, cc, or bcc attribute.
nsIMsgHeaderParser
addresses are removed if they are al
ready in either addrs or other_addrs.
... that argument is for passing in addresses that were al
ready mentioned in other header fields.) addresses are considered to be the same if they contain the same mailbox part (case-insensitive.) real names and other comments are not compared.
nsIMsgIdentity
requestreturnreceipt boolean
readonly: default request for return receipt option for this identity.
... receiptheadertype long
readonly: requestdsn boolean
readonly: default request for dsn option for this identity.
nsIMsgMessageService
acopylistener al
ready knows about the destination folder.
...ce(); var scriptinputstream = scriptinput.queryinterface(components.interfaces.nsiscriptableinputstream); scriptinputstream.init(consumer); try { msgservice.streammessage(messageuri, msgstream, msgwindow, null, false, null); } catch (ex) { alert("error: "+ex) } scriptinputstream .available(); while (scriptinputstream .available()) { content = content + scriptinputstream .
read(512); } alert(content streamheaders() this method streams a message's headers to the passed in consumer.
nsIXmlRpcFault
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void init(in print32 faultcode, in string faultsring); string tostring(); attributes attribute type description faultcode print32
read only.
... faultstring string
read only.
nsMsgRuleActionType
action { /* if you change these, you need to update filter.properties, look for filteractionx */ /* these longs are all actually of type nsmsgfilteractiontype */ const long custom=-1; /* see nsmsgfilteraction */ const long none=0; /* uninitialized state */ const long movetofolder=1; const long changepriority=2; const long delete=3; const long mark
read=4; const long killth
read=5; const long watchth
read=6; const long markflagged=7; const long label=8; const long reply=9; const long forward=10; const long stopexecution=11; const long deletefrompop3server=12; const long leaveonpop3server=13; const long junkscore=14; const long fetchbodyfrompop3server=15; const long copytofolder=16; const long add...
...tag=17; const long killsubth
read=18; const long markun
read=19; }; ...
nsMsgViewSortType
the nsmsgviewsorttype interface contains constants used for sorting the thunderbird th
readpane.
... last changed in gecko 1.9 (firefox 3) constants name value description bynone 0x11 not sorted bydate 0x12 bysubject 0x13 byauthor 0x14 byid 0x15 byth
read 0x16 bypriority 0x17 bystatus 0x18 bysize 0x19 byflagged 0x1a byun
read 0x1b byrecipient 0x1c bylocation 0x1d bytags 0x1e byjunkstatus 0x1f byattachments 0x20 byaccount 0x21 bycustom 0x22 byreceived 0x23 ...
Setting HTTP request headers
in the case your code initiates the request, you probably al
ready have one.
...the second line of code in the if block should al
ready be familiar to you.
Performance
the cache is th
readsafe.
...this made shutdown very slow because the asyncio th
read would block shutdown (bug 328598).
Troubleshooting XPCOM components registration
if your component requires any external libraries, you may need to
read using dependent libraries in extension components make sure you are compiling against the right version.
... a google groups th
read on the matter is located here.
Status, Recent Changes, and Plans
i'm sorry this section is in the way for first-time
readers.
... plans for nscomptr bug 59212: as soon as we test on more compilers, start recommending al
ready_addrefed as a function result.
XPIDL Syntax
;" / codefrag type_decl = [prop_list] "typedef" type_spec *(ident ",") ident type_decl /= [prop_list] "native" ident [parens] const_decl = "const" type_spec ident "=" expr op_decl = [prop_list] (type_spec / "void") parameter_decls raise_list parameter_decls = "(" [*(param_decl ",") param_decl] ")" param_decl = [prop_list] ("in" / "out" / "inout") type_spec ident attr_decl = [prop_list] ["
readonly"] "attribute" type_spec *(ident ",") ident ; descending order of precedence expr /= expr ("|" / "^" / "&") expr ; unequal precedence "|" is lowest expr /= expr ("<<" / ">>") expr expr /= expr ("+" / "-") expr expr /= expr ("*" / "/" / "%") expr expr /= ["-" / "+" / "~"] (scoped_name / literal / "(" expr ")" ) ; numeric literals: quite frankly, i'm sure you know how these kinds of ...
...tax idlfile = *(cdata / include / interface / typedef / native) typedef = "typedef" identifer identifier ";" native = [attributes] "native" identifier "(" nativeid ")" interface = [attributes] "interface" identifier" [ifacebase] [ifacebody] ";" ifacebase = ":" identifier ifacebody = "{" *(member) "}" member = cdata / "const" identifier identifier "=" number ";" member /= [attributes] ["
readonly"] "attribute" identifier identifer ";" member /= [attributes] identifier identifier "(" paramlist ")" raises ";" paramlist = [param *("," param)] raises = ["raises" "(" identifier *("," identifier) ")"] attributes = "[" attribute *("," attribute) "]" attribute = (identifier / const) ["(" (identifier / iid) ")"] param = [attributes] ("in" / "out" / "inout") identifier identifier numbe...
Cached compose window FAQ
(this window is not cached, since you al
ready have a cached compose window.) do new message again.
... user_pref("mail.compose.max_recycled_windows", 1); where can i
read more about it?
Filelink Providers
for example, the hightail implementation provides the following function: function extraargs() { var usernamevalue = document.getelementbyid("username").value; return { "username": {type: "char", value: usernamevalue}, }; } in this example, the username value is
read from the input, and then the specially-crafted object is returned.
... the content to the right of the menulist is an iframe, pointed at a url
read from the providers managementurl attribute, which should point to an xhtml page.
Mail client architecture overview
the mail
reader gecko (xul and html rendering) rdf (dynamic widgets) js (menus, events) libmime mail datasources mail javascript folder/message management msgdb imap/nntp/pop3 necko (networking) sections in grey refer to modules outside of mail/news the base module the base module provides a generic interface to a set of protocol-independant messaging services.
...most of these modules have little dependancy on the mail
reader itself: compose - the mail compose module is responsible for anything that has to do with sending mail.
Mailbox
the mailbox protocol is used to
read messages from a local folder berkeley mailbox.
...this may seem like a lot of infrastructure just to
read messages from a flat file, but it allows us to do it asynchronously, and to have
reading local messages fit into the same kind of mechanisms that
reading nntp and imap messages do - running urls, getting onstart/stoprunningurl notifications when the url starts/stops, etc.
Message Interfaces
nsimsgth
read nsimsgth
read - this interface is used to interact with th
reads in thunderbird.
... nsimsgdbview nsimsgdbview - the nsimsgdbview interface handles the display of mail in the th
readpane and preview pane of thunderbird and other xpcom based mail cients.
Thunderbird Binaries
please
read the release notes before downloading.
...if you wish to download nightly builds to help us test for the next release, please
read the testing page for where we need help.
Demo Addon
let query = gloda.newquery(gloda.noun_message); query.subjectmatches(searchterm); let mylistener = { /* called when new items are returned by the database query or freshly indexed */ onitemsadded: function mylistener_onitemsadded(aitems, acollection) { }, /* called when items that are al
ready in our collection get re-indexed */ onitemsmodified: function mylistener_onitemsmodified(aitems, acollection) { }, /* called when items that are in our collection are purged from the system */ onitemsremoved: function mylistener_onitemsremoved(aitems, acollection) { }, /* called when our database query completes */ onquerycompleted: function mylistener_onquerycomplete...
...it contains a collection of glodaconversation objects which itself is a th
read that contains one or more glodamessages.
Folders and message lists
if a collapsed th
read is in there and working with collapsed th
reads is enabled, this will include the headers for the messages in that collapsed th
read.
...like selectedmessages, this also includes messages in selected collapsed th
reads when so enabled.
Styling the Folder Pane
hasun
readmessages-true afolder.getnumun
read(false) > 0 indicates that the folder (but not subfolders) has un
read messages.
... newmessages-true afolder.hasnewmessages subfoldershaveun
readmessages-true afolder.getnumun
read(true) > afolder.getnumun
read(false) indicates whether or not subfolders have un
read messages.
customDBHeaders Preference
some of the functionality described here is really new, so please try to be understanding if some of these things change tomorrow (or have changed al
ready).
...ther"); adding a column the reply-to column tutorial does a good job of explaining how to add a column with an overlay, so i'll just show you my overlay file: <?xml version="1.0" ?> <overlay id="colsuperfluousoverlay" xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <script type='application/javascript' src='chrome://superfluous/content/superfluous.js'/> <tree id="th
readtree"> <treecols id="th
readcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unth
readed" flex="1" label="superfluous" tooltiptext="click to sort by superfluous" /> </treecols> </tree> </overlay> you should insure that whatever id you use for the treecol you're adding matches t...
Zombie compartments
this can be confusing at first, so be
ready for it.
... avoiding zombie compartments in add-ons once you know that an add-on causes a zombie compartment, the only way to identify the cause is to
read the add-on's code.
Add to iPhoto
choose it, and iphoto will start up (if it's not al
ready running) and import the image.
...then we call createunique() to create a unique file by that name (or a derivative thereof if the name is al
ready in use), and download the contents of the image file to that local file.
Declaring and Using Callbacks
warning: callbacks must be invoked on the same th
read with which they were registered.
... there is no concurrency logic in js-ctypes, so invoking callbacks on other th
reads will cause things to crash.
Declaring types
types are declared in terms of other, al
ready defined types.
... var timestr = asctime(thetime.address()); // pass a pointer to the tm struct var jsstring = timestr.
readstring(); // convert the c string to javascript the last line converts the c string returned by the libc asctime() function into a javascript string by calling the cdata
readstring() method.
Initialization and Destruction - Plugins
during initialization, when the browser encounters data of a mime type registered for a plug-in (either embedded in an html page or in a separate file), it loads the plug-in code into memory (if it hasn't been loaded al
ready) and creates a new instance of the plug-in.
...the browser calls the plug-in's np_shutdown function, which informs the plug-in that its library is about to be unloaded, and gives it a chance to cancel any outstanding i/o requests, delete th
reads it created, free any memory it allocated, and perform any other closing tasks.
Introduction to DOM Inspector - Firefox Developer Tools
a browser window and the dom inspector are likely be al
ready open and displayed in this list.
...the dom inspector not only presents all this information about pages in a clear and structured way, it gives you way to find and update those structures, and it's simple to access via shortcuts and menus al
ready available in the mozilla browser.
Use watchpoints - Firefox Developer Tools
when debugging javascript code, it can be useful to know when properties on objects are
read or modified.
...a get watchpoint pauses whenever a property is
read; a set watchpoint pauses whenever a property value changes; a get or set watchpoint pauses whenever a property value is accessed in either way.
Debugger.Frame - Firefox Developer Tools
each property is a
read-only accessor property whose getter returns the current value of the corresponding parameter.
... calls to frames’ handler methods are cross-compartment, intra-th
read calls: the call takes place in the th
read to which the frame belongs, and runs in the compartment to which the handler method belongs.
Debugger.Memory - Firefox Developer Tools
reading the accessor produces true if the debugger is capturing stacks for object allocations, and false otherwise.
... handler functions run in the same th
read in which the event occurred.
Debugger.Object - Firefox Developer Tools
(this function behaves like the standard object.issealed function, except that the object inspected is implicit and in a different compartment from the caller.) isfrozen() return true if the referent is frozen—that is, if it is not extensible, and all its properties have been marked as non-configurable and
read-only.
... watchpoint handler calls are cross-compartment, intra-th
read calls: the call takes place in the same th
read that changed the property, and inhandler's method's compartment (typically the same as the debugger's compartment).
The Firefox JavaScript Debugger - Firefox Developer Tools
there are multiple ways to tell the debugger how and when to pause: set a breakpoint set a conditional breakpoint set an xhr breakpoint set event listener breakpoints break on exceptions use watchpoints for property
reads and writes break on dom mutation disable breakpoints control execution what can you do after execution pauses?
... step through code black box a source debug worker th
reads debug eval sources look at values you probably want to see the value of variables or expressions, either during execution or when it is paused.
Dominators view - Firefox Developer Tools
if you al
ready know what shallow size, retained size, and dominators are, skip to the dominators ui section.
... taking a snapshot to see what it looks like in the dominators view: load the page enable the memory tool in the settings, if you haven't al
ready open the memory tool check "record call stacks" press the button labeled "make monsters!" take a snapshot switch to the "dominators" view analyzing the dominators tree you'll see the three arrays as the top three gc roots, each retaining about 23% of the total memory usage: if you expand an array, you'll see the objects (monsters) it contains.
Work with animations - Firefox Developer Tools
the bar is: blue if a transition was used to animate a property orange if a @keyframes animation was used green if the web animations api was used the bar contains a lightning bolt icon if the property was animated using the compositor th
read (see more about the cost of animating different css properties).
... the img#icon animation: animated the filter and transform properties, to scale the icon and color it lasted 750ms, had an enddelay of 100ms used the compositor th
read was given an easing value of ease-in: you can see this by the concave shape of the green bar.
Style Editor - Firefox Developer Tools
this is where the source for the selected style sheet is available for you to
read and edit.
... the editor provides line numbers and syntax highlighting to help make it easier to
read your css.
Web Console Helpers - Firefox Developer Tools
pprint() obsolete since gecko 74 formats the specified value in a
readable way; this is useful for dumping the contents of objects and arrays.
...in fact, this page you're
reading right now has one, so you can open up the web console and try this right now.
Web Console remoting - Firefox Developer Tools
we use the objectactor from dbg-script-actors.js without a th
readactor, to avoid slowing down the page scripts - the debugger deoptimizes javascript execution in the target page.
... the lifetime of object actors in the web console is different than the lifetime of these objects in the debugger - which is usually per pause or per th
read.
AbsoluteOrientationSensor - Web APIs
syntax var absoluteorientationsensor = new absoluteorientationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends device hardware and consequently may be less than requested.
Accelerometer.Accelerometer() - Web APIs
the accelerometer constructor creates a new accelerometer object which returns the acceleration of the device along all three axes at the time it is
read.
...the actual
reading frequency depends device hardware and consequently may be less than requested.
AmbientLightSensor.AmbientLightSensor() - Web APIs
syntax var ambientlightsensor = new ambientlightsensor(options) parameters options optional currently only one option is supported: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends device hardware and consequently may be less than requested.
Animation.effect - Web APIs
the target effect may be either an effect object of a type based on animationeffect
readonly, such as keyframeeffect, or null.
... syntax var effect = animation.effect; animation.effect = animationeffect
readonly value a animationeffect
readonly object describing the target animation effect for the animation, or null to indicate no active effect.
AudioContext.baseLatency - Web APIs
the baselatency
read-only property of the audiocontext interface returns a double that represents the number of seconds of processing latency incurred by the audiocontext passing an audio buffer from the audiodestinationnode — i.e.
... the end of the audio graph — into the host system's audio subsystem
ready for playing.
AudioContext - Web APIs
audiocontext.baselatency
read only returns the number of seconds of processing latency incurred by the audiocontext passing the audio from the audiodestinationnode to the audio subsystem.
... audiocontext.outputlatency
read only returns an estimation of the output latency of the current audio context.
AudioTrack.label - Web APIs
the
read-only audiotrack property label returns a string specifying the audio track's human-
readable label, if one is available; otherwise, it returns an empty string.
... syntax var audiotracklabel = audiotrack.label; value a domstring specifying the track's human-
readable label, if one is available in the track metadata.
AudioWorklet - Web APIs
the audioworklet interface of the web audio api is used to supply custom audio processing scripts that execute in a separate th
read to provide very low latency audio processing.
... the worklet's code is run in the audioworkletglobalscope global execution context, using a separate web audio th
read which is shared by the worklet and other audio nodes.
AuthenticatorAssertionResponse.userHandle - Web APIs
the userhandle
read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is an opaque identifier for the given user.
...this is not human-
readable and does not contain any personally identifying information (e.g.
AuthenticatorAttestationResponse - Web APIs
properties authenticatorattestationresponse.clientdatajson secure context
read only client data for the authentication, such as origin and challenge.
... authenticatorattestationresponse.attestationobject secure context
read only an arraybuffer containing authenticator data and an attestation statement for a newly-created key pair.
BaseAudioContext.createBuffer() - Web APIs
note: createbuffer() used to be able to take compressed data and give back decoded samples, but this ability was removed from the spec, because all the decoding was done on the main th
read, therefore createbuffer() was blocking other code execution.
... syntax var buffer = baseaudiocontext.createbuffer(numofchannels, length, samplerate); parameters note: for an in-depth explanation of how audio buffers work, and what these parameters mean,
read audio buffers: frames, samples and channels from our basic concepts guide.
BaseAudioContext.decodeAudioData() - Web APIs
in this case the arraybuffer is loaded from xmlhttprequest and file
reader.
... syntax older callback syntax: baseaudiocontext.decodeaudiodata(arraybuffer, successcallback, errorcallback); newer promise-based syntax: promise<decodeddata> baseaudiocontext.decodeaudiodata(arraybuffer); parameters arraybuffer an arraybuffer containing the audio data to be decoded, usually grabbed from xmlhttprequest, windoworworkerglobalscope.fetch() or file
reader.
BeforeInstallPromptEvent - Web APIs
beforeinstallpromptevent.platforms
read only returns an array of domstring items containing the platforms on which the event was dispatched.
... beforeinstallpromptevent.userchoice
read only returns a promise that resolves to a domstring containing either "accepted" or "dismissed".
BiquadFilterNode.getFrequencyResponse() - Web APIs
example in the following example we are using a biquad filter on a media stream (for the full demo, see our stream-source-buffer demo live, or
read the source.) as part of this demo, we get the frequency responses for this biquad filter, for five sample frequencies.
..., and grab a reference to it in our javascript: <p>biquad filter frequency response for: </p> <ul class="freq-response-output"> </ul> var freqresponseoutput = document.queryselector('.freq-response-output'); finally, after creating our biquad filter, we use getfrequencyresponse() to generate the response data and put it in our arrays, then loop through each data set and output them in a human-
readable list at the bottom of the page: var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.type = "lowshelf"; biquadfilter.frequency.value = 1000; biquadfilter.gain.value = range.value; ...
Blob.arrayBuffer() - Web APIs
this can happen, for example, if the
reader used to fetch the blob's data throws an exception.
... usage notes while similar to the file
reader.
readasarraybuffer() method, arraybuffer() returns a promise rather than being an event-based api, as is the case with the file
reader interface's method.
BlobEvent - Web APIs
blobevent.data
read only a blob representing the data associated with the event.
... blobevent.timecode
read only a domhighrestimestamp indicating the difference between the timestamp of the first chunk in data and the timestamp of the first chunk in the first blobevent produced by this recorder.
BluetoothRemoteGATTCharacteristic.value - Web APIs
the bluetoothremotegattcharacteristic.value
read-only property returns currently cached characteristic value.
... this value gets updated when the value of the characteristic is
read or updated via a notification or indication.
value - Web APIs
the bluetoothremotegattdescriptor.value
read-only property returns an arraybuffer containing the currently cached descriptor value.
... this value gets updated when the value of the descriptor is
read.
BluetoothRemoteGATTServer - Web APIs
interface interface bluetoothremotegattserver {
readonly attribute bluetoothdevice device;
readonly attribute boolean connected; promise<bluetoothremotegattserver> connect(); void disconnect(); promise<bluetoothremotegattservice> getprimaryservice(bluetoothserviceuuid service); promise<sequence<bluetoothremotegattservice>> getprimaryservices(optional bluetoothserviceuuid service); }; properties bluetoothremotegattserver.connected
read only a boolean value that returns true while this script execution environment is connected to this.device.
... bluetoothremotegattserver.device
read only a reference to the bluetoothdevice running the server.
Body.blob() - Web APIs
the blob() method of the body mixin takes a response stream and
reads it to completion.
...when the fetch is successful, we
read a blob out of the response using blob(), put it into an object url using url.createobjecturl, and then set that url as the source of an <img> element to display the image.
Body.json() - Web APIs
the json() method of the body mixin takes a response stream and
reads it to completion.
...when the fetch is successful, we
read and parse the data using json(), then
read values out of the resulting objects as you'd expect and insert them into list items to display our product data.
Body.text() - Web APIs
the text() method of the body mixin takes a response stream and
reads it to completion.
...when the fetch is successful, we
read a usvstring (text) object out of the response using text(), then set the innerhtml of the <article> element equal to the text object.
BroadcastChannel.name - Web APIs
the
read-only broadcastchannel.name property returns a domstring, which uniquely identifies the given channel with its name.
... this name is passed to the broadcastchannel() constructor at creation time and is therefore
read-only.
CSSGroupingRule - Web APIs
interface cssgroupingrule : cssrule {
readonly attribute cssrulelist cssrules; unsigned long insertrule (domstring rule, unsigned long index); void deleterule (unsigned long index); } properties common to all cssgroupingrule instances the cssgroupingrule derives from cssrule and inherits all properties of this class.
... it has one specific property: cssgroupingrule.cssrules
read only returns a cssrulelist of the css rules in the media rule.
CSSMediaRule - Web APIs
interface cssmediarule : cssconditionrule {
readonly attribute medialist media; } properties as a cssconditionrule, and therefore both a cssgroupingrule and a cssrule, cssmediarule also implements the properties of these interfaces.
... it has the following specific property: cssmediarule.media
read only specifies a medialist representing the intended destination medium for style information.
CSSPageRule - Web APIs
interface csspagerule : cssrule { attribute domstring selectortext;
readonly attribute cssstyledeclaration style; }; properties as a cssrule, csspagerule also implements the properties of this interface.
... csspagerule.style
read only returns the declaration block associated with the at-rule.
CSSPseudoElement - Web APIs
properties csspseudoelement.element
read only returns the originating/parent element of the pseudo-element.
... csspseudoelement.type
read only returns the pseudo-element selector as a cssomstring.
CSSRule - Web APIs
cssrule.parentrule
read only returns the containing rule, otherwise null.
... cssrule.parentstylesheet
read only returns the cssstylesheet object for the style sheet that contains this rule cssrule.type
read only one of the type constants indicating the type of css rule.
CSSRuleList - Web APIs
note that being indirect-modify (changeable but only having
read-methods), rules are not added or removed from the list directly, but instead here, only via its parent stylesheet.
...if however, for some reason the list does need to be modified but has no parent stylesheet (perhaps being a livecopy of a list that does), it cannot just be assigned one (as it has no such property), and neither can it be assigned to one (as stylesheet.cssrules is
read-only), but it must unfortunately be inserted into one, rule by rule, and unless combining lists, after any existing list therein is deleted, rule by rule.
CSSStyleRule - Web APIs
cssstylerule.style
read only returns the cssstyledeclaration object for the rule.
... cssstylerule.stylemap
read only returns a stylepropertymap object which provides access to the rule's property-value pairs.
Managing screen orientation - Web APIs
some devices (mainly mobile devices) can dynamically change the orientation of the screen based on their own orientation, ensuring that the user will always be able to
read what's on the screen.
... listening orientation change the orientationchange event is triggered each time the device change the orientation of the screen and the orientation itself can be
read with the screen.orientation property.
CSS Object Model (CSSOM) - Web APIs
it allows users to
read and modify css style dynamically.
...mathnegate cssmathproduct cssmathsum cssmathvalue cssmatrixcomponent cssnumericarray cssnumericvalue cssperspective csspositionvalue cssrotate cssscale cssskew cssskewx cssskewy cssstylevalue csstransformcomponent csstransformvalue csstranslate cssunitvalue cssunparsedvalue cssvariablereferencevalue stylepropertymap stylepropertymap
readonly obsolete cssom interfaces cssprimitivevalue cssvalue cssvaluelist tutorials determining the dimensions of elements (it needs some updating as it was made in the dhtml/ajax era).
CacheStorage - Web APIs
cachestorage.open() returns a promise that resolves to the cache object matching the cachename (a new cache is created if it doesn't al
ready exist.) cachestorage.delete() finds the cache object matching the cachename, and if found, deletes the cache object and returns a promise that resolves to true.
...onse.clone(); caches.open('v1').then(function (cache) { cache.put(event.request, responseclone); }); return response; }).catch(function () { return caches.match('/sw-test/gallery/mylittlevader.jpg'); }); } })); }); this snippet shows how the api can be used outside of a service worker context, and uses the await operator for much more
readable code.
CanvasRenderingContext2D - Web APIs
if the shape has al
ready been closed or has only one point, this function does nothing.
... canvasrenderingcontext2d.canvas a
read-only back-reference to the htmlcanvaselement.
Hit regions and accessibility - Web APIs
it's also very useful for assistive technology users (like screen
readers) which can
read and interpret the sub dom in it.
... partially overlaying the circle is a green <a href="http://en.wikipedia.org/wiki/square" onfocus="drawsquare();" onblur="drawpicture();">square</a> and a purple <a href="http://en.wikipedia.org/wiki/triangle" onfocus="drawtriangle();" onblur="drawpicture();">triangle</a>, both of which are semi-opaque, so the full circle can be seen underneath.</p> </canvas> see the video how nvda
reads this example by steve faulkner.
CaretPosition - Web APIs
caretposition.offsetnode
read only returns a node containing the found node at the caret's position.
... caretposition.offset
read only returns a long representing the character offset in the caret position node.
Using channel messaging - Web APIs
note: for more information and ideas, the ports as the basis of an object-capability model on the web section of the spec is a useful
read.
... // handle messages received on port1 function onmessage(e) { output.innerhtml = e.data; input.value = ''; } when a message is received back from the iframe confirming that the original message was received successfully, this simply outputs the confirmation to a paragraph and empties the text input
ready for the next message to be sent.
Client.url - Web APIs
the url
read-only property of the client interface returns the url of the current service worker client.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: 'window' }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of 'url' in that specification.
ClipboardItem() - Web APIs
the clipboarditem() constructor of the clipboard api creates a new clipboarditem object which represents data to be stored or retrieved via the clipboard api, that is clipboard.write() and clipboard.
read() respectively.
... note: to work with text see the clipboard.
readtext() and clipboard.writetext() methods of the clipboard interface.
ClipboardItem.getType() - Web APIs
examples in the following example, we're returning all items on the clipboard via the clipboard.
read() method.
... async function getclipboardcontents() { try { const clipboarditems = await navigator.clipboard.
read(); for (const clipboarditem of clipboarditems) { for (const type of clipboarditem.types) { const blob = await clipboarditem.gettype(type); // we can now use blob here } } } catch (err) { console.error(err.name, err.message); } } specifications specification status comment clipboard api and eventsthe definition of 'clipboarditem' in that specification.
CompositionEvent - Web APIs
compositionevent.data
read only returns the characters generated by the input method that raised the event; its varies depending on the type of event that generated the compositionevent object.
... compositionevent.locale
read only returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
ConstantSourceNode.offset - Web APIs
the
read-only offset property of the constantsourcenode interface returns a audioparam object indicating the numeric a-rate value which is always returned by the source when asked for the next sample.
... while the audioparam named offset is
read-only, the value property within is not.
ContentIndex.getAll() - Web APIs
async function create
readinglist() { // access our service worker registration const registration = await navigator.serviceworker.
ready; // get our index entries const entries = await registration.index.getall(); // create a containing element const
readinglistelem = document.createelement('div'); // test for entries if (!array.length) { // if there are no entries, display a message const messa...
...ge = document.createelement('p'); message.innertext = 'you currently have no articles saved for offline
reading.'
readinglistelem.append(message); } else { // if entries are present, display in a list of links to the content const listelem = document.createelement('ul'); for (const entry of entries) { const listitem = document.createelement('li'); const anchorelem = document.createelement('a'); anchorelem.innertext = entry.title; anchorelem.setattribute('href', entry.url); listelem.append(listitem); }
readinglistelem.append(listelem); } } specifications specification status comment unknownthe definition of 'getall' in that specification.
Credential - Web APIs
properties credential.id
read only returns a domstring containing the credential's identifier.
... credential.type
read only returns a domstring containing the credential's type.
CustomEvent.initCustomEvent() - Web APIs
if the event has al
ready been dispatched, this method does nothing.
... living standard initial definition, but al
ready deprecated in favor of the use of a constructor, customevent() ...
DOMError - Web APIs
properties domerror.name
read only returns a domstring representing one of the error type names (see below).
... domerror.message
read only returns a domstring representing a message or description associated with the given error type name.
DOMPointInit.x - Web APIs
the dompointinit dictionary's x property is used to specify the x component of a point in 2d or 3d space when either creating or serializing a dompoint or dompoint
readonly.
... dompointinit is used as an input when calling either dompoint
readonly.frompoint() or dompoint.frompoint(), and is returned by the dompoint
readonly.tojson() and dompoint.tojson() methods.
DOMQuad - Web APIs
it has a handy bounds attribute returning a domrect
readonly for those cases where you just want an axis-aligned bounding rectangle.
... properties p1,p2,p3,p4
read only are dompoint objects for each of the domquad object's four corners.
DataTransferItem - Web APIs
properties datatransferitem.kind
read only the kind of drag data item, string or file.
... datatransferitem.type
read only the drag data item's type, typically a mime type.
Document.contentType - Web APIs
the document.contenttype
read-only property returns the mime type that the document is being rendered as.
... syntax contenttype = document.contenttype; value contenttype is a
read-only property.
Document.fullscreen - Web APIs
the obsolete document interface's fullscreen
read-only property reports whether or not the document is currently displaying content in full-screen mode.
... although this property is
read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
Document.fullscreenEnabled - Web APIs
the
read-only fullscreenenabled property on the document interface indicates whether or not full-screen mode is available.
... although this property is
read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
Document.hasStorageAccess() - Web APIs
examples document.hasstorageaccess().then(hasaccess => { if (hasaccess) { // storage access has been granted al
ready.
... } else { // storage access hasn't been granted al
ready; // you may want to call requeststorageaccess().
Document.head - Web APIs
the head
read-only property of the document interface returns the <head> element of the current document.
... example <!doctype html> <head id="my-document-head"> <title>example: using document.head</title> </head> <script> var thehead = document.head; console.log(thehead.id); // "my-document-head"; console.log( thehead === document.queryselector("head") ); // true </script> notes document.head is
read-only.
DocumentOrShadowRoot.fullscreenElement - Web APIs
the documentorshadowroot.fullscreenelement
read-only property returns the element that is currently being presented in full-screen mode in this document, or null if full-screen mode is not currently in use.
... although this property is
read-only, it will not throw if it is modified (even in strict mode); the setter is a no-operation and it will be ignored.
How whitespace is handled by HTML, CSS, and in the DOM - Web APIs
these characters allow you to format your code in a way that will make it easily
readable by yourself and other people.
...in fact, we saw this al
ready in our very first example, when we described how whitespace is processed inside inline formatting contexts.
EffectTiming.delay - Web APIs
element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including delay.
... the value of delay corresponds directly to effecttiming.delay in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
EffectTiming.direction - Web APIs
the direction property of the web animations api dictionary effecttiming indicates an animation's playback direction along its timeline, as well as its behavior when it reaches the end of an iteration element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including direction.
... the value of direction corresponds directly to animationeffecttiming
readonly.direction in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
EffectTiming.duration - Web APIs
element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including duration.
... the value of duration corresponds directly to animationeffecttiming
readonly.duration in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
EffectTiming.easing - Web APIs
element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including easing.
... the value of easing corresponds directly to animationeffecttiming
readonly.easing in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
EffectTiming.iterationStart - Web APIs
element.animate(), keyframeeffect
readonly.keyframeeffect
readonly(), and keyframeeffect.keyframeeffect() all accept an object of timing properties including iterationstart.
... the value of iterationstart corresponds directly to animationeffecttiming
readonly.iterationstart in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
EffectTiming.iterations - Web APIs
element.animate(), keyframeeffect
readonly(), and keyframeeffect() all accept an object of timing properties including iterations.
... the value of iterations corresponds directly to animationeffecttiming
readonly.iterations in timing objects returned by animationeffect
readonly, keyframeeffect
readonly, and keyframeeffect.
Element.clientHeight - Web APIs
the element.clientheight
read-only property is zero for elements with no css or inline layout boxes; otherwise, it's the inner height of an element in pixels.
...the clientheight property is
read–only.
Element.requestFullscreen() - Web APIs
function togglefullscreen() { let elem = document.queryselector("video"); if (!document.fullscreenelement) { elem.requestfullscreen().catch(err => { alert(`error attempting to enable full-screen mode: ${err.message} (${err.name})`); }); } else { document.exitfullscreen(); } } if the document isn't al
ready in full-screen mode—detected by looking to see if document.fullscreenelement has a value—we call the video's requestfullscreen() method.
... if, on the other hand, full-screen mode is al
ready in effect, we call document.exitfullscreen() to disable full-screen mode.
Element.scrollIntoViewIfNeeded() - Web APIs
the element.scrollintoviewifneeded() method scrolls the current element into the visible area of the browser window if it's not al
ready within the visible area of the browser window.
... if the element is al
ready within the visible area of the browser window, then no scrolling takes place.
Element.setAttributeNodeNS() - Web APIs
myns:special-align="utterleft">one</div> // <div id="two">two</div> var myns = "http://www.mozilla.org/ns/specialspace"; var d1 = document.getelementbyid("one"); var d2 = document.getelementbyid("two"); var a = d1.getattributenodens(myns, "special-align"); d2.setattributenodens(a.clonenode(true)); alert(d2.attributes[1].value) // returns: `utterleft' notes if the specified attribute al
ready exists on the element, then that attribute is replaced with the new one and the replaced one is returned.
... note that if you try to set without cloning the node, mozilla gives an ns_error_dom_inuse_attribute_err "attribute al
ready in use" error, as the dom requires cloning for attr to be reused (unlike other nodes which can be moved).
Element.toggleAttribute() - Web APIs
example in the following example, toggleattribute() is used to toggle the
readonly attribute of a <input>.
... html <input value="text"> <button>toggleattribute("
readonly")</button> javascript var button = document.queryselector("button"); var input = document.queryselector("input"); button.addeventlistener("click", function(){ input.toggleattribute("
readonly"); }); result dom methods dealing with element's attributes: not namespace-aware, most commonly used methods namespace-aware variants (dom level 2) dom level 1 methods for dealing with attr nodes directly (seldom used) dom level 2 namespace-aware methods for dealing with attr nodes directly (seldom used) setattribute (dom 1) setattributens setattributenode setattributenodens getattribute (dom 1) getattributens getattributenode getattributenodens hasattribute (dom 2) hasattributens - - removeattribute (dom 1) removeattribu...
Event.bubbles - Web APIs
the bubbles
read-only property of the event interface indicates whether the event bubbles up through the dom or not.
...passes the event along if does not passiton(e); } // al
ready bubbling dooutput(e); } note: only certain events can bubble.
Event.initEvent() - Web APIs
once set, the
read-only property event.bubbles will give its value.
...once set, the
read-only property event.cancelable will give its value.
EventSource.close() - Web APIs
the close() method of the eventsource interface closes the connection, if one is made, and sets the eventsource.
readystate attribute to 2 (closed).
... note: if the connection is al
ready closed, the method does nothing.
FederatedCredential - Web APIs
federatedcredential.provider
read only returns a usvstring containing a credential's federated identity provider.
... federatedcredential.protocol
read only returns a domstring containing a credential's federated identity protocol.
File.lastModified - Web APIs
the file.lastmodified
read-only property provides the last modified date of the file as the number of milliseconds since the unix epoch (january 1, 1970 at midnight).
... example
reading from file input <input type="file" multiple id="fileinput"> const fileinput = document.queryselector('#fileinput'); fileinput.addeventlistener('change', (event) => { // files is a filelist object (similar to nodelist) const files = event.target.files; for (let file of files) { const date = new date(file.lastmodified); console.log(`${file.name} has a last modified date of ${date}`); } }); try the results out below: dynamically created files if a file is created dynamically, the last modified time can be supplied in the new file() constructor function.
FileList - Web APIs
for example, if the html includes the following file input: <input id="fileitem" type="file"> the following line of code fetches the first file in the node's file list as a file object: var file = document.getelementbyid('fileitem').files[0]; method overview file item(index); properties attribute type description length integer a
read-only value indicating the number of files in the list.
...upport yessamsung internet android full support yeslegend full support full support compatibility unknown compatibility unknown see also using files from web applications file file
reader ...
FileSystem - Web APIs
properties filesystem.name
read only a usvstring representing the file system's name.
... filesystem.root
read only a filesystemdirectoryentry object which represents the file system's root directory.
FileSystemDirectoryEntry - Web APIs
create
reader() creates a filesystemdirectory
reader object which can be used to
read the entries in this directory.
... 50opera android no support nosafari ios full support 11.3samsung internet android full support yesprefixed full support yesprefixed prefixed implemented with the vendor prefix: webkitcreate
reader experimentalchrome full support 13edge full support 79firefox full support 50ie no support noopera no support nosafari full support ...
FileSystemFlags.exclusive - Web APIs
the exclusive property on the filesystemflags dictionary is used in tandem with the create property to determine whether or not it's acceptable to require that the file not al
ready exist when the reference to it is created by calling filesystemdirectoryentry.getfile() or filesystemdirectoryentry.getdirectory().
... syntax filesystemflags.exclusive = booleanvalue values the table below describes the result of each possible combination of these flags depending on whether or not the target file or directory path al
ready exists.
FileSystemSync - Web APIs
attributes attribute type description name
readonly domstring name of the file system.
... root
readonly directoryentry the root directory of the file system.
FontFaceSet - Web APIs
properties fontfaceset.status
read only indicates the font-face's loading status.
... fontfaceset.
ready
read only promise which resolves once font loading and layout operations have completed.
FormData.append() - Web APIs
the append() method of the formdata interface appends a new value onto an existing key inside a formdata object, or adds the key if it does not al
ready exist.
... the difference between formdata.set and append() is that if the specified key al
ready exists, formdata.set will overwrite all existing values with the new one, whereas append() will append the new value onto the end of the existing set of values.
FormData.set() - Web APIs
the set() method of the formdata interface sets a new value for an existing key inside a formdata object, or adds the key/value if it does not al
ready exist.
... the difference between set() and formdata.append is that if the specified key does al
ready exist, set() will overwrite all existing values with the new one, whereas formdata.append will append the new value onto the end of the existing set of values.
FormData - Web APIs
methods formdata.append() appends a new value onto an existing key inside a formdata object, or adds the key if it does not al
ready exist.
... formdata.set() sets a new value for an existing key inside a formdata object, or adds the key/value if it does not al
ready exist.
GamepadButton - Web APIs
properties gamepadbutton.value
read only a double value used to represent the current state of analog buttons, such as the triggers on many modern gamepads.
... gamepadbutton.pressed
read only a boolean value indicating whether the button is currently pressed (true) or unpressed (false).
GamepadHapticActuator - Web APIs
properties gamepadhapticactuator.type
read only returns an enum representing the type of the haptic hardware.
... methods gamepadhapticactuator.pulse()
read only makes the hardware pulse at a certain intensity for a specified duration.
Using the Gamepad API - Web APIs
the gamepad api introduces new events on the window object for
reading gamepad and controller (hereby referred to as gamepad) state.
...if a gamepad is al
ready connected when the page loaded, the gamepadconnected event is dispatched to the focused page when the user presses a button or moves an axis.
GeolocationPosition - Web APIs
geolocationposition.coords
read only secure context returns a geolocationcoordinates object defining the current location.
... geolocationposition.timestamp
read only secure context returns a domtimestamp representing the time at which the location was retrieved.
GeolocationPositionError.message - Web APIs
the geolocationpositionerror.message
read-only property returns a human-
readable domstring describing the details of the error.
... syntax let msg = geolocationpositionerrorinstance.message value a human-
readable domstring describing the details of the error.
GeolocationPositionError - Web APIs
geolocationpositionerror.code
read only secure context returns an unsigned short representing the error code.
... geolocationpositionerror.message
read only secure context returns a human-
readable domstring describing the details of the error.
HTMLAnchorElement.relList - Web APIs
the htmlanchorelement.rellist
read-only property reflects the rel attribute.
... the property itself is
read-only, meaning you can't substitute the domtokenlist with another one, but its contents can still be changed.
HTMLAnchorElement - Web APIs
htmlhyperlinkelementutils.origin
read only returns a usvstring containing the origin of the url, that is its scheme, its domain and its port.
... htmlanchorelement.rellist
read only returns a domtokenlist that reflects the rel html attribute, as a list of tokens.
HTMLAreaElement.relList - Web APIs
the htmlareaelement.rellist
read-only property reflects the rel attribute.
... the property itself is
read-only, meaning you can't substitute the domtokenlist by another one, but the content of the returned list can be changed.
HTMLAreaElement - Web APIs
htmlhyperlinkelementutils.origin
read only returns a usvstring containing the origin of the url, that is its scheme, its domain and its port.
... htmlareaelement.rellist
read only returns a domtokenlist that reflects the rel html attribute, indicating relationships of the current document to the linked resource, as a list of tokens.
HTMLCanvasElement.getContext() - Web APIs
desynchronized: boolean that hints the user agent to reduce the latency by desynchronizing the canvas paint cycle from the event loop (gecko only) will
readfrequently: boolean that indicates whether or not a lot of
read-back operations are planned.
...this option is only available, if the flag gfx.canvas.will
readfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os).
HTMLElement.offsetHeight - Web APIs
the htmlelement.offsetheight
read-only property returns the height of an element, including vertical padding and borders, as an integer.
...the offsetheight property is
read-only.
HTMLElement.offsetWidth - Web APIs
the htmlelement.offsetwidth
read-only property returns the layout width of an element as an integer.
...the offsetwidth property is a
read-only.
HTMLImageElement.complete - Web APIs
the
read-only htmlimageelement interface's complete attribute is a boolean value which indicates whether or not the image has completely loaded.
... the image element has previously determined that the image is fully available and
ready for use.
HTMLImageElement.decode() - Web APIs
return value a promise which is resolved once the image data is
ready to be used.
...l use case for decode(): when loading very large images (for example, in an online photo album), you can present a low resolution thumbnail image initially and then replace that image with the full-resolution image by instantiating a new htmlimageelement, setting its source to the full-resolution image's url, then using decode() to get a promise which is resolved once the full-resolution image is
ready for use.
HTMLLabelElement - Web APIs
htmllabelelement.control
read only is a htmlelement representing the control with which the label is associated.
... htmllabelelement.form
read only is a htmlformelement object representing the form with which the labeled control is associated, or null if there is no associated control, or if that control isn't associated with a form.
HTMLLinkElement.relList - Web APIs
the htmllinkelement.rellist
read-only property reflects the rel attribute.
... the property itself is
read-only, meaning you can substitute the domtokenlist by another one, but the content of the returned list can be changed.
HTMLMediaElement: loadeddata event - Web APIs
the
readystate just increased to ' + 'have_current_data or greater for the first time.'); }); using the onloadeddata event handler property: const video = document.queryselector('video'); video.onloadeddata = (event) => { console.log('yay!
... the
readystate just increased to ' + 'have_current_data or greater for the first time.'); }; specifications specification status html living standardthe definition of 'loadeddata media event' in that specification.
HTMLProgressElement - Web APIs
htmlprogresselement.position
read only returns a double value returning the result of dividing the current value (value) by the maximum value (max); if the progress bar is an indeterminate progress bar, it returns -1.
... htmlprogresselement.labels
read only returns nodelist containing the list of <label> elements that are labels for this element.
HTMLTableElement.rows - Web APIs
the
read-only htmltableelement property rows returns a live htmlcollection of all the rows in the table, including the rows contained within any <thead>, <tfoot>, and <tbody> elements.
... although the property itself is
read-only, the returned object is live and allows the modification of its content.
HTMLTableElement.tBodies - Web APIs
the htmltableelement.tbodies
read-only property returns a live htmlcollection of the bodies in a <table>.
... although the property is
read-only, the returned object is live and allows the modification of its content.
HTMLTableElement - Web APIs
htmltableelement.rows
read only returns a live htmlcollection containing all the rows of the element, that is all <tr> that are a child of the element, or a child of one of its <thead>, <tbody> and <tfoot> children.
... htmltableelement.tbodies
read only returns a live htmlcollection containing all the <tbody> of the element.
Using microtasks in JavaScript with queueMicrotask() - Web APIs
this is a quick, simplified explanation, but if you would like more details, you can
read the information in the article in depth: microtasks and the javascript runtime environment.
...only tasks which were al
ready in the task queue when the event loop pass began will be executed during the current iteration.
Dragging and Dropping Multiple Items - Web APIs
you should add them in order starting with 0 as you cannot add items at positions farther than the last item, however you can replace existing items by using indices you have al
ready added.
...you may wish to do both in case another listener has al
ready cancelled the event.
HashChangeEvent - Web APIs
hashchangeevent.newurl
read only the new url to which the window is navigating.
... hashchangeevent.oldurl
read only the previous url from which the window was navigated.
History - Web APIs
length
read only returns an integer representing the number of elements in the session history, including the currently loaded page.
... state
read only returns an any value representing the state at the top of the history stack.
IDBCursor.continuePrimaryKey() - Web APIs
example here’s how you can resume an iteration of all articles tagged with "javascript" since your last visit: let request = articlestore.index("tag").opencursor(); let count = 0; let un
readlist = []; request.onsuccess = (event) => { let cursor = event.target.result; if (!cursor) { return; } let lastprimarykey = getlastiteratedarticleid(); if (lastprimarykey > cursor.primarykey) { cursor.continueprimarykey("javascript", lastprimarykey); return; } // update lastiteratedarticleid setlastiteratedarticleid(cursor.primarykey); // preload 5 artic...
...les into the un
read list; un
readlist.push(cursor.value); if (++count < 5) { cursor.continue(); } }; specifications specification status comment indexed database api draftthe definition of 'continueprimarykey()' in that specification.
IDBCursor.key - Web APIs
the key
read-only property of the idbcursor interface returns the key for the record at the cursor's position.
...for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.key); cursor.continue...
IDBCursor.primaryKey - Web APIs
the primarykey
read-only property of the idbcursor interface returns the cursor's current effective key.
...for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.primarykey); cursor.c...
IDBCursor.request - Web APIs
the request
read-only property of the idbcursor interface returns the idbrequest used to obtain the cursor.
...for example: function displaydata() { list.innerhtml = ''; var transaction = db.transaction(['rushalbumlist'], '
readonly'); var objectstore = transaction.objectstore('rushalbumlist'); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem...
IDBCursor.source - Web APIs
the source
read-only property of the idbcursor interface returns the idbobjectstore or idbindex that the cursor is iterating over.
...for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.source); cursor.conti...
IDBCursorWithValue.value - Web APIs
the value
read-only property of the idbcursorwithvalue interface returns the value of the current cursor, whatever that is.
...for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); console.log(cursor.value); cursor.contin...
IDBCursorWithValue - Web APIs
idbcursorwithvalue.value
read only returns the value of the current cursor.
...for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.
IDBDatabase: abort event - Web APIs
tes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('abort', () => { console.log('transaction aborted'); }); // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.r...
...createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.onabort = () => { console.log('transaction aborted'); }; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // abort the transaction transaction.abort(); }; ...
IDBFactorySync - Web APIs
blocks the calling th
read until the connection object is
ready to return.
... if there is al
ready a database with the specified name, it uses that one; otherwise, it creates the database using the specified name and description.
IDBIndex.count() - Web APIs
the count() method of the idbindex interface returns an idbrequest object, and in a separate th
read, returns the number of records within a key range.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); var countrequest = myindex.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); ...
IDBIndex.get() - Web APIs
the get() method of the idbindex interface returns an idbrequest object, and, in a separate th
read, finds either the value in the referenced object store that corresponds to the given key or the first corresponding value, if key is set to an idbkeyrange.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); var getrequest = myindex.get('bungle'); getrequest.onsuccess = function() { console.log(getrequest.result); } myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); ...
IDBIndex.getKey() - Web APIs
the getkey() method of the idbindex interface returns an idbrequest object, and, in a separate th
read, finds either the primary key that corresponds to the given key in this index or the first corresponding primary key, if key is set to an idbkeyrange.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); var getkeyrequest = myindex.getkey('bungle'); getkeyrequest.onsuccess = function() { console.log(getkeyrequest.result); } myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('...
IDBIndex.isAutoLocale - Web APIs
the isautolocale
read-only property of the idbindex interface returns a boolean indicating whether the index had a locale value of auto specified upon its creation (see createindex()'s optionalparameters.) syntax var myindex = objectstore.index('index'); console.log(myindex.isautolocale); value a boolean.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.isautolocale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' ...
IDBIndex.locale - Web APIs
the locale
read-only property of the idbindex interface returns the locale of the index (for example en-us, or pl) if it had a locale value specified upon its creation (see createindex()'s optionalparameters.) note that this property always returns the current locale being used in this index, in other words, it never returns "auto".
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.locale); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<...
IDBIndex.multiEntry - Web APIs
the multientry
read-only property of the idbindex interface returns a boolean value that affects how the index behaves when the result of evaluating the index's key path yields an array.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.multientry); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' ...
IDBIndex.name - Web APIs
constrainterror an index is al
ready using the specified name.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.name); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td...
IDBIndex.openCursor() - Web APIs
the opencursor() method of the idbindex interface returns an idbrequest object, and, in a separate th
read, creates a cursor over the specified key range.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</...
IDBIndex.openKeyCursor() - Web APIs
the openkeycursor() method of the idbindex interface returns an idbrequest object, and, in a separate th
read, creates a cursor over the specified key range, as arranged by this index.
... function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); myindex.openkeycursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.key + '</td>' + '<td>' + cursor.primarykey + '</td>...
IDBIndex.unique - Web APIs
the unique
read-only property returns a boolean that states whether the index allows duplicate keys.
...for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.unique); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<...
IDBKeyRange.lower - Web APIs
the lower
read-only property of the idbkeyrange interface returns the lower bound of the key range.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.lower); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.lowerOpen - Web APIs
the loweropen
read-only property of the idbkeyrange interface returns a boolean indicating whether the lower-bound value is included in the key range.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.loweropen); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.upper - Web APIs
the upper
read-only property of the idbkeyrange interface returns the upper bound of the key range.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upper); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.upperOpen - Web APIs
the upperopen
read-only property of the idbkeyrange interface returns a boolean indicating whether the upper-bound value is included in the key range.
... note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("f", "w", true, true); console.log(keyrangevalue.upperopen); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBObjectStore.count() - Web APIs
the count() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, returns the total number of records that match the provided key or idbkeyrange.
... var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); var countrequest = objectstore.count(); countrequest.onsuccess = function() { console.log(countrequest.result); } specification specification status comment indexed database api 2.0the definition of 'count()' in that specification.
IDBObjectStore.createIndex() - Web APIs
exceptions this method may raise a domexception of one of the following types: exception description constrainterror occurs if an index with the same name al
ready exists in the database.
... db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data al
ready in the idb displaydata(); }; // this handler fires when a new database is created and indicates // either that one has not been created before, or a new version // was submitted with window.indexeddb.open().
IDBObjectStore.openCursor() - Web APIs
the opencursor() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, returns a new idbcursorwithvalue object.
... example in this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "
readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.opencursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.value contains the current record being iterated through // this is where you'd do something with the result cursor.continue(); } else { // no more results } }; specification ...
IDBRequest.result - Web APIs
the result
read-only property of the idbrequest interface returns the result of the request.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "
readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another requ...
IDBRequest.source - Web APIs
the source
read-only property of the idbrequest interface returns the source of the request, such as an index or an object store.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "
readwrite").objectstore('todolist'); // get the to-do list object that has this title as its title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another reque...
IDBRequest.transaction - Web APIs
the transaction
read-only property of the idbrequest interface returns the transaction for the request, that is, the transaction the request is being made inside.
...for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "
readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another requ...
IDBTransaction: abort event - Web APIs
tstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // add a listener for `abort` transaction.addeventlistener('abort', () => { console.log('transaction was aborted'); }); // abort the transaction transaction.abort(); }; the same example, but assigning the event handler to the onabort property: // open the database co...
...tstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // add a listener for `abort` transaction.onabort = (event) => { console.log('transaction was aborted'); }; // abort the transaction transaction.abort(); }; ...
IDBTransaction: complete event - Web APIs
tstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // add a listener for `complete` transaction.addeventlistener('complete', event => { console.log('transaction was competed'); }); const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'ja...
...tstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); objectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = event => { const db = dbopenrequest.result; // open a
read/write db transaction,
ready for adding the data const transaction = db.transaction(['todolist'], '
readwrite'); // add a listener for `complete` transaction.oncomplete = event => { console.log('transaction was competed'); }; const objectstore = transaction.objectstore('todolist'); const newitem = { tasktitle: 'my task', hours: 10, minutes: 10, day: 10, month: 'january', year: 201...
IDBTransaction.error - Web APIs
example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IDBTransaction.onabort - Web APIs
}; example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IDBTransaction.onerror - Web APIs
}; example in the following code snippet, we open a
read/write transaction on our database and add some data to an object store.
... // this is used a lot below db = dbopenrequest.result; // run the adddata() function to add the data to the database adddata(); }; function adddata() { // create a new object
ready for being inserted into the idb var newitem = [ { tasktitle: "walk dog", hours: 19, minutes: 30, day: 24, month: "december", year: 2013, notified: "no" } ]; // open a
read/write db transaction,
ready for adding the data var transaction = db.transaction(["todolist"], "
readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.i...
IIRFilterNode.getFrequencyResponse() - Web APIs
examples in the following example we are using an iir filter on a media stream (for a complete full demo, see our stream-source-buffer demo live, or
read its source.) as part of this demo, we get the frequency responses for this iir filter, for five sample frequencies.
...our results, and grab a reference to it in our javascript: <p>iir filter frequency response for: </p> <ul class="freq-response-output"> </ul> var freqresponseoutput = document.queryselector('.freq-response-output'); finally, after creating our filter, we use getfrequencyresponse() to generate the response data and put it in our arrays, then loop through each data set and output them in a human-
readable list at the bottom of the page: var feedforwardcoefficients = [0.1, 0.2, 0.3, 0.4, 0.5]; var feedbackcoefficients = [0.5, 0.4, 0.3, 0.2, 0.1]; var iirfilter = audioctx.createiirfilter(feedforwardcoefficients, feedbackcoefficients); ...
ImageBitmap - Web APIs
properties imagebitmap.height
read only is an unsigned long representing the height, in css pixels, of the imagedata.
... imagebitmap.width
read only is an unsigned long representing the width, in css pixels, of the imagedata.
firesTouchEvents - Web APIs
the inputdevicecapabilities.firestouchevents
read-only property returns a boolean that indicates whether the device dispatches touch events.
... you can use this property to detect mouse events that represent an action that may al
ready have been handled by touch event handlers.
InstallEvent.activeWorker - Web APIs
the activeworker
read-only property of the installevent interface returns the serviceworker that is currently actively controlling the page.
... this will return null if no active worker is al
ready controlling the page.
IntersectionObserverEntry.boundingClientRect - Web APIs
the intersectionobserverentry interface's
read-only boundingclientrect property returns a domrect
readonly which in essence describes a rectangle describing the smallest rectangle that contains the entire target element.
... syntax var boundsrect = intersectionobserverentry.boundingclientrect; value a domrect
readonly which describes the smallest rectangle that contains every part of the target element whose intersection change is being described.
IntersectionObserverEntry.intersectionRect - Web APIs
the intersectionobserverentry interface's
read-only intersectionrect property is a domrect
readonly object which describes the smallest rectangle that contains the entire portion of the target element which is currently visible within the intersection root.
... syntax var intersectionrect = intersectionobserverentry.intersectionrect; value a domrect
readonly which describes the part of the target element that's currently visible within the root's intersection rectangle.
IntersectionObserverEntry.rootBounds - Web APIs
the intersectionobserverentry interface's
read-only rootbounds property is a domrect
readonly corresponding to the target's root intersection rectangle, offset by the intersectionobserver.rootmargin if one is specified.
... syntax var rootbounds = intersectionobserverentry.rootbounds; value a domrect
readonly which describes the root intersection rectangle.
LocalFileSystem - Web APIs
this means that your app cannot
read, or write the files of another app's files.
... root - the
read-only directoryentry object representing the root of the file system.
Lock - Web APIs
properties lock.mode
read only returns the access mode passed to lockmanager.request() when the lock was requested.
... lock.name
read only returns the name passed to lockmanager.request() when the lock was requested.
LockedFile.mode - Web APIs
summary the mode property provides the
read/write status of the lockedfile file.
... syntax var mode = instanceoflockedfile.mode value a string, one of
readonly or
readwrite.
Long Tasks API - Web APIs
tasks that block the main th
read for 50 ms or more cause, among other issues: delayed "time to interactive".
... long task any uninterrupted period where the main ui th
read is busy for 50 ms or longer.
MIDIInputMap - Web APIs
the midiinputmap
read-only interface of the web midi api provides a map-like interface to the currently available midi input ports.
... though it works generally like a map, because it is
read-only it does not contain clear(), delete(), or set() functions.
MIDIOutputMap - Web APIs
the midioutputmap
read-only interface of the web midi api provides a map-like interface to the currently available midi output ports.
... although it works like a map, because it is
read-only, it does not contain clear(), delete(), or set() functions.
MSGraphicsTrust - Web APIs
syntax var trustobject = media.msgraphicstruststatus; parameters constrictionactive a
read-only property which returns true when protected media is forced to play in a lower resolution.
... status a
read-only property which returns an enum with the driver status when playing protected content.
MSManipulationEvent.initMSManipulationEvent() - Web APIs
example interface msmanipulationevent extends uievent {
readonly currentstate: number;
readonly inertiadestinationx: number;
readonly inertiadestinationy: number;
readonly laststate: number; initmsmanipulationevent(typearg: string, canbubblearg: boolean, cancelablearg: boolean, viewarg: window, detailarg: number, laststate: number, currentstate: number): void;
readonly ms_manipulation_state_active: number;
readonly ms_manipulation_s...
...tate_cancelled: number;
readonly ms_manipulation_state_committed: number;
readonly ms_manipulation_state_dragging: number;
readonly ms_manipulation_state_inertia: number;
readonly ms_manipulation_state_preselect: number;
readonly ms_manipulation_state_selecting: number;
readonly ms_manipulation_state_stopped: number; } see also msmanipulationevent microsoft api extensions ...
Magnetometer.Magnetometer() - Web APIs
syntax var magnetometer = new magnetometer([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends on device hardware and consequently may be less than requested.
msExtendedCode - Web APIs
the element's error property will then contain an msextendedcode
read-only property with platform-specific error code information.
... msextendedcode is a
read-only proprietary property specific to internet explorer and microsoft edge.
MediaKeyMessageEvent - Web APIs
mediakeymessageevent.message
read only returns an arraybuffer with a message from the content decryption module.
... mediakeymessageevent.messagetype
read only indicates the type of message.
MediaQueryList - Web APIs
matches
read only a boolean that returns true if the document currently matches the media query list, or false if not.
... media
read only a domstring representing a serialized media query.
MediaQueryListEvent - Web APIs
mediaquerylistevent.matches
read only a boolean that returns true if the document currently matches the media query list, or false if not.
... mediaquerylistevent.media
read only a domstring representing a serialized media query.
MediaSource.duration - Web APIs
invalidstateerror mediasource.
readystate is not equal to open, or one or more of the sourcebuffer objects in mediasource.sourcebuffers are being updated (i.e.
... their sourcebuffer.updating property is true.) example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); mediasource.duration = 120; video.play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaSource.isTypeSupported() - Web APIs
ew the full demo live, or download the source for further investigation.) var asseturl = 'frag_bunny.mp4'; // need to be specific for blink regarding codecs // ./mp4info frag_bunny.mp4 | grep codec var mimecodec = 'video/mp4; codecs="avc1.42e01e, mp4a.40.2"'; if ('mediasource' in window && mediasource.istypesupported(mimecodec)) { var mediasource = new mediasource; //console.log(mediasource.
readystate); // closed video.src = url.createobjecturl(mediasource); mediasource.addeventlistener('sourceopen', sourceopen); } else { console.error('unsupported mime type or codec: ', mimecodec); } function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sou...
...rcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); video.play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; specifications specification status comment media source extensionsthe definition of 'istypesupported()' in that specification.
MediaSource.sourceBuffers - Web APIs
the sourcebuffers
read-only property of the mediasource interface returns a sourcebufferlist object containing the list of sourcebuffer objects associated with this mediasource.
... example the following snippet is based on a simple example written by nick desaulniers (view the full demo live, or download the source for further investigation.) function sourceopen (_) { //console.log(this.
readystate); // open var mediasource = this; var sourcebuffer = mediasource.addsourcebuffer(mimecodec); fetchab(asseturl, function (buf) { sourcebuffer.addeventlistener('updateend', function (_) { mediasource.endofstream(); console.log(mediasource.sourcebuffers); // will contain the source buffer that was added above video.play(); //console.log(mediasource.
readystate); // ended }); sourcebuffer.appendbuffer(buf); }); }; ...
MediaStream.ended - Web APIs
the ended
read-only property of the mediastream interface returns a boolean value which is true if the stream has been completely
read, or false if the end of the stream has not been reached.
... this property has been removed from the specification; you should instead rely on the ended event or check the value of mediastreamtrack.
readystate to see if its value is "ended" for the track or tracks you want to ensure have finished playing.
Capabilities, constraints, and settings - Web APIs
if it's clicked and there's not al
ready media in use, we call startvideo(), and let that function handle starting the stream with the specified settings in place.
... otherwise, we follow these steps to apply the updated constraints to the al
ready-active stream: buildconstraints() is called to construct updated mediatrackconstraints objects for the audio track (audioconstraints) and the video track (videoconstraints).
MerchantValidationEvent.methodName - Web APIs
the merchantvalidationevent property methodname is a
read-only value which returns a string indicating the payment method identifier which represents the payment handler that requires merchant validation.
... syntax methodid = merchantvalidationevent.methodname; value a
read-only domstring which uniquely identifies the payment handler which is requesting merchant validation.
MerchantValidationEvent.validationURL - Web APIs
the merchantvalidationevent property validationurl is a
read-only string value providing the url from which to fetch the payment handler-specific data needed to validate the merchant.
... syntax validationurl = merchantvalidationevent.validationurl; value a
read-only usvstring giving the url from which to load payment handler specific data needed to complete the merchant verification process.
MessageChannel - Web APIs
properties messagechannel.port1
read only returns port1 of the channel.
... messagechannel.port2
read only returns port2 of the channel.
Metadata - Web APIs
properties modificationtime
read only a date object indicating the date and time the entry was modified.
... size
read only a 64-bit unsigned integer indicating the size of the entry in bytes.
Microdata DOM API - Web APIs
nameditem(domstring name); // shadows inherited nameditem()
readonly attribute domstring[] names; }; typedef sequence<any> propertyvaluearray; interface propertynodelist : nodelist { propertyvaluearray getvalues(); }; collection .
... the names attribute must return a live
read only array object giving the property names of all the elements represented by the collection, listed in tree order, but with duplicates removed, leaving only the first occurrence of each name.
MouseEvent.which - Web APIs
the mouseevent.which
read-only property indicates which button was pressed on the mouse to trigger the event.
...in this case, the values are
read from right to left.
msGraphicsTrustStatus - Web APIs
msgraphicstruststatus is a
read-only property which returns an object containing information on protected video playback.
... msaudiodevicetype: string;
readonly msgraphicstruststatus: msgraphicstrust; ...
msPlayToPreferredSourceUri - Web APIs
msplaytopreferredsourceuri is a
read/write property which gets or sets the path to the preferred media source.
... example <video src="http://www.contoso.com/videos/video.mp4" msplaytopreferredsourceuri="http://www.contoso.com/catalogid=1234" /> var video = document.createelement('video'); document.body.appendchild(video); video.src = "http://www.contoso.com/videos/video.mp4"; video.msplaytopreferredsourceuri = "http://www.contoso.com/catalogid=1234"; see also microsoft play
ready content access and protection technology is a set of technologies that can be used to distribute audio/video content more securely over a network, and help prevent the unauthorized use of this content.
MutationObserver.observe() - Web APIs
there are some caveats to note: if you call observe() on a node that's al
ready being observed by the same mutationobserver, all existing observers are automatically removed from all targets being observed before the new observer is activated.
... if the same mutationobserver is not al
ready in use on the target, then the existing observers are left alone and the new one is added.
NDEFRecord() - Web APIs
the ndefrecord() constructor of the web nfc api returns a newly constructed ndefrecord object that represents data that can be
read from or written to compatible nfc devices, e.g.
... syntax writer = new ndefrecord(ndefrecordinit); parameters ndefrecordinit
read only ndefrecordinit with initialization data.
NDEFWriter - Web APIs
nfc tags supporting ndef, when these devices are within the
reader's magnetic induction field.
... specifications specification status comment web nfc, ndef
reader draft initial definition.
Web-based protocol handlers - Web APIs
registering the same protocol handler more than once will pop up a different notification, indicating that the protocol handler is al
ready registered.
... therefore, it is a good idea to guard your call to register the protocol handler with a check to see if it is al
ready registered, such as in the example below.
NavigatorLanguage - Web APIs
navigatorlanguage.language
read only returns a domstring representing the preferred language of the user, usually the language of the browser ui.
... navigatorlanguage.languages
read only returns an array of domstring representing the languages known to the user, by order of preference.
Node.baseURI - Web APIs
the baseuri
read-only property returns the absolute base url of a node.
...although this property is
read-only, its value may change in certain situations (see below).
Node.nodePrincipal - Web APIs
the node.nodeprincipal
read-only property returns the nsiprincipal object representing current security context of the node.
... notes this property is
read-only; attempting to write to it will throw an exception.
Node.parentNode - Web APIs
the node.parentnode
read-only property returns the parent of the specified node in the dom tree.
... example if (node.parentnode) { // remove a node from the tree, unless // it's not in the tree al
ready node.parentnode.removechild(node); } notes document and documentfragment nodes can never have a parent, so parentnode will always return null.
Node.textContent - Web APIs
in contrast, innertext only shows “human-
readable” elements.
... moreover, since innertext takes css styles into account,
reading the value of innertext triggers a reflow to ensure up-to-date computed styles.
NonDocumentTypeChildNode - Web APIs
nondocumenttypechildnode.previouselementsibling
read only returns the element immediately prior to this node in its parent's children list, or null if there is no element in the list prior to this node.
... nondocumenttypechildnode.nextelementsibling
read only returns the element immediately following this node in its parent's children list, or null if there is no element in the list following this node.
Notification.actions - Web APIs
the actions
read-only property of the notification interface returns the list of notificationaction objects set using the actions option when creating the notification using the notification() constructor.
... syntax var actions[] = notification.actions; value a
read-only array of notificationaction objects, each describing a single action the user can choose within a notification.
Notification.close() - Web APIs
the user al
ready
read the notification on the webpage in the case of a messaging app or the following song is al
ready playing in a music app).
...at the end of the function, it also calls close() inside a addeventlistener() function to remove the notification when the relevant content has been
read on the webpage.
Notifications API - Web APIs
firefox is al
ready doing this from version 72, for example.
... note: to find out more about using notifications in your own app,
read using the notifications api.
OffscreenCanvas.getContext() - Web APIs
(gecko only) will
readfrequently: boolean that indicates whether or not a lot of
read-back operations are planned.
...this option is only available, if the flag gfx.canvas.will
readfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os).
OffscreenCanvas - Web APIs
// commit rendering to the second canvas var bitmaptwo = offscreen.transfertoimagebitmap(); two.transferfromimagebitmap(bitmaptwo); asynchronous display of frames produced by an offscreencanvas another way to use the offscreencanvas api, is to call transfercontroltooffscreen() on a <canvas> element, either on a worker or the main th
read, which will return an offscreencanvas object from an htmlcanvaselement object from the main th
read.
... main.js (main th
read code): var htmlcanvas = document.getelementbyid("canvas"); var offscreen = htmlcanvas.transfercontroltooffscreen(); var worker = new worker("offscreencanvas.js"); worker.postmessage({canvas: offscreen}, [offscreen]); offscreencanvas.js (worker code): onmessage = function(evt) { var canvas = evt.data.canvas; var gl = canvas.getcontext("webgl"); // ...
OrientationSensor.populateMatrix() - Web APIs
the populatematrix method of the orientationsensor interface populates the given target matrix with the rotation matrix based on the latest sensor
reading.
... syntax orientationinstance.populatematrix(targetmatrix) because orientationsensor is a base class, populatematrix may only be
read from one of its derived classes.
OrientationSensor.quaternion - Web APIs
the quaternion
read-only property of the orientationsensor interface returns a four element array whose elements contain the components of the unit quaternion representing the device's orientation.
... syntax var quaternion = orientationinstance.quaternion because orientationsensor is a base class, quaternion may only be
read from one of its derived classes.
OscillatorNode - Web APIs
properties inherits properties from its parent, audioscheduledsourcenode, and adds the following properties: oscillatornode.frequency an a-rate audioparam representing the frequency of oscillation in hertz (though the audioparam returned is
read-only, the value it represents is not).
... oscillatornode.detune an a-rate audioparam representing detuning of oscillation in cents (though the audioparam returned is
read-only, the value it represents is not).
Page Visibility API - Web APIs
videoelement.addeventlistener("play", function(){ document.title = 'playing'; }, false); } properties added to the document interface the page visibility api adds the following properties to the document interface: document.hidden
read only returns true if the page is in a state considered to be hidden to the user, and false otherwise.
... document.visibilitystate
read only a domstring indicating the document's current visibility state.
PaymentMethodChangeEvent - Web APIs
methoddetails
read only secure context an object containing payment method-specific data useful when handling a payment method change.
... methodname
read only secure context a domstring containing the payment method identifier, a string which uniquely identifies a particular payment method.
Payment Request API - Web APIs
advantages of using the payment request api with "basic-card" (card-based payments): fast purchase experience: users enter their details once into the browser and are then
ready to pay for goods and services on the web.
... accessibility: as the browser controls the input elements of the payment sheet, it can assure consistent keyboard and screen
reader accessibility on every website without developers needing to do anything.
PerformanceNavigationTiming.domComplete - Web APIs
the domcomplete
read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document
readiness of the current document to complete.
... syntax perfentry.domcomplete; return value a timestamp representing a time value equal to the time immediately before the user agent sets the current document
readiness of the current document to complete.
PerformanceNavigationTiming.domInteractive - Web APIs
the dominteractive
read-only property returns a timestamp representing the time value equal to the time immediately before the user agent sets the current document
readiness of the current document to interactive.
... syntax perfentry.dominteractive; return value a timestamp representing the time value equal to the time immediately before the user agent sets the current document
readiness of the current document to interactive.
PerformanceTiming.loadEventEnd - Web APIs
please use the performancenavigationtiming interface's performancenavigationtiming.loadeventend
read-only property instead.
... the legacy performancetiming.loadeventend
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event handler terminated, that is when the load event is completed.
PerformanceTiming.loadEventStart - Web APIs
please use the performancenavigationtiming interface's performancenavigationtiming.loadeventstart
read-only property instead..
... the legacy performancetiming.loadeventstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the load event was sent for the current document.
PermissionStatus - Web APIs
properties permissionstatus.state
read only returns the state of a requested permission; one of 'granted', 'denied', or 'prompt'.
... permissionstatus.status
read only returns the state of a requested permission; one of 'granted', 'denied', or 'prompt'.
Permissions API - Web APIs
read more about how it works in our article using the permissions api.
... interfaces navigator.permissions and workernavigator.permissions
read only provides access to the permissions object from the main context and worker context respectively.
Pointer events - Web APIs
(all of the following properties are
read only .) pointerid a unique identifier for the pointer causing the event.
...depressing an additional button while another button on the pointer device is al
ready depressed.
ProgressEvent() - Web APIs
lengthcomputable optional is a boolean flag indicating if the total work to be done, and the amount of work al
ready done, by the underlying process is calculable.
... loaded optional is an unsigned long long representing the amount of work al
ready performed by the underlying process.
ProgressEvent.initProgressEvent() - Web APIs
lengthcomputable is a boolean flag indicating if the total work to be done, and the amount of work al
ready done, by the underlying process is calculable.
... loaded is an unsigned long long representing the amount of work al
ready performed by the underlying process.
PromiseRejectionEvent - Web APIs
promiserejectionevent.promise
read only the javascript promise that was rejected.
... promiserejectionevent.reason
read only a value or object indicating why the promise was rejected, as passed to promise.reject().
PublicKeyCredentialCreationOptions.excludeCredentials - Web APIs
excludecredentials, an optional property of the publickeycredentialcreationoptions dictionary, is an array whose elements are descriptors for the public keys al
ready existing for a given user.
... if the authenticator al
ready contains one of such a public key credential, the client will throw a domexception or asks the user if they want to create a new credential.
PublicKeyCredentialCreationOptions.user - Web APIs
syntax useraccount = publickeycredentialcreationoptions.user properties displayname a domstring which is human
readable and intended for display.
... name a domstring giving a human-
readable name for the user's identifier (e.g.
PublicKeyCredentialCreationOptions - Web APIs
this is provided by the relying party to avoid creating new public key credentials for an existing user who al
ready have some.
...authenticator's origin attestation attestation: "none", extensions: { uvm: true, exts: true }, // filter out authenticators which are bound to the device authenticatorselection:{ authenticatorattachment: "cross-platform", requireresidentkey: true, userverification: "preferred" }, // exclude al
ready existing credentials for the user excludecredentials: [ { type: "public-key", // the id for john.doe@example.com id : new uint8array(26) /* this actually is given by the server */ }, { type: "public-key", // the id for john-doe@example.com id : new uint8array(26) /* another id */ ...
PushManager.subscribe() - Web APIs
} navigator.serviceworker.register('serviceworker.js'); // use serviceworker.
ready to ensure that you can subscribe for push navigator.serviceworker.
ready.then( function(serviceworkerregistration) { var options = { uservisibleonly: true, applicationserverkey: applicationserverkey }; serviceworkerregistration.pushmanager.subscribe(options).then( function(pushsubscription) { console.log(pushsubscription.endpoint); // the push subsc...
...firefox is al
ready doing this from version 72, for example.
PushSubscription.endpoint - Web APIs
the endpoint
read-only property of the pushsubscription interface returns a usvstring containing the endpoint associated with the push subscription.
... example navigator.serviceworker.
ready.then(function(reg) { reg.pushmanager.subscribe({uservisibleonly: true}).then(function(subscription) { console.log(subscription.endpoint); // at this point you would most likely send the subscription // endpoint to your server, save it, then use it to send a // push message at a later date }) }) specifications specification status comment push...
PushSubscription.options - Web APIs
the options
read-only property of the pushsubscription interface is an object containing containing the options used to create the subscription.
... syntax var options = pushsubscription.options value an
read-only options object containing the following values: uservisibleonly: a boolean, indicating that the returned push subscription will only be used for messages whose effect is made visible to the user.
RTCDTMFSender - Web APIs
t="_top"><rect x="151" y="1" width="130" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="216" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">rtcdtmfsender</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties rtcdtmfsender.tonebuffer
read only a domstring which contains the list of dtmf tones currently in the queue to be transmitted (tones which have al
ready been played are no longer included in the string).
...calling insertdtmf() replaces any al
ready-pending tones from the tonebuffer.
RTCDataChannel.close() - Web APIs
the sequence of events which occurs in response to this method being called: rtcdatachannel.
readystate is set to "closing".
... the rtcdatachannel.
readystate property is set to "closed".
RTCPeerConnection.canTrickleIceCandidates - Web APIs
the
read-only rtcpeerconnection property cantrickleicecandidates returns a boolean which indicates whether or not the remote peer can accept trickled ice candidates.
... ice trickling is the process of continuing to send candidates after the initial offer or answer has al
ready been sent to the other peer.
RTCPeerConnection.connectionState - Web APIs
the
read-only connectionstate property of the rtcpeerconnection interface indicates the current state of the peer connection by returning one of the string values specified by the enum rtcpeerconnectionstate.
... this value was in the rtcsignalingstate enum (and therefore found by
reading the value of the signalingstate) property until the may 13, 2016 draft of the specification.
RTCPeerConnection.createAnswer() - Web APIs
the answer contains information about any media al
ready attached to the session, codecs and options supported by the browser, and any ice candidates al
ready gathered.
... exceptions not
readableerror the identity provider wasn't able to provide an identity assertion.
RTCPeerConnection.currentLocalDescription - Web APIs
the
read-only property rtcpeerconnection.currentlocaldescription returns an rtcsessiondescription object describing the local end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... also included is a list of any ice candidates that may al
ready have been generated by the ice agent since the offer or answer represented by the description was first instantiated.
RTCPeerConnection.currentRemoteDescription - Web APIs
the
read-only property rtcpeerconnection.currentremotedescription returns an rtcsessiondescription object describing the remote end of the connection as it was most recently successfully negotiated since the last time the rtcpeerconnection finished negotiating and connecting to a remote peer.
... also included is a list of any ice candidates that may al
ready have been generated by the ice agent since the offer or answer represented by the description was first instantiated.
RTCPeerConnection.peerIdentity - Web APIs
the
read-only rtcpeerconnection property peeridentity returns a javascript promise that resolves to an rtcidentityassertion which contains a domstring identifying the remote peer.
...if there isn't al
ready a target peer identity, peeridentity is set to a newly created promise and the process begins again, until the process succeeds or no further attempts to authenticate occur.
RTCPeerConnection.removeTrack() - Web APIs
if the track is al
ready stopped, or is not in the connection's senders list, this method has no effect.
... if the connection has al
ready been negotiated (signalingstate is set to "stable"), it is marked as needing to be negotiated again; the remote peer won't experience the change until this negotiation occurs.
RTCRtpReceiver - Web APIs
properties rtcrtpreceiver.track
read only returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
... rtcrtpreceiver.transport
read only returns the rtcdtlstransport instance over which the media for the receiver's track is received.
RTCSessionDescription - Web APIs
rtcsessiondescription.type
read only an enum of type rtcsdptype describing the session description's type.
... rtcsessiondescription.sdp
read only a domstring containing the sdp describing the session.
Range.commonAncestorContainer - Web APIs
the range.commonancestorcontainer
read-only property returns the deepest — or furthest down the document tree — node that contains both boundary points of the range.
... this property is
read-only.
Range.endOffset - Web APIs
the range.endoffset
read-only property returns a number representing where in the range.endcontainer the range ends.
...this property is
read-only.
RelativeOrientationSensor.RelativeOrientationSensor() - Web APIs
syntax var relativeorientationsensor = new relativeorientationsensor([options]) parameters options optional options are as follows: frequency: the desired number of times per second a sample should be taken, meaning the number of times per second that sensor.on
reading will be called.
...the actual
reading frequency depends device hardware and consequently may be less than requested.
Request.mode - Web APIs
the mode
read-only property of the request interface contains the mode of the request (e.g., cors, no-cors, same-origin, or navigate.) this is used to determine if cross-origin requests lead to valid responses, and which properties of the response are
readable.
...only a limited set of headers are exposed in the response, but the body is
readable.
ResizeObserverEntry.borderBoxSize - Web APIs
the borderboxsize
read-only property of the resizeobserverentry interface returns an array containing the new border box size of the observed element when the callback is run.
... note: for more explanation of writing modes and block and inline dimensions,
read handling different text directions.
ResizeObserverEntry.contentBoxSize - Web APIs
the contentboxsize
read-only property of the resizeobserverentry interface returns an array containing the new content box size of the observed element when the callback is run.
... note: for more explanation of writing modes and block and inline dimensions,
read handling different text directions.
ResizeObserverEntry.contentRect - Web APIs
the contentrect
read-only property of the resizeobserverentry interface returns a domrect
readonly object containing the new size of the observed element when the callback is run.
... syntax var contentrect = resizeobserverentry.contentrect; value a domrect
readonly object containing the new size of the element indicated by the target property.
SVGAnimatedAngle - Web APIs
interface overview also implement none methods none properties
readonly svgangle baseval
readonly svgangle animval normative document svg 1.1 (2nd edition) properties name type description baseval svgangle the base value of the given attribute before applying any animations.
... animval svgangle a
read only svgangle representing the current animated value of the given attribute.
SVGAnimatedLengthList - Web APIs
interface overview also implement none methods none properties
readonly svglengthlist baseval
readonly svglengthlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svglengthlist the base value of the given attribute before applying any animations.
... animval svglengthlist a
read only svglengthlist representing the current animated value of the given attribute.
SVGAnimatedNumberList - Web APIs
interface overview also implement none methods none properties
readonly svgnumberlist baseval
readonly svgnumberlist animval normative document svg 1.1 (2nd edition) properties svganimatednumberlist.baseval
read only is a svgnumberlist that represents the base value of the given attribute before applying any animations.
... svganimatednumberlist.animval
read only is a
read only svgnumberlist that represents the current animated value of the given attribute.
SVGAnimatedPreserveAspectRatio - Web APIs
interface overview also implement none methods none properties
readonly float baseval
readonly float animval normative document svg 1.1 (2nd edition) properties svganimatedpreserveaspectratio.baseval
read only is a svgpreserveaspectratio that represents the base value of the given attribute before applying any animations.
... svganimatedpreserveaspectratio.animval
read only is a svgpreserveaspectratio that represents the current animated value of the given attribute.
SVGAnimatedRect - Web APIs
interface overview also implement none methods none properties
readonly svgrect baseval
readonly svgrect animval normative document svg 1.1 (2nd edition) properties name type description baseval svgrect the base value of the given attribute before applying any animations.
... animval svgrect a
read only svgrect representing the current animated value of the given attribute.
SVGAnimatedTransformList - Web APIs
interface overview also implement none methods none properties
readonly svgtransformlist baseval
readonly svgtransformlist animval normative document svg 1.1 (2nd edition) properties name type description baseval svgtransformlist the base value of the given attribute before applying any animations.
... animval svgtransformlist a
read only svgtransformlist representing the current animated value of the given attribute.
SVGCursorElement - Web APIs
svgcursorelement.x
read only an svganimatedlength corresponding to the x attribute of the given <cursor> element.
... svgcursorelement.y
read only an svganimatedlength corresponding to the y attribute of the given <cursor> element.
SVGFEDistantLightElement - Web APIs
svgfedistantlightelement.azimuth
read only an svganimatednumber corresponding to the azimuth attribute of the given element.
... svgfedistantlightelement.elevation
read only an svganimatednumber corresponding to the elevation attribute of the given element.
SVGFEImageElement - Web APIs
svgfeimageelement.preserveaspectratio
read only an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given element.
... svgfeimageelement.crossorigin
read only an svganimatedstring reflects the crossorigin attribute of the given element, limited to only known values.
SVGImageElement.decode - Web APIs
the decode() method of the svgimageelement interface initiates asynchronous decoding of an image, returning a promise that resolves once the image data is
ready for use.
... return value a promise which resolves once the image data is
ready to be used, such as by appending it to the dom, replacing an existing image, and so forth.
SVGMarkerElement - Web APIs
exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is
read only.
... exceptions: a domexception with code no_modification_allowed_err is raised when the object itself is
read only.
SVGNumber - Web APIs
an svgnumber object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... note: if the svgnumber is
read-only, a domexception with the code no_modification_allowed_err is raised on an attempt to change the value.
SVGPreserveAspectRatio - Web APIs
an svgpreserveaspectratio object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... exceptions on setting: a domexception with code no_modification_allowed_err is raised on an attempt to change the value of an attribute on a
read only object.
SVGRect - Web APIs
an svgrect object can be designated as
read only, which means that attempts to modify the object will result in an exception being thrown.
... methods this interface also inherits properties from its parent, domrect
readonly.
SVGTextContentElement - Web APIs
svgtextcontentelement.textlength
read only an svganimatedlength reflecting the textlength attribute of the given element.
... svgtextcontentelement.lengthadjust
read only an svganimatedenumeration reflecting the lengthadjust attribute of the given element.
Screen.mozBrightness - Web APIs
you can
read and write this attribute even when the screen is disabled, but the backlight is off while the screen is disabled.
... if you write a value of x into this attribute, the attribute may not have the same value x when you later
read it.
ScreenOrientation - Web APIs
properties screenorientation.type
read only returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
... screenorientation.angle
read only returns the document's current orientation angle.
ScriptProcessorNode - Web APIs
scriptprocessornode.buffersize
read only returns an integer representing both the input and output buffer size.
... events listen to these events using addeventlistener() or by assigning an event listener to the oneventname property of this interface: audioprocess fired when an input buffer of a scriptprocessornode is
ready to be processed.
Sensor.activated - Web APIs
the activated
read-only property of the sensor interface returns a boolean indicating whether the sensor is active.
... syntax var boolean = sensorinstance.activated because sensor is a base class, activated may only be
read from one of its derived classes.
Sensor.timestamp - Web APIs
the timestamp
read-only property of the sensor interface returns the time stamp of the latest sensor
reading.
... syntax var timestamp = sensorinstance.timestamp because sensor is a base class, timestamp may only be
read from one of its derived classes.
ServiceWorkerContainer - Web APIs
properties serviceworkercontainer.controller
read only returns a serviceworker object if its state is activated (the same object returned by serviceworkerregistration.active).
... serviceworkercontainer.
ready
read only provides a way of delaying code execution until a service worker is active.
ServiceWorkerGlobalScope: notificationclick event - Web APIs
cancelable no interface notificationevent event handler onnotificationclick examples you can use the notificationclick event in an addeventlistener method: self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }); or use the onnotificationcli...
...ck event handler property: self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications specification status notifications apithe definition of 'onnotificationclick' in that specification.
ServiceWorkerGlobalScope.onnotificationclick - Web APIs
notifications created on the main th
read or in workers which aren't service workers using the notification() constructor will instead receive a click event on the notification object itself.
...}; example self.onnotificationclick = function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) return client.focus(); } if (clients.openwindow) return clients.openwindow('/'); })); }; specifications spec...
ServiceWorkerRegistration.index - Web APIs
the index
read-only property of the serviceworkerregistration interface returns a reference to the contentindex interface, which allows for indexing of offline content.
... here is an example from the main script: // reference registration const registration = await navigator.serviceworker.
ready; // feature detection if ('index' in registration) { // content index api functionality const contentindex = registration.index; } from the service worker: // service worker script const contentindex = self.registration.index; specifications specification status comment unknownthe definition of 'index' in that specification.
Service Worker API - Web APIs
a service worker is run in a worker context: it therefore has no dom access, and runs on a different th
read to the main javascript that powers your app, so it is non-blocking.
... for a complete tutorial to show how to build up your first basic example,
read using service workers.
SharedWorker - Web APIs
sharedworker.port
read only returns a messageport object used to communicate with and control the shared worker.
...the ports associated with that worker are accessible in the connect event's ports property — we then use messageport start() method to start the port, and the onmessage handler to deal with messages sent from the main th
reads.
SharedWorkerGlobalScope: connect event - Web APIs
bubbles no cancelable no interface messageevent event handler property sharedworkerglobalscope.onconnect examples this example shows a shared worker file — when a connection to the worker occurs from a main th
read via a messageport, the onconnect event handler fires.
... the connecting port can be referenced through the event object's ports parameter; this reference can have an onmessage handler attached to it to handle messages coming in through the port, and its postmessage() method can be used to send messages back to the main th
read using the worker.
SourceBuffer.abort() - Web APIs
exceptions exception explanation invalidstateerror the mediasource.
readystate property of the parent media source is not equal to open, or this sourcebuffer has been removed from the mediasource.
...in lines 92-101, the seek() function is defined — note that abort() is called if mediasource.
readystate is set to open, which means that it is
ready to receive new source buffers — at this point it is worth aborting the current segment and just getting the one for the new seek position (see checkbuffer() and getcurrentsegment().) specifications specification status comment media source extensionsthe definition of 'abort()' in that specification.
SourceBuffer.appendStream() - Web APIs
the appendstream() method of the sourcebuffer interface appends media segment data from a
readablestream object to the sourcebuffer.
... syntax sourcebuffer.appendstream(stream, maxsize); parameters stream the
readablestream that is the source of the media segment data you want to append to the sourcebuffer.
SpeechRecognitionAlternative - Web APIs
properties speechrecognitionalternative.transcript
read only returns a string containing the transcript of the recognised word.
... speechrecognitionalternative.confidence
read only returns a numeric estimate of how confident the speech recognition system is that the recognition is correct.
SpeechRecognitionError - Web APIs
speechrecognitionerror.error
read only returns the type of error raised.
... speechrecognitionerror.message
read only returns a message describing the error in more detail.
SpeechRecognitionErrorEvent - Web APIs
speechrecognitionerrorevent.error
read only returns the type of error raised.
... speechrecognitionerrorevent.message
read only returns a message describing the error in more detail.
SpeechRecognitionResult - Web APIs
properties speechrecognitionresult.isfinal
read only a boolean that states whether this result is final (true) or not (false) — if so, then this is the final time this result will be returned; if not, then this result is an interim result, and may be updated later on.
... speechrecognitionresult.length
read only returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) methods speechrecognitionresult.item a standard getter that allows speechrecognitionalternative objects within the result to be accessed via array syntax.
Storage - Web APIs
properties storage.length
read only returns an integer representing the number of data items stored in the storage object.
... storage.setitem() when passed a key name and value, will add that key to the storage, or update that key's value if it al
ready exists.
StylePropertyMap - Web APIs
" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="81" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">stylepropertymap</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, stylepropertymap
readonly.
... methods inherits methods from its parent, stylepropertymap
readonly.
SyncEvent - Web APIs
syncevent.tag
read only returns the developer-defined identifier for this syncevent.
... syncevent.lastchance
read only returns true if the user agent will not make further synchronization attempts after the current attempt.
Text.replaceWholeText() - Web APIs
a domexception with the value no_modification_err is thrown if one of the text nodes being replaced is
read only.
... the returned node is the current node unless the current node is
read only, in which case the returned node is a newly created text node of the same type which has been inserted at the location of the replacement.
TextEncoder - Web APIs
textencoder.prototype.encoding
read only always returns "utf-8".
...these sequences are not al
ready precomputed because they serve to aesthetically illustrate how the polyfill works.
TimeEvent - Web APIs
meevent" target="_top"><rect x="116" y="1" width="90" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="161" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">timeevent</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties timeevent.detail
read only is a long that specifies some detail information about the event, depending on the type of the event.
... timeevent.view
read only is a windowproxy that identifies the window from which the event was generated.
TypeInfo - Web APIs
properties typeinfo.typename
read only returns a domstring indicating the type's name.
... typeinfo.typenamespace
read only returns a domstring indicating the type's namespace within the schema.
UIEvent.initUIEvent() - Web APIs
once set, the
read-only property event.bubbles will give its value.
...once set, the
read-only property event.cancelable will give its value.
URL API - Web APIs
let addr = new url("/docs/web/api/url_api"); let host = addr.host; let path = addr.pathname; the snippet above creates a url object for the article you're
reading right now, then fetches the host and pathname properties.
... url api interfaces the url api is a simple one, with only a couple of interfaces to its name: url urlsearchparams older versions of the specification included an interface called urlutils
readonly, which has since been merged into the workerlocation interface.
USBInTransferResult - Web APIs
properties usbintransferresult.data
read only returns a dataview object containing the data received from the usb device, if any.
... usbintransferresult.status
read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferPacket - Web APIs
properties usbisochronousintransferpacket.data
read only
read only returns a dataview object containing the data received from the usb device in this packet, if any.
... usbisochronousintransferpacket.status
read only
read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferResult - Web APIs
properties usbisochronousintransferresult.data
read only returns a dataview object containing the data received from the device.
... usbisochronousintransferresult.packets
read only returns an array of usbisochronousintransferpacket objects containing the result of each request to receive a packet from the device.
USBIsochronousOutTransferPacket - Web APIs
properties usbisochronousouttransferpacket.byteswritten
read only returns the number of bytes from the packet that were sent to the device.
... usbisochronousouttransferpacket.status
read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBOutTransferResult - Web APIs
properties usbouttransferresult.byteswritten
read only returns the number of bytes from the transfer request that were sent to the device.
... usbouttransferresult.status
read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
VideoTrack.label - Web APIs
the
read-only videotrack property label returns a string specifying the video track's human-
readable label, if one is available; otherwise, it returns an empty string.
... syntax var videotracklabel = videotrack.label; value a domstring specifying the track's human-
readable label, if one is available in the track metadata.
VideoTrackList - Web APIs
length
read only the number of tracks in the list.
... selectedindex
read only the index of the currently selected track, if any, or −1 otherwise.
WakeLockSentinel.type - Web APIs
the
read-only type property of the wakelocksentinel interface returns a string representation of the currently acquired wakelocksentinel type.
... type
read only return values are: 'screen': a screen wake lock.
WebGL2RenderingContext.invalidateFramebuffer() - Web APIs
gl.
read_framebuffer: used as a source for
reading operations.
... examples gl.invalidateframebuffer(gl.
read_framebuffer, [gl.color_attachment0, gl.color_attachment1]); specifications specification status comment webgl 2.0the definition of 'invalidateframebuffer' in that specification.
WebGL2RenderingContext.invalidateSubFramebuffer() - Web APIs
gl.
read_framebuffer: used as a source for
reading operations.
... examples gl.invalidatesubframebuffer(gl.
read_framebuffer, [gl.color_attachment0, gl.color_attachment1], 0, 0, 256, 256); specifications specification status comment webgl 2.0the definition of 'invalidatesubframebuffer' in that specification.
WebGLRenderingContext.bindBuffer() - Web APIs
when using a webgl 2 context, the following values are available additionally: gl.copy_
read_buffer: buffer for copying from one buffer object to another.
... adds new target buffers: gl.copy_
read_buffer, gl.copy_write_buffer, gl.transform_feedback_buffer, gl.uniform_buffer, gl.pixel_pack_buffer, gl.pixel_unpack_buffer opengl es 3.0the definition of 'glbindbuffer' in that specification.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
bptc_unorm_ext ext.compressed_rgb_bptc_signed_float_ext ext.compressed_rgb_bptc_unsigned_float_ext when using the ext_texture_compression_rgtc extension: ext.compressed_red_rgtc1_ext ext.compressed_signed_red_rgtc1_ext ext.compressed_red_green_rgtc2_ext ext.compressed_signed_red_green_rgtc2_ext imagesize a glsizei specifying the number of bytes to
read from the buffer bound to gl.pixel_unpack_buffer.
... offset a glintptr specifying the offset in bytes from which to
read from the buffer bound to gl.pixel_unpack_buffer.
WebGLRenderingContext.pixelStorei() - Web APIs
glint 0 0 to infinity opengl es 3.0 gl.unpack_image_height image height used for
reading pixel data from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_pixels number of pixel images skipped before the first pixel is
read from memory glint 0 0 to infinity opengl es 3.0 gl.unpack_skip_rows number of rows of pixel locations skipped before the first pixel is
read from memory glint 0 0 to infinity opengl es 3.0 ...
... gl.unpack_skip_images number of pixel images skipped before the first pixel is
read from memory glint 0 0 to infinity opengl es 3.0 examples setting the pixel storage mode affects the webglrenderingcontext.
readpixels() operations, as well as unpacking of textures with the webglrenderingcontext.teximage2d() and webglrenderingcontext.texsubimage2d() methods.
WebGLRenderingContext.vertexAttribPointer() - Web APIs
usually, your 3d geometry is al
ready in a certain binary format, so you need to
read the specification of that specific format to figure out the memory layout.
...we can call gl.disablevertexattribarray() to tell webgl to use the default value, while calling gl.enablevertexattribarray() will
read the values from the array buffer as specified with gl.vertexattribpointer().
A basic 2D WebGL animation example - Web APIs
with the association in place between the vertex buffer for our shape and the avertexposition attribute used to deliver vertexes one by one into the vertex shader, we're
ready to draw the shape by calling drawarrays().
...that's done here by calling requestanimationframe(), which asks that a callback function be executed the next time the browser is
ready to update the screen.
Basic scissoring - Web APIs
we have al
ready seen how fragment color changes during graphics operations, by applying color masking.
... in other cases, the fragments may be discarded altogether (so the pixel value is not updated), or it may interact with the al
ready existing pixel value (such as when doing color blending for non-opaque elements in the scene).
WebGL by example - Web APIs
instead of trying to juggle shaders, geometry, and working with gpu memory, al
ready in the first program, the examples here explore webgl in an incremental way.
...you should
read all comments, because more advanced examples could not repeat comments about parts of the code that were previously explained.
Compressed texture formats - Web APIs
note that webgl makes no functionality available to compress or decompress textures: they must al
ready be in a compressed format and can then be directly uploaded to video memory.
... no examples async function getcompressedtextureifavailable(gl) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // create texture object on gpu const ext = gl.getextension('webgl_compressed_texture_s3tc'); // will be null if not supported if (ext) { // the file is al
ready in the correct compressed format const dataarraybuffer = await fetch('/textures/foobar512x512.rgba_s3tc_dxt1') .then(response => response.arraybuffer()); gl.compressedteximage2d(gl.texture_2d, 0, // set the base image level ext.compressed_rgba_s3tc_dxt1_ext, // the compressed format we are using 512, 512, // width, height of the image 0, // border, always 0 ...
Animating textures in WebGL - Web APIs
o can be copied to texture var copyvideo = false; function setupvideo(url) { const video = document.createelement('video'); var playing = false; var timeupdate = false; video.autoplay = true; video.muted = true; video.loop = true; // waiting for these 2 events ensures // there is data in the video video.addeventlistener('playing', function() { playing = true; check
ready(); }, true); video.addeventlistener('timeupdate', function() { timeupdate = true; check
ready(); }, true); video.src = url; video.play(); function check
ready() { if (playing && timeupdate) { copyvideo = true; } } return video; } first we create a video element.
...instead, all it does is create an empty texture object, put a single pixel in it, and set its filtering for later use: function inittexture(gl) { const texture = gl.createtexture(); gl.bindtexture(gl.texture_2d, texture); // because video has to be download over the internet // they might take a moment until it's
ready so // put a single pixel in the texture so we can // use it immediately.
Getting started with WebGL - Web APIs
it's assumed that you al
ready have an understanding of the mathematics involved in 3d graphics, and this article doesn't pretend to try to teach you 3d graphics concepts itself.
... at this point, you have enough code that the webgl context should successfully initialize, and you should wind up with a big black, empty box,
ready and waiting to receive content.
WebSocket.close() - Web APIs
if the connection is al
ready closed, this method does nothing.
... reason optional a human-
readable string explaining why the connection is closing.
Using bounded reference spaces - Web APIs
this property contains an array of dompoint
readonly objects, each of which defines one of the points making up the space's border, moving around the room in clockwise order.
...ton(event) { if (!xrsession) { navgator.xr.requestsession("immersive-vr"), { requiredfeatures: ["local-floor"], optionalfeatures: ["bounded-floor"] }).then((session) => { xrsession = session; startsessionanimation(); }); } } this function, called when the user clicks on a button to start the xr experience, works as usual, exiting at once if a session is al
ready in place, then requesting a new session using immersive-vr mode.
WebXR Device API - Web APIs
navigator.xr
read only this property, added to the navigator interface, returns the xrsystem object through which the webxr api is exposed.
... foundations and basics fundamentals of webxr before diving into the details of how to create content using webxr, it may be helpful to
read this overview of the technology, which includes introductions to terminology that may be unfamiliar to you, or which may be used in a new way.
Web Animations API - Web APIs
to get more information on the concepts behind the api and how to use it,
read using the web animations api.
... effecttiming element.animate(), keyframeeffect
readonly.keyframeeffect
readonly(), and keyframeeffect.keyframeeffect() all accept an optional dictionary object of timing properties.
Controlling multiple parameters with ConstantSourceNode - Web APIs
you could use a loop and change the value of each affected audioparam one at a time, but there are two drawbacks to doing it that way: first, that's extra code that, as you're about to see, you don't have to write; and second, that loop uses valuable cpu time on your th
read (likely the main th
read), and there's a way to offload all that work to the audio rendering th
read, which is optimized for this kind of work and may run at a more appropriate priority level than your code.
... function toggleplay(event) { if (playing) { playbutton.innerhtml = "▶️"; stoposcillators(); } else { playbutton.innerhtml = "⏸"; startoscillators(); } } if the playing variable indicates we're al
ready playing the oscillators, we change the playbutton's content to be the unicode character "right-pointing triangle" (▶️) and call stoposcillators() to shut down the oscillators.
Visualizations with Web Audio API - Web APIs
read those pages to get more information on how to use them.
...to create the oscilloscope visualisation (hat tip to soledad penadés for the original code in voice-change-o-matic), we first follow the standard pattern described in the previous section to set up the buffer: analyser.fftsize = 2048; var bufferlength = analyser.frequencybincount; var dataarray = new uint8array(bufferlength); next, we clear the canvas of what had been drawn on it before to get
ready for the new visualization display: canvasctx.clearrect(0, 0, width, height); we now define the draw() function: function draw() { in here, we use requestanimationframe() to keep looping the drawing function once it has been started: var drawvisual = requestanimationframe(draw); next, we grab the time domain data and copy it into our array analyser.getbytetimedomaindata(dataarray); next, ...
Web NFC API - Web APIs
interfaces ndefmessage interface that represents ndef messages that can be received from or sent to a compatible device or tag via ndef
reader and ndefwriter objects respectively.
... ndef
reader interface that enables
reading messages from compatible nfc devices or tags.
Web Speech API - Web APIs
grammar is defined using jspeech grammar format (jsgf.) speech synthesis is accessed via the speechsynthesis interface, a text-to-speech component that allows programs to
read out their text content (normally via the device's default speech synthesiser.) different voice types are represented by speechsynthesisvoice objects, and different parts of text that you want to be spoken are represented by speechsynthesisutterance objects.
...it contains the content the speech service should
read and information about how to
read it (e.g.
Functions and classes available to Web Workers - Web APIs
across the network.) 39 (39) (mostly in 34 (34) behind pref, although a few features are later.) no support 42 41 behind pref 10.1 file
reader this api allows asynchronous
read of blob and file objects.
... 46 (46) no support (yes) no support file
readersync this api allows synchronous
read of blob and file objects.
Window.crypto - Web APIs
the
read-only window.crypto property returns the crypto object associated to the global object.
...although the property itself is
read-only, all of its methods (and the methods of its child object, subtlecrypto) are not
read-only, and therefore vulnerable to attack by polyfill.
Window.getComputedStyle() - Web APIs
however, the two objects have different purposes: the object from getcomputedstyle is
read-only, and should be used to inspect the element's style — including those set by a <style> element or an external stylesheet.
...originally, css 2.0 defined the computed values as the "
ready to be used" final values of properties after cascading and inheritance, but css 2.1 redefined them as pre-layout, and used values as post-layout.
Window.innerHeight - Web APIs
the
read-only innerheight property of the window interface returns the interior height of the window in pixels, including the height of the horizontal scroll bar, if present.
...the property is
read only and has no default value.
Window.innerWidth - Web APIs
the
read-only window property innerwidth returns the interior width of the window in pixels.
...this property is
read-only, and has no default value.
Window: load event - Web APIs
fully loaded: window.addeventlistener('load', (event) => { console.log('page is fully loaded'); }); the same, but using the onload event handler property: window.onload = (event) => { console.log('page is fully loaded'); }; live example html <div class="controls"> <button id="reload" type="button">reload</button> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } #reload { height: 2rem; } js const ...
...log = document.queryselector('.event-log-contents'); const reload = document.queryselector('#reload'); reload.addeventlistener('click', () => { log.textcontent =''; window.settimeout(() => { window.location.reload(true); }, 200); }); window.addeventlistener('load', (event) => { log.textcontent = log.textcontent + 'load\n'; }); document.addeventlistener('
readystatechange', (event) => { log.textcontent = log.textcontent + `
readystate: ${document.
readystate}\n`; }); document.addeventlistener('domcontentloaded', (event) => { log.textcontent = log.textcontent + `domcontentloaded\n`; }); result specifications specification status comment ui eventsthe definition of 'load' in that specification.
Window.localStorage - Web APIs
the
read-only localstorage property allows you to access a storage object for the document's origin; the stored data is saved across browser sessions.
... localstorage.setitem('mycat', 'tom'); the syntax for
reading the localstorage item is as follows: const cat = localstorage.getitem('mycat'); the syntax for removing the localstorage item is as follows: localstorage.removeitem('mycat'); the syntax for removing all the localstorage items is as follows: localstorage.clear(); note: please refer to the using the web storage api article for a full example.
window.location - Web APIs
the window.location
read-only property returns a location object with information about the current location of the document.
... though window.location is a
read-only location object, you can also assign a domstring to it.
Window.scrollY - Web APIs
the
read-only scrolly property of the window interface returns the number of pixels that the document is currently scrolled vertically.
...} window.scrollbypages(1); notes use this property to check that the document hasn't al
ready been scrolled when using relative scroll functions such as scrollby(), scrollbylines(), or scrollbypages().
WindowClient.focused - Web APIs
the focused
read-only property of the windowclient interface is a boolean that indicates whether the current client has focus.
... example self.addeventlistener('notificationclick', function(event) { console.log('on notification click: ', event.notification.tag); event.notification.close(); // this looks to see if the current is al
ready open and // focuses if it is event.waituntil(clients.matchall({ type: "window" }).then(function(clientlist) { for (var i = 0; i < clientlist.length; i++) { var client = clientlist[i]; if (client.url == '/' && 'focus' in client) { if(!client.focused) return client.focus(); } } } if (clients.openwindow) return clients.openwindow('/'); })); }); specifications specification status comment service workersthe definition of...
WritableStream.getWriter() - Web APIs
const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
WritableStreamDefaultWriter.close() - Web APIs
const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
WritableStreamDefaultWriter.write() - Web APIs
const list = document.queryselector('ul'); function sendmessage(message, writablestream) { // defaultwriter is of type writablestreamdefaultwriter const defaultwriter = writablestream.getwriter(); const encoder = new textencoder(); const encoded = encoder.encode(message, { stream: true }); encoded.foreach((chunk) => { defaultwriter.
ready .then(() => { return defaultwriter.write(chunk); }) .then(() => { console.log("chunk written to sink."); }) .catch((err) => { console.log("chunk error:", err); }); }); // call
ready again to ensure that all chunks are written // before closing the writer.
... defaultwriter.
ready .then(() => { defaultwriter.close(); }) .then(() => { console.log("all chunks written"); }) .catch((err) => { console.log("stream error:", err); }); } const decoder = new textdecoder("utf-8"); const queuingstrategy = new countqueuingstrategy({ highwatermark: 1 }); let result = ""; const writablestream = new writablestream({ // implement the sink write(chunk) { return new promise((resolve, reject) => { var buffer = new arraybuffer(2); var view = new uint16array(buffer); view[0] = chunk; var decoded = decoder.decode(view, { stream: true }); var listitem = document.createelement('li'); listitem.textcontent = "chunk decoded: " + decoded; list.appendchild(listitem); result += de...
XMLHttpRequest.abort() - Web APIs
the xmlhttprequest.abort() method aborts the request if it has al
ready been sent.
... when a request is aborted, its
readystate is changed to xmlhttprequest.unsent (0) and the request's status code is set to 0.
XMLHttpRequest.getAllResponseHeaders() - Web APIs
example this example examines the headers in the request's
readystatechange event handler, xmlhttprequest.on
readystatechange.
... var request = new xmlhttprequest(); request.open("get", "foo.txt", true); request.send(); request.on
readystatechange = function() { if(this.
readystate == this.headers_received) { // get the raw header string var headers = request.getallresponseheaders(); // convert the header string into an array // of individual headers var arr = headers.trim().split(/[\r\n]+/); // create a map of header names to values var headermap = {}; arr.foreach(function (line) { var parts = line.split(': '); var header = parts.shift(); var value = parts.join(': '...
XMLHttpRequest.getResponseHeader() - Web APIs
example in this example, a request is created and sent, and a
readystatechange handler is established to look for the
readystate to indicate that the headers have been received; when that is the case, the value of the content-type header is fetched.
... var client = new xmlhttprequest(); client.open("get", "unicorns-are-teh-awesome.txt", true); client.send(); client.on
readystatechange = function() { if(this.
readystate == this.headers_received) { var contenttype = client.getresponseheader("content-type"); if (contenttype != my_expected_type) { client.abort(); } } } specifications specification status comment xmlhttprequestthe definition of 'getresponseheader()' in that specification.
XMLHttpRequest.open() - Web APIs
note: calling this method for an al
ready active request (one for which open() has al
ready been called) is the equivalent of calling abort().
... note: synchronous requests on the main th
read can be easily disruptive to the user experience and should be avoided; in fact, many browsers have deprecated synchronous xhr support on the main th
read entirely.
XMLHttpRequest.responseXML - Web APIs
the xmlhttprequest.responsexml
read-only property returns a document containing the html or xml retrieved by the request; or null if the request was unsuccessful, has not yet been sent, or if the data can't be parsed as xml or html.
... example var xhr = new xmlhttprequest; xhr.open('get', '/server'); // if specified, responsetype must be empty string or "document" xhr.responsetype = 'document'; // force the response to be parsed as xml xhr.overridemimetype('text/xml'); xhr.onload = function () { if (xhr.
readystate === xhr.done && xhr.status === 200) { console.log(xhr.response, xhr.responsexml); } }; xhr.send(); specifications specification status comment xmlhttprequestthe definition of 'responsexml' in that specification.
XMLHttpRequest.sendAsBinary() - Web APIs
this method makes it possible to
read and upload any type of file and to stringify the raw data.
...you can create the binary string using the file
reader method
readasbinarystring().
XMLHttpRequest.statusText - Web APIs
the
read-only xmlhttprequest.statustext property returns a domstring containing the response's status message as returned by the http server.
...if the request's
readystate is in unsent or opened state, the value of statustext will be an empty string.
XRBoundedReferenceSpace.boundsGeometry - Web APIs
the
read-only xrboundedreferencespace property boundsgeometry is an array of dompoint
readonly objects which specifies the points making up a polygon inside which the viewer is allowed to move.
... syntax bounds = xrreferencespace.boundsgeometry; value the boundsgeometry property is an array of dompoint
readonly objects, each of which defines one vertex in a polygon inside which the viewer is required to remain.
XRInputSourceEvent - Web APIs
properties frame
read only an xrframe object providing the needed information about the event frame during which the event occurred.
... inputsource
read only an xrinputsource object indicating which input source generated the input event.
XRPose - Web APIs
properties xrpose.transform
read only a xrrigidtransform which provides the position and orientation of the pose relative to the base xrspace.
... xrpose.emulatedposition
read only a boolean value which is false if the position and orientation given by transform is obtained directly from a full six degree of freedom (6dof) xr device (that is, a device which tracks not only the pitch, yaw, and roll of the head but also the forward, backward, and side-to-side motion of the viewer).
XRReferenceSpaceEvent - Web APIs
properties in addition to inheriting the properties available on the parent interface, event, xrreferencespaceevent objects include the following properties: referencespace
read only an xrreferencespace indicating the reference space that generated the event.
... transform
read only an xrrigidtransform object indicating the position and orientation of the specified referencespace's native origin after the event, defined relative to the coordinate system before the event.
XRRenderState.baseLayer - Web APIs
the
read-only baselayer property of the xrrenderstate interface returns the xrwebgllayer instance that is the source of bitmap images and a description of how the image is to be rendered in the device.
... this property is
read-only; however, you can indirectly change its value using xrsession.updaterenderstate.
XRRigidTransform() - Web APIs
the specified orientation gets normalized if it's not al
ready.
...the drawframe() callback will be executed when the system is
ready to draw the next frame.
XRRigidTransform.orientation - Web APIs
the
read-only xrrigidtransform property orientation is a dompoint
readonly containing a normalized quaternion (also called a unit quaternion or versor) specifying the rotational component of the transform represented by the object.
... syntax let orientation = xrrigidtransform.orientation; value a dompoint
readonly object which contains a unit quaternion providing the orientation component of the transform.
XRRigidTransform.position - Web APIs
the
read-only xrrigidtransform property position is a dompoint
readonly object which provides the 3d point, specified in meters, describing the translation component of the transform.
... syntax let pos = xrrigidtransform.position; value a
read-only dompoint
readonly indicating the 3d position component of the transform matrix.
XRSession.renderState - Web APIs
the
read-only renderstate property of an xrsession object indicates the returns a xrrenderstate object describing how the user's environment which should be rendered.
... while this property is
read only, you can call the xrsession method updaterenderstate() to make changes.
XRWebGLLayer.antialias - Web APIs
the
read-only xrwebgllayer property antialias is a boolean value which is true if the rendering layer's frame buffer supports antialiasing.
... usage notes since this is a
read-only property, you can set the antialiasing mode only when initially creating the xrwebgllayer, by specifying the antialias object in the xrwebgllayer() constructor's layerinit parameter.
XRWebGLLayer.framebuffer - Web APIs
the
read-only xrwebgllayer property framebuffer is an opaque webglframebuffer which is used to buffer the rendered image if the xr compositor is being used.
...attempting to clear, draw to, or
read from the framebuffer results in a webgl invalid_framebuffer_operation error (0x0506).
XRWebGLLayer.ignoreDepthValues - Web APIs
the
read-only xrwebgllayer property ignoredepthvalues is a boolean value which is true if the session has been configured to ignore the values in the depth buffer while rendering the scene.
...as a parameter you're likely to set yourself, it is unlikely you'll need to
read it later, but it's available if the need arises.
Using the alertdialog role - Accessibility
when the alert dialog appears, screen
readers should announce the alert.
... when the alert dialog is correctly labeled and focus is moved to a control inside the dialog, screen
readers should announce the dialog's accessible role, name and optionally description before announcing the focused element.
Using the aria-hidden attribute - Accessibility
would not be
read aloud by a screen
reader).
...</p> accessibility concerns best practices aria-hidden="true" should not be added when: the html hidden attribute is present the element or the element's ancestor is hidden with display: none the element or the element's ancestor is hidden with visibility: hidden in all three scenarios, the attribute is unnecessary to add because the element has al
ready been removed from the accessibility tree.
Using the aria-labelledby attribute - Accessibility
assistive technology, such as screen
readers, use this attribute to catalog the objects in a document so that users can navigate between them.
... <div role="main" aria-labelledby="foo"> <h1 id="foo">wild fires sp
read across the san diego hills</h1> strong winds expand fires ignited by high temperatures ...
Using the link role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen
readers should announce the text of the link or its label when it is focused, along with the fact that it is a link.
... aria links should be included in the screen
reader's “list links” function just like ordinary links, and actions in this dialogue list, such as “activate link” or “move to link”, should perform the same as they do with ordinary links.
Using the status role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen
readers may provide a special key to announce the current status, and this should present the contents of any status live region.
... <p role="status">your changes were automatically saved.</p> working examples: notes aria attributes used status related aria techniques alert role live region roles live region attributes compatibility the paciello group published some data on compatibility via their 2014 blog post: screen
reader support for aria live regions tbd: add updated support information for common ua and at product combinations additional resources previous recommendations from wai-aria 1.0 (2014) for the status role ...
x-ms-aria-flowfrom - Accessibility
the x-ms-aria-flowfrom property specifies the id of the previous element in an alternative
reading order, allowing assistive technology to override the general default of
reading in document source order.
... syntax x-ms-aria-flowfrom="elementid"; value the x-ms-aria-flowfrom property value uses an id selector to define which previous element the
reading order will flow from.
Using ARIA: Roles, states, and properties - Accessibility
authors must assign an aria role and the appropriate states and properties to an element during its life-cycle, unless the element al
ready has appropriate aria semantics (via use of an appropriate html element).
...roles alert log marquee status timer window roles alertdialog dialog states and properties widget attributes aria-autocomplete aria-checked aria-current aria-disabled aria-errormessage aria-expanded aria-haspopup aria-hidden aria-invalid aria-label aria-level aria-modal aria-multiline aria-multiselectable aria-orientation aria-placeholder aria-pressed aria-
readonly aria-required aria-selected aria-sort aria-valuemax aria-valuemin aria-valuenow aria-valuetext live region attributes aria-live aria-relevant aria-atomic aria-busy drag & drop attributes aria-dropeffect aria-dragged relationship attributes aria-activedescendant aria-colcount aria-colindex aria-colspan aria-controls aria-describedby aria-details aria-erro...
ARIA: figure role - Accessibility
the aria figure role can be used to identify a figure inside page content where appropriate semantics do not al
ready exist.
... recommendation screen
reader support tbd ...
ARIA: gridcell role - Accessibility
interactive grids and treegrids editable cells both td elements and elements with a role of gridcell applied to them can be made editable, mimicking functionality similar to editing a sp
readsheet.
...if a gridcell is conditionally toggled into a state where editing is prohibited, toggle aria-
readonly on the gridcell element.
ARIA: row role - Accessibility
aria-rowindex attribute the aria-rowindex attribute is only needed if rows are hidden from the dom, to indicate which row, in the list of total rows, is being
read.
... the first rule of aria use is you can use a native feature with the semantics and behavior you require al
ready built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: tab role - Accessibility
working draft precedence order what are the related properties, and in what order will this attribute or property be
read (which property will take precendence over this one, and which property will be overwritten.
... screen
reader support tbd ...
ARIA: checkbox role - Accessibility
this attribute has one of three possible values: true the checkbox is checked false the checkbox is not checked mixed the checkbox is partially checked, or indeterminate tabindex="0" used to make it focusable so the assistive technology user can tab to it and start
reading right away.
... assistive technology products should do the following: screen
readers should announce the element as a checkbox, and optionally provide instructions on how to activate it.
An overview of accessible web applications and widgets - Accessibility
users might recognize it visually, but there are no machine-
readable semantics for an assistive technology.
...a developer might be tempted to implement the "view" mode using a
read-only text <input> element and setting its aria role to button, then switching to "edit" mode by making the element writable and removing the role attribute in "edit" mode (since <input> elements have their own role semantics).
Keyboard-navigable JavaScript widgets - Accessibility
non-native controls native html elements that are interactive, like <a>, <input> and <select>, are al
ready accessible by keyboards, so to use one of them is the fastest path to make components work with keyboards.
... use onfocus to track the current focus don't assume that all focus changes will come via key and mouse events: assistive technologies such as screen
readers can set the focus to any focusable element.
:visited - CSS: Cascading Style Sheets
the :visited css pseudo-class represents links that the user has al
ready visited.
... html <a href="#test-visited-link">have you visited this link yet?</a><br> <a href="">you've al
ready visited this link.</a> css a { /* specify non-transparent defaults to certain properties, allowing them to be styled with the :visited state */ background-color: white; border: 1px solid white; } a:visited { background-color: yellow; border-color: hotpink; color: hotpink; } result specifications specification status comment html living standar...
@counter-style - CSS: Cascading Style Sheets
speak-as describes how to
read out the counter style in speech synthesizers, such as screen
readers.
... for example, the value of the marker symbol can be
read out as numbers or alphabets for ordered lists or as audio cues for unordered lists, based on the value of this descriptor.
light-level - CSS: Cascading Style Sheets
syntax dim the device is used in a dim environment, where excessive contrast and brightness would be distracting or uncomfortable to the
reader.
... washed the device is used in an exceptionally bright environment, causing the screen to be washed out and difficult to
read.
prefers-reduced-motion - CSS: Cascading Style Sheets
important: an embedded example at the bottom of this page has a scaling movement that may be problematic for some
readers.
...
readers with vestibular motion disorders may wish to enable the reduce motion feature on their device before viewing the animation.
Detecting CSS animation support - CSS: Cascading Style Sheets
the first thing to do is look to see if there's al
ready a style sheet on the document; if so, we simply insert the keyframe description into that stylesheet; this is done in lines 13-15.
... if there isn't al
ready a style sheet, a new <style> element is created, and its content is set to the value of keyframes.
Border-image generator - CSS: Cascading Style Sheets
height', e.clienty - valuey); }; var init = function init() { makedraggable(preview); makedraggable(subject); var handle = document.createelement('div'); handle.classname = 'resize-handle'; handle.addeventlistener('mousedown', dragstart); document.addeventlistener('mouseup', dragend); preview.appendchild(handle); }; return { init: init }; }(); var image
reader = (function image
reader() { var f
reader = new file
reader(); var browse = document.createelement('input'); var loadimage = function loadimage(e) { if (browse.files.length === 0) return; var file = browse.files[0]; if (file.type.slice(0, 5) !== 'image') return; f
reader.
readasdataurl(file); return false; }; f
reader.onload = function(e) { imagecontrol.load...
...lery = getelembyid('image-gallery'); var browse = getelembyid('load-image'); var remote = getelembyid('remote-url'); var load_remote = getelembyid('load-remote'); remote.addeventlistener('change', function(){ loadremoteimage(this.value); }); load_remote.addeventlistener('click', function(){ loadremoteimage(remote.value); }); browse.addeventlistener('click', image
reader.load); gallery.addeventlistener('click', pickimage); imgsource.addeventlistener('load', update); inputslidermanager.subscribe('scale', setscale); inputslidermanager.setvalue('scale', scale); imgstate = 'border1'; loadremoteimage('https://udn.realityripple.com/samples/2c/fa0192d18e.png'); togglegallery(); }; return { init: init, getscale : getscale, loadremote...
Handling Overflow in Multicol - CSS: Cascading Style Sheets
in a future version of the specification it would be useful to be able to have overflow columns in continuous media display in the block direction, therefore allowing the
reader to scroll down to view the next set of columns.
... using vertical media queries one issue with multicol on the web is that, if your columns are taller than the viewport, the
reader will need to scroll up and down to
read, which is not good user experience.
Basic concepts of flexbox - CSS: Cascading Style Sheets
you can
read more about the relationship between flexbox and the writing modes specification in a later article; however, the following description should help explain why we do not talk about left and right and top and bottom when we describe the direction that our flex items flow in.
... next steps after
reading this article you should have an understanding of the basic features of flexbox.
Typical use cases of Flexbox - CSS: Cascading Style Sheets
you can
read more about the difference between flexbox and css grid layout in relationship of flexbox to other layout methods, where we discuss how flexbox fits into the overall picture of css layout.
...you can
read more about this property in aligning items in a flex container, which deals with aligning items on the main axis.
Flow Layout and Overflow - CSS: Cascading Style Sheets
as we have al
ready learned, using any of these values, other than the default of visible, will create a new block formatting context.
...it may not be obvious to the
reader that there is more content to click through to when clicking the box or the title.
Variable fonts guide - CSS: Cascading Style Sheets
this allows for common typographic techniques such as setting different size headings in different weights for better
readability at each size, or using a slightly narrower width for data-dense displays.
...if the size was very small (such as an equivalent to 10 or 12px), the characters would have an overall thicker stroke, and perhaps other small modifications to ensure that it would reproduce and be
readable at a physically smaller size.
Using the :target pseudo-class in selectors - CSS: Cascading Style Sheets
<h4 id="one">...</h4> <p id="two">...</p> <div id="three">...</div> <a id="four">...</a> <em id="five">...</em> <a href="#one">first</a> <a href="#two">second</a> <a href="#three">third</a> <a href="#four">fourth</a> <a href="#five">fifth</a> conclusion in cases where a fragment identifier points to a portion of the document,
readers may become confused about which part of the document they're supposed to be
reading.
... by styling the target of a uri,
reader confusion can be reduced or eliminated.
Column layouts - CSS: Cascading Style Sheets
requirements there are a number of design patterns you might want to achieve with your columns: a continuous th
read of content broken up into newspaper-style columns.
... a continuous th
read of content — multi-column layout if you create columns using multi-column layout your text will remain as a continuous stream filling each column in turn.
Using media queries - CSS: Cascading Style Sheets
although websites are commonly designed with screens in mind, you may want to create styles that target special devices such as printers or audio-based screen
readers.
... in the previous example, we've al
ready seen the and operator used to group a media type with a media feature.
Pseudo-classes - CSS: Cascading Style Sheets
cus :focus-visible :focus-within :has() :host :host() :host-context() :hover :indeterminate :in-range :invalid :is() :lang() :last-child :last-of-type :left :link :local-link :not() :nth-child() :nth-col() :nth-last-child() :nth-last-col() :nth-last-of-type() :nth-of-type() :only-child :only-of-type :optional :out-of-range :past :placeholder-shown :
read-only :
read-write :required :right :root :scope :state() :target :target-within :user-invalid :valid :visited :where() specifications specification status comment fullscreen api living standard defined :fullscreen.
... css basic user interface module level 3 recommendation defined :default, :valid, :invalid, :in-range, :out-of-range, :required, :optional, :
read-only and :
read-write, but without the associated semantic meaning.
break-after - CSS: Cascading Style Sheets
(a recto page is a right page in a left-to-right sp
read or a left page in a right-to-left sp
read.) verso forces one or two page breaks right after the principal box, whichever will make the next page into a verso page.
... (a verso page is a left page in a left-to-right sp
read or a left right in a right-to-left sp
read.) column break values avoid-column avoids any column break right after the principal box.
break-before - CSS: Cascading Style Sheets
(a recto page is a right page in a left-to-right sp
read or a left page in a right-to-left sp
read.) verso forces one or two page breaks right before the principal box, whichever will make the next page into a verso page.
... (a verso page is a left page in a left-to-right sp
read or a left right in a right-to-left sp
read.) column break values avoid-column avoids any column break right before the principal box.
<color> - CSS: Cascading Style Sheets
by definition, red=0deg=360deg, with the other colors sp
read around the circle, so green=120deg, blue=240deg, etc.
... note that these keywords are case insensitive, but are listed here with mixed case for
readability.
<display-box> - CSS: Cascading Style Sheets
due to a bug in browsers this will currently remove the element from the accessibility tree — screen
readers will not look at what's inside.
...this will cause the element — and in some browser versions, its descendant elements — to no longer be announced by screen
reading technology.
<easing-function> - CSS: Cascading Style Sheets
syntax steps(number_of_steps, direction) where: number_of_steps is a strictly positive <integer>, representing the amount of equidistant t
reads composing the stepping function.
...*/ cubic-bezier(-1.9, 0.3, -0.2, 2.1) steps() function examples these easing functions are valid: /* there is 5 t
reads, the last one happens right before the end of the animation.
flex-direction - CSS: Cascading Style Sheets
this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen
reader.
... if the visual (css) order is important, then screen
reader users will not have access to the correct
reading order.
font-kerning - CSS: Cascading Style Sheets
in well-kerned fonts, this feature makes character spacing more uniform and pleasant to
read than it would otherwise be.
...for example, some browsers will disable kerning on small fonts, since applying it could harm the
readability of text.
font-weight - CSS: Cascading Style Sheets
t"]'); let weightinput = document.queryselector('#weight'); let sampletext = document.queryselector('.sample'); function update() { weightlabel.textcontent = `font-weight: ${weightinput.value};`; sampletext.style.fontweight = weightinput.value; } weightinput.addeventlistener('input', update); update(); accessibility concerns people experiencing low vision conditions may have difficulty
reading text set with a font-weight value of 100 (thin/hairline) or 200 (extra light), especially if the font has a low contrast color ratio.
...d | <number <a href="/docs/css/value_definition_syntax#brackets" title="brackets: enclose several entities, combinators, and multipliers to transform them as a single component">[1,1000]> examples setting font weights html <p> alice was beginning to get very tired of sitting by her sister on the bank, and of having nothing to do: once or twice she had peeped into the book her sister was
reading, but it had no pictures or conversations in it, "and what is the use of a book," thought alice "without pictures or conversations?" </p> <div>i'm heavy<br/> <span>i'm lighter</span> </div> css /* set paragraph text to be bold.
grid-template - CSS: Cascading Style Sheets
]+ [ / <explicit-track-list> ]?where <line-names> = '[' <custom-ident>* ']'<track-size> = <track-b
readth> | minmax( <inflexible-b
readth> , <track-b
readth> ) | fit-content( [ <length> | <percentage> ] )<explicit-track-list> = [ <line-names>?
... <track-size> ]+ <line-names>?where <track-b
readth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-b
readth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples defining a grid template css #page { display: grid; width: 100%; height: 200px; grid-template: [header-left] "head head" 30px [header-right] [main-left] "nav main" 1fr [main-right] [footer-left] "nav foot" 30px [footer-right] / 120px 1fr; } header { background-color: lime; grid-area: head; } nav { background-color: lightblue; grid-area: nav; } main { background-color: yellow; grid-area: main; } footer { background-color: red; grid-area: foot; } html <...
letter-spacing - CSS: Cascading Style Sheets
positive values of letter-spacing causes characters to sp
read farther apart, while negative values of letter-spacing bring characters closer together.
... accessibility concerns a large positive or negative letter-spacing value will make the word(s) the styling is applied to un
readable.
max() - CSS: Cascading Style Sheets
accessibility concerns when max() is used for controlling text size, make sure the text is always large enough to
read.
... a suggestion is to use the min() function nested within a max() that has as its second value a relative length unit that is always large enough to
read.
minmax() - CSS: Cascading Style Sheets
syntax /* <inflexible-b
readth>, <track-b
readth> values */ minmax(200px, 1fr) minmax(400px, 50%) minmax(30%, 300px) minmax(100px, max-content) minmax(min-content, 400px) minmax(max-content, auto) minmax(auto, 300px) minmax(min-content, auto) /* <fixed-b
readth>, <track-b
readth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-...
...b
readth>, <fixed-b
readth> values */ minmax(400px, 50%) minmax(30%, 300px) minmax(min-content, 200px) minmax(max-content, 200px) minmax(auto, 300px) a function taking two parameters, min and max.
order - CSS: Cascading Style Sheets
this will adversely affect users experiencing low vision navigating with the aid of assistive technology such as a screen
reader.
... if the visual (css) order is important, then screen
reader users will not have access to the correct
reading order.
CSS: Cascading Style Sheets
css introduction if you're new to web development, be sure to
read our css basics article to learn what css is and how to use it.
... css layout at this point we've al
ready looked at css fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside.
Media buffering, seeking, and time ranges - Developer guides
byte range requests allow parts of the media file to be delivered from the server and so can be
ready to play almost immediately — thus they are seekable.
... var seekabletimeranges = myaudio.seekable; creating our own buffering feedback if we wish to create our own custom player, we may want to provide feedback on how much of the media is
ready to be played.
Creating a cross-browser video player - Developer guides
ement's max attribute if it is currently not set: video.addeventlistener('timeupdate', function() { if (!progress.getattribute('max')) progress.setattribute('max', video.duration); progress.value = video.currenttime; progressbar.style.width = math.floor((video.currenttime / video.duration) * 100) + '%'; }); note: for more information and ideas on progress bars and buffering feedback,
read media buffering, seeking, and time ranges.
...ontainer.requestfullscreen(); else if (videocontainer.mozrequestfullscreen) videocontainer.mozrequestfullscreen(); else if (videocontainer.webkitrequestfullscreen) videocontainer.webkitrequestfullscreen(); else if (videocontainer.msrequestfullscreen) videocontainer.msrequestfullscreen(); setfullscreendata(true); } } first of all the function checks if the browser is al
ready in fullscreen mode by calling another function isfullscreen: var isfullscreen = function() { return !!(document.fullscreen || document.webkitisfullscreen || document.mozfullscreen || document.msfullscreenelement || document.fullscreenelement); } this function checks all the various browser prefixed versions to try and determine the correct result.
Audio and Video Delivery - Developer guides
it's strongly recommended that you
read the autoplay guide for media and web audio apis to learn how to use autoplay wisely..
... }) .then(function onsuccess(stream) { var video = document.getelementbyid('webcam'); video.autoplay = true; video.srcobject = stream; }) .catch(function onerror() { alert('there has been a problem retreiving the streams - are you running on file:/// or did you disallow access?'); }); } else { alert('getusermedia is not supported in this browser.'); } to find out more,
read our mediadevices.getusermedia page.
Constraint validation - Developer guides
d-12345 or 12345" ], nl : [ '^(nl-)?\\d{4}\\s*([a-rt-z][a-z]|s[bce-rt-z])$', "nederland zips must have exactly 4 digits, followed by 2 letters except sa, sd and ss" ] }; //
read the country id var country = document.getelementbyid("country").value; // get the npa field var zipfield = document.getelementbyid("zip"); // build the constraint checker var constraint = new regexp(constraints[country][0], ""); console.log(constraint); // check it!
... here is the html part: <label for="fs">select a file smaller than 75 kb : </label> <input type="file" id="fs"> this displays: 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 c...
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
the title attribute has a specific semantic meaning when used with the <abbr> element; it must contain a full human-
readable description or expansion of the abbreviation.
... to define an abbreviation which may be unfamiliar to the
reader, present the term using <abbr> and either a title attribute or inline text providing the definition.
<data> - HTML: Hypertext Markup Language
the html <data> element links a given piece of content with a machine-
readable translation.
... value this attribute specifies the machine-
readable translation of the content of the element.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
examples <p><del>this text has been deleted</del>, here is the rest of the paragraph.</p> <del><p>this paragraph has been deleted.</p></del> result accessibility concerns the presence of the del element is not announced by most screen
reading technology in its default configuration.
... del::before, del::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } del::before { content: " [deletion start] "; } del::after { content: " [deletion end] "; } some people who use screen
readers deliberately disable announcing content that creates extra verbosity.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
example <!doctype html> <html lang="en"> <head>...</head> <body>...</body> </html> accessibility concerns providing a lang attribute with a valid ietf identifying language tag on the <html> element will help screen
reading technology determine the proper language to announce.
...without it, screen
readers will typically default to the operating system's set language, which may cause mispronunciations.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
due to widesp
read misuse, this is not helpful for non-visual browsers.
... html <iframe src="https://mdn-samples.mozilla.org/snippets/html/iframe-simple-contents.html" title="iframe example 1" width="400" height="300"> </iframe> result accessibility concerns people navigating with assistive technology such as a screen
reader can use the title attribute on an <iframe> to label its content.
<input type="image"> - HTML: Hypertext Markup Language
eight, in css pixels, at which to draw the image src the url from which to load the image width the width, in css pixels, at which to draw the image alt the alt attribute provides an alternate string to use as the button's label if the image cannot be shown (due to error, a user agent that cannot or is configured not to show images, or if the user is using a screen
reading device).
... the alt attribute provides alt text for the image, so screen
reader users can get a better idea of what the button is used for.
<ins> - HTML: Hypertext Markup Language
examples <ins>this text has been inserted</ins> result accessibility concerns the presence of the <ins> element is not announced by most screen
reading technology in its default configuration.
... ins::before, ins::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } ins::before { content: " [insertion start] "; } ins::after { content: " [insertion end] "; } some people who use screen
readers deliberately disable announcing content that creates extra verbosity.
<isindex> - HTML: Hypertext Markup Language
in this th
read, different type of solutions are proposed.
...the user fills in the fields, clicks ok, and the query results come up in the table of contents window." a th
read about isindex in november 1992, kevin hoadley questioned the need for an isindex element and proposed to drop it.
<main> - HTML: Hypertext Markup Language
<body> <a href="#main-content">skip to main content</a> <!-- navigation and header content --> <main id="main-content"> <!-- main page content --> </main> </body> webaim: "skip navigation" links
reader mode browser
reader mode functionality looks for the presence of the <main> element, as well as heading and content sectioning elements when converting content into a specialized
reader view.
... building websites for safari
reader mode and other
reading apps.
<s> - HTML: Hypertext Markup Language
examples <s>today's special: salmon</s> sold out<br> <span style="text-decoration:line-through;">today's special: salmon</span> sold out accessibility concerns the presence of the s element is not announced by most screen
reading technology in its default configuration.
... s::before, s::after { clip-path: inset(100%); clip: rect(1px, 1px, 1px, 1px); height: 1px; overflow: hidden; position: absolute; white-space: nowrap; width: 1px; } s::before { content: " [start of stricken text] "; } s::after { content: " [end of stricken text] "; } some people who use screen
readers deliberately disable announcing content that creates extra verbosity.
Inline elements - HTML: Hypertext Markup Language
because the <span> element is inline, the paragraph correctly renders as a single, unbroken text flow, like this: for looks, this css (not displayed in standard
reading mode) is also used: body { margin: 0; padding: 4px; border: 1px solid #333; } .highlight { background-color:#ee3; } block-level now let's change that <span> into a block-level element, such as <p>: <div>the following paragraph is a <p class="highlight">block-level element;</p> its background has been colored to display both the beginning and end of the block-level element's influ...
...ence.</div> the css (not displayed in standard
reading mode) is also used: body { margin: 0; padding: 4px; border: 1px solid #333; } .highlight { background-color:#ee3; } rendered using the same css as before, we get: see the difference?
Quirks Mode and Standards Mode - HTML: Hypertext Markup Language
this is essential in order to support websites that were built before the widesp
read adoption of web standards.
... if you serve xhtml-like content using the text/html mime type, browsers will
read it as html, and you will need the doctype to use standards mode.
Microformats - HTML: Hypertext Markup Language
in addition to being machine-
readable, their format is designed to be easily
read by humans.
..."dt-start", "dt-end", "dt-bday" special parsing: time element datetime attribute, value-class-pattern and separate date time value parsing for
readability.
Choosing between www and non-www URLs - HTTP
this has no impact on the human
reader of the page, but tells search engine crawlers where the page actually lives.
...if you wish to
read deeper, please see some of the many articles on the subject.
CORS errors - HTTP
if the cors configuration isn't setup correctly, the browser console will present an error like "cross-origin request blocked: the same origin policy disallows
reading the remote resource at $somesite" indicating that the request was blocked due to violating the cors security rules.
...it will probably look like this: the text of the error message will be something similar to the following: cross-origin request blocked: the same origin policy disallows
reading the remote resource at https://some-url-here.
HTTP caching - HTTP
you might have seen "caching" in your browser's settings al
ready.
...when these are
read, the new versions of the others are also
read.
Compression in HTTP - HTTP
in practice, web developers don't need to implement compression mechanisms, both browsers and servers have it implemented al
ready, but they have to be sure that the server is configured adequately.
... as compression brings significant performance improvements, it is recommended to activate it for all files, but al
ready compressed ones like images, audio files and videos.
HTTP conditional requests - HTTP
integrity of a partial download partial downloading of files is a functionality of http that allows to resume previous operations, saving bandwidth and time, by keeping the al
ready obtained information: a server supporting partial downloads broadcasts this by sending the accept-ranges header.
...the client first
reads the original files, modifies them, and finally pushes them to the server: unfortunately, things get a little inaccurate as soon as we take into account concurrency.
Using HTTP cookies - HTTP
if your site authenticates users, it should regenerate and resend session cookies, even ones that al
ready exist, whenever the user authenticates.
...however, do not assume that secure prevents all access to sensitive information in cookies; for example, it can be
read by someone with access to the client's hard disk.
Accept-Encoding - HTTP
two common cases lead to this: the data to be sent is al
ready compressed and a second compression won't lead to smaller data to be transmitted.
... * matches any content encoding not al
ready listed in the header.
Server-Timing - HTTP
database
read/write, cpu time, file system access, etc.) in the developer tools in the user's browser or in the performanceservertiming interface.
... // single metric without value server-timing: missedcache // single metric with value server-timing: cpu;dur=2.4 // single metric with description and value server-timing: cache;desc="cache
read";dur=23.2 // two metrics with value server-timing: db;dur=53, app;dur=47.2 // server-timing as trailer trailer: server-timing --- response body --- server-timing: total;dur=123.4 privacy and security the server-timing header may expose potentially sensitive application and infrastructure information.
X-Content-Type-Options - HTTP
however, it also enables cross-origin
read blocking (corb) protection for html, txt, json and xml files (excluding svg image/svg+xml).
... header type response header forbidden header name no syntax x-content-type-options: nosniff directives nosniff blocks a request if the request destination is of type: "style" and the mime type is not text/css, or "script" and the mime type is not a javascript mime type enables cross-origin
read blocking (corb) protection for the mime-types: text/html text/plain text/json, application/json or any other type with a json extension: */*+json text/xml, application/xml or any other type with an xml extension: */*+xml (excluding image/svg+xml) specifications specification status comment fetchthe definition of 'x-content-type-options definition' in that specification.
HTTP headers - HTTP
this is used to update caches (for safe requests), or to prevent to upload a new resource when one al
ready exists.
... cross-origin-resource-policy (corp) prevents other domains from
reading the response of the resources to which this header is applied.
Link prefetching FAQ - HTTP
basically, there are two ways of looking at this issue: websites can al
ready cause things to be silently downloaded using js/dom hacks.
... privacy implications along with the referral and url-following implications al
ready mentioned above, prefetching will generally cause the cookies of the prefetched site to be accessed.
A typical HTTP session - HTTP
an absolute url without the protocol or domain name the http protocol version subsequent lines represent an http header, giving the server information about what type of data is appropriate (e.g., what language, what mime types), or other data altering its behavior (e.g., not sending an answer if it is al
ready cached).
...similar to a client request, a server response is formed of text directives, separated by crlf, though divided into three blocks: the first line, the status line, consists of an acknowledgment of the http version used, followed by a status request (and its brief meaning in human-
readable text).
Concurrency model and the event loop - JavaScript
event loop the event loop got its name because of how it's usually implemented, which usually resembles: while (queue.waitformessage()) { queue.processnextmessage() } queue.waitformessage() waits synchronously for a message to arrive (if one is not al
ready available and waiting to be handled).
...this differs from c, for instance, where if a function runs in a th
read, it may be stopped at any point by the runtime system to run some other code in another th
read.
Details of the object model - JavaScript
this chapter assumes that you are al
ready somewhat familiar with javascript and that you have used javascript functions to create simple objects.
...in a class definition, you can specify that the new class is a subclass of an al
ready existing class.
Indexed collections - JavaScript
as you al
ready know, array objects grow and shrink dynamically and can have any javascript value.
...you can't directly manipulate the contents of an arraybuffer; instead, you create a typed array view or a dataview which represents the buffer in a specific format, and use that to
read and write the contents of the buffer.
Iterators and generators - JavaScript
done this is true if the last value in the sequence has al
ready been consumed.
...the behavior of this code is identical, but the implementation is much easier to write and
read.
Regular expressions - JavaScript
note: if you are al
ready familiar with the forms of a regular expression, you may also
read the cheatsheet for a quick lookup for a specific pattern/construct.
... if escape strings are not al
ready part of your pattern you can add them using string.replace: function escaperegexp(string) { return string.replace(/[.*+\-?^${}()|[\]\\]/g, '\\$&'); // $& means the whole matched string } the "g" after the regular expression is an option or flag that performs a global search, looking in the whole string and returning all matches.
Working with objects - JavaScript
if you al
ready go for the object initializer when defining a prototype you will probably most of the time choose the first form.
...the second form probably best represents the dynamic nature of javascript — but it can make the code hard to
read and understand.
TypeError: invalid assignment to const "x" - JavaScript
this constant name is al
ready taken in this scope.
... const columns = 80; function setupbigscreenenvironment() { const columns = 120; } const and immutability the const declaration creates a
read-only reference to a value.
SyntaxError: redeclaration of formal parameter "x" - JavaScript
message syntaxerror: let/const redeclaration (edge) syntaxerror: redeclaration of formal parameter "x" (firefox) syntaxerror: identifier "x" has al
ready been declared (chrome) error type syntaxerror what went wrong?
...if you want to create a new variable, you need to rename it as conflicts with the function parameter al
ready.
ArrayBuffer - JavaScript
it is an array of bytes, often referred to in other languages as a "byte array".you cannot directly manipulate the contents of an arraybuffer; instead, you create one of the typed array objects or a dataview object which represents the buffer in a specific format, and use that to
read and write the contents of the buffer.
... instance properties arraybuffer.prototype.bytelength the
read-only size, in bytes, of the arraybuffer.
DataView.prototype.getInt8() - JavaScript
syntax dataview.getint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
DataView.prototype.getUint8() - JavaScript
syntax dataview.getuint8(byteoffset) parameters byteoffset the offset, in byte, from the start of the view where to
read the data.
... errors thrown rangeerror thrown if the byteoffset is set such as it would
read beyond the end of the view.
Date.prototype.toDateString() - JavaScript
syntax dateobj.todatestring() return value a string representing the date portion of the given date object in human
readable form in english.
...calling tostring() will return the date formatted in a human
readable form in english.
Date.prototype.toLocaleString() - JavaScript
to check whether an implementation supports them al
ready, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocalestringsupportslocales() { try { new date().tolocalestring('i'); } catch (e) { return e instanceof rangeerror; } return false; } using locales this example shows some of the variations in localized date and time formats.
... for this reason, you cannot expect to be able to compare the results of tolocalestring() to a static value: "1/1/2019, 01:00:00" === new date("2019-01-01t01:00:00z").tolocalestring("en-us"); // true in firefox and others // false in ie and edge note: see also this stackoverflow th
read for more details and examples.
Map - JavaScript
let kvarray = [['key1', 'value1'], ['key2', 'value2']] // use the regular map constructor to transform a 2d key-value array into a map let mymap = new map(kvarray) mymap.get('key1') // returns "value1" // use array.from() to transform a map into a 2d key-value array console.log(array.from(mymap)) // will show you exactly the same array as kvarray // a succinct way to do the same, using the sp
read syntax console.log([...mymap]) // or use the keys() or values() iterators, and convert them to an array console.log(array.from(mymap.keys())) // ["key1", "key2"] cloning and merging maps just like arrays, maps can be cloned: let original = new map([ [1, 'one'] ]) let clone = new map(original) console.log(clone.get(1)) // one console.log(original === clone) // false (useful for shal...
...// sp
read operator essentially converts a map to an array let merged = new map([...first, ...second]) console.log(merged.get(1)) // uno console.log(merged.get(2)) // dos console.log(merged.get(3)) // three maps can be merged with arrays, too: let first = new map([ [1, 'one'], [2, 'two'], [3, 'three'], ]) let second = new map([ [1, 'uno'], [2, 'dos'] ]) // merge maps with an array.
Object.prototype.constructor - JavaScript
the value is only
read-only for primitive values such as 1, true, and "test".
...only true, 1, and "test" will not be affected (as they have
read-only native constructors).
Promise.any() - JavaScript
return value an al
ready resolved promise if the iterable passed is empty.
... if an empty iterable is passed, then this method returns (synchronously) an al
ready resolved promise.
RegExp.lastMatch ($&) - JavaScript
the non-standard lastmatch property is a static and
read-only property of regular expressions that contains the last matched characters.
... the value of the lastmatch property is
read-only and modified whenever a successful match is made.
RegExp.lastParen ($+) - JavaScript
the non-standard lastparen property is a static and
read-only property of regular expressions that contains the last parenthesized substring match, if any.
... the value of the lastparen property is
read-only and modified whenever a successful match is made.
RegExp.leftContext ($`) - JavaScript
the non-standard leftcontext property is a static and
read-only property of regular expressions that contains the substring preceding the most recent match.
... the value of the leftcontext property is
read-only and modified whenever a successful match is made.
RegExp.$1-$9 - JavaScript
the legacy regexp $1, $2, $3, $4, $5, $6, $7, $8, $9 properties are static and
read-only properties of regular expressions that contain parenthesized substring matches.
... the values of these properties are
read-only and modified whenever successful matches are made.
RegExp.rightContext ($') - JavaScript
the non-standard rightcontext property is a static and
read-only property of regular expressions that contains the substring following the most recent match.
... the value of the rightcontext property is
read-only and modified whenever a successful match is made.
Symbol.prototype.description - JavaScript
the
read-only description property is a string returning the optional description of symbol objects.
...the symbol.prototype.description property can be used to
read that description.
Symbol.for() - JavaScript
symbol.for() does also not necessarily create a new symbol on every call, but checks first if a symbol with the given key is al
ready present in the registry.
... examples using symbol.for symbol.for('foo'); // create a new global symbol symbol.for('foo'); // retrieve the al
ready created symbol // same global symbol, but not locally symbol.for('bar') === symbol.for('bar'); // true symbol('bar') === symbol('bar'); // false // the key is also used as the description var sym = symbol.for('mario'); sym.tostring(); // "symbol(mario)" to avoid name clashes with your global symbol keys and other (library code) global symbols, it might be a good idea to prefix your symbols: ...
Symbol - JavaScript
symbol.isconcatsp
readable a boolean value indicating if an object should be flattened to its array elements.
... instance properties symbol.prototype.description a
read-only string containing the description of the symbol.
WebAssembly.Module.exports() - JavaScript
var worker = new worker("wasm_worker.js"); webassembly.compilestreaming(fetch('simple.wasm')) .then(mod => worker.postmessage(mod) ); in the worker (see wasm_worker.js) we define an import object for the module to use, then set up an event handler to receive the module from the main th
read.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main th
read'); var mod = e.data; webassembly.instantiate(mod, importobject).then(function(instance) { instance.exports.exported_func(); }); var exports = webassembly.module.exports(mod); console.log(exports[0]); }; the exports[0] output looks like this: { name: "exported_func", kind: "function" } specifications specification webassembly javascript interfacethe defini...
encodeURIComponent() - JavaScript
// the following are not required for percent-encoding per rfc5987, // so we can allow for a little better
readability over the wire: |`^ replace(/%(?:7c|60|5e)/g, unescape); } // here is an alternative to the above function function encoderfc5987valuechars2(str) { return encodeuricomponent(str).
...// i.e., %27 %28 %29 %2a (note that valid encoding of "*" is %2a // which necessitates calling touppercase() to properly encode) // the following are not required for percent-encoding per rfc5987, // so we can allow for a little better
readability over the wire: |`^ replace(/%(7c|60|5e)/g, (str, hex) => string.fromcharcode(parseint(hex, 16))); } specifications specification ecmascript (ecma-262)the definition of 'encodeuricomponent' in that specification.
Iteration protocols - JavaScript
s default iterator returns the string's code points one by one: let iterator = somestring[symbol.iterator](); console.log(iterator + ''); // "[object string iterator]" console.log(iterator.next()); // { value: "h", done: false } console.log(iterator.next()); // { value: "i", done: false } console.log(iterator.next()); // { value: undefined, done: true } some built-in constructs—such as the sp
read syntax—use the same iteration protocol under the hood: console.log([...somestring]); // ["h", "i"] you can redefine the iteration behavior by supplying our own @@iterator: // need to construct a string object explicitly to avoid auto-boxing let somestring = new string('hi'); somestring[symbol.iterator] = function () { return { // this is the iterator object, returning a single element...
...); // "b" new set([1, 2, 3]).has(3); // true new set('123').has('2'); // true new weakset(function* () { yield {} yield myobj yield {} }()).has(myobj); // true see also promise.all(iterable) promise.race(iterable) array.from(iterable) syntaxes expecting iterables some statements and expressions expect iterables, for example the for...of loops, the sp
read operator), yield*, and destructuring assignment: for (let value of ['a', 'b', 'c']) { console.log(value); } // "a" // "b" // "c" console.log([...'abc']); // ["a", "b", "c"] function* gen() { yield* ['a', 'b', 'c']; } console.log(gen().next()); // { value: "a", done: false } [a, b, c] = new set(['a', 'b', 'c']); console.log(a); // "a" non-well-formed iterables if an ite...
Destructuring assignment - JavaScript
let key = 'z'; let {[key]: foo} = {z: 'bar'}; console.log(foo); // "bar" rest in object destructuring the rest/sp
read properties for ecmascript proposal (stage 4) adds the rest syntax to destructuring.
... rest properties collect the remaining own enumerable property keys that are not al
ready picked off by the destructuring pattern.
Pipeline operator (|>) - JavaScript
this allows the creation of chained function calls in a
readable manner.
... examples chaining function calls the pipeline operator can improve
readability when chaining several functions.
class - JavaScript
class foo {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has al
ready been declared the same error is thrown when a class has been defined before using the class expression.
... let foo = class {}; class foo {}; // uncaught syntaxerror: identifier 'foo' has al
ready been declared specifications specification ecmascript (ecma-262)the definition of 'class definitions' in that specification.
const - JavaScript
(this makes sense, given that it can't be changed later.) the const declaration creates a
read-only reference to a value.
...my_fav = 20; // my_fav is 7 console.log('my favorite number is: ' + my_fav); // trying to redeclare a constant throws an error // uncaught syntaxerror: identifier 'my_fav' has al
ready been declared const my_fav = 20; // the name my_fav is reserved for constant above, so this will fail too var my_fav = 20; // this throws an error too let my_fav = 20; block scoping it's important to note the nature of block scoping.
import - JavaScript
the static import statement is used to import
read only live bindings which are exported by another module.
...the static form is preferable for loading initial dependencies, and can benefit more
readily from static analysis tools and tree shaking.
let - JavaScript
in the same line, the if block's foo has al
ready been created in the lexical environment, but has not yet reached (and terminated) its initialization (which is part of the statement itself).
...the instruction let n of n.a is al
ready inside the private scope of the for loop's block.
Strict mode - JavaScript
i'm a strict mode script!"; this syntax has a trap that has al
ready bitten a major site: it isn't possible to blindly concatenate conflicting scripts.
... x; } the simple alternative of assigning the object to a short name variable, then accessing the corresponding property on that variable, stands
ready to replace with.
JavaScript
javascript is a prototype-based, multi-paradigm, single-th
readed, dynamic language, supporting object-oriented, imperative, and declarative (e.g.
...
read more about javascript.
Authoring MathML - MathML
one of the advantage of jqmath over the previous scripts is that it will automatically add some simple css rules to do the mathematical layout and make the formulas
readable on browsers with limited mathml support.
... optical character & handwriting recognition infty
reader is able to perform some optical character recognition, including translation of mathematical equations into mathml.
Autoplay guide for media and Web Audio APIs - Web media technologies
note: it is strongly recommended that you use the autoplay attribute whenever possible, because support for autoplay preferences are more widesp
read for the autoplay attribute than for other means of playing media automatically.
...if others have it al
ready, they are welcome to pitch in with this section...
Web audio codec guide - Web media technologies
joint stereo can reduce the size of the encoded audio to some extent the parameters available—and the range of possible values—varies from codec to codec, and even among different encoding utilities for the same codec, so
read the documentation that comes with the encoding software you use to learn more.
...consider the b
readth of actual support for the codecs when making your decisions.
Digital audio concepts - Web media technologies
at regular intervals, the a/d converter circuitry
reads the voltage of the signal as a value between (in this case) -1.0 and +1.0.
... for example, consider a stereo audio clip (that is, two audio channels) with a sample size of 16 bits (2 bytes), recorded at 48 khz: 2×2bytessample×48000samplessecond=192000bytessecond=192kbps2 \times 2\frac { bytes }{ sample } \times 48000\frac { samples }{ second } = 192000\frac { bytes }{ second } = 192 kbps at 192 kbps, lower-end networks are al
ready going to be strained just by a single audio stream playing.
Handling media support issues in web content - Web media technologies
this may be simply the first frame of video; however, in many cases, the first frame is blank, or contains nothing but the logo of a business, or some other image that doesn't give the
reader any context for the video's contents.
... a good poster frame is one which is either a representative of the video's contents, or is an image which isn't even from the video itself but contains imagery and/or text which gives the
reader a useful idea of the video's contents.
OpenSearch description format
reference material opensearch documentation safari 8.0 release notes: quick website search microsoft edge dev guide: search provider discovery the chromium projects: tab to search imdb.com has a working osd.xml opensearch plugin generator
ready2search - create opensearch plugins.
... customized search through
ready2search ...
Progressive web app structure - Progressive web apps (PWAs)
that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache al
ready).
...it's different with html, as the browser is actually streaming the data al
ready and you can see when the elements are loaded and rendered on the website.
How to make PWAs installable - Progressive web apps (PWAs)
previous overview: progressive next in the last article, we
read about how the example application, js13kpwa, works offline thanks to its service worker, but we can go even further and allow users to install the web app on mobile and desktop browers that support doing so.
... for more information on a2hs, be sure to
read our add to home screen guide.
Introduction to progressive web apps - Progressive web apps (PWAs)
progressive enhancement and responsive design al
ready allow us to build mobile friendly websites.
... some of the capabilities have al
ready been enabled on certain web-based platforms by proprietary technologies like open graph, which provides a format for specifying similar metadata in the html <head> block using <meta> tags.
Structural overview of progressive web apps - Progressive web apps (PWAs)
that way, the next time someone visits the app from the device, the ui loads from the cache immediately and any new content is requested from the server (if it isn’t available in the cache al
ready).
...it's different with html, as the browser is actually streaming the data al
ready and you can see when the elements are loaded and rendered on the website.
Namespaces crash course - SVG: Scalable Vector Graphics
if you write scripts for namespaced xml such as svg,
read on.
...if you don't al
ready have one, make one up starting with the following code: <svg xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink"> </svg> even if you don't use all those namespaces in a particular document, there's no harm in including the namespace declarations.
SVG 2 support in Mozilla - SVG: Scalable Vector Graphics
general change notes length attribute and indexed property for list interfaces implementation status unknown <script> element in content model of all elements implementation status unknown initialize(), appenditem(), replaceitem(), and insertitembefore() on list objects making a copy of any list item being inserted that is al
ready in another list implementation status unknown crossorigin attribute for <image> and <script> elements not implemented yet (at least for <image>; bug 1240357) rendering model change notes svg root and <foreignobject> not overflow:hidden in ua style sheet implementation status unknown allow overflow: auto; to clip and show scroll bars ...
...implementation status unknown allow overflow: scroll; to show scroll bars on <svg> elements implementation status unknown basic data types and interfaces change notes dommatrix or dommatrix
readonly instead of svgmatrix implementation status unknown domrect or domrect
readonly instead of svgrect implementation status unknown dompoint or dompoint
readonly instead of svgpoint implementation status unknown members of svgstylable and svglangspace available in svgelement implementation status unknown svggraphicselement instead of svglocatable and svgtransformable implementation status unknown svggeometryelement with svggeometryelement.ispointinfill() and svggeometryelement.ispointinstroke() methods...
How to fix a website with blocked mixed content - Web security
note that since mixed content blocking al
ready happens in chrome and internet explorer, it is very likely that if your website works in both of these browsers, it will work equally well in firefox with mixed content blocking.
... often, the https version of the content al
ready exists and this just requires adding an "s" to links - http:// to https://.
Tutorials
intermediate level css layout at this point we've al
ready looked at css fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside.
...you've seen this stuff al
ready in the course, but only in passing — here we'll discuss it all explicitly.
XPath
this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies, and guides the
reader through background, context, structure, concepts, and introductory terminology.
...there are some cases in which the whole content of an xml document must be
read from the javascript interpreter (like for web-apps languages or settings xml documents, for example).
An Overview - XSLT: Extensible Stylesheet Language Transformations
because typing "http://www.w3.org/1999/xsl/transform" repeatedly would be tedious and would render the markup difficult to
read, there is a standard mechanism for assigning a shorthand name to the namespace in the stylesheet heading.
... to learn more about xslt and xpath, see the for further
reading section at the end of this article.
Transforming XML with XSLT - XSLT: Extensible Stylesheet Language Transformations
yet eventually much of the content stored in xml documents will need to be presented to human
readers.
... not() (supported) number() (supported) position() (supported) round() (supported) starts-with() (supported) string() (supported) string-length() (supported) substring() (supported) substring-after() (supported) substring-before() (supported) sum() (supported) system-property() (supported) translate() (supported) true() (supported) unparsed-entity-url() (not supported) for further
reading books online the world wide web consortium portals articles tutorials/examples mailing lists/newsgroups resources index original document information copyright information: copyright © 2001-2003 netscape.
XSLT: Extensible Stylesheet Language Transformations
xslt tutorial this w3schools tutorial teaches the
reader how to use xslt to transform xml documents into other formats, like xhtml.
... this extensive introduction to xslt and xpath assumes no prior knowledge of the technologies and guides the
reader through background, context, structure, concepts and introductory terminology.
Caching compiled WebAssembly modules - WebAssembly
function storeindatabase(db, module) { var store = db.transaction([storename], '
readwrite').objectstore(storename); var request = store.put(module, url); request.onerror = err => { console.log(`failed to store in wasm cache: ${err}`) }; request.onsuccess = err => { console.log(`successfully stored ${url} in wasm cache`) }; } using our helper functions with all the promise-based helper functions defined, we can now express the core logic of an indexeddb cache looku...
...we start by trying to open a database, then see if we al
ready have a compiled module with the key url stored in the given db: return opendatabase().then(db => { return lookupindatabase(db).then(module => { if we do, we instantiate it with the given import object: console.log(`found ${url} in wasm cache`); return webassembly.instantiate(module, importobject); }, if not, we compile it from scratch and then store the compiled module in the database with a key of url, for next time we want to use it: errmsg => { console.log(errmsg); return webassembly.instantiatestreaming(fetch(url)).then(results => { storeindatabase(db, results.module); return results.instance; }); }) }, note: it is for this kind of usage that webassembly...
WebAssembly Concepts - WebAssembly
be
readable and debuggable — webassembly is a low-level assembly language, but it does have a human-
readable text format (the specification for which is still being finalized) that allows code to be written, viewed, and debugged by hand.
... memory: a resizable arraybuffer that contains the linear array of bytes
read and written by webassembly’s low-level memory access instructions.
WebAssembly
guides webassembly concepts get started by
reading the high-level concepts behind webassembly — what it is, why it is so useful, how it fits into the web platform (and beyond), and how to use it.
... webassembly.module() a webassembly.module object contains stateless webassembly code that has al
ready been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
Communicating With Other Scripts - Archive of obsolete content
n.js" will create a page-mod that will attach "content-script.js" to the target web page, and will then load the target web page: var tabs = require("sdk/tabs"); var mod = require("sdk/page-mod"); var self = require("sdk/self"); var pageurl = self.data.url("page.html") var pagemod = mod.pagemod({ include: pageurl, contentscriptfile: self.data.url("content-script.js"), contentscriptwhen: "
ready" }) tabs.open(pageurl); the target web page "page.html" includes a button and a page script: <html> <head> <meta charset="utf-8"> </head> <body> <input id="message" type="button" value="send a message"/> <script type="text/javascript" src="page-script.js"></script> </body> </html> the content script "content-script.js" adds an event listener to the button, that sends a c...
port - Archive of obsolete content
due to bug 816272 the page-mod's removelistener() function does not prevent the listener from receiving messages that are al
ready queued.
Communicating using "postMessage" - Archive of obsolete content
gemodscript, onattach: function(worker) { worker.on('message', function(message) { switch(message.kind) { case 'mouseover': console.log('mouseover: ' + message.element); break; case 'mouseout': console.log('mouseout: ' + message.element); break; } }); } }); implementing the same add-on with user-defined events is shorter and more
readable: var pagemodscript = "window.addeventlistener('mouseover', function(event) {" + " self.port.emit('mouseover', event.target.tostring());" + "}, false);" + "window.addeventlistener('mouseout', function(event) {" + " self.port.emit('mouseout', event.target.tostring());" + "}, false);"; var pag...
Porting the Library Detector - Archive of obsolete content
tview(tab.window); if (!tab.libraries) { tab.libraries = []; } widgetview.content = buildwidgetviewcontent(tab.libraries); widgetview.width = tab.libraries.length * icon_width; } main.js will use the tabs module to update the widget's content when necessary (for example, when the user switches between tabs): tabs.on('activate', function(tab) { updatewidgetview(tab); }); tabs.on('
ready', function(tab) { tab.libraries = []; }); showing the library detail the xul library detector displayed the detailed information about each library on mouseover in a tooltip: we can't do this using a widget, so instead will use a panel.
hotkeys - Archive of obsolete content
the following commonly used hotkey combinations will not pass amo review: accel-z, accel-c, accel-x, accel-v or accel-q if you choose to use a key combination that's al
ready defined, choose one which makes sense for the operation it will perform.
indexed-db - Archive of obsolete content
= database.onerror; if(db.objectstorenames.contains("items")) { db.deleteobjectstore("items"); } var store = db.createobjectstore("items", {keypath: "time"}); }; request.onsuccess = function(e) { database.db = e.target.result; }; request.onerror = database.onerror; }; function additem(name) { var db = database.db; var trans = db.transaction(["items"], "
readwrite"); var store = trans.objectstore("items"); var time = new date().gettime(); var request = store.put({ "name": name, "time": time }); request.onerror = database.onerror; }; function getitems(callback) { var cb = callback; var db = database.db; var trans = db.transaction(["items"], "
readwrite"); var store = trans.objectstore("items"); var items = new array(); t...
private-browsing - Archive of obsolete content
for example, here's an add-on that stores the titles of tabs the user loads, and uses isprivate() to exclude the titles of tabs that were loaded into private windows: var simplestorage = require("simple-storage"); if (!simplestorage.storage.titles) simplestorage.storage.titles = []; require("tabs").on("
ready", function(tab) { if (!require("sdk/private-browsing").isprivate(tab)) { console.log("storing..."); simplestorage.storage.titles.push(tab.title); } else { console.log("not storing, private data"); } }); here's an add-on that uses a page-mod to log the content of pages loaded by the user, unless the page is private.
content/worker - Archive of obsolete content
the script may not be initialized yet, or may al
ready have been unloaded you can handle the detach event in the content script itself though: // in content script self.port.on("detach", function() { window.close(); }); ...
core/heritage - Archive of obsolete content
reading or writing such code requires sharp eye and lot's of discipline, mainly due to code fragmentation and lots of machinery being exposed: // defining a simple class function dog(name) { // classes are for creating instances, calling them without `new` changes // behavior, which in majority cases you need to handle, so you end up // with additional boilerplate.
event/core - Archive of obsolete content
to avoid hassles of removing such listeners there is a convenient once function: once(target, 'load', function() { console.log('
ready'); }); emit(target, 'load') // info: '
ready' emit(target, 'load') there are also convenient ways to remove registered listeners.
places/favicon - Archive of obsolete content
let { getfavicon } = require("sdk/places/favicon"); // string example getfavicon("http://mozilla.org").then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); // tab example require("sdk/tabs").open({ url: "http://mozilla.org", on
ready: function (tab) { getfavicon(tab).then(function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); } }); // an optional callback can be provided to handle // the promise's resolve and reject states getfavicon("http://mozilla.org", function (url) { console.log(url); // http://mozorg.cdn.mozilla.net/media/img/favicon.ico }); parameters object ...
cfx - Archive of obsolete content
this command will create an skeleton add-on, as a starting point for your own add-on development, with the following file structure: my-addon data docs main.md lib main.js package.json
readme.md tests test-main.js cfx run this command is used to run the add-on.
jpm-mobile - Archive of obsolete content
jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version number installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't al
ready.
Displaying annotations - Archive of obsolete content
updating main.js first, initialize an array to hold workers associated with the matcher's content scripts: var matchers = []; in the main function, add the code to create the matcher: var matcher = pagemod.pagemod({ include: ['*'], contentscriptwhen: '
ready', contentscriptfile: [data.url('jquery-1.4.2.min.js'), data.url('matcher.js')], onattach: function(worker) { if(simplestorage.storage.annotations) { worker.postmessage(simplestorage.storage.annotations); } worker.port.on('show', function(data) { annotation.content = data; annotation.show(); }); worker.port.on('hide', function() { ...
Implementing the widget - Archive of obsolete content
the following code: var widgets = require('sdk/widget'); var data = require('sdk/self').data; var annotatorison = false; function toggleactivation() { annotatorison = !annotatorison; return annotatorison; } exports.main = function() { var widget = widgets.widget({ id: 'toggle-switch', label: 'annotator', contenturl: data.url('widget/pencil-off.png'), contentscriptwhen: '
ready', contentscriptfile: data.url('widget/widget.js') }); widget.port.on('left-click', function() { console.log('activate/deactivate'); widget.contenturl = toggleactivation() ?
Logging - Archive of obsolete content
the following add-on logs the html content of every tab the user loads, by calling console.log() inside a content script: require("sdk/tabs").on("
ready", function(tab) { tab.attach({ contentscript: "console.log(document.body.innerhtml);" }); }); console output if you are running your add-on from the command line (for example, executing jpm run or jpm test) then the console's messages appear in the command shell you used.
Developing for Firefox Mobile - Archive of obsolete content
-mobile run with some extra options: jpm-mobile run --adb /path/to/adb in the command shell, you should see something like: launching mobile application with intent name org.mozilla.fennec pushing the addon to your device starting: intent { act=android.activity.main cmp=org.mozilla.fennec/.app (has extras) } --------- beginning of /dev/log/main --------- beginning of /dev/log/system could not
read chrome manifest 'file:///data/data/org.mozilla.fennec/chrome.manifest'.
Cookies - Archive of obsolete content
reading existing cookies cookies for a given host, represented as nsicookie2 objects, can be enumerated as such: let enum = services.cookies.getcookiesfromhost("example.com"); while (enum.hasmoreelements()) { var cookie = enum.getnext().queryinterface(ci.nsicookie2); dump(cookie.host + ";" + cookie.name + "=" + cookie.value + "\n"); } all cookies, regardless of host, can be enumerated using services.cookies.enumerator rather than getcookiesfromhost().
Downloading Files - Archive of obsolete content
if (channel instanceof components.interfaces.nsihttpchannel && channel.responsestatus != 200) { return ""; } var bstream = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.interfaces.nsibinaryinputstream); bstream.setinputstream(stream); var size = 0; var file_data = ""; while(size = bstream.available()) { file_data += bstream.
readbytes(size); } return file_data; } see also nsidownloadprogresslistener saving an arbitrary url to a local file customizing the download progress bar appearance ...
Finding window handles - Archive of obsolete content
es.cast(browserwindow_madeintogdkwinptr, gdkdrawable.ptr); var browserwindow_madeintoxid = gdk_x11_drawable_get_xid(browserwindow_madeintogdkdrawable); console.info('browserwindow_madeintoxid:', browserwindow_madeintoxid, browserwindow_madeintoxid.tostring(), uneval(browserwindow_madeintoxid)); // the code to focus the window is soon to come, its long and messy it needs to be made into a simple
readable good for example.
Post data to window - Archive of obsolete content
createinstance(ci.nsimimeinputstream); postdata.addheader("content-type", "application/x-www-form-urlencoded"); postdata.addcontentlength = true; postdata.setdata(stringstream); // postdata is
ready to be used as apostdata argument ...
Sidebar - Archive of obsolete content
// toggle the bookmarks sidebar (close it if it's open or // open it if it's currently closed) sidebarui.toggle("viewbookmarkssidebar"); // show the history sidebar, whether it's hidden or al
ready showing sidebarui.show("viewhistorysidebar"); // hide the sidebar, if one is showing sidebarui.hide(); avoid opening the sidebar on startup.
Delayed Execution - Archive of obsolete content
queuing a task in the main event loop when a task needs to be only briefly delayed, such that it runs after the current call chain returns, it can be added directly to the main th
read's event queue rather than scheduled as a timeout: function executesoon(func) { services.tm.mainth
read.dispatch(func, ci.nsith
read.dispatch_normal); } using nsitimers to schedule tasks in instances where settimeout() and setinterval() are unavailable, or insufficient, tasks can be scheduled with delays using nsitimer instances.
xml:base support in old browsers - Archive of obsolete content
3 : 2; // if the file protocol has an extra slashe, prepare to also skip it in the separator search var att2 = att.indexof('/', protocolpos+skipfile); // find first path separator ('/') after protocol if (att2 !== -1) { att = att.substring(0, att2 - 1); // don't want any trailing slash, as the absolute path to be added al
ready has one } } else if (!att.match(/\/$/)) { // if no trailing slash, add one, since it is being attached to a relative path att += '/'; } xmlbase = att + xmlbase; // if previous path was not absolute, resolve against the full uri here' break; } else if (att.indexof('/') === 0) { // if absolute (/), need to prepare for next time to strip out after slash xmlba...
Configuration - Archive of obsolete content
status turns the status messages on or off for this web app: yes or no location turns the
readonly location bar on or off for this web app: yes or no navigation turns the hotkey history navigation (alt+left, alt+right and alt+home) on or off for this web app: yes or no splashscreen filename of an html page to be displayed while the app is loading.
Proxy UI - Archive of obsolete content
camino configured in os (networking preferences) (recently added - some support for
reading os and account settings.)ui elements preferences panel overview the ui is based on selecting a proxy mode, then filling out any additional needed information in "related" ui.
String Rosetta Stone - Archive of obsolete content
find a substring nsstring findin
readable(const nsastring& pattern, nsastring::const_iterator start, nsastring::const_iterator end, nsstringcomparator& acomparator = nsdefaultstringcomparator()) std::string size_type find(const basic_string& s, size_type pos = 0) const size_type find(const chart* s, size_type pos, size_type n) const size_type find(const chart* s, size_type pos = 0) const size_type find(chart c, size_type pos = 0) const qstring int qstring::indexof ( const qstring & str, int from = 0, qt::casesensitivity cs = qt::casesensitive ) const format a printf style string nsstring appendprintf() std::string n/a qstring qstring & qstring::sprintf ( const char * cformat, ...
Supporting per-window private browsing - Archive of obsolete content
var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(function (asubject, atopic, adata) { asubject.queryinterface(components.interfaces.nsisupportsprbool); // if another extension has not al
ready canceled entering the private mode if (!asubject.data) { /* you should display some user interface here */ asubject.data = true; // cancel the operation } }, "last-pb-context-exiting", false); forcing a channel into private mode usually, network channels inherit the privacy status of the document that created them, which means that they work correctly most of the time.
Supporting private browsing mode - Archive of obsolete content
tification with the subject "exit", and set its data field to true to cancel the operation, like this: var os = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); os.addobserver(function (asubject, atopic, adata) { asubject.queryinterface(components.interfaces.nsisupportsprbool); // if another extension has not al
ready canceled entering the private mode if (!asubject.data) { if (adata == "exit") { // if we are leaving the private mode /* you should display some user interface here */ asubject.data = true; // cancel the operation } } }, "private-browsing-cancel-vote", false); note: a well-mannered extension should display some sort of user interface to indicate that privat...
The new nsString class implementation (1999) - Archive of obsolete content
usage patterns how to use these classes to increase the portability, th
read and process safety of gecko, i suggest the following rules regarding the use of each of our string class derivatives: <center> string class</center> <center> where to use</center> nsstrimpl use to pass strings between modules who have linked the nsstrimpl function library.
Creating a Windows Inno Setup installer for XULRunner applications - Archive of obsolete content
: {uninstallexe} name: {userdesktop}\my app; filename: {app}\myapp.exe; tasks: desktopicon name: {userappdata}\microsoft\internet explorer\quick launch\my app; filename: {app}\myapp.exe; tasks: quicklaunchicon [run] filename: {app}\myapp.exe; description: {cm:launchprogram,my app}; onlybelowversion: 0,6; flags: nowait postinstall skipifsilent step 4: building an installer once your script is
ready, start the inno setup compiler, load the script file, and compile it.
Using SOAP in XULRunner 1.9 - Archive of obsolete content
req.setrequestheader("method", "post"); < req.setrequestheader("content-length", soapclient.contentlength); < req.setrequestheader("soapserver", soapclient.soapserver); < req.setrequestheader("soapaction", soapreq.action); < } < }); --- > var xhr = new xmlhttprequest(); > xhr.mozbackgroundrequest = true; > xhr.open('post', soapclient.proxy, true); > xhr.on
readystatechange = function() { > if (4 != xhr.
readystate) { return; } > getresponse(xhr); > }; > var headers = { > 'method': 'post', > 'content-type': soapclient.contenttype + '; charset="' + > soapclient.charset + '"', > 'content-length': soapclient.contentlength, > 'soapserver': soapclient.soapserver, > 'soapaction': soapreq.action > }; > for (var h in h...
What XULRunner Provides - Archive of obsolete content
the following features are either al
ready implemented or planned: gecko features xpcom networking gecko rendering engine dom editing and transaction support (no ui) cryptography xbl (xbl2 planned) xul svg xslt xml extras (xmlhttprequest, domparser, etc.) web services (soap) auto-update support (not yet complete) type ahead find toolbar history implementation (the places implementation in the 1.9 cycle) accessibility support ipc services for communication between gecko-based apps (not yet complete) storage/sqlite interfaces user interface features the following user interface is supplied by xul...
calICalendarView - Archive of obsolete content
interface code [scriptable, uuid(3e567ccb-2ecf-4f59-b7ca-bf42b0fbf24a)] interface calicalendarview : nsisupports { attribute calicalendar displaycalender; attribute calicalendarviewcontroller controller; void showdate(in calidatetime adate); void setdaterange(in calidatetime astartdate, in calidatetime aenddate);
readonly attribute calidatetime startdate;
readonly attribute calidatetime enddate;
readonly attribute boolean supportsdisjointdates;
readonly attribute boolean hasdisjointdates; void setdatelist(in unsigned long acount, [array,size_is(acount)] in calidatetime adates); void getdatelist(out unsigned long acount, [array,size_is(acount),retval] out calidatetime adates); attribute caliitemba...
calICalendarViewController - Archive of obsolete content
modifyoccurrence void modifyoccurrence (in caliitemoccurrence aoccurrence, in calidatetime anewstarttime, in calidatetime anewendtime); the modifyoccurrence method is used to change the attributes of an al
ready existing caliitem.
calIFileType - Archive of obsolete content
defined in calendar/base/public/caliimportexport.idl interface code [scriptable, uuid(efef8333-e995-4f45-bdf7-bfcabbd9793e)] interface califiletype : nsisupports {
readonly attribute astring defaultextension;
readonly attribute astring extensionfilter;
readonly attribute astring description; }; attributes defaultextension the default extension that should be associated with files of this type.
2006-10-13 - Archive of obsolete content
user questions about a open/saveas bug that al
ready exisits: https://bugzilla.mozilla.org/show_bug.cgi?id=347230 installer for 2.0rc2 ehume gives the developers a thumbs up for the new installer for 2.0rc2 having a textfield where you can type in the installation directory.
Date.prototype.toLocaleFormat() - Archive of obsolete content
extension and xulrunner developers should know that just loading the format string from a .dtd or .properties file using a chrome://somedomain/locale/somefile.ext uri should be avoided, as the .dtd/.properties file and the tolocaleformat() method does not not necessarily use the same locale, which could result in odd looking or even ambiguous or un
readable dates.
Enumerator.atEnd - Archive of obsolete content
method is used to determine if the end of a list of drives has been reached: function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.is
ready) { var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; s += freegb.tofixed(3) + " gb free of "; s += totalgb.tofixed(3) + " gb"; } else { s += "not
ready"; } s += "<br />"; e.movenext(); } return(s); } requirements supported in the follo...
Enumerator.item - Archive of obsolete content
example function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.is
ready) { var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; s += freegb.tofixed(3) + " gb free of "; s += totalgb.tofixed(3) + " gb"; } else { s += "not
ready"; } s += "<br />"; e.movenext(); } return(s); } requirements supported in the follo...
Enumerator.moveFirst - Archive of obsolete content
d to evaluate members of the drivescollection from the beginning of the list: function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.is
ready) { var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; s += freegb.tofixed(3) + " gb free of "; s += totalgb.tofixed(3) + " gb"; } else { s += "not
ready"; } s += "<br />"; e.movenext(); } return(s); } requirements supported in the follo...
Enumerator.moveNext - Archive of obsolete content
e movenext method is used to move to the next drive in the drives collection: function showdrives() { var s = ""; var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); var e = new enumerator(fso.drives); e.movefirst(); while (e.atend() == false) { var drv = e.item(); s += drv.path + " - "; if (drv.is
ready) { var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; s += freegb.tofixed(3) + " gb free of "; s += totalgb.tofixed(3) + " gb"; } else { s += "not
ready"; } s += "<br />"; e.movenext(); } return(s); } requirements supported in the follo...
Enumerator - Archive of obsolete content
example the following code shows the usage of the enumerator object: var bytespergb = 1024 * 1024 * 1024; var fso = new activexobject("scripting.filesystemobject"); document.write(fso.drives); var e = new enumerator(fso.drives); var drivestring = ""; e.movefirst(); while (e.atend() == false) { var drv = e.item(); drivestring += drv.path + " - "; if (drv.is
ready){ var freegb = drv.freespace / bytespergb; var totalgb = drv.totalsize / bytespergb; drivestring += freegb.tofixed(3) + " gb free of "; drivestring += totalgb.tofixed(3) + " gb"; } else{ drivestring += "not
ready"; } drivestring += "<br />";; e.movenext(); } document.write(drivestring); // output: <drive information properties th...
GetObject - Archive of obsolete content
for example: myobject.line(9, 90); myobject.inserttext(9, 100, "hello, world."); myobject.saveas("c:\\drawings\\sample.drw"); note: use the getobject function when there is a current instance of the object, or if you want to create the object with a file al
ready loaded.
ECMAScript 2015 support in Mozilla - Archive of obsolete content
arraybuffer get arraybuffer[@@species] (firefox 48) dataview int8array uint8array uint8clampedarray int16array uint16array int32array uint32array float32array float64array get %typedarray%[@@species] (firefox 48) expressions and operators new.target (firefox 41) sp
read operator for arrays (firefox 16) use symbol.iterator property (firefox 36) sp
read operator for function calls (firefox 27) use symbol.iterator property (firefox 36) const (js 1.5, firefox 1.0) (es2015 compliance bug 950547 implemented in firefox 51) let (js 1.7, firefox 2) (es2015 compliance bug 950547 implemented in firefox 51) destructuring assignment (js 1.7, firefox ...
LiveConnect - Archive of obsolete content
mailing list newsgroup rss feed related topics javascript, plugins older notes (please update or remove as needed.) while the bloated liveconnect code in the mozilla source was removed in version 1.9.2 of the platform (see bug 442399), its former api has been restored (see also the specification and this th
read) (building on npapi?), and as of java 6 update 12, extensions as well as applets can make use of this restored api.
Flex - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further
reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css ...
Flexbox - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex flex-basis flex-direction flex-flow flex-grow flex-shrink flex-wrap justify-content order further
reading css flexible box layout module level 1 specification css flexbox guide: basic concepts of flexbox css flexbox guide: relationship of flexbox to other layout methods css flexbox guide: aligning items in a flex container css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis css flexbox guide: mastering wrapping of flex items css ...
Grid Areas - MDN Web Docs Glossary: Definitions of Web-related terms
1fr); grid-template-rows: 100px 100px; grid-template-areas: "a a b" "a a b"; } .item1 { grid-area: a; } .item2 { grid-area: b; } <div class="wrapper"> <div class="item1">item</div> <div class="item2">item</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns grid-template-areas grid-area further
reading css grid layout guide: basic concepts of grid layout css grid layout guide: grid template areas definition of grid areas in the css grid layout specification ...
Grid Cell - MDN Web Docs Glossary: Definitions of Web-related terms
: #ffd8a8; padding: 1em; color: #d9480f; } .wrapper { display: grid; grid-template-columns: repeat(3,1fr); grid-auto-rows: 100px; } <div class="wrapper"> <div>one</div> <div>two</div> <div>three</div> <div>four</div> <div>five</div> </div> learn more property reference grid-template-columns grid-template-rows grid-auto-rows grid-auto-columns further
reading css grid layout guide: basic concepts of grid layout definition of grid cells in the css grid layout specification ...
Grid Lines - MDN Web Docs Glossary: Definitions of Web-related terms
1fr [cols-end]; grid-template-rows: [row1-start] 100px [row2-start] 100px [rows-end]; } .item { grid-column-start: col1-start; grid-column-end: col3-start; grid-row-start: row1-start; grid-row-end: rows-end; } learn more property reference grid-template-columns grid-template-rows grid-column-start grid-column-end grid-column grid-row-start grid-row-end grid-row further
reading css grid layout guide: basic concepts of grid layout css grid layout guide: line-based placement with css grid css grid layout guide: layout using named grid lines css grid layout guide: css grids, logical values and writing modes definition of grid lines in the css grid layout specification ...
Semantics - MDN Web Docs Glossary: Definitions of Web-related terms
some of the benefits from writing semantic markup are as follows: search engines will consider its contents as important keywords to influence the page's search rankings (see seo) screen
readers can use it as a signpost to help visually impaired users navigate a page finding blocks of meaningful code is significantly easier than searching though endless divs with or without semantic or namespaced classes suggests to the developer the type of data that will be populated semantic naming mirrors proper custom element/component naming when approaching which markup to use, ask yoursel...
Server - MDN Web Docs Glossary: Definitions of Web-related terms
for example: an internet-connected web server is sending a html file to your browser software so that you can
read this page local area network server for file, name, mail, print, and fax minicomputers, mainframes, and super computers at data centers learn more general knowledge introduction to servers server (computing) on wikipedia ...
XInclude - MDN Web Docs Glossary: Definitions of Web-related terms
else if (href.match(/#$/, '') || href.match(/^#/, '')) { alert('fragment identifiers are disallowed in an xinclude "href" attribute'); return false; } var j; var xincludeparent = xinclude.parentnode; try { netscape.security.privilegemanager.enableprivilege('universalxpconnect universalbrowser
read'); // necessary with file:///-located files trying to reach external sites if (href !== null) { var response, responsetype; var request = new xmlhttprequest(); request.open('get', href, false); request.setrequestheader('if-modified-since', 'thu, 1 jan 1970 00:00:00 gmt'); request.se...
jQuery - MDN Web Docs Glossary: Definitions of Web-related terms
$(document).
ready(function(){ alert("hello world!"); $("#blackbox").hide(); }); the above code carries out the same function as the following code: window.onload = function() { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }; or: window.addeventlistener("load", () => { alert("hello world!"); document.getelementbyid("blackbox").style.display = "none"; }); learn more general knowledge jquery on wikipedia jquery ...
non-normative - MDN Web Docs Glossary: Definitions of Web-related terms
software specifications often contains information marked as non-normative or informative, which means that those are provided there for the purpose of helping the
readers to understand the specification better or to show an example or a best practice, and not needed to be followed as a rule.
Preferences system
you should be careful to
read the higs for the platforms you are targeting and use the xul preprocessor if necessary to set different window titles as appropriate.
Profile Manager
for this reason, if you attempt to launch firefox using profile manager, and it detects that another instance of firefox is al
ready running, it will automatically add the -no-remote argument for you, regardless of whether this launch option was checked.
Emscripten
read more about emscripten and try some demos, then get started with using it.
Installing JSHydra
converting html, xul, or xbl files into a
readable js equivalent is a work in progress, as is accounting for the preprocessing that mozilla files sometimes use.
Localization Use Cases
0 : 1; var sizeinfo = filesizeformatter.get
readablefilesize(size, fixeddigits); var _ = navigator.mozl10n.get; element.textcontent = _(l10nid, { size: sizeinfo.size, unit: _('byteunit-' + sizeinfo.unit) }); } the function is used like so: // application storage updateappfreespace: function storage_updateappfreespace() { var self = this; this.getfreespace(this.appstorage, function(freespace) { devicestoragehelper.showf...
L20n
internationalization for your web app first
read for developers looking to use the l20n infrastructure.
Leak And Bloat Tests
il.server.server1.directory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/local folders"); user_pref("mail.server.server2.directory", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail/tinderbox"); user_pref("mail.attachment.store.version", 1); user_pref("mail.folder.views.version", 1); user_pref("mail.spam.version", 1); user_pref("mailnews.quotingprefs.version", 1); user_pref("mailnews.ui.th
readpane.version", 6); changes to leak and bloat tests date and time (pst) description approx effect on numbers pre dec 2008 initial version - 2008/12/07 11:20 bug 463594 disabled os x and outlook address books via the preference settings mac lk -56.2kb.
MailNews automated testing
message manipulation: mark messages as
read, tag them, untag them, move them to other folders, trash them, etc.
NSPR Contributor Guide
the following are some general guidelines to use when implementing new features: don't export global variables your code must be th
read safe you must provide test cases that test all apis you are adding.
Anonymous Shared Memory
this restricts processes that do not inherit the shared memory from opening the file and
reading or writing its contents.
Hash Tables
warning: the nspr hash table library functions are not th
read safe.
NSPR Types
here are some simple examples of the use of these types: in dowhim.h: pr_extern( void ) dowhatimean( void ); static void pr_callback rootfunction(void *arg); in dowhim.c: pr_implement( void ) dowhatimean( void ) { return; }; prth
read *th
read = pr_createth
read(..., rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit in...
Named Shared Memory
shared memory protocol named shared memory functions shared memory protocol using named shared memory functions pr_opensharedmemory creates the shared memory segment, if it does not al
ready exist, or opens a connection with the existing shared memory segment if it al
ready exists.
PR_LoadLibrary
the function suppresses duplicate loading if the library is al
ready known by the runtime.
PR_MSEC_PER_SEC
a convenience macro to improve code
readability as well as to avoid mistakes in counting the number of zeros; represents the number of milliseconds in a second.
PR_NSEC_PER_MSEC
a convenience macro to improve code
readability as well as to avoid mistakes in counting the number of zeros; represents the number of nanoseconds in a millisecond.
PR_NSEC_PER_SEC
a convenience macro to improve code
readability as well as to avoid mistakes in counting the number of zeros; represents the number of nanoseconds in a second.
PR_OpenAnonFileMap
description if the shared memory al
ready exists, a handle is returned to that shared memory object.
PR_OpenDir
description pr_opendir opens the directory specified by the pathname name and returns a pointer to a directory stream (a prdir object) that can be passed to subsequent pr_
readdir calls to get the directory entries (files and subdirectories) in the directory.
PR_OpenSemaphore
syntax #include <pripcsem.h> #define pr_sem_create 0x1 /* create if not exist */ #define pr_sem_excl 0x2 /* fail if al
ready exists */ nspr_api(prsem *) pr_opensemaphore( const char *name, printn flags, printn mode, pruintn value ); parameters the function has the following parameters: name the name to be given the semaphore.
PR_QueueJob_Accept
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_accept( prth
readpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_QueueJob_Connect
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_connect( prth
readpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_QueueJob_Timer
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prth
readpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_QueueJob_Write
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_write( prth
readpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prth
readpool structure previously created by a call to pr_createth
readpool.
PR_Rename
if a file with the new name al
ready exists, pr_rename fails with the error code pr_file_exists_error.
PR_Seek
moves the current
read-write file pointer by an offset expressed as a 32-bit integer.
PR_Seek64
moves the current
read-write file pointer by an offset expressed as a 64-bit integer.
PR_SendTo
the calling th
read blocks until all bytes are sent, a timeout has occurred, or there is an error.
NSS 3.12.4 release notes
_reset should be invoked in sdb_findobjectsinit when error occurs bug 494073: update rsa/dsa powerupself tests to be compliant for 2011 bug 494087: passing null as the value of cert_pi_trustanchors causes a crash in cert_pkixsetparam bug 494107: during nss_nodb_init(), softoken tries but fails to load libsqlite3.so crash [@ @0x0 ] bug 495097: sdb_mapsqlerror returns signed int bug 495103: nss_init
readwrite(sql:<dbdir>) causes nss to look for sql:<dbdir>/libnssckbi.so bug 495365: add const to the 'nickname' parameter of sec_certnicknameconflict bug 495656: nss_init
readwrite(sql:<configdir>) leaves behind a pkcs11.txu file if libnssckbi.so is in <configdir>.
NSS 3.14.2 release notes
bug 813857 - modification of certificate trust flags from multiple th
reads is now a th
read-safe operation.
NSS 3.14.4 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data
read in the event of a decryption failure.
NSS 3.16 release notes
it just verifies the signature, assuming that the certificate has been verified al
ready.
NSS 3.21 release notes
ckm_tls_mac - computes tls finished mac in secoidt.h nss_use_alg_in_ssl_kx - policy flag indicating that keys are used in tls key exchange in sslerr.h ssl_error_rx_short_dtls_
read - error code for failure to include a complete dtls record in a udp packet ssl_error_no_supported_signature_algorithm - error code for when no valid signature and hash algorithm is available ssl_error_unsupported_signature_algorithm - error code for when an unsupported signature and hash algorithm is configured ssl_error_missing_extended_master_secret - error code for when the extended m...
NSS 3.28.2 release notes
bugs fixed in nss 3.28.2 bug 1334114 - nss 3.28 regression in signature scheme flexibility, causes connectivity issue between ios 8 clients and nss servers with ecdsa certificates bug 1330612 - x25519 is the default curve for ecdhe in nss bug 1323150 - crash [@
readdbentry ] compatibility nss 3.28.2 shared libraries are backward compatible with all older nss 3.x shared libraries.
NSS 3.44 release notes
dnss_disable_chachapoly 1532312 - post-handshake auth doesn't interoperate with openssl 1542741 - certutil -f crashes with segmentation fault 1546925 - allow preceding text in try comment 1534468 - expose chacha20 primitive 1418944 - quote cc/cxx variables passed to nspr 1543545 - allow to build nss as a static library 1487597 - early data that arrives before the handshake completes can be
read afterwards 1548398 - freebl_gtest not building on linux/mac 1548722 - fix some coverity warnings 1540652 - softoken/sdb.c: logically dead code 1549413 - android log lib is not included in build 1537927 - ipsec usage is too restrictive for existing deployments 1549608 - signature fails with dbm disabled 1549848 - allow building nss for ios using gyp 1549847 - nss's sqlite compilation warni...
NSS 3.51 release notes
bug 1538980 - secu_
readderfromfile calls strstr on a string that isn't guaranteed to be null-terminated bug 1561337 - correct a warning for comparison of integers of different signs: 'int' and 'unsigned long' in security/nss/lib/freebl/ecl/ecp_25519.c:88 bug 1609751 - add test for mp_int clamping bug 1582169 - don't attempt to
read the fips_enabled flag on the machine unless nss was built with fips enabled bug 14319...
NSS Sample Code Sample_1_Hashing
unsigned int len; unsigned int digestlen; hash_hashtype hashtype; hashcontext *hashcontext = null; hashtype = hash_gethashtypebyoidtag(hashoidtag); hashcontext = hash_create(hashtype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_
read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
NSS Sample Code sample2
h; pk11slotinfo* slot = null; pk11symkey* symkey = null; secitem* secparam = null; pk11context* enccontext = null; secitem keyitem, ivitem; secstatus rv, rv1, rv2; unsigned char data[1024], buf1[1024], buf2[1024]; int i, result_len, tmp1_outlen, tmp2_outlen; /* initialize nss * if your application code has al
ready initialized nss, you can skip it * here.
NSS Sample Code sample3
++) printf("%02x ", digest[i]); cout << endl; } /* * main */ int main(int argc, const char *argv[]) { int status = 0; pk11slotinfo *slot = 0; pk11symkey *key = 0; pk11context *context = 0; unsigned char data[80]; unsigned char digest[20]; /*is there a way to tell how large the output is?*/ unsigned int len; secstatus s; /* initialize nss * if your application code has al
ready initialized nss, you can skip it * here.
Hashing - sample 1
unsigned char digest[64]; unsigned int len; hash_hashtype hashtype; hashcontext *hashcontext = null; hashtype = hash_gethashtypebyoidtag(hashoidtag); hashcontext = hash_create(hashtype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_
read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
sample1
t len; unsigned int digestlen; hash_hashtype hashtype; hashcontext *hashcontext = null; hashtype = hash_gethashtypebyoidtag(hashoidtag); hashcontext = hash_create(hashtype); if (hashcontext == null) { return secfailure; } do { hash_begin(hashcontext); /* incrementally hash the file contents */ while ((nb = pr_
read(infile, ibuf, sizeof(ibuf))) > 0) { hash_update(hashcontext, ibuf, nb); } hash_end(hashcontext, digest, &len, 64); /* normally we would write it out in binary with * nb = pr_write(outfile, digest, len); * but for illustration let's print it in hex.
nss tech note4
icate* cert = ssl_localcertificate(prfiledesc *fd); if ssl client, this will get you the client cert's handle, if client auth happened if ssl server, this will get you the server's cert handle don't forget to clean up the cert handle when you're done with it void cert_destroycertificate(certcertificate *cert); some info is
readily available cert->subjectname (char*) cert->issuername (char*) cert->emailaddr (char*) or char *cert_getcertificateemailaddress(certcertificate *cert); cert->keyusage (unsigned int) to break the issuer and subject names into components pass &(cert->issuer) or &(cert->subject) to the following functions char *cert_getcommonn...
PKCS11 module installation
pkcs #11 modules are external modules which add to firefox support for smartcard
readers, biometric security devices, and external certificate stores.
FC_GetSessionInfo
otherwise, it fills in the ck_session_info structure with the following information: state: the state of the session, i.e., no role is assumed, the user role is assumed, or the crypto officer role is assumed flags: bit flags that define the type of session ckf_rw_session (0x00000002): true if the session is
read/write; false if the session is
read-only.
NSS Key Functions
when an application makes a copy of a particular certificate or key structure that al
ready exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
NSS tools : crlutil
if options -m|-g is used and -c crl-script-file is not specified, crlutil will
read script data from standard input.
sslcrt.html
when an application makes a copy of a particular certificate or key structure that al
ready exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
sslkey.html
when an application makes a copy of a particular certificate or key structure that al
ready exists in memory, ssl makes a shallow copy--that is, it increments the reference count for that object rather than making a whole new copy.
NSS_3.12.3_release_notes.html
the information in this table is excerpted from https://developer.mozilla.org/en/nss_reference/nss_environment_variables environment variable value type description nsrandcount integer (byte count) sets the maximum number of bytes to
read from the file named in the environment variable nsrandfile (see below).
NSS Tools crlutil
if options -m|-g is used and -c crl-script-file is not specified, crlutil will
read script data from standard input.
NSS Tools pk12util
error codes pk12util can return the following values: 0 - no error 1 - user cancelled 2 - usage error 6 - nls init error 8 - certificate db open error 9 - key db open error 10 - file initialization error 11 - unicode conversion error 12 - temporary file creation error 13 - pkcs11 get slot error 14 - pkcs12 decoder start error 15 - error
read from import file 16 - pkcs12 decode error 17 - pkcs12 decoder verify error 18 - pkcs12 decoder validate bags error 19 - pkcs12 decoder import bags error 20 - key db conversion version 3 to version 2 error 21 - cert db conversion version 7 to version 5 error 22 - cert and key dbs patch error 23 - get default cert db error 24 - find cert by nickname error 25 - create export context error 26 - pkcs1...
NSS tools : crlutil
if options -m|-g is used and -c crl-script-file is not specified, crlutil will
read script data from standard input.
The Necko HTTP module
transaction model this document describes the lifetime of a http transaction, the th
reads involved, and the relevant objects.
Necko Interfaces Overview
he channels complete) all channels owned by a load group can be canceled at once via the load group's nsirequest::cancel method nsitransport represents a physical connection, such as a file descriptor or a socket used directly by protocol handler implementations (as well as by mailnews and chatzilla) synchronous i/o methods: openinputstream, openoutputstream asynchronous i/o methods: async
read, asyncwrite nsitransport::async
read takes a nsistreamlistener parameter original document information author(s): darin fisher last updated date: december 10, 2001 copyright information: portions of this content are © 1998–2007 by individual mozilla.org contributors; content available under a creative commons license | details.
Necko
browse our code in its latest state at netwerk/ documents a necko code walkthrough necko architecture necko multith
reading necko faq necko interfaces overview the necko http module proxies in necko pac files community view mozilla forums...
Installing Pork
apply this patch: note: this doesn't seem necessary in the latest version; cppflags is al
ready an argument.
Pork Tools
var = getter(); // detect ns_ensure_success immediately following // and change it to an equivalent ns_ensure_true ns_ensure_true(var, ns_error_failure); // case 2 var = getter(); // case 3, eliminate rv2 decl given that it's not used elsewhere var = getter(); ns_ensure_true(var, ns_error_failure) } outparamdel also support rewriting getters such that they return al
ready_addrefed<nsifoo>.
Rhino documentation
scopes and contexts describes how to use scopes and contexts for the best performance and flexibility, with an eye toward multith
readed environments.
Rhino downloads archive
if you are looking for js.jar for xslt or for ibm's bean scripting framework (bsf), please
read the following note and then download one of the zip files above and unzip it.
Rebranding SpiderMonkey (1.8.5)
search for this text: mozjs185.pc "scroll down" a few lines until you see this line: > $@ && chmod 644 $@ that line should be modified to
read back: > $brand.pc && chmod 644 $brand.pc "scroll down" a few lines until you see these lines: install:: $(pkg_config_files) @echo pkg_config_file: $(pkg_config_files) those two lines should be modified to
read back: install:: $brand.pc @echo pkg_config_file: $brand.pc note: while it is possible to automate the manual editing process, this has been discouraged due to the fact that t...
Future directions
it can be
read as something like an "ideal future state" for the engine.
GC Rooting Guide
the usual way is to define a void trace(jstracer* trc, const char* name) method on the class -- which is al
ready enough be able to create a js::rooted<yourstruct> on the stack -- and then arrange for it to be called during tracing.
64-bit Compatibility
lir safety it is not immediately clear from
reading lir which opcodes should be used for 64-bit safety.
Statistics API
the browser preference javascript.options.mem.log controls dumping of human-
readable gc stats messages to the developer console.
JS::AutoIdArray
in a js_th
readsafe build, the caller must be in a request on this jscontext.
XML Extras
xmlhttprequest.open("ahost") ok file:// documents can access http:// documents but you need to enable universalbrowser
read privilege in your scripts - see the javascript security: signed scripts document for more details.
Creating a Python XPCOM component
creating applications with mozilla al
ready provides a tutorial for making a simple javascript or c++ component (implementing the nsisimple interface).
Generic factory
fine_iid(kifactoryiid, ns_ifactory_iid); ns_impl_isupports(nsgenericfactory, kifactoryiid) ns_imethodimp nsgenericfactory::createinstance(nsisupports *aouter, refnsiid aiid, void **aresult) { return mcreator(aouter, aiid, aresult); } ns_imethodimp nsgenericfactory::lockfactory(prbool alock) { return ns_ok; } many of our classes al
ready have a static entry point that serves as the creator function, so in most cases, creating a new factory for a class is just: nsifactory* newmallocfactory() { nsifactory* factory = new nsgenericfactory(&nsmalloc::create); factory->addref(); return factory; } talking to warren, he suggests that we even provide a shorthand for this, we should be able to register a factory with just a fu...
Setting up the Gecko SDK
we also link against a number of libraries in the object/library modules line: nspr4.lib plds4.lib plc4.lib embedstring.lib xpcomglue.lib both of these settings are shown below: the last change you need to make to set up the gecko sdk in your project is to change the "use run-time library" setting to "multith
readed dll." since this change is configuration dependent, you must make set the release configuration run-time library to the release multith
readed dll runtime and the debug configuration to the debug multith
readed dll runtime (this needs clarification): after making these changes, press ok.
Inheriting from implementation classes
} th
readsafe if you want to make this th
readsafe, you can replace ns_impl_isupports1(a, ia) with ns_impl_th
readsafe_isupports1(a, ia) in the base implementation class only (e.g.
Receiving startup notifications
once that process is completed, extensions can then be loaded by simply
reading their manifests, loading their components, and continuing with application startup, all without having to restart the browser.
Components.Constructor
ibinaryinputstream", "setinputstream"); try { // throws, because number of arguments isn't equal to the number of // arguments nsibinaryinputstream.setinputstream takes var bis = new binaryinputstream(); } catch (e) { // someinputstream is an existing nsiinputstream bis = new binaryinputstream(someinputstream); // succeeds var bytes = bis.
readbytearray(somenumberofbytes); // succeeds } compare instance creation from base principles with instance creation using components.constructor(); the latter is much easier to
read than the former (particularly if you're creating instances of a component in many different places): var bis = components.classes["@mozilla.org/binaryinputstream;1"] .createinstance(components.inte...
Components.ID
the exception to this is the case where a component is written in javascript and needs to register itself with the component manager using its own nsid - an id that is not al
ready registered and thus does not appear in components.classes.
Components.results
components.results is a
read-only object whose properties are the names listed as the first parameters of the macros in js/xpconnect/src/xpc.msg (also at table of errors), with the value of each corresponding to that constant's value.
Components.stack
components.stack is a
read only property of type nsistackframe (idl definition) that represents a snapshot of the current javascript callstack.
Components.utils.Sandbox
romise (removed in firefox 37) css indexeddb (web worker only) xmlhttprequest textencoder textdecoder url urlsearchparams atob btoa blob file crypto rtcidentityprovider fetch (added in firefox 41) caches file
reader for example: var sandboxscript = 'var encoded = btoa("hello");' + 'var decoded = atob(encoded);'; var options = { "wantglobalproperties": ["atob", "btoa"] } var sandbox = components.utils.sandbox("https://example.org/", options); components.utils.evalinsandbox(sandboxscript, sandbox); console.log(sandbox.encoded); // "sgvsbg8=" console.log(sandb...
Components.utils.evalInWindow
the result is structured cloned back to the original context, unless it is native (for example, if it returns a dom node, this is not structured cloned, because the original context will see that through an xraywrapper al
ready), so it's guaranteed to behave predictably.
nsIMacDockSupport
this can be used, for example, to display the number of un
read messages in an email client.
nsIMemory
void heapminimize( in boolean immediate ); parameters immediate if true, heap minimization will occur immediately if the call was made on the main th
read.
nsIMicrosummaryService
the set might change after this method returns, since this method will trigger an asynchronous load of the page in question (if it isn't al
ready loaded) to see if it references any page-specific microsummaries.
nsIMimeHeaders
????????"] .createinstance(components.interfaces.nsimimeheaders); method overview string extractheader([const] in string headername, in boolean getallofthem); void initialize([const] in string allheaders, in long allheaderssize); attributes attribute type description allheaders string
read only.
nsIMsgDBViewCommandUpdater
last changed in gecko 1.9 (firefox 3) inherits from: nsisupports in thunderbird this is implemented for different windows in several different places: nsmsgdbviewcommandupdater (for the standalone message window) nsmsgdbviewcommandupdater (for the th
readpane message window) nsmsgsearchcommandupdater (for search dialogs) method overview void updatecommandstatus(); void displaymessagechanged(in nsimsgfolder afolder, in astring asubject, in acstring akeywords); void updatenextmessageafterdelete(); methods updatecommandstatus() called when the number of selected items changes.
nsIMsgFilter
throws an exception if the action is not label attribute nsmsglabelvalue label; junkscore attribute long junkscore; strvalue attribute autf8string strvalue; customid // action id if type is custom attribute acstring customid; customaction // custom action associated with customid // (which must be set prior to
reading this attribute)
readonly attribute nsimsgfiltercustomaction customaction; methods addterm() void nsimsgfilter::addterm ( in nsmsgsearchattribvalue attrib, in nsmsgsearchopvalue op, in nsimsgsearchvalue value, in boolean booleanand, in acstring arbitraryheader ) getterm() void nsimsgfilter::getterm ( in long ...
nsIMsgFilterList
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgfilterlist.idl attributes folder attribute nsimsgfolder nsimsgfilterlist::folder version
readonly attribute short nsimsgfilterlist::version arbitraryheaders
readonly attribute acstring nsimsgfilterlist::arbitraryheaders shoulddownloadallheaders
readonly attribute boolean nsimsgfilterlist::shoulddownloadallheaders filtercount
readonly attribute unsigned long nsimsgfilterlist::filtercount loggingenabled attribute boolean nsimsgfilterlist::loggingenabled defaultfile attribute nsilocalfile nsimsgfilterlist::defaultfile logstream attribute nsioutputstream nsimsgfilterlist::logstream logurl
readonly attribute acstring nsimsgfilterlist::logurl methods getfilterat() nsimsgfilter nsimsgfilterlist::getfilterat (in unsigned...
nsIMsgRuleAction
throws an exception if the action is not label attribute nsmsglabelvalue label; // junkscore throws an exception if the action type is not junkscore attribute long junkscore; attribute autf8string strvalue; // action id if type is custom attribute acstring customid; // custom action associated with customid // (which must be set prior to
reading this attribute)
readonly attribute nsimsgfiltercustomaction customaction; }; ...
nsIMsgSearchScopeTerm
defined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchscopeterm.idl [scriptable, uuid(934672c3-9b8f-488a-935d-87b4023fa0be)] interface nsimsgsearchscopeterm : nsisupports { nsiinputstream getinputstream(in nsimsgdbhdr ahdr); void closeinputstream();
readonly attribute nsimsgfolder folder;
readonly attribute nsimsgsearchsession searchsession; }; ...
nsIMsgSearchSession
chtype setsearchparam(in nsmsgsearchtype type, in voidptr param); [noscript] void addresultelement(in nsmsgresultelement element); boolean matchhdr(in nsimsgdbhdr amsghdr, in nsimsgdatabase adatabase); void addsearchhit(in nsimsgdbhdr header, in nsimsgfolder folder); attributes attribute type description searchterms nsisupportsarray
readonly: numsearchterms unsigned long
readonly: runningadapter nsimsgsearchadapter
readonly: searchparam voidptr not scriptable and
readonly: searchtype nsmsgsearchtype
readonly: numresults long
readonly: window nsimsgwindow constants name value description booleanor 0 ...
nsINavHistoryResultObserver
although this attribute is
read-write, you should not alter it directly; instead, call nsinavhistoryresult.addobserver() to add an observer to a result.
AddressErrors.addressLine - Web APIs
syntax var addresslineerror = addresserrors.addressline; value if an error occurred during validation of the address due to one of the strings in the addressline array having an invalid value, this property is set to a domstring providing a human-
readable error message explaining the validation error.
AddressErrors.city - Web APIs
syntax var cityerror = addresserrors.city; value if the value specified in the paymentaddress object's city property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.country - Web APIs
syntax var countryerror = addresserrors.country; value if an error occurred during validation of the address due to the country property having an invalid value, this property is set to a domstring providing a human-
readable error message explaining the validation error.
AddressErrors.dependentLocality - Web APIs
syntax var localityerror = addresserrors.dependentlocality; value if the value specified in the paymentaddress object's dependentlocality property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.languageCode - Web APIs
syntax var languageerror = addresserrors.languagecode; value if the value specified in the paymentaddress object's languagecode property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.organization - Web APIs
syntax var organizationerror = addresserrors.organization; value if the value specified in the paymentaddress object's organization property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.phone - Web APIs
syntax var phoneerror = addresserrors.phone; value if the value specified in the paymentaddress object's phone property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.postalCode - Web APIs
syntax var postcodeerror = addresserrors.postcode; value if the value specified in the paymentaddress object's postalcode property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.recipient - Web APIs
syntax var recipienterror = addresserrors.recipient; value if the value specified in the paymentaddress object's recipient property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.region - Web APIs
syntax var regionerror = addresserrors.region; value if the value specified in the paymentaddress object's region property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.regionCode - Web APIs
syntax var regioncodeerror = addresserrors.regioncode; value if the value specified in the paymentaddress object's regioncode property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AddressErrors.sortingCode - Web APIs
syntax var sortingcodeerror = addresserrors.sortingcode; value if the value specified in the paymentaddress object's sortingcode property could not be validated, this property contains a domstring offering a human-
readable explanation of the validation error and offers suggestions for correcting it.
AmbientLightSensor.illuminance - Web APIs
example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.on
reading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
AmbientLightSensor - Web APIs
example if ( 'ambientlightsensor' in window ) { const sensor = new ambientlightsensor(); sensor.on
reading = () => { console.log('current light level:', sensor.illuminance); }; sensor.onerror = (event) => { console.log(event.error.name, event.error.message); }; sensor.start(); } specifications specification status comment generic sensor api candidate recommendation defines sensors in general.
Comment - Web APIs
the comment interface represents textual notations within markup; although it is generally not visually shown, such comments are available to be
read in the source view.
CompositionEvent.data - Web APIs
the data
read-only property of the compositionevent interface returns the characters generated by the input method that raised the event; its exact nature varies depending on the type of event that generated the compositionevent object.
CompositionEvent.locale - Web APIs
the locale
read-only property of the compositionevent interface returns the locale of current input method (for example, the keyboard layout locale if the composition is associated with ime).
Console.group() - Web APIs
the console.groupcollapsed() method is similar, but the new block is collapsed and requires clicking a disclosure button to
read it.
console - Web APIs
the console.groupcollapsed() method is similar but creates the new block collapsed, requiring the use of a disclosure button to open it for
reading.
ConstantSourceNode() - Web APIs
options a constantsourceoptions dictionary object defining the properties you want the constantsourcenode to have: offset: a
read-only audioparam specifying the constant value generated by the source.
ConstantSourceNode - Web APIs
to see this example in action, as well as to
read the rest of the code from which these snippets were derived, see controlling multiple parameters with constantsourcenode.
ContentIndex.add() - Web APIs
amet.html', title: 'amet consectetur adipisicing', description: 'repellat et quia iste possimus ducimus aliquid a aut eaque nostrum.', icons: [{ src: '/media/dark.png', sizes: '128x128', type: 'image/png', }], category: 'article' }; // our asynchronous function to add indexed content async function registercontent(data) { const registration = await navigator.serviceworker.
ready; // feature detect content index if (!registration.index) { return; } // register content try { await registration.index.add(data); } catch (e) { console.log('failed to register content: ', e.message); } } the add method can also be used within the service worker scope.
ContentIndex.delete() - Web APIs
async function unregistercontent(article) { // reference registration const registration = await navigator.serviceworker.
ready; // feature detect content index if (!registration.index) return; // unregister content from index await registration.index.delete(article.id); } the delete method can also be used within the service worker scope.
ContentIndexEvent.id - Web APIs
the
read-only id property of the contentindexevent interface is a string which identifies the deleted content index via it's id.
Crypto.subtle - Web APIs
the crypto.subtle
read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations.
Crypto - Web APIs
crypto.subtle
read only secure context returns a subtlecrypto object providing access to common cryptographic primitives, like hashing, signing, encryption, or decryption.
CustomElementRegistry.define() - Web APIs
exceptions exception description notsupportederror the customelementregistry al
ready contains an entry with the same name or the same constructor (or is otherwise al
ready defined), or extends is specified and it is a valid custom element name, or extends is specified but the element it is trying to extend is an unknown element.
Element: compositionend event - Web APIs
istener('compositionend', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd {...
Element: compositionstart event - Web APIs
tener('compositionstart', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd {...
Element: compositionupdate event - Web APIs
ener('compositionupdate', (event) => { console.log(`generated characters were: ${event.data}`); }); live example html <div class="control"> <label for="name">on macos, click in the textbox below,<br> then type <kbd>option</kbd> + <kbd>`</kbd>, then <kbd>a</kbd>:</label> <input type="text" id="example" name="example"> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="25"></textarea> <button class="clear-log">clear</button> </div> css body { padding: .2rem; display: grid; grid-template-areas: "control log"; } .control { grid-area: control; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } input[type="text"] { margin: .5rem 0; } kbd {...
Element.currentStyle - Web APIs
polyfill this polyfill returns the values in pixels and is likely to be rather slow, as it has to call window.getcomputedstyle() every time its value is
read.
Element: error event - Web APIs
examples live example html <div class="controls"> <button id="img-error" type="button">generate image error</button> <img class="bad-img" /> </div> <div class="event-log"> <label>event log:</label> <textarea
readonly class="event-log-contents" rows="8" cols="30"></textarea> </div> css body { display: grid; grid-template-areas: "control log"; } .controls { grid-area: control; display: flex; align-items: center; justify-content: center; } .event-log { grid-area: log; } .event-log-contents { resize: none; } label, button { display: block; } button { height: 2rem; margin: .5rem;...
Element.getClientRects() - Web APIs
each domrect object contains
read-only left, top, right and bottom properties describing the border box, in pixels, with the top-left relative to the top-left of the viewport.
Element.innerHTML - Web APIs
reading the html contents of an element
reading innerhtml causes the user agent to serialize the html or xml fragment comprised of the element's descendants.
Element.namespaceURI - Web APIs
the element.namespaceuri
read-only property returns the namespace uri of the element, or null if the element is not in a namespace.
Element.outerHTML - Web APIs
syntax var content = element.outerhtml; element.outerhtml = htmlstring; value
reading the value of outerhtml returns a domstring containing an html serialization of the element and its descendants.
The HTML DOM API - Web APIs
this code looks at the length of the current value of the input; if it's zero, then the "send" button is disabled if it's not al
ready disabled.
History.length - Web APIs
the history.length
read-only property returns an integer representing the number of elements in the session history, including the currently loaded page.
Ajax navigation example - Web APIs
-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: "al
ready reported", 226: "im used", 300: "multiple choices", 301: "moved permanently", 302: "found", 303: "see other", 304: "not modified", 305: "use proxy", 306: "reserved", 307: "temporary redirect", 308: "permanent redirect", 400: "bad request", 401: "unauthor...
IDBCursor.advance() - Web APIs
for a complete working example, see our idbcursor example (view example live.) function advanceresult() { list.innerhtml = ''; var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.albumtitle + '</strong>, ' + cursor.value.year; list.appendchild(listitem); cursor.advance(2); } ...
IDBCursor.continue() - Web APIs
for a complete working example, see our idbcursor example (view example live.) function displaydata() { var transaction = db.transaction(['rushalbumlist'], "
readonly"); var objectstore = transaction.objectstore('rushalbumlist'); objectstore.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = cursor.value.albumtitle + ', ' + cursor.value.year; list.appendchild(listitem); cursor.continue(); } else { console.
IDBDatabase.createObjectStore() - Web APIs
has been deleted or removed.) in firefox previous to version 41, an invalidstateerror was raised in this case as well, which was misleading; this has now been fixed (see bug 1176165.) constrainterror an object store with the given name (based on case-sensitive comparison) al
ready exists in the connected database.
IDBDatabase.name - Web APIs
the name
read-only property of the idbdatabase interface is a domstring that contains the name of the connected database.
IDBDatabase.objectStoreNames - Web APIs
the objectstorenames
read-only property of the idbdatabase interface is a domstringlist containing a list of the names of the object stores currently in the connected database.
IDBEnvironment - Web APIs
properties idbenvironment.indexeddb
read only provides a mechanism for applications to asynchronously access capabilities of indexed databases; contains an idbfactory object.
IDBEnvironmentSync - Web APIs
attributes attribute type description indexeddbsync
readonly idbfactorysync provides a synchronous means of accessing the capabilities of indexed databases.
IDBIndex.keyPath - Web APIs
for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.keypath); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '...
IDBIndex.objectStore - Web APIs
for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); console.log(myindex.objectstore); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' ...
IDBKeyRange.bound() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at the idbkeyrange directory in the indexeddb-examples repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.lowerBound() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.lowerbound("f"); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.only() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.only("a"); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBKeyRange.upperBound() - Web APIs
note: for a more complete example allowing you to experiment with key range, have a look at our idbkeyrange-example repo (view the example live too.) function displaydata() { var keyrangevalue = idbkeyrange.upperbound("f"); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); objectstore.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var listitem = document.createelement('li'); listitem.innerhtml = '<strong>' + cursor.value.fthing + '</strong>, ' + cursor.value.frating; list.appendchild(listitem); cursor.c...
IDBLocaleAwareKeyRange - Web APIs
examples function displaydata() { var keyrangevalue = idblocaleawarekeyrange.bound("a", "f"); var transaction = db.transaction(['fthings'], '
readonly'); var objectstore = transaction.objectstore('fthings'); var myindex = objectstore.index('lname'); myindex.opencursor(keyrangevalue).onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' +...
IDBObjectStore.deleteIndex() - Web APIs
this is used a lot below db = this.result; // run the displaydata() function to populate the task list with all the to-do list data al
ready in the idb displaydata(); }; // this event handles the event whereby a new version of the database needs to be created // either one has not been created before, or a new version number has been submitted via the // window.indexeddb.open line above //it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(eve...
IDBObjectStore.getKey() - Web APIs
the getkey() method of the idbobjectstore interface returns an idbrequest object, and, in a separate th
read, returns the key selected by the specified query.
IDBObjectStore.index() - Web APIs
for a complete working example, see our idbindex-example demo repo (view the example live.) function displaydatabyindex() { tableentry.innerhtml = ''; var transaction = db.transaction(['contactslist'], '
readonly'); var objectstore = transaction.objectstore('contactslist'); var myindex = objectstore.index('lname'); myindex.opencursor().onsuccess = function(event) { var cursor = event.target.result; if(cursor) { var tablerow = document.createelement('tr'); tablerow.innerhtml = '<td>' + cursor.value.id + '</td>' + '<td>' + cursor.value.lname + '</t...
IDBObjectStore.openKeyCursor() - Web APIs
example in this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store: var transaction = db.transaction("name", "
readonly"); var objectstore = transaction.objectstore("name"); var request = objectstore.openkeycursor(); request.onsuccess = function(event) { var cursor = event.target.result; if(cursor) { // cursor.key contains the key of the current record being iterated through // note that there is no cursor.value, unlike for opencursor // this is where you'd do something with the result curs...
IDBOpenDBRequest.onblocked - Web APIs
// this is used a lot below db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data al
ready in the idb displaydata(); }; // this event handles the event whereby a new version of the // database needs to be created.
IDBOpenDBRequest - Web APIs
this is used a lot below db = dbopenrequest.result; // run the displaydata() function to populate the task // listwith all the to-do list data al
ready in the idb displaydata(); }; // this event handles the event whereby a new version of // the database needs to be created either one has not // been created before, or a new version number has been // submitted via the window.indexeddb.open line above // it is only implemented in recent browsers dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function...
IDBRequest.onerror - Web APIs
for a full working example, see our to-do notifications app (view example live.) var title = "walk dog"; // open up a transaction as usual var objectstore = db.transaction(['todolist'], "
readwrite").objectstore('todolist'); // get the to-do list object that has this title as it's title var objectstoretitlerequest = objectstore.get(title); objectstoretitlerequest.onsuccess = function() { // grab the data object returned as the result var data = objectstoretitlerequest.result; // update the notified value in the object to "yes" data.notified = "yes"; // create another requ...
PerformanceTiming.connectEnd - Web APIs
the legacy performancetiming.connectend
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the connection is opened network.
PerformanceTiming.connectStart - Web APIs
the legacy performancetiming.connectstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the request to open a connection is sent to the network.
PerformanceTiming.domComplete - Web APIs
the legacy performancetiming.domcomplete
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.
readystate changes to 'complete' and the corresponding
readystatechange event is thrown.
PerformanceTiming.domContentLoadedEventEnd - Web APIs
the legacy performancetiming.domcontentloadedeventend
read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after all the scripts that need to be executed as soon as possible, in order or not, has been executed.
PerformanceTiming.domContentLoadedEventStart - Web APIs
the legacy performancetiming.domcontentloadedeventstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, right before the parser sent the domcontentloaded event, that is right after all the scripts that need to be executed right after parsing has been executed.
PerformanceTiming.domInteractive - Web APIs
the legacy performancetiming.dominteractive
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser finished its work on the main document, that is when its document.
readystate changes to 'interactive' and the corresponding
readystatechange event is thrown.
PerformanceTiming.domLoading - Web APIs
the legacy performancetiming.domloading
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the parser started its work, that is when its document.
readystate changes to 'loading' and the corresponding
readystatechange event is thrown.
PerformanceTiming.domainLookupEnd - Web APIs
the legacy performancetiming.domainlookupend
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup is finished.
PerformanceTiming.domainLookupStart - Web APIs
the legacy performancetiming.domainlookupstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the domain lookup starts.
PerformanceTiming.fetchStart - Web APIs
the legacy performancetiming.fetchstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the browser is
ready to fetch the document using an http request.
PerformanceTiming.navigationStart - Web APIs
the legacy performancetiming.navigationstart
read-only property returns an unsigned long long representing the moment, in milliseconds since the unix epoch, right after the prompt for unload terminates on the previous document in the same browsing context.
PerformanceTiming.redirectEnd - Web APIs
the legacy performancetiming.redirectend
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the last http redirect is completed, that is when the last byte of the http response has been received.
PerformanceTiming.redirectStart - Web APIs
the legacy performancetiming.redirectstart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the first http redirect starts.
PerformanceTiming.requestStart - Web APIs
the legacy performancetiming.requeststart
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser sent the request to obtain the actual document, from the server or from a cache.
PerformanceTiming.responseEnd - Web APIs
the legacy performancetiming.responseend
read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, when the browser received the last byte of the response, or when the connection is closed if this happened first, from the server from a cache or from a local resource.
SourceBuffer.audioTracks - Web APIs
the audiotracks
read-only property of the sourcebuffer interface returns a list of the audio tracks currently contained inside the sourcebuffer.
SourceBuffer.buffered - Web APIs
the buffered
read-only property of the sourcebuffer interface returns the time ranges that are currently buffered in the sourcebuffer as a normalized timeranges object.
SourceBuffer.changeType() - Web APIs
usage notes if the parent mediasource is in its "ended"
readystate, calling changetype() will transition the media source to the "open"
readystate and fire a simple event named sourceopen at the parent media source.
SourceBuffer.mode - Web APIs
if timestamps al
ready exist for the media segments, then the value will be set to segments; if they don't, then the value will be set to sequence.
SourceBuffer.textTracks - Web APIs
the texttracks
read-only property of the sourcebuffer interface returns a list of the text tracks currently contained inside the sourcebuffer.
SourceBuffer.updating - Web APIs
the updating
read-only property of the sourcebuffer interface indicates whether the sourcebuffer is currently being updated — i.e.
SourceBuffer.videoTracks - Web APIs
the videotracks
read-only property of the sourcebuffer interface returns a list of the video tracks currently contained inside the sourcebuffer.
SourceBufferList - Web APIs
="_top"><rect x="151" y="1" width="160" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="231" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">sourcebufferlist</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties sourcebufferlist.length
read only returns the number of sourcebuffer objects in the list.
SpeechGrammarList.length - Web APIs
the length
read-only property of the speechgrammarlist interface returns the number of speechgrammar objects contained in the speechgrammarlist.
SpeechGrammarList - Web APIs
properties speechgrammarlist.length
read only returns the number of speechgrammar objects contained in the speechgrammarlist.
SpeechRecognition.abort() - Web APIs
turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('
ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'abort()' in that specification.
SpeechRecognition.start() - Web APIs
turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('
ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'start()' in that specification.
SpeechRecognition.stop() - Web APIs
turquoise | violet | white | yellow ;' var recognition = new speechrecognition(); var speechrecognitionlist = new speechgrammarlist(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('
ready to receive a color command.'); } abortbtn.onclick = function() { recognition.abort(); console.log('speech recognition aborted.'); } recognition.onspeechend = function() { recognition.stop(); console.log('speech recognition has stopped.'); } specifications specification status comment web speech apithe definition of 'stop()' in that specification.
SpeechRecognition - Web APIs
st(); speechrecognitionlist.addfromstring(grammar, 1); recognition.grammars = speechrecognitionlist; recognition.continuous = false; recognition.lang = 'en-us'; recognition.interimresults = false; recognition.maxalternatives = 1; var diagnostic = document.queryselector('.output'); var bg = document.queryselector('html'); document.body.onclick = function() { recognition.start(); console.log('
ready to receive a color command.'); } recognition.onresult = function(event) { var color = event.results[0][0].transcript; diagnostic.textcontent = 'result received: ' + color; bg.style.backgroundcolor = color; } specifications specification status comment web speech apithe definition of 'speechrecognition' in that specification.
WorkerNavigator.connection - Web APIs
the workernavigator.connection
read-only property returns a networkinformation object containing information about the system's connection, such as the current bandwidth of the user's device or whether the connection is metered.
WorkerNavigator.locks - Web APIs
the locks
read-only property of the workernavigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
WorkerNavigator.permissions - Web APIs
the workernavigator.permissions
read-only property returns a permissions object that can be used to query and update permission status of apis covered by the permissions api.
WritableStream.locked - Web APIs
the locked
read-only property of the writablestream interface returns a boolean indicating whether the writablestream is locked to a writer.
WritableStreamDefaultWriter.closed - Web APIs
the closed
read-only property of the writablestreamdefaultwriter interface returns a promise that fulfills if the stream becomes closed or the writer's lock is released, or rejects if the stream errors.
HTML in XMLHttpRequest - Web APIs
this test file is small and is not well-formed xml: <title>&&<</title> if the file is named detect.html, the following function can be used for detecting html parsing support: function detecthtmlinxhr(callback) { if (!window.xmlhttprequest) { window.settimeout(function() { callback(false); }, 0); return; } var done = false; var xhr = new window.xmlhttprequest(); xhr.on
readystatechange = function() { if (this.
readystate == 4 && !done) { done = true; callback(!!(this.responsexml && this.responsexml.title && this.responsexml.title == "&&<")); } } xhr.onabort = xhr.onerror = function() { if (!done) { done = true; callback(false); } } try { xhr.open("get", "detect.html"); xhr.responsetype = "document"; xhr.send...
init() - Web APIs
if this is specified, it is used even if the global has a window with a load group al
ready established.
XMLHttpRequest: abort event - Web APIs
event handler property onabort examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea
readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'...
XMLHttpRequest: error event - Web APIs
event handler property onerror examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea
readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'...
XMLHttpRequest: load event - Web APIs
event handler property onload examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea
readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'...
XMLHttpRequest: loadend event - Web APIs
event handler property onloadend examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea
readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'...
XMLHttpRequest: loadstart event - Web APIs
event handler property onloadstart examples live example html <div class="controls"> <input class="xhr success" type="button" name="xhr" value="click to start xhr (success)" /> <input class="xhr error" type="button" name="xhr" value="click to start xhr (error)" /> <input class="xhr abort" type="button" name="xhr" value="click to start xhr (abort)" /> </div> <textarea
readonly class="event-log"></textarea> css .event-log { width: 25rem; height: 4rem; border: 1px solid black; margin: .5rem; padding: .2rem; } input { width: 11rem; margin: .5rem; } js const xhrbuttonsuccess = document.queryselector('.xhr.success'); const xhrbuttonerror = document.queryselector('.xhr.error'); const xhrbuttonabort = document.queryselector('.xhr.abort'...
Mozilla CSS extensions - CSS: Cascading Style Sheets
:-moz-locale-dir(rtl) :-moz-lwtheme :-moz-lwtheme-brighttext :-moz-lwtheme-darktext n – r :-moz-native-anonymous :-moz-only-whitespace ::-moz-page ::-moz-page-sequence ::-moz-pagebreak ::-moz-pagecontent :-moz-placeholderobsolete since gecko 51 ::-moz-placeholderdeprecated since gecko 51 ::-moz-progress-bar ::-moz-range-progress ::-moz-range-thumb ::-moz-range-track :-moz-
read-only :-moz-
read-write s ::-moz-scrolled-canvas ::-moz-scrolled-content ::-moz-scrolled-page-sequence ::-moz-selectiondeprecated since gecko 62 :-moz-submit-invalid :-moz-suppressed ::-moz-svg-foreign-content t ::-moz-table ::-moz-table-cell ::-moz-table-column ::-moz-table-column-group ::-moz-table-outer ::-moz-table-row ::-moz-table-row-group :-moz-tree-cell :-moz-tr...
CSS reference - CSS: Cascading Style Sheets
tompadding-inlinepadding-inline-endpadding-inline-startpadding-leftpadding-rightpadding-top@pagepage-break-afterpage-break-beforepage-break-insidepaint()paint-orderpath()pc<percentage>perspectiveperspective()perspective-originplace-contentplace-itemsplace-self::placeholderpointer-eventspolygon()<position>positionprefix (@counter-style)ptpxqqquotesrradradial-gradient()range (@counter-style)<ratio>:
read-only:
read-writerect()remrepeat()repeating-linear-gradient()repeating-radial-gradient():requiredresize<resolution>revertrgb()rgba():rightright@right-bottom:rootrotaterotate()rotate3d()rotatex()rotatey()rotatez()row-gapsssaturate()scalescale()scale3d()scalex()scaley()scalez():scopescroll-behaviorscroll-marginscroll-margin-blockscroll-margin-block-endscroll-margin-block-startscroll-margin-bottomscro...
Syntax - CSS: Cascading Style Sheets
the css syntax reflects this goal and its basic building blocks are: the property which is an identifier, that is a human-
readable name, that defines which feature is considered.
background-color - CSS: Cascading Style Sheets
accessibility concerns it is important to ensure that the contrast ratio between the background color and the color of the text placed over it is high enough that people experiencing low vision conditions will be able to
read the content of the page.
color-adjust - CSS: Cascading Style Sheets
for example, when printing, a browser might opt to leave out all background images and to adjust text colors to be sure the contrast is optimized for
reading on white paper.
color - CSS: Cascading Style Sheets
accessibility concerns it is important to ensure that the contrast ratio between the color of the text and the background the text is placed over is high enough that people experiencing low vision conditions will be able to
read the content of the page.
content - CSS: Cascading Style Sheets
html <h1>5</h1> <p>according to sir tim berners-lee, <q cite="http://www.w3.org/people/berners-lee/faq.html#internet">i was lucky enough to invent the web at the time when the internet al
ready existed - and had for a decade and a half.</q> we must understand that there is nothing fundamentally wrong with building on the contributions of others.
drop-shadow() - CSS: Cascading Style Sheets
syntax drop-shadow(offset-x offset-y blur-radius color) the drop-shadow() function accepts a parameter of type <shadow> (defined in the box-shadow property), with the exception that the inset keyword and sp
read parameters are not allowed.
font-size-adjust - CSS: Cascading Style Sheets
it also applies to ::first-letter and ::first-line.inheritedyescomputed valueas specifiedanimation typea number formal syntax none | <number> examples adjusting lower-case letter sizes html <p class="times">this text uses the times font (10px), which is hard to
read in small sizes.</p> <p class="verdana">this text uses the verdana font (10px), which has relatively large lowercase letters.</p> <p class="adjtimes">this is the 10px times, but now adjusted to the same aspect ratio as the verdana.</p> css .times { font-family: times, serif; font-size: 10px; } .verdana { font-family: verdana, sans-serif; font-size: 10px; } .adjtimes { font-family: ti...
font-style - CSS: Cascading Style Sheets
selector('.sample'); function update() { let slant = `oblique ${slantinput.value}deg`; slantlabel.textcontent = `font-style: ${slant};`; sampletext.style.fontstyle = slant; } slantinput.addeventlistener('input', update); update(); accessibility concerns large sections of text set with a font-style value of italic may be difficult for people with cognitive concerns such as dyslexia to
read.
font-variant-caps - CSS: Cascading Style Sheets
accessibility concerns large sections of text set with a font-variant value of all-small-caps or all-petite-caps may be difficult for people with cognitive concerns such as dyslexia to
read.
grid-auto-columns - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valuethe percentage as specified or the absolute lengthanimation typediscrete formal syntax <track-size>+where <track-size> = <track-b
readth> | minmax( <inflexible-b
readth> , <track-b
readth> ) | fit-content( [ <length> | <percentage> ] )where <track-b
readth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-b
readth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples setting grid column size html <div id="grid"> <div id="item1"></di...
grid-auto-rows - CSS: Cascading Style Sheets
formal definition initial valueautoapplies togrid containersinheritednopercentagesrefer to corresponding dimension of the content areacomputed valuethe percentage as specified or the absolute lengthanimation typediscrete formal syntax <track-size>+where <track-size> = <track-b
readth> | minmax( <inflexible-b
readth> , <track-b
readth> ) | fit-content( [ <length> | <percentage> ] )where <track-b
readth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-b
readth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples setting grid row size html <div id="grid"> <div id="item1"></div> ...
list-style-type - CSS: Cascading Style Sheets
pic-halehame-am example ethiopic-halehame-ti-er -moz-ethiopic-halehame-ti-er example ethiopic-halehame-ti-et -moz-ethiopic-halehame-ti-et example hangul -moz-hangul example example example hangul-consonant -moz-hangul-consonant example example example urdu -moz-urdu example accessibility concerns the voiceover screen
reader has an issue where unordered lists with a list-style-type value of none applied to them will not be announced as a list.
min() - CSS: Cascading Style Sheets
formal syntax min( <calc-sum># )where <calc-sum> = <calc-product> [ [ '+' | '-' ] <calc-product> ]*where <calc-product> = <calc-value> [ '*' <calc-value> | '/' <number> ]*where <calc-value> = <number> | <dimension> | <percentage> | ( <calc-sum> ) accessibility concerns when using min() to set a maximum font size, ensure that the font can still be scaled at least 200% for
readability (without assistive technology like a zoom function).
opacity - CSS: Cascading Style Sheets
for example: background: rgba(0, 0, 0, 0.4); accessibility concerns if text opacity is adjusted, it is important to ensure that the contrast ratio between the color of the text and the background the text is placed over is high enough that people experiencing low vision conditions will be able to
read the content of the page.
Content categories - Developer guides
note: a more detailed discussion of these content categories and their comparative functionalities is beyond the scope of this article; for that, you may wish to
read the relevant portions of the html specification.
Introduction to HTML5 - Developer guides
keep in mind that it's still highly recommended that one writes valid mark-up, as such code is easier to
read and maintain, and it greatly decreases the prominence of incompatibilities that exists in various older browsers.
A hybrid approach - Developer guides
this keeps the complexity of altering content on the server side, but still allows our layouts to benefit from the flexibility and future-
readiness of responsive design.
Mobile-friendliness - Developer guides
goal #1 (presentation) “make websites that work well on a variety of screen sizes.” these days, users can access the web on devices in a wide range of form factors, including phones, tablets, and e
readers.
Parsing and serializing XML - Developer guides
"error while parsing" : odom.documentelement.nodename); parsing url-addressable resources into dom trees using xmlhttprequest here is sample code that
reads and parses a url-addressable xml file into a dom tree: var xhr = new xmlhttprequest(); xhr.onload = function() { dump(xhr.responsexml.documentelement.nodename); } xhr.onerror = function() { dump("error while getting xml."); } xhr.open("get", "example.xml"); xhr.responsetype = "document"; xhr.send(); the value returned in the xhr object's responsexml field is a document constructed by pars...
disabled - HTML: Hypertext Markup Language
attribute interactions the difference between disabled and
readonly is that
read-only controls can still function and are still focusable, whereas disabled controls can not receive focus and are not submitted with the form and generally do not function as controls until they are enabled.
HTML attribute: maxlength - HTML: Hypertext Markup Language
constraint validation while the browser will generally prevent user from entering more text than the maxlength attribute allows, should the length be longer than the maxlength allows, the
read-only toolong property of a validitystate object will be true.
<header> - HTML: Hypertext Markup Language
n page title</h1> <img src="mdn-logo-sm.png" alt="mdn logo"> </header> article header <article> <header> <h2>the planet earth</h2> <p>posted on wednesday, <time datetime="2017-10-04">4 october 2017</time> by jane smith</p> </header> <p>we live on a planet that's blue and green, with so many things still unseen.</p> <p><a href="https://janesmith.com/the-planet-earth/">continue
reading....</a></p> </article> specifications specification status comment html living standardthe definition of '<header>' in that specification.
<input type="range"> - HTML: Hypertext Markup Language
note: the following input attributes do not apply to the input range: accept, alt, checked, dirname, formaction, formenctype, formmethod, formnovalidate, formtarget, height, maxlength, minlength, multiple, pattern, placeholder,
readonly, required, size, src, and width.
<wbr> - HTML: Hypertext Markup Language
example the yahoo style guide recommends breaking a url before punctuation, to avoid leaving a punctuation mark at the end of the line, which the
reader might mistake for the end of the url.
id - HTML: Hypertext Markup Language
this attribute's value is an opaque string: this means that web authors should not rely on it to convey human-
readable information (although having your ids somewhat human-
readable can be useful for code comprehension, e.g.
itemprop - HTML: Hypertext Markup Language
t are strings <div itemscope> <p>my name is <span itemprop="name">neil</span>.</p> <p>my band is called <span itemprop="band">four parts water</span>.</p> <p>i am <span itemprop="nationality">british</span>.</p> </div> one property, "image", whose value is a url <div itemscope> <img itemprop="image" src="google-logo.png" alt="google"> </div> when a string value can't be easily
read and understood by a person (e.g., a long string of numbers and letters), it can be displayed using the value attribute of the data element, with the more easily-understood-by-a human-version given in the element's contents (which is not part of the structured data - see example below).
title - HTML: Hypertext Markup Language
html <div title="cooltip"> <p>hovering here will show “cooltip”.</p> <p title="">hovering here will show nothing.</p> </div> result accessibility concerns use of the title attribute is highly problematic for: people using touch-only devices people navigating with keyboards people navigating with assistive technology such as screen
readers or magnifiers people experiencing fine motor control impairment people with cognitive concerns this is due to inconsistent browser support, compounded by the additional assistive technology parsing of the browser-rendered page.
Microdata - HTML: Hypertext Markup Language
microdata is an attempt to provide a simpler way of annotating html elements with machine-
readable tags than the similar approaches of using rdfa and classic microformats.
HTML: Hypertext Markup Language
html introduction if you're new to web development, be sure to
read our html basics article to learn what html is and how to use it.
Introduction - JavaScript
what you should al
ready know this guide assumes you have the following basic background: a general understanding of the internet and the world wide web (www).
Keyed collections - JavaScript
let myset = new set(); myset.add(1); myset.add('some text'); myset.add('foo'); myset.has(1); // true myset.delete('foo'); myset.size; // 2 for (let item of myset) console.log(item); // 1 // "some text" converting between array and set you can create an array from a set using array.from or the sp
read operator.
Text formatting - JavaScript
ne 1 // string text line 2" embedded expressions in order to embed expressions within normal strings, you would use the following syntax: const five = 5; const ten = 10; console.log('fifteen is ' + (five + ten) + ' and not ' + (2 * five + ten) + '.'); // "fifteen is 15 and not 20." now, with template literals, you are able to make use of the syntactic sugar making substitutions like this more
readable: const five = 5; const ten = 10; console.log(`fifteen is ${five + ten} and not ${2 * five + ten}.`); // "fifteen is 15 and not 20." for more information,
read about template literals in the javascript reference.
Classes - JavaScript
class rectangle { #height = 0; #width; constructor(height, width) { this.#height = height; this.#width = width; } } it's an error to reference private fields from outside of the class; they can only be
read or written within the class body.
Warning: String.x is deprecated; use String.prototype.x instead - JavaScript
examples deprecated syntax var num = 15; string.replace(num, /5/, '2'); standard syntax var num = 15; string(num).replace(/5/, '2'); shim the following is a shim to provide support to non-supporting browsers: /*globals define*/ // assumes all supplied string instance methods al
ready present // (one may use shims for these if not available) (function() { 'use strict'; var i, // we could also build the array of methods with the following, but the // getownpropertynames() method is non-shimable: // object.getownpropertynames(string).filter(function(methodname) { // return typeof string[methodname] === 'function'; // }); methods = [ 'conta...
TypeError: setting getter-only property "x" - JavaScript
message typeerror: assignment to
read-only properties is not allowed in strict mode (edge) typeerror: setting getter-only property "x" (firefox) typeerror: cannot set property "prop" of #<object> which has only a getter (chrome) error type typeerror in strict mode only.
SyntaxError: JSON.parse: bad parsing - JavaScript
se: unterminated fractional number syntaxerror: json.parse: missing digits after exponent indicator syntaxerror: json.parse: missing digits after exponent sign syntaxerror: json.parse: exponent part is missing a number syntaxerror: json.parse: unexpected end of data syntaxerror: json.parse: unexpected keyword syntaxerror: json.parse: unexpected character syntaxerror: json.parse: end of data while
reading object contents syntaxerror: json.parse: expected property name or '}' syntaxerror: json.parse: end of data when ',' or ']' was expected syntaxerror: json.parse: expected ',' or ']' after array element syntaxerror: json.parse: end of data when property name was expected syntaxerror: json.parse: expected double-quoted property name syntaxerror: json.parse: end of data after property name when '...
The arguments object - JavaScript
however, it can be converted to a real array: var args = array.prototype.slice.call(arguments); // using an array literal is shorter than above but allocates an empty array var args = [].slice.call(arguments); as you can do with any array-like object, you can use es2015's array.from() method or sp
read syntax to convert arguments to a real array: let args = array.from(arguments); // or let args = [...arguments]; the arguments object is useful for functions called with more arguments than they are formally declared to accept.
getter - JavaScript
this is useful in the following situations: if the calculation of a property value is expensive (takes much ram or cpu time, spawns worker th
reads, retrieves remote file, etc).
Array.prototype.reduce() - JavaScript
on (acc, obj) { let key = obj[property] if (!acc[key]) { acc[key] = [] } acc[key].push(obj) return acc }, {}) } let groupedpeople = groupby(people, 'age') // groupedpeople is: // { // 20: [ // { name: 'max', age: 20 }, // { name: 'jane', age: 20 } // ], // 21: [{ name: 'alice', age: 21 }] // } bonding arrays contained in an array of objects using the sp
read operator and initialvalue // friends - an array of objects // where object field "books" is a list of favorite books let friends = [{ name: 'anna', books: ['bible', 'harry potter'], age: 21 }, { name: 'bob', books: ['war and peace', 'romeo and juliet'], age: 26 }, { name: 'alice', books: ['the lord of the rings', 'the shining'], age: 18 }] // allbooks - list which will contain...
Array.prototype.indexOf() - JavaScript
ement, idx + 1); } console.log(indices); // [0, 2, 4] finding if an element exists in the array or not and updating the array function updatevegetablescollection (veggies, veggie) { if (veggies.indexof(veggie) === -1) { veggies.push(veggie); console.log('new veggies collection is : ' + veggies); } else if (veggies.indexof(veggie) > -1) { console.log(veggie + ' al
ready exists in the veggies collection.'); } } var veggies = ['potato', 'tomato', 'chillies', 'green-pepper']; updatevegetablescollection(veggies, 'spinach'); // new veggies collection is : potato,tomato,chillies,green-pepper,spinach updatevegetablescollection(veggies, 'spinach'); // spinach al
ready exists in the veggies collection.
Atomics.exchange() - JavaScript
this atomic operation guarantees that no other write happens between the
read of the old value and the write of the new value.
DataView() constructor - JavaScript
(that probably wasn't a very helpful description.) you can think of the returned object as an "interpreter" of the array buffer of bytes — it knows how to convert numbers to fit within the buffer correctly, both when
reading and writing to it.
Date.prototype.toLocaleDateString() - JavaScript
to check whether an implementation supports them al
ready, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaledatestringsupportslocales() { try { new date().tolocaledatestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in localized date formats.
Date.prototype.toLocaleTimeString() - JavaScript
to check whether an implementation supports them al
ready, you can use the requirement that illegal language tags are rejected with a rangeerror exception: function tolocaletimestringsupportslocales() { try { new date().tolocaletimestring('i'); } catch (e) { return e.name === 'rangeerror'; } return false; } using locales this example shows some of the variations in localized time formats.
Error.prototype.lineNumber - JavaScript
examples using linenumber var e = new error('could not parse input'); throw e; console.log(e.linenumber) // 2 alternative example using error event window.addeventlistener('error', function(e) { console.log(e.linenumber); // 5 }); var e = new error('could not parse input'); throw e; this is not a standard feature and lacks widesp
read support.
Function.prototype.call() - JavaScript
'use strict'; var sdata = 'wisen'; function display() { console.log('sdata value is %s ', this.sdata); } display.call(); // cannot
read the property of 'sdata' of undefined specifications specification ecmascript (ecma-262)the definition of 'function.prototype.call' in that specification.
Generator.prototype.return() - JavaScript
function* gen() { yield 1; yield 2; yield 3; } const g = gen(); g.next(); // { value: 1, done: false } g.return('foo'); // { value: "foo", done: true } g.next(); // { value: undefined, done: true } if return(value) is called on a generator that is al
ready in "completed" state, the generator will remain in "completed" state.
Infinity - JavaScript
as defined by the ecmascript 5 specification, infinity is
read-only (implemented in javascript 1.8.5 / firefox 4).
Intl.DateTimeFormat.prototype.format() - JavaScript
of format() to a static value: let d = new date("2019-01-01t00:00:00.000000z"); let formatteddate = intl.datetimeformat(undefined, { year: 'numeric', month: 'numeric', day: 'numeric', hour: 'numeric', minute: 'numeric', second: 'numeric' }).format(d); "1.1.2019, 01:00:00" === formatteddate; // true in firefox and others // false in ie and edge note: see also this stackoverflow th
read for more details and examples.
JSON.stringify() - JavaScript
space optional a string or number object that's used to insert white space into the output json string for
readability purposes.
Math.fround() - JavaScript
however, sometimes you may be working with 32-bit floating-point numbers, for example if you are
reading values from a float32array.
Math.max() - JavaScript
function getmaxofarray(numarray) { return math.max.apply(null, numarray); } the new sp
read operator is a shorter way of writing the apply solution to get the maximum of an array: var arr = [1, 2, 3]; var max = math.max(...arr); however, both sp
read (...) and apply will either fail or return the wrong result if the array has too many elements, because they try to pass the array elements as function parameters.
Object.assign() - JavaScript
console.log(obj); // { "0": "a", "1": "b", "2": "c" } exceptions will interrupt the ongoing copying task const target = object.defineproperty({}, 'foo', { value: 1, writable: false }); // target.foo is a
read-only property object.assign(target, { bar: 2 }, { foo2: 3, foo: 3, foo3: 3 }, { baz: 4 }); // typeerror: "foo" is
read-only // the exception is thrown when assigning target.foo console.log(target.bar); // 2, the first source was copied successfully.
Object.entries() - JavaScript
polyfill to add compatible object.entries() support in older environments that do not natively support it, you can use any of the following: a demonstration implementation of object.entries in the tc39/proposal-object-values-entries (if you don't need any support for ie); a polyfill in the es-shims/object.entries repositories; or, you can use the simple,
ready-to-deploy polyfill listed below: if (!object.entries) { object.entries = function( obj ){ var ownprops = object.keys( obj ), i = ownprops.length, resarray = new array(i); // preallocate the array while (i--) resarray[i] = [ownprops[i], obj[ownprops[i]]]; return resarray; }; } for the above polyfill code snippet, if you need support for ie<9, then you w...
Object.freeze() - JavaScript
t.freeze(new dataview(new arraybuffer(32))) // no elements dataview {} > object.freeze(new float64array(new arraybuffer(64), 63, 0)) // no elements float64array [] > object.freeze(new float64array(new arraybuffer(64), 32, 2)) // has elements typeerror: cannot freeze array buffer views with elements note that; as the standard three properties (buf.bytelength, buf.byteoffset and buf.buffer) are
read-only (as are those of an arraybuffer or sharedarraybuffer), there is no reason for attempting to freeze these properties.
Object.prototype.hasOwnProperty() - JavaScript
note that the for...in loop is al
ready only iterating enumerable items, so one should not assume based on the lack of non-enumerable properties shown in the loop that hasownproperty itself is confined strictly to enumerable items (as with object.getownpropertynames()).
Object.setPrototypeOf() - JavaScript
function to that chain function person(sname) { this.identity = sname; } var george = object.appendchain(new person('george'), 'console.log("hello guys!!");'); console.log(george.identity); // 'george' george(); // 'hello guys!!' polyfill using the older object.prototype.__proto__ property, we can easily define object.setprototypeof if it isn't available al
ready: if (!object.setprototypeof) { // only works in chrome and firefox, does not work in ie: object.prototype.setprototypeof = function(obj, proto) { if(obj.__proto__) { obj.__proto__ = proto; return obj; } else { // if you want to return prototype of object.create(null): var fn = function() { for (var k...
Promise.allSettled() - JavaScript
however, if and only if an empty iterable is passed as an argument, promise.allsettled() returns a promise object that has al
ready been resolved as an empty array.
Promise.prototype.catch() - JavaScript
ion(){ console.log('> > > > > > called .then on %o with arguments: %o', this, arguments); return originalthen.apply(this, arguments); }; promise.prototype.catch = function(){ console.error('> > > > > > called .catch on %o with arguments: %o', this, arguments); return originalcatch.apply(this, arguments); }; })(this.promise); // calling catch on an al
ready resolved promise promise.resolve().catch(function xxx(){}); // logs: // > > > > > > called .catch on promise{} with arguments: arguments{1} [0: function xxx()] // > > > > > > called .then on promise{} with arguments: arguments{2} [0: undefined, 1: function xxx()] description the catch method is used for error handling in promise composition.
Proxy - JavaScript
get the "doccookies" object here: https://developer.mozilla.org/docs/dom/document.cookie#a_little_framework.3a_a_complete_cookies_
reader.2fwriter_with_full_unicode_support */ var doccookies = new proxy(doccookies, { get: function (otarget, skey) { return otarget[skey] || otarget.getitem(skey) || undefined; }, set: function (otarget, skey, vvalue) { if (skey in otarget) { return false; } return otarget.setitem(skey, vvalue); }, deleteproperty: function (otarget, skey) { if (skey in otarget) { return fal...
Reflect.construct() - JavaScript
(this would also be possible by using the sp
read syntax combined with the new operator.) let obj = new foo(...args) let obj = reflect.construct(foo, args) reflect.construct() vs object.create() prior to the introduction of reflect, objects could be constructed using an arbitrary combination of constructor and prototype by using object.create().
RegExp - JavaScript
for an introduction to regular expressions,
read the regular expressions chapter in the javascript guide.
Set - JavaScript
, 2, 3, 4, 5, 6] intersection(seta, setc) // => set [3, 4] symmetricdifference(seta, setc) // => set [1, 2, 5, 6] difference(seta, setc) // => set [1, 2] relation with array objects let myarray = ['value1', 'value2', 'value3'] // use the regular set constructor to transform an array into a set let myset = new set(myarray) myset.has('value1') // returns true // use the sp
read operator to transform a set into an array.
String.prototype.charAt() - JavaScript
throw 'low surrogate without preceding high surrogate'; } var prev = str.charcodeat(i - 1); // (could change last hex to 0xdb7f to treat high private // surrogates as single characters) if (0xd800 > prev || prev > 0xdbff) { throw 'low surrogate without preceding high surrogate'; } // we can pass over low surrogates now as the second component // in a pair which we have al
ready processed return false; } in an ecmascript 2016 environment which allows destructured assignment, the following is a more succinct and somewhat more flexible alternative in that it does increment for an incrementing variable automatically (if the character warrants it in being a surrogate pair).
String.prototype.charCodeAt() - JavaScript
hi = code; low = str.charcodeat(idx + 1); if (isnan(low)) { throw 'high surrogate not followed by ' + 'low surrogate in fixedcharcodeat()'; } return ( (hi - 0xd800) * 0x400) + (low - 0xdc00) + 0x10000; } if (0xdc00 <= code && code <= 0xdfff) { // low surrogate // we return false to allow loops to skip // this iteration since should have al
ready handled // high surrogate above in the previous iteration return false; // hi = str.charcodeat(idx - 1); // low = code; // return ((hi - 0xd800) * 0x400) + // (low - 0xdc00) + 0x10000; } return code; } fixing charcodeat() to handle non-basic-multilingual-plane characters if their presence earlier in the string is known function knowncharcodeat(str, idx) { str +...
String.prototype.matchAll() - JavaScript
instead, by using matchall, you get an iterator to use with the more convenient for...of, array sp
read, or array.from() constructs: const regexp = regexp('foo[a-z]*','g'); const str = 'table football, foosball'; const matches = str.matchall(regexp); for (const match of matches) { console.log(`found ${match[0]} start=${match.index} end=${match.index + match[0].length}.`); } // expected output: "found football start=6 end=14." // expected output: "found foosball start=16 end=24." // matches ite...
SyntaxError() constructor - JavaScript
syntax new syntaxerror([message[, filename[, linenumber]]]) parameters message optional human-
readable description of the error filename optional the name of the file containing the code that caused the exception linenumber optional the line number of the code that caused the exception examples catching a syntaxerror try { eval('hoo bar'); } catch (e) { console.error(e instanceof syntaxerror); console.error(e.message); console.error(e.name); console.error(e.filename); console.error(e.linenumber); console.error(e.columnnumber); console.error(e.stack); } creating a syntaxerror try { throw new syntaxerror('hello', 'somefile.js'...
Unary plus (+) - JavaScript
the unary plus operator (+) precedes its operand and evaluates to its operand but attempts to convert it into a number, if it isn't al
ready.
super - JavaScript
} } var y = new y(); y.foo(); // typeerror: "prop" is
read-only console.log(y.prop); // 1 using super.prop in object literals super can also be used in the object initializer / literal notation.
Expressions and operators - JavaScript
...obj sp
read syntax allows an expression to be expanded in places where multiple arguments (for function calls) or multiple elements (for array literals) are expected.
block - JavaScript
note that the block-scoped const c = 2 does not throw a syntaxerror: identifier 'c' has al
ready been declared because it can be declared uniquely within the block.
export - JavaScript
bindings that are exported can still be modified locally; when imported, although they can only be
read by the importing module the value updates whenever it is updated by the exporting module.
for await...of - JavaScript
async function* streamasynciterable(stream) { const
reader = stream.get
reader(); try { while (true) { const { done, value } = await
reader.
read(); if (done) { return; } yield value; } } finally {
reader.releaselock(); } } // fetches data from url and calculates response size using the async generator.
for...of - JavaScript
log(value); } // 1 // 2 // 3 iterating over the arguments object you can iterate over the arguments object to examine all of the parameters passed into a javascript function: (function() { for (const argument of arguments) { console.log(argument); } })(1, 2, 3); // 1 // 2 // 3 iterating over a dom collection iterating over dom collections like nodelist: the following example adds a
read class to paragraphs that are direct descendants of an article: // note: this will only work in platforms that have // implemented nodelist.prototype[symbol.iterator] const articleparagraphs = document.queryselectorall('article > p'); for (const paragraph of articleparagraphs) { paragraph.classlist.add('
read'); } closing iterators in for...of loops, abrupt iteration termination can be cause...
switch - JavaScript
take a look at this example: const action = 'say_hello'; switch (action) { case 'say_hello': let message = 'hello'; console.log(message); break; case 'say_hi': let message = 'hi'; console.log(message); break; default: console.log('empty action received.'); break; } this example will output the error uncaught syntaxerror: identifier 'message' has al
ready been declared which you were not probably expecting.
try...catch - JavaScript
myfile(); try { // tie up a resource writemyfile(thedata); } finally { closemyfile(); // always close the resource } examples nested try-blocks first, let's see what happens with this: try { try { throw new error('oops'); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.message); } // output: // "finally" // "outer" "oops" now, if we al
ready caught the exception in the inner try-block by adding a catch-block try { try { throw new error('oops'); } catch (ex) { console.error('inner', ex.message); } finally { console.log('finally'); } } catch (ex) { console.error('outer', ex.message); } // output: // "inner" "oops" // "finally" and now, let's rethrow the error.
with - JavaScript
ambiguity contra contra: the with statement makes it hard for a human
reader or javascript compiler to decide whether an unqualified name will be found along the scope chain, and if so, in which object.
Template literals (Template strings) - JavaScript
ng text line 1 // string text line 2" expression interpolation in order to embed expressions within normal strings, you would use the following syntax: let a = 5; let b = 10; console.log('fifteen is ' + (a + b) + ' and\nnot ' + (2 * a + b) + '.'); // "fifteen is 15 and // not 20." now, with template literals, you are able to make use of the syntactic sugar, making substitutions like this more
readable: let a = 5; let b = 10; console.log(`fifteen is ${a + b} and not ${2 * a + b}.`); // "fifteen is 15 and // not 20." nesting templates in certain cases, nesting a template is the easiest (and perhaps more
readable) way to have configurable strings.
Trailing commas - JavaScript
if you want to add a new property, you can simply add a new line without modifying the previously last line if that line al
ready uses a trailing comma.
Web app manifests
nformation about it: background_colorcategoriesdescriptiondirdisplayiarc_rating_idiconslangnameorientationprefer_related_applicationsrelated_applicationsscopescreenshotsserviceworkershort_nameshortcutsstart_urltheme_color example manifest { "name": "hackerweb", "short_name": "hackerweb", "start_url": ".", "display": "standalone", "background_color": "#fff", "description": "a simply
readable hacker news app.", "icons": [{ "src": "images/touch/homescreen48.png", "sizes": "48x48", "type": "image/png" }, { "src": "images/touch/homescreen72.png", "sizes": "72x72", "type": "image/png" }, { "src": "images/touch/homescreen96.png", "sizes": "96x96", "type": "image/png" }, { "src": "images/touch/homescreen144.png", "sizes": "144x144", ...
<maction> - MathML
possible values are: statusline: if there is a click on the expression or the
reader moves the pointer over it, the message is sent to the browser's status line.
<mstyle> - MathML
in addition, the scriptlevel attribute can never reduce the font size below scriptminsize in order to avoid un
readable small font sizes and depends on the multiplier specified in scriptsizemultiplier.
Media container formats (file types) - Web media technologies
through quicktime, mac applications (including web browsers, through the quicktime plugin or direct quicktime integration) were able to
read and write audio formats including aac, aiff, mp3, pcm, and qualcomm purevoice; and video formats including avi, dv, pixlet, prores, flac, cinepak, 3gp, h.261 through h.265, mjpeg, mpeg-1 and mpeg-4 part 2, sorenson, and many more.
Web media technologies
this ranges from simply using the alt attribute on <img> elements to captions to tagging media for screen
readers.
contentStyleType - SVG: Scalable Vector Graphics
usage notes value one of the content types specified in the media types default value text/css animatable no since css is the only widely deployed style sheet language for online styling and it's al
ready defined as default value if contentstyletype is ommitted, the attribute is not well supported in user agents.
externalResourcesRequired - SVG: Scalable Vector Graphics
if an external resource is not available, progressive rendering is suspended, the document's svgload event is not fired and the animation timeline does not begin until that resource and all other required resources become available, have been parsed and are
ready to be rendered.
font-size-adjust - SVG: Scalable Vector Graphics
tribute, it can be applied to any element but it has effect only on the following eight elements: <altglyph>, <text>, <textpath>, <tref>, and <tspan> html, body, svg { height: 100%; } <svg width="600" height="80" viewbox="0 0 500 80" xmlns="http://www.w3.org/2000/svg"> <text y="20" font-family="times, serif" font-size="10px"> this text uses the times font (10px), which is hard to
read in small sizes.
SVG Attribute reference - SVG: Scalable Vector Graphics
transform patternunits ping pointer-events points pointsatx pointsaty pointsatz preservealpha preserveaspectratio primitiveunits r r radius referrerpolicy refx refy rel rendering-intent repeatcount repeatdur requiredextensions requiredfeatures restart result rotate rx ry s scale seed shape-rendering slope spacing specularconstant specularexponent speed sp
readmethod startoffset stddeviation stemh stemv stitchtiles stop-color stop-opacity strikethrough-position strikethrough-thickness string stroke stroke-dasharray stroke-dashoffset stroke-linecap stroke-linejoin stroke-miterlimit stroke-opacity stroke-width style surfacescale systemlanguage t tabindex tablevalues target targetx targety text-anchor text-decoration text-r...
Compatibility sources - SVG: Scalable Vector Graphics
for firefox http://www.webkit.org/projects/svg/status.xml together with its recorded archive for webkit, safari and chrome http://www.opera.com/docs/specs/opera9/svg/ and accompanying pages for opera >= 9, http://www.opera.com/docs/specs/opera8/ for opera 8 http://blogs.msdn.com/b/ie/archive/2010/03/18/svg-in-ie9-roadmap.aspx for hints on ie9 support status the svg support charts at coded
read.com for basic checks against the w3c test suite wikipedia for basic hints, not normative ...
<a> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient el...
<circle> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<ellipse> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<foreignObject> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesnonepermitted contentany elements or character data specifications specification status comment scalable vector graphics (svg) 2the defin...
<g> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural...
<line> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<linearGradient> - SVG: Scalable Vector Graphics
value type: <url> ; default value: none; animatable: yes sp
readmethod this attribute indicates how the gradient behaves if it starts or ends inside the bounds of the shape containing the gradient.
<marker> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural elementsgradient el...
<path> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifications spe...
<polygon> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<polyline> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<radialGradient> - SVG: Scalable Vector Graphics
value type: <length> ; default value: 50%; animatable: yes sp
readmethod this attribute indicates how the gradient behaves if it starts or ends inside the bounds of the shape containing the gradient.
<rect> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesbasic shape element, graphics element, shape elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elements specifi...
<svg> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural...
<symbol> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriescontainer element, structural elementpermitted contentany number of the following elements, in any order:animation elementsdescriptive elementsshape elementsstructural...
<text> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriesgraphics element, text content elementpermitted contentcharacter data and any number of the following elements, in any order:animation elementsdescriptive elementstext...
<textPath> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role xlink attributes xlink:title usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:d...
<tspan> - SVG: Scalable Vector Graphics
, aria-controls, aria-current, aria-describedby, aria-details, aria-disabled, aria-dropeffect, aria-errormessage, aria-expanded, aria-flowto, aria-grabbed, aria-haspopup, aria-hidden, aria-invalid, aria-keyshortcuts, aria-label, aria-labelledby, aria-level, aria-live, aria-modal, aria-multiline, aria-multiselectable, aria-orientation, aria-owns, aria-placeholder, aria-posinset, aria-pressed, aria-
readonly, aria-relevant, aria-required, aria-roledescription, aria-rowcount, aria-rowindex, aria-rowspan, aria-selected, aria-setsize, aria-sort, aria-valuemax, aria-valuemin, aria-valuenow, aria-valuetext, role usage notes categoriestext content element, text content child elementpermitted contentcharacter data and any number of the following elements, in any order:descriptive elements<a>, <altgly...
Linking - SVG: Scalable Vector Graphics
to get around this, requires a little ugly javascript hacking: button.svg: <?xml version="1.1" encoding="utf-8"?> <svg xmlns="http://www.w3.org/2000/svg"> <g onclick="top.document.href='page2.html'" cursor="pointer"> <!-- button graphical elements here --> </g> </svg> example for an example of this solution at work see www.coded
read.com.
Basic shapes - SVG: Scalable Vector Graphics
some are slightly redundant in that they can be created by other shapes, but they're all there for your convenience and to keep your svg documents as short and as
readable as possible.
SVG: Scalable Vector Graphics
other resources: xml, css, dom, canvas examples google maps (route overlay) & docs (sp
readsheet charting) svg bubble menus svg authoring guidelines an overview of the mozilla svg project frequently asked questions regarding svg and mozilla svg as an image svg animation with smil svg art gallery animation and interactions like html, svg has a document model (dom) and events, and is accessible from javascript.
Insecure passwords - Web security
for example, a news site may save which news articles a user wants to go back to and
read, but not save any other data about a user.
Subdomain takeovers - Web security
if an attacker can do this, they can potentially
read cookies set from the main domain, perform cross-site scripting, or circumvent content security policies, thereby enabling them to capture protected information (including logins) or send malicious content to unsuspecting users.
Subresource Integrity - Web security
therefore, the resource must be served with an access-control-allow-origin header that allows the resource to be shared with the requesting origin; for example: access-control-allow-origin: * examples in the following examples, assume that oqvuafxrkap7fdgccy5uykm6+r9gqq8k/uxy9rx7hnqlgyl1kpzqho1wx4jwy8wc is al
ready known to be the expected sha-384 hash (digest) of a particular script example-framework.js, and there’s a copy of the script hosted at https://example.com/example-framework.js.
Transport Layer Security - Web security
encryption data is encrypted while being transmitted between the user agent and the server, in order to prevent it from being
read and interpreted by unauthorized parties.
Using shadow DOM - Web Components
high-level view this article assumes you are al
ready familiar with the concept of the dom (document object model) — a tree-like structure of connected nodes that represents the different elements and strings of text appearing in a markup document (usually an html document in the case of web documents).
Axes - XPath
for further information on using xpath expressions, please see the for further
reading section at the end of transforming xml with xslt document.
Functions - XPath
for further information on using xpath/xslt functions, please see the for further
reading page.
Index - XPath
2 axes transforming_xml_with_xslt, xpath, xpath_reference, xslt, xslt_reference for further information on using xpath expressions, please see the for further
reading section at the end of transforming xml with xslt document.
XPath snippets - XPath
if you are using xmlhttprequest to
read a local or remote xml file into a dom tree (as described in parsing and serializing xml), the first argument to evaluatexpath() should be req.responsexml.
Loading and running WebAssembly code - WebAssembly
an exported function: obj.instance.exports.exported_func(); // or access the buffer contents of an exported memory: var i32 = new uint32array(obj.instance.exports.memory.buffer); // or access the elements of an exported table: var table = obj.instance.exports.table; console.log(table.get(0)()); }) note: for more information on how exporting from a webassembly module works, have a
read of using the webassembly javascript api, and understanding webassembly text format.