Search completed in 1.19 seconds.
5847 results for "read":
Your results are loading. Please wait...
ReadableStreamDefaultReader.ReadableStreamDefaultReader() - Web APIs
the readablestreamdefaultreader() constructor creates and returns a readablestreamdefaultreader object instance.
... note: you generally wouldn't use this constructor manually; instead, you'd use the readablestream.getreader() method.
... syntax var readablestreamdefaultreader = new readablestreamdefaultreader(stream); parameters stream the readablestream to be read.
...And 6 more matches
ReadableStreamBYOBReader.ReadableStreamBYOBReader() - Web APIs
the readablestreambyobreader() constructor creates and returns a readablestreambyobreader object instance.
... note: you generally wouldn't use this constructor manually; instead, you'd use the readablestream.getreader() method.
... syntax var readablestreambyobreader = new readablestreambyobreader(stream); parameters stream the readablestream to be read.
...And 3 more matches
ReadableStreamDefaultReader.read() - Web APIs
the read() method of the readablestreamdefaultreader interface returns a promise providing access to the next chunk in the stream's internal queue.
... syntax var promise = readablestreamdefaultreader.read(); parameters none.
... exceptions typeerror the source object is not a readablestreamdefaultreader, or the stream has no owner.
...And 8 more matches
ReadableStreamBYOBReader.read() - Web APIs
the read() method of the readablestreambyobreader interface returns a promise providing access to the next chunk in the byte stream's internal queue.
... syntax var promise = readablestreambyobreader.read(view); parameters view the view to be read into.
... exceptions typeerror the source object is not a readablestreambyobreader, 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 readablestreamdefaultreader 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 filesystemdirectoryreader 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 already called readentries() on this filesystemdirectoryreader, the array is empty.
...And 9 more matches
ReadableStream.getReader() - Web APIs
the getreader() 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.getreader({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 filereader readystate property provides the current state of the reading operation a filereader is in.
... a filereader 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 readablestreamdefaultreader interface of the streams api represents a default reader that can be used to read stream data supplied from a network (e.g.
... constructor readablestreamdefaultreader() creates and returns a readablestreamdefaultreader object instance.
... properties readablestreamdefaultreader.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 readablestreambyobreader 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 readablestreambyobreader() creates and returns a readablestreambyobreader object instance.
...And 6 more matches
FileReaderSync.readAsBinaryString() - Web APIs
note: this method is deprecated in favor of readasarraybuffer().
... the readasbinarystring() method of the filereadersync 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 readablestreamdefaultreader 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 readablestreamdefaultreader.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 instanceoffilereader.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 filereadersync 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 filereadersync 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 filereadersync 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 readablestreambyobreader 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 filereader 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 filereader.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 readablestreambyobreader 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 = readablestreambyobreader.cancel(reason); parameters reason a domstring providing a human-readable reason for the cancellation.
... exceptions typeerror the source object is not a readablestreambyobreader, or the stream has no owner.
ReadableStreamDefaultReader.closed - Web APIs
the closed read-only property of the readablestreamdefaultreader 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 = readablestreamdefaultreader.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 onreading property of ndefreader 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, ndefreader.onreadig draft initial definition.
ReadableStreamBYOBReader.closed - Web APIs
the closed read-only property of the readablestreambyobreader 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 = readablestreambyobreader.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 threading the html parser parses data received from the network off the main thread.
... (there's currently one parser thread serving all parser instances.) data received from document.write() is parsed on the main thread.
...the nsistreamlistener methods (onstartrequest, ondataavailable and onstoprequest) are called on the main thread.
...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 thread.
... 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 thread, 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 filereader 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: filereader 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_threadsafe is now permanently on.
... js_threadsafe was a compile-time option that enables support for running multiple threads of javascript code concurrently as long as no objects or strings are shared between them.
...until recently, sharing objects among threads 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 threads.
... each thread is an execution entity that is scheduled independently from other threads in the same process.
... this chapter describes the basic nspr threading 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 thread to abruptly exit.
... threads are not processes.
...in that environment, exit() may be called and any time, and results in the calling thread's immediate termination.
...And 22 more matches
nsIZipReader
modules/libjar/nsizipreader.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 zipreader = components.classes["@mozilla.org/libjar/zip-reader;1"] .createinstance(components.interfaces.nsizipreader); about character sets and code pages note: nsizipreader 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 dommatrixreadonly interface represents a read-only 4×4 matrix, suitable for 2d and 3d operations.
... the dommatrix interrface—which is based upon dommatrixreadonly—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 thread safe.
... there has not yet been a need to make necko entirely thread safe as most of mozilla (and especially most of gecko) run only on the main/primordial thread.
... in the future, necko may be made thread safe to support changes to gecko that would put some other processing work on background threads (eg.
...And 20 more matches
nsIThread
this interface provides a high-level abstraction for an operating system thread.
... threads have a built-in event queue, and a thread is an event target that can receive nsirunnable objects (events) to be processed on the thread.
... to create a thread, use the nsithreadmanager interface.
...And 19 more matches
JS_ClearContextThread
transfer a jscontext from one thread to another.
... syntax jsword js_clearcontextthread(jscontext *cx); jsword js_setcontextthread(jscontext *cx); name type description cx jscontext * the context to transfer from one thread to another.
... description an application that creates or uses a jscontext in one thread, then uses or destroys it in another thread, must use js_clearcontextthread and js_setcontextthread to transfer the jscontext safely from one thread to the other.
...And 17 more matches
nsIThreadObserver
the nsithreadobserver interface may be implemented to let an observer implement a layered event queue.
... the implementation of this interface must be thread safe.
... xpcom/threads/nsithreadinternal.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-threaded.
... you must only use it from one thread.
...see js_threadsafe for a gentler introduction to using spidermonkey in a multi-threaded application.
...And 16 more matches
nsIThreadManager
the nsithreadmanager interface lets applications and extensions create and manage threads, each of which is represented by an nsithread.
... xpcom/threads/nsithreadmanager.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsisupports method overview nsithread getthreadfromprthread(in prthread prthread); 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
spread 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 spread syntax.
... in a way, rest syntax is the opposite of spread syntax.
...And 15 more matches
nsIThreadPool
xpcom/threads/nsithreadpool.idlscriptable the nsithreadpool interface provides support for thread 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 thread pool provides a convenient way to process events off the main thread.
... when you send events to the thread pool, the pool creates a new thread to process the event, up to the number of threads specified by the threadlimit attribute.
...And 14 more matches
PR_CreateThread
creates a new thread.
... syntax #include <prthread.h> prthread* pr_createthread( prthreadtype type, void (*start)(void *arg), void *arg, prthreadpriority priority, prthreadscope scope, prthreadstate state, pruint32 stacksize); parameters pr_createthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
... start a pointer to the thread's root function, which is called as the root of the new thread.
...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 thread.
... however, it may be useful for c++ code in the mozilla platform to run tasks on another thread.
... typically, thread 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 urlutilsreadonly interface previously defined utility methods for working with urls.
...urlutilsreadonly has been removed from the specification, and the properties it defined are now directly part of the affected interfaces.
... urlutilsreadonly.href read only is a domstring containing the whole url.
...And 11 more matches
PR_AttachThread
associates a prthread object with an existing native thread.
... syntax #include <pprthread.h> prthread* pr_attachthread( prthreadtype type, prthreadpriority priority, prthreadstack *stack); parameters pr_attachthread has the following parameters: type specifies that the thread is either a user thread (pr_user_thread) or a system thread (pr_system_thread).
... priority the priority to assign to the thread being attached.
...And 10 more matches
PRThreadState
a thread's thread state is either joinable or unjoinable.
... syntax #include <prthread.h> typedef enum prthreadstate { pr_joinable_thread, pr_unjoinable_thread } prthreadstate; enumerators pr_unjoinable_thread thread termination happens implicitly when the thread returns from the root function.
... the time of release of the resources assigned to the thread cannot be determined in advance.
...And 9 more matches
PR_JoinThread
blocks the calling thread until a specified thread terminates.
... syntax #include <prthread.h> prstatus pr_jointhread(prthread *thread); parameter pr_jointhread has the following parameter: thread a valid identifier for the thread 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 thread can be found that corresponds to the specified target thread, or if the target thread is unjoinable--pr_failure.
...And 9 more matches
nsIZipReaderCache
modules/libjar/nsizipreader.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 zipreadercache = components.classes["@mozilla.org/libjar/zip-reader-cache;1"] .createinstance(components.interfaces.nsizipreadercache); method overview nsizipreader getinnerzip(in nsifile zipfile, in autf8string zipentry); nsizipreader getinnerzip(in nsifile zipfile, in string zipentry); obsolete since gecko 10 nsizipreader getzip(in nsifile zipfile); void init(in unsigned long cachesize); methods getinnerzip() returns a (possibly shared) cached nsizipreader for a zip inside another zip.
...And 9 more matches
FileReaderSync - Web APIs
the filereadersync interface allows to read file or blob objects synchronously.
... methods filereadersync.readasarraybuffer() this method converts a specified blob or a file into an arraybuffer representing the input data as a binary string.
... filereadersync.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 thread, specified as a parameter to pr_createthread or returned by pr_getthreadscope.
... syntax #include <prthread.h> typedef enum prthreadscope { pr_local_thread, pr_global_thread pr_global_bound_thread } prthreadscope; enumerators pr_local_thread a local thread, scheduled locally by nspr within the process.
... pr_global_thread a global thread, scheduled by the host os.
...And 8 more matches
JS::CompileOffThread
this article covers features introduced in spidermonkey 31 compile a script off thread for execution.
... syntax bool js::cancompileoffthread(jscontext *cx, const js::readonlycompileoptions &options, size_t length); bool js::compileoffthread(jscontext *cx, const js::readonlycompileoptions &options, const char16_t *chars, size_t length, js::offthreadcompilecallback callback, void *callbackdata); jsscript * js::finishoffthreadscript(jscontext *maybecx, jsruntime *rt, void *token); typedef void (*js::offthreadcompilecallback)(void *token, void *callbackdata); name type description cx / maybe jscontext * pointer to a js context from which to derive runtime information.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 8 more matches
nsIMsgThread
the nsimsgfolder interface is used to interact with threads in thunderbird.
... inherits from: nsisupports method overview void addchild(in nsimsgdbhdr child, in nsimsgdbhdr inreplyto, in boolean threadinthread, 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 markchildread(in boolean bread); nsimsgdbhdr getfirstunreadchild(); nsisimpleenumerator enumeratemessages(in nsmsgkey parent); attributes attribute type description threadkey nsm...
...sgkey unsigned long key designating this thread.
...And 8 more matches
The Thread Manager
the thread manager, introduced in firefox 3, offers an easy to use mechanism for creating threads and dispatching events to them for processing.
... only c++ code may use the thread manager and xpcom thread.
... application/extension javascript should consider using a chromeworker instead.") interfaces there are several interfaces that provide threading support: nsithreadmanager the thread manager itself lets you create threads.
...And 8 more matches
DOMPointReadOnly - Web APIs
the dompointreadonly 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 dompointreadonly 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 dompointreadonly(50, 50); /* 3d */ const point = new dompointreadonly(50, 50, 25); /* 3d with perspective */ const point = new dompointreadonly(100, 100, 100, 1.0); the other option is to use the static dompointreadonly.frompoint() method: const point = dompointreadonly.frompoint({x: 100, y: 100, z: 50; w: 1.0}); constructor dompointreadonly() creates a new dompointreadonly object given the values of its coordinates and perspective.
...And 8 more matches
DOMRectReadOnly - Web APIs
the domrectreadonly interface specifies the standard properties used by domrect to define a rectangle whose properties are immutable.
... constructor domrectreadonly() defined to create a new domrectreadonly object.
... properties domrectreadonly.x read only the x coordinate of the domrect's origin.
...And 8 more matches
FileReader.result - Web APIs
WebAPIFileReaderresult
the filereader 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 = instanceoffilereader.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 nsithreadinternal interface is implemented by the xpcom thread object to let consumers observe dispatch activity on a thread.
... xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) inherits from: nsithread method overview void popeventqueue(); void pusheventqueue(in nsithreadeventfilter filter); attributes attribute type description observer nsithreadobserver get/set the current thread observer; set to null to disable observing.
...And 7 more matches
Clipboard.read() - Web APIs
WebAPIClipboardread
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 directoryreadersync 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 thread.
...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 stylepropertymapreadonly 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 stylepropertymapreadonly.size returns an unsinged long integer containing the size of the stylepropertymapreadonly object.
... methods stylepropertymapreadonly.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.isconcatspreadable 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 @@isconcatspreadable symbol (symbol.isconcatspreadable) 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 spread (flatten) elements.
...And 7 more matches
spreadMethod - SVG: Scalable Vector Graphics
the spreadmethod attribute determines how a shape is filled beyond the defined edges of a gradient.
... examples of spreadmethod 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" spreadmethod="reflect" x1="33%" x2=...
..."67%"> <stop offset="0%" stop-color="fuchsia"/> <stop offset="100%" stop-color="orange"/> </lineargradient> <lineargradient id="repeatgradient" spreadmethod="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 thread's priority setting.
... syntax #include <prthread.h> typedef enum prthreadpriority { pr_priority_first = 0, pr_priority_low = 0, pr_priority_normal = 1, pr_priority_high = 2, pr_priority_urgent = 3, pr_priority_last = 3 } prthreadpriority; enumerators pr_priority_first placeholder.
...this priority is appropriate for threads that are expected to perform intensive computation.
...And 6 more matches
PR_DetachThread
disassociates a prthread object from a native thread.
... syntax #include <pprthread.h> void pr_detachthread(void); parameters pr_detachthread has no parameters.
... description this function detaches the nspr thread from the currently executing native thread.
...And 6 more matches
PR_NewThreadPrivateIndex
returns a new index for a per-thread private data table and optionally associates a destructor with the data that will be assigned to the index.
... syntax #include <prthread.h> prstatus pr_newthreadprivateindex( pruintn *newindex, prthreadprivatedtor destructor); parameters pr_newthreadprivateindex has the following parameters: newindex on output, an index that is valid for all threads in the process.
... you use this index with pr_setthreadprivate and pr_getthreadprivate.
...And 6 more matches
Thread Sanitizer
what is thread sanitizer?
... thread sanitizer (tsan) is a fast data race detector for c/c++ programs.
...more information on how tsan works can be found on the thread sanitizer wiki.
...And 6 more matches
nsIThreadPoolListener
the nsithreadpoollistener interface represents objects that listen to notifications generated by the nsithreadpool.
... xpcom/threads/nsithreadpool.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 onthreadcreated(); void onthreadshuttingdown(); methods onthreadcreated() called when a new thread is created by the thread pool.
...And 6 more matches
FileSystemDirectoryEntry.createReader() - Web APIs
the filesystemdirectoryentry interface's method createreader() returns a filesystemdirectoryreader object which can be used to read the entries in the directory.
... syntax directoryreader = filesystemdirectoryentry.createreader(); parameters none.
... return value a filesystemdirectoryreader object which can be used to read the directory's entries.
...And 6 more matches
NDEFReader - Web APIs
the ndefreader 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 ndefreader.ndefreader() returns an ndefreader 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 readablestreamdefaultreader.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 thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
... syntax #include <npapi.h> void npn_pluginthreadasynccall(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 thread.
...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_writeready() and npp_write().
... syntax #include <npapi.h> nperror npn_requestread(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_requestread() 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
thread 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 thread.
... the main thread 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 already physically present on a jsobject.
... syntax boo js_alreadyhasownproperty(jscontext *cx, js::handleobject obj, const char *name, bool *foundp); boo js_alreadyhasownucproperty(jscontext *cx, js::handleobject obj, const char16_t *name, size_t namelen, bool *foundp); boo js_alreadyhasownpropertybyid(jscontext *cx, js::handleobject obj, js::handleid id, bool *foundp); // added in spidermonkey 1.8.1 boo js_alreadyhasownelement(jscontext *cx, js::handleobject obj, uint32_t index, bool *foundp); name type description cx jscontext * pointer to a js context.
...in a js_threadsafe 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 thread, specified as a parameter to pr_createthread.
... syntax #include <prthread.h> typedef enum prthreadtype { pr_user_thread, pr_system_thread } prthreadtype; enumerators pr_user_thread pr_cleanup blocks until the last thread of type pr_user_thread terminates.
... pr_system_thread nspr ignores threads of type pr_system_thread when determining when a call to pr_cleanup should return.
...And 4 more matches
PR_AcceptRead
syntax #include <prio.h> print32 pr_acceptread( 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 thread for a context.
... syntax int js_getcontextthread(jscontext *cx); name type description cx jscontext * the context to examine.
... description js_getcontextthread returns the id of the thread currently associated with this context.
...And 4 more matches
DOMPointReadOnly.fromPoint() - Web APIs
the static dompointreadonly method frompoint() creates and returns a new dompointreadonly object given a source point.
... the source point is specified as a dompointinit-compatible object, which includes both dompoint and dompointreadonly.
... you can also create a new dompointreadonly object using the new dompointreadonly() 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 currentreadystate = request.readystate; value the idbrequestreadystate 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 updateready 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 threads, with their implication of a unique stack for each thread, requires that the nspr copy the stacks during thread 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 thread boundaries.
... the simplest demonstration of the problem is as follows: typedef struct shareddata { prlock *ml; prcondvar *cv; print32 counter; } shareddata; static void forkedthread(void *arg) { shareddata *shared = (shareddata*)arg; while (--shared->counter > 0) pr_waitcondvar(shared->cv, pr_interval_no_timeout); return; } /* forkedthread */ printn main(printn argc, char **argv) { prthread *thread; shareddata shared; shared.ml = pr_newlock(); shared.cv = pr_newcondvar(shared.ml); shared.counter = 10; thread = pr_createthread( pr_user_thread, forkedthread, &shared, pr_priority_normal, pr_local_thread, pr_joinable_thread, 0); do { pr_sleep(pr_secondstointerval(1)); pr_lock(shared.ml); if (0 == shared...
...And 3 more matches
DOMRectReadOnly() - Web APIs
the domrectreadonly() constructor creates a new domrectreadonly object.
... syntax const mydomrectreadonly = new domrectreadonly(x, y, width, height) parameters x the x coordinate of the domrectreadonly's origin.
... y the y coordinate of the domrectreadonly'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 thread is where a browser processes user events and paints.
... by default, the browser uses a single thread 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 thread, leading to an unresponsive page and a bad user experience.
...And 2 more matches
PRThread
an nspr thread.
... syntax #include <prthread.h> typedef struct prthread prthread; description in nspr, a thread is represented by a pointer to an opaque structure of type prthread.
... this pointer is a required parameter for most of the functions that operate on threads.
...And 2 more matches
PR_GetThreadPrivate
recovers the per-thread private data for the current thread.
... syntax #include <prthread.h> void* pr_getthreadprivate(pruintn index); parameter pr_getthreadprivate has the following parameters: index the index into the per-thread private data table.
... description pr_getthreadprivate may be called at any time during a thread'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 thread.
... syntax #include <prthread.h> void pr_setthreadpriority( prthread *thread, prthreadpriority priority); parameters pr_setthreadpriority has the following parameters: thread a valid identifier for the thread whose priority you want to set.
... description modifying the priority of a thread other than the calling thread is risky.
...And 2 more matches
PR_SetThreadPrivate
sets per-thread private data.
... syntax #include <prthread.h> prstatus pr_setthreadprivate(pruintn index, void *priv); parameters pr_setthreadprivate has the following parameters: index an index into the per-thread private data table.
... priv the per-thread private data, or more likely, a pointer to the data.
...And 2 more matches
Thread Pools
this chapter describes the nspr api thread pools.
... thread pools create and manage threads to provide support for scheduling work (jobs) onto one or more threads.
... nspr's thread pool is modeled on the thread pools described by david r.
...And 2 more matches
nsIDOMFileReader
the nsidomfilereader interface provides a way to read data from a file specified by an nsidomfile.
... content/base/public/nsidomfilereader.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/filereader;1.
...And 2 more matches
already_AddRefed
« xpcom api reference already_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 already produced an addrefed pointer as a result.
... in fact, it is preferred to use already_addrefed in this case over returning a raw pointer or nscomptr (see the nscomptr user manual).
...And 2 more matches
Animation.ready - Web APIs
WebAPIAnimationready
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 filesystemdirectoryreader 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 internetfilesystemdirectoryreader deprecatednon-standardchrome full support 8alternate name full support 8alternate name alternate name uses the non-standard name: directoryreaderedge 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 filereader.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 filereader.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 myreadystate = mediasource.readystate; value a domstring.
...And 2 more matches
NDEFReader() - Web APIs
the ndefreader() constructor of the web nfc api returns a newly constructed ndefreader object used to read ndef messages from compatiable nfc devices, e.g.
... ndef tags, within the reader's magnetic induction field.
... syntax writer = new ndefreader(); parameters none.
...And 2 more matches
NDEFReadingEvent - Web APIs
the ndefreadingevent interface represents events despatched on new nfc readings obtained by ndefreader.
... constructor ndefreadingevent.ndefreadingevent() creates an ndefreadingevent event with the given parameters.
... ndefreadingevent.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 thread.
... the xmlhttprequest.onreadystatechange 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 prthreadstack structure is only used in the third argument "prthreadstack *stack" to the pr_attachthread function.
... the 'stack' argument is now obsolete and ignored by pr_attachthread.
... you should pass null as the 'stack' argument to pr_attachthread.
... syntax #include <prthread.h> typedef struct prthreadstack prthreadstack; ...
PR_CreateThreadPool
syntax #include <prtpool.h> nspr_api(prthreadpool *) pr_createthreadpool( print32 initial_threads, print32 max_threads, pruint32 stacksize ); parameters the function has the following parameters: initial_threads the number of threads to be created within this thread pool.
... max_threads the limit on the number of threads that will be created to server the thread pool.
... stacksize size of the stack allocated to each thread in the thread.
... returns pointer to a prthreadpool structure or null on error.
PR_GetCurrentThread
returns the current thread object for the currently running code.
... syntax #include <prthread.h> prthread* pr_getcurrentthread(void); returns always returns a valid reference to the calling thread--a self-identity.
... description the currently running thread may discover its own identity by calling pr_getcurrentthread.
... note: this is the only safe way to establish the identity of a thread.
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_setthreadstacklimit(jscontext *cx, jsuword limitaddr) name type description cx jscontext * the context to configure.
... description js_setthreadstacklimit sets the maximum (if stack grows upward) or minimum (downward) legal stack byte address in limitaddr for the thread or process stack used by cx.
...in a js_threadsafe build, after passing a jscontext from one thread to another, call js_setthreadstacklimit(cx, 0) after calling js_setcontextthread.
... (see also js_setcontextthread and js_clearcontextthread.) see also mxr id search for js_setthreadstacklimit js_setnativestackquota bug 723021 ...
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
... const char_type* endreading() 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 beginreading for an example.
... see also beginreading, ns_cstringgetdata, nsacstring ...
EndReading
« xpcom api reference summary the endreading function returns a const char_type pointer to the element just beyond the last element of the string's internal buffer.
... const char_type* endreading() 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 beginreading for an example.
... see also beginreading, ns_cstringgetdata, nsastring ...
nsIThreadEventFilter
the nsithreadeventfilter interface may be implemented to determine whether or not an event may be accepted by a nested event queue; see nsithreadinternal.pusheventqueue() for more information.
... xpcom/threads/nsithreadinternal.idlscriptable please add a summary to this article.
...(see nsithreadinternal.pusheventqueue()) warning: this method must not make any calls on the thread object.
... see also the thread manager nsithreadmanager nsithread nsithreadpool nsithreadobserver nsithreadinternal ...
Debug worker threads - Firefox Developer Tools
the debugger shows the source code for all running worker threads — 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 thread.
... inspecting worker code for example, see the selected item worker.js below — it is listed in a separate thread in the sources list, but appears in the source pane in the same way as main thread code when selected.
... you can set a breakpoint (or logpoint) on any active worker thread: when execution is paused in a worker thread, 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 internetreadvalue experimentalchrome full support 57notes full support 57notes notes macos only.
DOMPointReadOnly() - Web APIs
the dompointreadonly() constructor returns a new dompointreadonly object representing a point in 2d or 3d space, optionally with perspective, whose values cannot be altered by script code.
... syntax point = new dompointreadonly(x, y, z, w); parameters x optional the value of the horizontal coordinate, x, as a floating point number.
... return value a new dompointreadonly object representing the specified location in space.
... var point2d = new dompointreadonly(50, 25); var point3d = new dompointreadonly(50, 0, 10); var perspectivepoint3d = new dompointreadonly(50, 50, 25, 0.5); specifications specification status comment geometry interfaces module level 1the definition of 'dompointreadonly' in that specification.
DOMPointReadOnly.toJSON() - Web APIs
the dompointreadonly method tojson() returns a dompointinit object giving the json form of the point object.
... syntax pointjson = dompointreadonly.tojson(); parameters none.
... return value a new dompointinit object whose properties are set to the values in the dompoint or dompointreadonly 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 'dompointreadonly.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 myreadystate = 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 filereader() constructor creates a new filereader.
... for details about how to use filereader, see using files from web applications.
... syntax var reader = new filereader(); parameters none.
... example the following code snippet shows creation of a filereader object using the filereader() constructor and subsequent usage of the object: function printfile(file) { var reader = new filereader(); 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 filereader.abort().
... bubbles no cancelable no interface progressevent event handler property filereader.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 filereader(); 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 filereader.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 filereader(); 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 filereader.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 filereader(); 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 filereader.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 filereader(); 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 filereader reads data.
... bubbles no cancelable no interface progressevent event handler property filereader.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 filereader(); 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.getreader(); 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
WebAPISensoronreading
the onreading eventhandler is called when a reading is taken on one of the child interfaces of the sensor interface.
... syntax sensorinstance.onreading = function sensorinstance.addeventlistener('reading', function() { ...
... }) because sensor is a base class, onreading may only be used on one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'onreading' in that specification.
StylePropertyMapReadOnly.get() - Web APIs
the get() method of the stylepropertymapreadonly interface returns a cssstylevalue object for the first value of the specified property.
... syntax var declarationblock = stylepropertymapreadonly.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 stylepropertymapreadonly object.
... we create an array of properties of interest and use the stylepropertymapreadonly'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_writeready(npp instance, npstream* stream); parameters the function has the following parameters: instance pointer to the current plug-in instance.
... description the browser calls npp_writeready 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_writeready.
PRThreadPrivateDTOR
the destructor function passed to pr_newthreadprivateindex that is associated with the resulting thread private index.
... syntax #include <prthread.h> typedef void (pr_callback *prthreadprivatedtor)(void *priv); description until the data associated with an index is actually set with a call to pr_setthreadprivate, 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 thread terminates.
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
... const char_type* beginreading() 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.beginreading(); const char* end = str.endreading(); pruint32 count = 0; while (start != end) { if (*start++ == c) ++count; } return count; } see also length, endreading ...
BeginReading
« xpcom api reference summary the beginreading function returns a const pointer to the first element of the string's internal buffer.
... const char_type* beginreading() 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.beginreading(); const prunichar* end = str.endreading(); 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 dommatrixreadonly constructor creates a new dommatrixreadonly object which represents 4x4 matrices, suitable for 2d and 3d operations.
... syntax var dommatrixreadonly = new dommatrixreadonly([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 'dommatrixreadonly' in that specification.
DOMMatrixReadOnly.scale() - Web APIs
the scale() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a scale transform applied.
... const matrix = new dommatrixreadonly(); 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 'dommatrixreadonly.scale()' in that specification.
DOMPointReadOnly.x - Web APIs
the dompointreadonly 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 = somedompointreadonly.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 onreadystatechange 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
WebAPIFileReaderabort
the abort method aborts the read operation.
... upon return, the readystate will be done.
... syntax instanceoffilereader.abort(); exceptions dom_file_abort_err thrown when abort is called while no read operation is in progress (that is, the state isn't loading).
FileReader.error - Web APIs
WebAPIFileReadererror
the filereader error property returns the error that occurred while reading the file.
... syntax var error = instanceoffilereader.error value a domerror containing the relevant error.
... specifications specification status comment file apithe definition of 'filereader: error' in that specification.
FileReader.onabort - Web APIs
the filereader.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 ndefreader 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, ndefreader.onerror draft initial definition.
NDEFReader.scan() - Web APIs
WebAPINDEFReaderscan
the scan() method of ndefreader interface reads ndef records from compatible nfc devices, e.g., ndef nfc tags.
... syntax var readerpromise = ndefreader.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 isreadable = 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
WebAPISensorhasReading
the hasreading read-only property of the sensor interface returns a boolean indicating whether the sensor has a reading.
... syntax var boolean = sensorinstance.hasreading because sensor is a base class, hasreading may only be read from one of its derived classes.
... specifications specification status comment generic sensor apithe definition of 'hasreading' 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 stylepropertymapreadonly.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 stylepropertymapreadonly.entries() parameters none.
... return value an array of the given stylepropertymapreadonly object's own enumerable property [key, value] pairs.
StylePropertyMapReadOnly.forEach() - Web APIs
the stylepropertymapreadonly.foreach() method executes a provided function once for each element of stylepropertymapreadonly.
... syntax stylepropertymapreadonly.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 stylepropertymapreadonly thatforeach() is being called on.
URLUtilsReadOnly.toString() - Web APIs
the urlutilsreadonly.tostring() stringifier method returns a domstring containing the whole url.
... it is a synonym for urlutilsreadonly.href.
... syntax string = object.tostring(); examples // in a web worker, on the page https://developer.mozilla.org/urlutilsreadonly.href var result = window.self.tostring(); // returns:'https://developer.mozilla.org/urlutilsreadonly.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 unread type: boolean this attribute is set to true if the tab is unread; 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 unread.
Breadcrumb - MDN Web Docs Glossary: Definitions of Web-related terms
a breadcrumb, or breadcrumb 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 breadcrumb for this document might look something like this: mdn > glossary > breadcrumb breadcrumb trails enable users to be aware of their location within a website.
PR_GetThreadPriority
returns the priority of a specified thread.
... syntax #include <prthread.h> prthreadpriority pr_getthreadpriority(prthread *thread); parameter pr_getthreadpriority has the following parameter: thread a valid identifier for the thread whose priority you want to know.
PR_GetThreadScope
gets the scoping of the current thread.
... syntax #include <prthread.h> prthreadscope pr_getthreadscope(void); returns a value of type prthreadscope indicating whether the thread is local or global.
PR_JoinThreadPool
waits for all threads in a thread pool to complete, then releases resources allocated to the thread pool.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_jointhreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Read
causes a job to be queued when a socket becomes readable.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_read( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_ShutdownThreadPool
notifies all threads in a thread pool to terminate.
... syntax #include <prtpool.h> nspr_api(prstatus) pr_shutdownthreadpool( prthreadpool *tpool ); parameter the function has the following parameter: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
XPCOM Thread Synchronization
xpcom thread 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 thread synchronization, see introduction_to_nspr.
DOMMatrixReadOnly.flipX() - Web APIs
the flipx() method of the dommatrixreadonly 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 dommatrixreadonly(); const flippedmatrix = matrix.flipx(); flipped.setattribute('transform', flippedmatrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.flipx()' in that specification.
DOMMatrixReadOnly.translate() - Web APIs
the translate() method of the dommatrixreadonly interface creates a new matrix being the result of the original matrix with a translation applied.
... const matrix = new dommatrixreadonly().translate(25, 25); document.queryselector('#transformed').setattribute('transform', matrix.tostring()); screenshotlive sample specifications specification status comment geometry interfaces module level 1the definition of 'dommatrixreadonly.translate()' in that specification.
DOMPointReadOnly.w - Web APIs
the dompointreadonly interface's w property holds the point's perspective value, w, for a read-only point in space.
... syntax const perspective = somedompointreadonly.w value a double-precision floating-point value indicating the w perspective value for the point.
DOMPointReadOnly.y - Web APIs
the dompointreadonly interface's y property holds the vertical coordinate, y, for a read-only point in space.
... syntax const ypos = somedompointreadonly.y; value a double-precision floating-point value indicating the y coordinate's value for the point.
DOMPointReadOnly.z - Web APIs
the dompointreadonly interface's z property holds the depth coordinate, z, for a read-only point in space.
... syntax const zpos = somedompointreadonly.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 domrectreadonly interface creates a new domrectreadonly object with a given location and dimensions.
... syntax var domrect = domrectreadonly.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 filereader.onerror examples const fileinput = document.queryselector('input[type="file"]'); const reader = new filereader(); 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
WebAPIFileReaderonload
the filereader.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 filereader(); reader.onload = function(e) { // the file's text will be printed here console.log(e.target.result) }; reader.readastext(file); } ...
FontFaceSet.ready - Web APIs
WebAPIFontFaceSetready
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 stylepropertymapreadonly interface returns an array of cssstylevalue objects containing the values for the provided property.
... syntax var cssstylevalues[] = stylepropertymapreadonly.getall(property) parameters property the name of the property to retrieve all values of.
StylePropertyMapReadOnly.has() - Web APIs
the has() method of the stylepropertymapreadonly interface indicates whether the specified property is in the stylepropertymapreadonly object.
... syntax var boolean = stylepropertymapreadonly.has(property) parameters property the name of a property.
StylePropertyMapReadOnly.size - Web APIs
the size read-only property of the stylepropertymapreadonly interface returns an unsinged long integer containing the size of the stylepropertymapreadonly object.
... syntax var size = stylepropertymapreadonly.size value an unsigned long integer.
StylePropertyMapReadOnly.values() - Web APIs
the stylepropertymapreadonly.values() method returns a new array iterator containing the values for each index in the stylepropertymapreadonly object.
... syntax stylepropertymapreadonly.values() parameters none.
URLUtilsReadOnly.hash - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.hash#example var result = window.self.hash; // returns:'#hash' specifications specification status comment urlthe definition of 'urlutilsreadonly.hash' in that specification.
URLUtilsReadOnly.host - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.host var result = window.self.host; // returns:'developer.mozilla.org:80' specifications specification status comment urlthe definition of 'urlutilsreadonly.host' in that specification.
URLUtilsReadOnly.hostname - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.hostname var result = window.self.hostname; // returns:'developer.mozilla.org' specifications specification status comment urlthe definition of 'urlutilsreadonly.hostname' in that specification.
URLUtilsReadOnly.href - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.href var result = window.self.href; // returns:'https://developer.mozilla.org/urlutilsreadonly.href' specifications specification status comment urlthe definition of 'urlutilsreadonly.href' in that specification.
URLUtilsReadOnly.origin - Web APIs
the urlutilsreadonly.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 'urlutilsreadonly.origin' in that specification.
URLUtilsReadOnly.pathname - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.pathname var result = window.self.pathname; // returns:'/urlutilsreadonly.pathname' specifications specification status comment urlthe definition of 'urlutilsreadonly.pathname' in that specification.
URLUtilsReadOnly.port - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.port var result = window.self.port; // returns:'80' specifications specification status comment urlthe definition of 'urlutilsreadonly.port' in that specification.
URLUtilsReadOnly.protocol - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.href var result = window.self.protocol; // returns:'https:' specifications specification status comment urlthe definition of 'urlutilsreadonly.protocol' in that specification.
URLUtilsReadOnly.search - Web APIs
the urlutilsreadonly.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/urlutilsreadonly.href?t=67 var result = window.self.search; // returns:'?t=67' specifications specification status comment urlthe definition of 'urlutilsreadonly.search' in that specification.
ARIA Screen Reader Implementors Guide - Accessibility
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.
Breadcrumb Navigation - CSS: Cascading Style Sheets
breadcrumb navigation helps the user to understand their location in the website by providing a breadcrumb trail back to the start page.
...this could also be achieved using one selector only: .breadcrumb li:not(:first-child)::before { content: "→"; } this solution uses a more complex selector, but requires less rules.
Warning: -file- is being assigned a //# sourceMappingURL, but already has one - JavaScript
the javascript warning "-file- is being assigned a //# sourcemappingurl, but already has one." occurs when a source map has been specified more than once for a given javascript source.
... message warning: -file- is being assigned a //# sourcemappingurl, but already has one.
readonly - Archive of obsolete content
« xul reference home readonly type: boolean if set to true, then the user cannot change the value of the element.
readOnly - Archive of obsolete content
« xul reference readonly type: boolean if set to true, then the user cannot modify the value of the element.
isReadable
this content is now available at nsifile.isreadable().
read
this content is now available at nsiinputstream.read().
readSegments
this content is now available at nsiinputstream.readsegments().
read
this content is now available at nsiscriptableinputstream.read().
DOMRectReadOnly.bottom - Web APIs
the bottom read-only property of the domrectreadonly interface returns the bottom coordinate value of the domrect.
DOMRectReadOnly.height - Web APIs
the height read-only property of the domrectreadonly interface represents the height of the domrect.
DOMRectReadOnly.left - Web APIs
the left read-only property of the domrectreadonly interface returns the left coordinate value of the domrect.
DOMRectReadOnly.right - Web APIs
the right read-only property of the domrectreadonly interface returns the right coordinate value of the domrect.
DOMRectReadOnly.top - Web APIs
the top read-only property of the domrectreadonly interface returns the top coordinate value of the domrect.
DOMRectReadOnly.width - Web APIs
the width read-only property of the domrectreadonly interface represents the width of the domrect.
DOMRectReadOnly.x - Web APIs
WebAPIDOMRectReadOnlyx
the x read-only property of the domrectreadonly interface represents the x coordinate of the domrect's origin.
DOMRectReadOnly.y - Web APIs
WebAPIDOMRectReadOnlyy
the y read-only property of the domrectreadonly interface represents the y coordinate of the domrect's origin.
StylePropertyMapReadOnly.keys() - Web APIs
the stylepropertymapreadonly.keys() method returns a new array iterator containing the keys for each item in stylepropertymapreadonly syntax stylepropertymapreadonly.keys() parameters none.
Index - Web APIs
WebAPIIndex
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 already 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
MozillaTechXPCOMIndex
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 already 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 threads, thread 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_jointhread 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 threads nspr provides an execution environment that promotes the use of lightweight threads.
... each thread is an execution entity that is scheduled independently from other threads in the same process.
...And 81 more matches
Window - Web APIs
WebAPIWindow
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 already 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 screenreader is reading from the top of the page.
... the problem here is that visually they work, but screenreaders 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 screenreader 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 already 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 spreadsheet download stage-1.zip install stage-1.xpi to build our xul spreadsheet, 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 spreadsheet.
...And 45 more matches
sslfnc.html
nss_init nss_initreadwrite 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-thread and inter-thread.
... intra-thread non-deterministic behaviors are non-deterministic even in the absence of actions by other threads, and inter-thread non-deterministic behaviors are those affected by interleaving execution with other threads, 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
WebAPIDocument
document.anchorsread only returns a list of all of the anchors in the document.
... document.charactersetread 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 already 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 thread.
... 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 threads.
... in the combined (mxn) model, which includes nt, irix (sprocs), and pthreads-user, the primordial thread is always a local thread.
...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 thread-safe and non-blocking.
...accessible as a service only, fully thread-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_writeready, 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_requestread 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_writeready and npp_write.
...And 30 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
40 breadcrumb accessibility, glossary, navigation, search, site map, breadcrumb a breadcrumb, or breadcrumb 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 spread 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 getnumunread(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 markmessagesread(in nsisupportsarray messages, in boolean markread); void markallmessagesread(); void markmessagesflagged(in nsisupportsarray messages, in boolean markflagged); void markthreadread(in nsimsgthread thread); 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 abytestoread, 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); already_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 already_addrefed<myclass> constructor(const globalobject& aglobal, errorresult& rv); static already_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 multithreaded programming.
...a trust anchor is just another x.509 certificate that is already 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 thread 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 thread.
... promiseworker.jsm path: resource://gre/modules/promiseworker.jsm a javascript code module used by the main thread to create a worker thread 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 areadonly); 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 connectionready 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 isreadable(); 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
WebAPINavigator
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, screenreader, semantics you should now be well-versed in writing accessible html for most occasions.
... 8 mobile accessibility accessibility, article, beginner, codingscripting, learn, mobile, responsive, screenreader, 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 threads with a context menu supports symbolication for local builds on windows if you run “mach buildsymbols” first profiling non-nsthreads?
... the current setup requires each thread that you want to profile to notify the profiler about its existence.
... we have this hooked up for nsthreads, and as of very recently also for rayon threads (used in stylo).
...And 23 more matches
Bytecode Descriptions
val must already be a numeric value, such as the result of jsop::tonumeric.
...this instruction is used when an array literal contains a spreadelement.
...format: jof_argc, jof_invoke, jof_typeset, jof_ic spreadcall 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 threads.
... the worker thread 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 thread; 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 threads.
... tip: threads 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 thread areas.
...And 22 more matches
Python binding for NSS
programmers already familiar with nss/nspr will be quite comfortable with python-nss.
... support threading.
...this allows other python threads to execute during the time a nss/nspr function is progress in another thread.
...And 22 more matches
Index
it can be read as something like an "ideal future state" for the engine.
... 33 js::compileoffthread jsapi reference, reference, référence(2), spidermonkey js::compileoffthread compiles a script, chars for execution.
... 137 jsobjectops.getrequiredslot jsapi reference, obsolete, spidermonkey get and set a required slot, one that should already 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 already 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 already been constructed.
... there are two startup notifications, both of which create the observer if it isn't already 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 thread 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 thread of execution.
...And 20 more matches
Element - Web APIs
WebAPIElement
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 spread 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 <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" /* constants */ #define blocksize 32 #define modblocksize 128 #define default_key_bits 1024 /* header file constants */ #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 thread, in a non-blocking fashion: make your request on the main thread, then carry on and get the async response later, also on the main thread.
... there is an option to receive ondataavailable specifically on a non-main thread, but all other calls happen on the main thread.
...And 19 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
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 zipreader.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 markread(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 isread 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 threadpane and preview pane of thunderbird and other xpcom based mail cients.
...available in the mozilla codebase are types "quicksearch", "threadswithunread", "watchedthreadswithunread", "xfvf" (virtual folders), "search", "group", and "threaded" 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 threadindex, 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.entrytyperead only returns "resource".
... performanceentry.nameread only returns the resources url.
... performanceentry.starttimeread 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 thread is not thread safe.
... since gecko's main thread uses com, and com requires threads to declare their threading model, the main thread must initialize itself to live inside its own single threaded apartment (sta).
...And 18 more matches
NSS Sample Code Sample_3_Basic Encryption and MACing
sample code 3 /* nspr headers */ #include <prthread.h> #include <plgetopt.h> #include <prerror.h> #include <prinit.h> #include <prlog.h> #include <prtypes.h> #include <plstr.h> /* nss headers */ #include <keyhi.h> #include <pk11priv.h> /* our samples utilities */ #include "util.h" #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 <prthread.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 <prthread.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 thread 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 thread of execution.
... note: blocking output streams are often written to on a background thread to avoid locking up the main application thread.
...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 already 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-thread-safe (though 'free-threaded') implementation.
...And 17 more matches
Performance best practices for Firefox front-end engineers
avoid the main thread where possible the main thread is where we process user events and do painting.
... it's also important to note that most of our javascript runs on the main thread, 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 thread, the more that thread can respond to user events, paint, and generally be responsive to the user.
...And 16 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
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.getreader(), 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 thread calls an nspr io function on a file descriptor and the io function fails with <tt>pr_io_timeout_error</tt> or <tt>pr_pending_interrupt_error</tt>, the file descriptor must be closed before the thread exits.
...a thread calling an io function is blocked until the io operation finishes, either due to a successful io completion or an error.
...if the thread gets interrupted by another thread'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 threads in extensions to perform tasks in the background without blocking the user interface.
... if you haven't already 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 thread, 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 already 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 already 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 already 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 threads in the chrome process, for example communication between workers and multiple child processes and other parent-process worker threads.
... 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 thread, and can only be used safely from that thread.
...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_already_exists the specified path already exists in the zip file.
...And 14 more matches
Getting Started Guide
if you're already familiar with nscomptrs, then you might want to skip ahead to the reference manual or the faq.
...you should already 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
WebAPINode
node.baseuriread 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.childnodesread 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
WebAPIUSBDevice
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 already 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 threaded.
... for the most part, browsers are considered single threaded.
...render time is key, with ensuring the main thread 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 screenreader 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 screenreaders.
...And 12 more matches
General asynchronous programming concepts - Learn web development
the answer is because javascript, generally speaking, is single-threaded.
... at this point, we need to introduce the concept of threads.
... threads a thread is basically a single process that a program can use to complete tasks.
...And 12 more matches
Error codes returned by Mozilla APIs
ns_error_already_initialized (0xc1f30002) an attempt is made to initialize a component or object again which has already been initialized.
... ns_error_file_already_exists (0x80520008) an attempt was made to create a file that already 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 already 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 thread) to the chrome process (ui thread).
... 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 thread - 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:: already_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 enumeratethreads(); void synccounts; nsimsgthread getthreadcontainingmsghdr(in nsimsgdbhdr msghdr); void markhdrread(in nsimsgdbhdr msghdr, in boolean bread, 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 markread(in nsmsgkey key, in boolean bread, 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 markthreadread(in nsimsgthread thread, in nsidbchangelistener instigator, in nsmsgkeyarrayptr thosemarked); native code only!
... void markthreadignored(in nsimsgthread thread, in nsmsgkey threadkey, in boolean bignored, in nsidbchangelistener instigator); void markthreadwatched(in nsimsgthread thread, in nsmsgkey threadkey, in boolean bwatched, in nsidbchangelistener instigator); void markheaderkilled(in nsimsgdbhdr msg, in boolean bignored, in nsidbchangelistener instigator); boolean isread(in nsmsgkey key); boolean isignored(in nsmsgkey key); boolean ismarked(in nsmsgkey key); boolean hasattachments(in nsmsgkey key); void markallread(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 getfolderreadonly(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 setfolderreadonly(in long long afolder, in boolean areadonly); 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
nsINavHistoryResultNode
read only.
...read only.
...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 thread on arbitrary xpcom interfaces.
...it is no longer needed because javascript code can no longer run on arbitrary threads, 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-thread 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.onreadystatechange 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 textreader = fileio.open(filename, "r"); if (!textreader.closed) { text = textreader.read(); textreader.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 textreader(inputstream, charset) creates a buffered input stream that reads text from a backing stream using a given text encoding.
... you can also create textreader 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 already, 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 already 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, already have some accessibility built-in.
...since the individual widgets predominately come from the operating system, they already 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_threadsafe 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 setsafejscontextforcurrentthread(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 collectgarbageonmainthreadonly 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 already 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
WebAPIResponse
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 already 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 already started streaming.
...And 11 more matches
WorkerNavigator - Web APIs
workernavigator.connectionread 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 already, 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 nsizipreader 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 already been destroyed.
...threading the gc routines are not currently thread safe, we're operating under the assumption that none of the player spawned threads create gc'd things.
... if this isn't true we hope to eliminate other threads from doing this and if we can't do that we will be forced to make our gc thread 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 threading packages to implement nspr threads.
... nspr has a user-level threading library where thread context switches are done by <tt>setjmp/longjmp</tt> or <tt>sigsetjmp/siglongjmp</tt>.
... this is called the local threads 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 already 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 already 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 already 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 thread.
... syntax #include <prthread.h> prstatus pr_interrupt(prthread *thread); parameter pr_interrupt has the following parameter: thread the thread whose interrupt request you want to set.
... returns the function returns one of the following values: if the specified thread 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 already in place.
... {{ svg{source: "http://people.mozilla.org/~wmccloskey/incremental1.svg", embedding: "iframe", height:"130"} }} assume object b is already 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 'thread 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_setthreadstacklimit 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::compileoffthread added in spidermonkey 31 js::cancompileoffthread added in spidermonkey 31 js::finishoffthreadscript 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.beginreading(); const char16_t* end = data.endreading(); 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
WebAPIEvent
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
WebAPIIDBIndex
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 urlutilsreadonly interface.
... urlutilsreadonly.href read only is a stringifier that returns a domstring containing the whole url of the script executed in the worker.
... urlutilsreadonly.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 spread 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 already use to generate pages.
...but for the purposes of generating a microsummary for the spread 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
ArchiveMozillaXULIndex
underlined text may be read by the screen reader.
... 307 readonly xul attributes, xul reference no summary!
... 407 unread 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_requestread (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_requestread.
... np_normal (default): delivers stream data to the instance in a series of calls to npp_writeready 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 already does well.
... modern versions of firefox and google chrome (and probably others) attempt to connect requestanimationframe callbacks to their main thread at the very beginning of a frame's timeslice.
... the browser's main thread 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 already 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 already seen how our components can communicate with each other using props, two-way data binding, and events.
...if you’ve already 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 thread invoking an io function is blocked until the io operation is finished.
... the blocking io model encourages the use of multiple threads as a programming model.
... a thread 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 thread currently holds the lock.
... ticks the amount of time (in printervaltime units) that the thread is willing to wait for an explicit notification before being rescheduled.
... returns the function returns one of the following values: pr_success means the thread 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 already exists in your database.
... sec_error_duplicate_cert_name -8169 downloaded certificate's name duplicates one already 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/threads/nsieventtarget.idlscriptable a target for events.
... events may be sent to this target from any thread by calling the dispatch method.
... implement this interface in order to support receiving events from other threads.
...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.
... getpanelwhenready(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-threaded language.
...to support this, it was necessary to find ways to allow for projects to escape the limitations of a single-threaded 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-threaded 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
WebAPIRequest
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.blockeduriread only a usvstring representing the uri of the resource that was blocked because it violates a policy.
... securitypolicyviolationevent.columnnumberread only the column number in the document or worker at which the violation occurred.
... securitypolicyviolationevent.dispositionread 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
WebAPITouch
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 onreadystatechange property of the object and naming it after the function to call when the request changes state, like this: httprequest.onreadystatechange = 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.onreadystatechange = 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.onreadystatechange = nameofthefunction; what should this function do?
...And 9 more matches
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
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 already effectively generalized the concept of an install location, we can make this set configurable by applications and extensions.
...And 8 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
reading in style sheets xul uses css to specify the appearance of its elements.
... again, since xul is a type of xml, stylesheets are read in using the xml-stylesheet processing instruction.
... on line 2 of listing 2, we’re reading in the theme’s standard style sheet.
...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; tread 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 unreadable 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 already visited xml main page.
...it looks odd when someone who uses devmo on regular basis sees some violet links just because he already 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 threading 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 threads.
... this can be overrided with the threads flag: python ./runtests.py --threads=3 threading on cygwin / windows due to an issue with cygwin python, threading does not work, and threads will always be set to 1.
... in order to use threading 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 already 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 already globally imported and is available from the privileged window scope as window.jni.
... method overview cdata getforthread(); cdata loadclass(cdata ajenv, string aclassfullyqualifiedname, [optional] object adeclares); cdata newstring(cdata ajenv, string astr); string readstring(cdata ajenv, cdata ajavastring); void unloadclasses(); methods getforthread() blah blah cdata getforthread(); 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 getforthread().
...And 8 more matches
OSFile.jsm
javascript module os.file contains primitives for manipulating files out of the main thread.
... os.file is a new api designed for efficient, off-main thread, manipulation of files by privileged javascript code.
... why is off main thread 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 already have helper functions that take care of all of this, so all you need to do is pass their return values through.
... msgsperthread: 1 how many messages should be in each thread?
...And 8 more matches
Monitors
monitor type monitor functions with a mutex of type prlock, a single thread may enter the monitor only once before it exits, and the mutex can have multiple associated condition variables.
... with a mutex of type prmonitor, a single thread may re-enter a monitor as many times as it sees fit.
... the first time the thread enters a monitor, it acquires the monitor's lock and the thread'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 already taken, attempts will be made to ensure that it is unique.
...the specified file is created if it does not already exist.
...consumers should check mozistorageconnection.connectionready 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
nsIMsgProtocolInfo
read only.
...read only.
...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 thread 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 thread, 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 thread 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 thread 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 filereader 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 already 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 already 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 }, onready: 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 onready 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 bytereader = fileio.open(filename, "rb"); if (!bytereader.closed) { data = bytereader.read(); bytereader.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 bytereader(inputstream) creates a binary input stream that reads bytes from a backing stream.
... you can also create bytereader 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 already exists.
... nsilocalfile.isreadable() 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-thread 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 pthreads 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 threads on linux.
... mozilla uses pthreads for its networking library so you need to be able to work in a threaded 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 already 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 already 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 screenreaders built in to enable visually impaired users to use them successfully.
... summary of screenreader testing on android and ios the most common mobile platforms have fully functional screen readers.
... these function in much the same way as desktop screenreaders, 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 screenreaders or navigated by the keyboard, and we need to give them a helping hand.
... simple images we already 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 screenreaders 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 already know about.
...we need to make our links accessible to all readers, regardless of their current context and which tools they prefer.
... for example: screenreader 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 already 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 already 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 already 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 spread 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 already 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 targetread only eventtarget the event target (the topmost target in the dom tree).
... typeread 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 already 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 already 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.setthreadtoken().
... this sets the token to be used by the jss jca provider in the current thread.
... when you call getinstance() on a jca class, the jss provider checks the current per-thread default token (by calling cryptomanager.getthreadtoken()) 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.setthreadtoken().
... this sets the token to be used by the jss jca provider in the current thread.
... when you call getinstance() on a jca class, the jss provider checks the current per-thread default token (by calling cryptomanager.getthreadtoken()) 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_pthreads 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 already exists.
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already exists.
...create a new accessible of the appropriate type if necessary, or use one from the accessibility cache if it already 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.
... childrenreadonly 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/threads/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 thread, 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 already has an email account, the user can switch to the original account setup wizard.
... 20 db views (message lists) mailnews, thunderbird the thread 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 spread 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 authenticatedsignedwritesread only returns a boolean that is true if signed writing to the characteristic value is permitted.
... broadcastread only returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
... indicateread only returns a boolean that is true if indications of the characteristic value with acknowledgement is permitted.
...And 7 more matches
DOMRect - Web APIs
WebAPIDOMRect
it inherits from its parent, domrectreadonly.
... <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/domrectreadonly" 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">domrectreadonly</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, domrectreadonly.
...And 7 more matches
File - Web APIs
WebAPIFile
in particular, filereader, 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 already 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 thread, 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
WebAPIUIEvent
uievent.detailread 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 already 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 already dealt with them.
...And 7 more matches
Window.open() - Web APIs
WebAPIWindowopen
=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 already 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.spreadfirefox.com/", "promotefirefoxwindowname", "resizable,scrollbars,status"); /* then create it.
...*/ }; } </script> (...) <p><a href="http://www.spreadfirefox.com/" target="promotefirefoxwindowname" onclick="openffpromotionpopup(); return false;" title="this link will create a new window or will re-use an already 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 already 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 thread.
... instead, you should write your code so that your app creates a web worker that does as much as possible in a background thread (for example, fetching and processing data.) then, anything that must be done on the main thread (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 threads, while you keep the run-time of main thread 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 already 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
ArchiveMozillaXULEventscommand
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 already 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 already 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 already 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 already sounds like a necessary toolchain.
... once you've signed up for github (click the sign up link on the homepage if you don't already 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 already, but if not, refer back to that section.
...And 6 more matches
JavaScript OS.Constants
using os.constants from the main thread to initialize os.constants for use in the main thread, 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 already 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 already 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 already 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 already bold, the bold will be removed.
... contentreadonly this command will make the editor readonly(true)or editable(false).
... if there is a selection and all of the characters are already italic, the italic will be removed.
...And 6 more matches
About NSPR
these facilities include threads, thread synchronization, normal file and network i/o, interval timing and calendar time, basic memory management (malloc and free) and shared library linking.
... threads threads are the major feature of nspr.
... the industry's offering of threads is quite sundry.
...And 6 more matches
NSPR Error Handling
pr_pending_interrupt_error the operation terminated because another thread has interrupted it with pr_interrupt.
... pr_is_connected_error an attempt to connect on an already connected network file descriptor.
... pr_tpd_range_error attempt to access a thread-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 already 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 already 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 already 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 thread-specific information about the execution environment.
... there should be one and only one context associated with each thread that will be executing javascript.
... to associate the current thread with a context, simply call the enter method of context: context cx = context.enter(); once you are done with execution, simply exit the context: context.exit(); these calls will work properly even if there is already a context associated with the current thread.
...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 thread.
... see js_threadsafe.
... a general rule about the state of all threads at a given time: either exactly one thread is "in gc" and no threads are in requests; or no thread is doing gc, in which case any number of threads 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_setcurrentthreadname" 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 thread that uses the jsapi.
...to do anything useful with spidermonkey, you must read all three sections.
... throwing and catching exceptions we have already 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 thread 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 thread intends to call jsapi functions.
... description when your multithreaded 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 thread.
...but the javascript engine will then detect that gc is already happening and will not actually do a nested gc cycle in this case.
... in a js_threadsafe build, a jsgc_begin callback may happen on any thread, any time that thread triggers garbage collection (from almost any jsapi call).
...And 6 more matches
XPCOM array guide
MozillaTechXPCOMGuideArrays
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 onoutputstreamready 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.onoutputstreamready() event is dispatched, the stream releases its reference to the nsioutputstreamcallback object.
...in other words, this method may be called when the stream already 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
nsIDOMGeoPositionAddress
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 = fread(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 already 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 already 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 thread shown when the main thread sends a message to a worker, or receives a message from a worker.
... one of: serialize data on the main thread the main thread is serializing a message to be sent to the worker.
... deserialize data on the main thread the main thread is deserializing a message received from the worker.
...And 6 more matches
Attr - Web APIs
WebAPIAttr
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 thread 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 thread 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 thread, since it's common for user interface changes to only be available to the main thread.
...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 directoryreadersync createreader () 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 createreader() creates a new directoryreadersync to read entri...
... directoryreadersync createreader ( ) raises (fileexception); returns directoryreadersync represents a directory in a file system.
...And 6 more matches
Gamepad - Web APIs
WebAPIGamepad
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 screenreader support is currently not there.
...the annotations should just work once screenreader support is added.
... aria-details versus aria-describedby we have already 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"> spread </div> <div class="ui-slider-btn-set" data-topic="spread" data-type="sub"></div> <div class="ui-slider" data-topic="spread" data-min="-100" data-max="100" data-step="1" data-value="50"> </div> <div class="ui-slider-btn-set" data-topic="spread" data-type="add"></div> ...
... <div class="ui-slider-input" data-topic="spread" 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.spread = 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 already 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 already w3c recommendations, other still are early working drafts.
...some modules, like selectors 4 or css borders and backgrounds level 4 already 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 already became a standard as a w3c recommendation.
...And 5 more matches
progress - Archive of obsolete content
read only.
...read only.
...read only.
...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 threads 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 threads we store thread information persistently in the database and expose these object through the [nsimsgthread 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 already 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 thread, the entire browser is blocked until getusermedia() returns!
...even if the handlecallbutton() function has already 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 thread (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 thread is available.
...the callbacks you pass to these functions cannot run until the stack on the main thread 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 screenreader 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 screenreaders, 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 already 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 already 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_acceptread, 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_acceptread 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 thread interrupted) before it will resume from the wait.
... the value pr_interval_no_wait causes the thread 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 thread 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 thread-safe and doing most of the work in the main-thread, 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 already 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 nodeisreadonly(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 isreadonlyfolder(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 thread-safe.
...And 5 more matches
Observer Notifications
xpcom-shutdown-threads shuts down the thread manager, causing all nsthreads to finish processing any events already 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
mozIStorageStatement
read only.
...read only.
...read only.
...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
nsICacheEntryInfo
read only.
...read only.
...read only.
...And 5 more matches
nsIDOMClientRect
read only.
...read only.
...read only.
...And 5 more matches
nsIDownloadManager
read only.
...read only.
...read only.
...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 thread 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.markmessagesread); mailnews/base/public/nsimsgdbview.idlscriptable please add a summary to this article.
... last changed in gecko 1.9 (firefox 3) constants name value description markmessagesread 0 marks the selected messages as read.
... markmessagesunread 1 mark the selected messages as unread togglemessageread 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 already opened window, and passing data between different windows.
... finding already opened windows the window mediator xpcom component (nsiwindowmediator interface) provides information about existing windows.
...=== example: opening a window only if it's not opened already === 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 already 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.formread only an htmlformelement referencing the form that this element is associated with.
... htmlselectelement.labelsread only a nodelist of <label> elements associated with the element.
... htmlselectelement.optionsread only an htmloptionscollection representing the set of <option> (htmloptionelement) elements contained by this element.
...And 5 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
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_spreadmethod_unknown 0 the type is not one of predefined types.
... svg_spreadmethod_pad 1 corresponds to value pad.
... svg_spreadmethod_reflect 2 corresponds to value reflect.
...And 5 more matches
SVGLength - Web APIs
WebAPISVGLength
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 === 'notreadableerror' ) { 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 thread.
... in production code, avoid such entry points, especially on the browser main thread 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 thread 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 already 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 screenreader, converted to large print, or represented on a braille display.
...otherwise, screenreaders 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
WebHTMLElementinputnumber
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
WebHTMLElementtextarea
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
WebHTTPCORS
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 already-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 already open, even if that panel was opened by a different add-on sdk based extension.
... we've already 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.domready={onadd:function(a){if(browser.loaded){a.call(this);}}};(function(){var b=function(){if(browser.loaded){return;}browser.loaded=true; window.fireevent("domready");document.fireevent("domready");};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
File object - Archive of obsolete content
readable pipelines (i.e.
... file.canread true if the file can be read.
...(readonly) file.position the file position.
...And 4 more matches
Venkman Introduction - Archive of obsolete content
even if you are already using venkman, the features, procedures, and tips described here will make you a more confident web developer and debugger.
... if you don't already 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 already 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 already 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 already 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_requestread.
...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_writeready and npp_write.
...description the browser calls the npp_write function to deliver the data specified in a previous npp_writeready call to the plug-in.
...And 4 more matches
Common Firefox theme issues and solutions - Archive of obsolete content
please see the following threads 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 thread.
... style inspector's bread crumb buttons are hard to read the text labels of breadcrumbs 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 already downloaded, extracted, and consumed the necessary documentation to get up and running with some basic rhino scripts.
... if you don’t already 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.inputstreamreader( c.getinputstream() ); var b = new java.io.bufferedreader( 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 already.
...--jonnyq i've already 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 already 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 already 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 already 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 already 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 already 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 already 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 already 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 screenreader.
... can you update the article text to make it easier for screenreader 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 already 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 already: this assigns a value to a variable.
...you have already 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 screenreaders 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
From object to iframe — other embedding technologies - Learn web development
read on...
... note: you can read frederik braun's post on the x-frame-options security header for more background information on this topic.
... note: a plugin, in this context, refers to software that provides access to content the browser cannot read natively.
...And 4 more matches
HTML table basics - Learn web development
LearnHTMLTablesBasics
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: screenreaders, 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 already available in the dom.
...this is because as we said in the previous article, javascript is single threaded.
... only one thing can happen at a time, on a single main thread, 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 spreadsheet 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 already.
...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 already 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 already using for a different purpose.
...And 4 more matches
Strategies for carrying out testing - Learn web development
of course, this relies on you already 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 threads 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 thread, 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 already 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 already 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 already have a reference.
...if the associated promise has already 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 already resolved to the pending promise.
...And 4 more matches
Index
you also need to determine if a localization effort already 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 already 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 thread.
...in the asynchronous scrolling model, the visual scroll position is updated in the compositor thread and is visible to the user before the scroll event is updated in the dom and fired on the main thread.
...as the scroll event listener runs in the javascript on the browser's main thread, 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 already 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 thread waiting on a change in the state of monitored data.
...the calling thread must be in the monitor defined by the value of the address.
... returns pr_success indicates that the calling thread 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 threads.
... syntax #include <prinit.h> void pr_setconcurrency(pruintn numcpus); parameter pr_setconcurrency has one parameter: numcpus the number of extra virtual processor threads to be created.
... description setting concurrency controls the number of virtual processors that nspr uses to implement its m x n threading model.
...And 4 more matches
PR_Sleep
causes the current thread to yield for a specified amount of time.
... syntax #include <prthread.h> prstatus pr_sleep(printervaltime ticks); parameter pr_sleep has the following parameter: ticks the number of ticks you want the thread to sleep for (see printervaltime).
...if you set ticks to pr_interval_no_wait, the thread 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 multithreaded programming.
...a trust anchor is just another x.509 certificate that is already 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 thread that created it; it may not be accessed by any other thread.
... suspends the calling thread's current request, if any, to allow the thread to block or perform time-consuming calculations.
... description in js_threadsafe builds, when a multi-threaded application is in a request but needs to block or perform lengthy computation that can race safely with the garbage collector, it should call js_suspendrequest before the time-consuming operation and js_resumerequest after.
...And 4 more matches
JS_YieldRequest
momentarily suspend the current jsapi request, allowing garbage collection to run if another thread 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 thread.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...And 4 more matches
SpiderMonkey 1.8.5
multithreaded js programs that race against the same objects are now explicitly not supported.
... multithreaded programs are allowed, but each thread must operate on objects in a separate compartment, isolated from the other threads.
... no compartment may execute js code or call into jsapi on two os threads at the same time.
...And 4 more matches
Mork
MozillaTechMork
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 thread, where the meta-rows represent information about the thread in general.
...morkreader usage morkreader 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 beginreading endreading 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& areadable 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 beginreading pruint32 beginreading(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 already defined aggregate functions provided by sqlite.
... note this callback is executed on the thread that the statement or trigger is executing on.
... if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code.
...And 4 more matches
nsIAccessibleTableCell
read only.
...read only.
...read only.
...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 thread.
... 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 thread on which the listener's onlookupcomplete should be called.
... if this parameter is null, then onlookupcomplete will be called on an unspecified thread (possibly recursively).
...And 4 more matches
nsIDOMGeoPositionCoords
read only.
...read only.
...read only.
...And 4 more matches
nsIDOMXPathResult
read only.
...read only.
...read only.
...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
nsISocketTransport
read only.
...read only.
...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
nsIWebSocketChannel
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 threadindex = new object(); gdbview.viewnavigate(components.interfaces.nsmsgnavigationtype.nextmessage, resultid, resultindex, threadindex, 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.
... togglethreadkilled 5 must match nsmsgviewcommandtype togglethreadkilled.
... firstunreadmessage 6 go to the first unread message in the view.
...And 4 more matches
XPCOM
file and memory management, threads, 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 datasourcealready_addrefedalready_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
WebAPIBlob
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.serviceread only returns the bluetoothgattservice this characteristic belongs to.
... bluetoothremotegattcharacteristic.uuidread 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.characteristicread only returns the bluetoothremotegattcharacteristic this descriptor belongs to.
... bluetoothremotegattdescriptor.uuidread 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
WebAPIBody
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
WebAPIClipboard
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.formread only an htmlformelement indicating the form associated with the control, reflecting the form html attribute if it is defined.
... htmloutputelement.htmlforread 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.labelsread 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 domrectreadonly.
... intersectionobserverentry.intersectionratio read only returns the ratio of the intersectionrect to the boundingclientrect.
... intersectionobserverentry.intersectionrect read only returns a domrectreadonly 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 instrumentkeyread 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.
... methoddataread 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.
... modifiersread 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 numberofitemsread only unsigned long the number of items in the list.
...if the inserted item is already in a list, it is removed from its previous list before it is inserted into this list.
... if newitem is already 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
WebAPISelection
properties selection.anchornoderead only returns the node in which the selection begins.
... selection.anchoroffsetread only returns a number representing the offset of the selection's anchor within the anchornode.
... selection.focusnoderead 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
WebAPITextTrack
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 thread, thus blocking everything else going on until it completed execution.
...an audio context's audio worklet is a worklet which runs off the main thread, 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 already 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.booleanvalueread only a boolean representing the value of the result if resulttype is boolean_type.
... xpathresult.invaliditeratorstateread only signifies that the iterator has become invalid.
... xpathresult.numbervalueread 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.
... gripspaceread 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
WebAPI
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 dommatrixreadonly domobject domparser dompoint dompointinit dompointreadonly domquad domrect domrectreadonly domstring domstringlist domstringmap domtimestamp domtokenlist domuserdata datatransfer datatransferitem datatransferitemlist dedicatedworkerglobalscope delaynode deprecationreportbody devicelightevent devicemotionevent devicemotioneventacceleration devicemotioneventrotationrate deviceor...
...ientationevent deviceproximityevent directoryentrysync directoryreadersync 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 filereader filereadersync filerequest filesystem filesystemdirectoryentry filesystemdirectoryreader 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 already 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
WebHTMLElementinputsearch
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 already been fulfilled or rejected when a corresponding handler is attached, the handler will be called, so there is no race condition between an asynchronous operation completing and its handlers being attached.
...promises in javascript represent processes that are already 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 thread 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 thread, 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 already 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 "nsreadableutils.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.beginreading(begin); mystring.endreading(end); + const prunichar *begin, *end;+ mystring.beginreading(&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 nsreadableutils.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 already 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 already 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 thread 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 already 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 already 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 already possess a wealth of technical expertise that will be relevant for creating xul applications.
... in addition to the technologies already 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.isreadable() - 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
ArchiveMozillaXULmenu
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
application/http-index-format specification - Archive of obsolete content
the application/http-index-format file format is an attempt to provide a generic, extensible file listing format that is principly machine readable.
... number codes 100 a human readable comment line.
... 101 pre formatted human readable information line.
...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 xmlreader = components.classes["@mozilla.org/saxparser/xmlreader;1"] .createinstance(components.interfaces.nsisaxxmlreader); 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 nsisaxxmlreader interface.
...And 3 more matches
Using SSH to connect to CVS - Archive of obsolete content
this document assumes that you already 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 already 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 already 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 already 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 already present.
... justify: makes the text spread 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 already 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 already 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 filereader, canvas, and webrtc.
...to learn more about the filereader api, see using files from web applications.
... in the following example, we use the filereader 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 screenreaders when their users focus on the elements that contain them.
... implementing the javascript we've got a fairly complete html and css interface already; 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 already 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 already be annoying, but what about 100 items, or 1000?
...paste the following code into the console: let shopping = ['bread', '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 "bread" 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 already 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 already 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 threads.
...if you haven't already 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 already 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 already 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 already 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 already 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 thread.
...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 already have a local clone of the repository.
...consequently, if you already 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 thread 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 thread was not the thread that held the monitor's mutex.
...while the thread 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 already 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_initreadwrite("."); 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_isreadonly pk11_setpasswordfunc secmod_loadusermodule load a new pkcs #11 module based on a modulespec.
...secmod_closeuserdb close an already 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_initreadwrite, 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_pk11threadsafe - only load pkcs#11 modules that are thread-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 already 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 thread class: its constructor takes a runnable that contains a single method run that will be called when the new thread is started.
...now that we have an object implementing runnable, we can create a thread and run it.
... the function we defined for run will be called on a new thread.
...And 3 more matches
Garbage collection
much of the gc work is performed on helper threads.
...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-thread 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 thread.
... if this class has a finalizer that makes use of state shared with the main thread then this option must be specified.
... jsclass_background_finalize it is safe to finalize objects of this class on a background thread.
...And 3 more matches
JS_CheckAccess
in a js_threadsafe 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_threadsafe builds, some objects are not safe to be shared among threads.
...in short, applications that share objects among threads in such a way that two threads could access an array, iterator, or generator object at the same time should not use spidermonkey 1.8.
... js_alreadyhasownproperty 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 threads 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) thread (two threads share a resource but don’t lock it) signal race conditions example char *ptr; void sighandler() { if (ptr) free(ptr); _exit(0); } int main() { signal(sigint, sighandler); ptr = malloc(1000); if (!ptr) exit(0); ...
... it would lead to a double free race conditions: prevention be very careful when working with threads, the file system, or signals track down shared resources and lock them accordingly for signal handlers never use non-atomic operations longjmp() is a sign of badness even exit() could cause problems, but _exit() is okay deadlocks and locking issues locks are used when dealing with threads acquiring more than one lock to perform an action if a second thread acquires the same locks but in a different order, it causes denial of service...
...And 3 more matches
Preface
who should read this book no one.
...if you already 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 already 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 thread.
... obsolete since gecko 45 the function was moved to threadsafechromeutils 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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& areadable 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 beginreading pruint32 beginreading(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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar* begin prunichar* end prunichar beginreading() const - source endreading prunichar endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 thread 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 threads.
...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
nsIApplicationUpdateService
read only.
...read only.
...read only.
...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
nsIHttpChannelInternal
read only.
...read only.
...read only.
...And 3 more matches
nsIInstallLocation
read only.
...read only.
...read only.
...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 notifymarkedmessageread(in long arequestid, in bool aread); void notifymarkmessagereadfailed(in long arequestid, in long aerror); void notifynomessageinlist(in long arequestid); void notifyreadmessagelistfailed(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 already existing request object.
... notifymarkedmessageread() requires gecko 15.0(firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) void notifymarkedmessageread( in long arequestid in bool aread ); 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 already reached.
... note: this function may only be called from an event dispatch on the socket thread.
... 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 thread.
... 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 thread pane (aka message list) is driven by classes that implement nsimsgdbview and inherit from nsmsgdbview.
... these are the main view classes: nsmsgthreadeddbview - (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 threaded mode.
... m_folders cross-folder views only (nsmsgsearchdbview and its descendant, nsmsgxfvirtualfolderdbview) most of the time, the thread pane is driven by an nsmsgthreadeddbview 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 « thread 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 already 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
WebAPIBlobstream
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 getreader() on the returned stream to get an object to use to read the data from the blob using methods such as the readablestreamdefaultreader 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 stylepropertymapreadonly 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 stylepropertymapreadonly.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, stylepropertymapreadonly.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
WebAPIDOMMatrix
it is a mutable version of the dommatrixreadonly interface.
... properties this interface inherits properties from dommatrixreadonly, 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
WebAPIDOMPoint
dompoint is based on dompointreadonly but allows its properties' values to be changed.
...you can also use an existing dompoint or dompointreadonly or a dompointinit dictionary to create a new point by calling the dompoint.frompoint() static method.
... methods dompoint inherits methods from its parent, dompointreadonly.
...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
WebAPIDocumentcookie
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.getreader(); 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
WebAPIFileError
represents an error that occurs while using the filereader 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 filereader) 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 already exists.
... fileerror.path_exists_err the create and exclusive options were both true, indicating that the directory should be created but must not already exist, but the directory does in fact already exist.
...the parent directory must already 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 already exists.
... fileerror.path_exists_err the create and exclusive options were both true, indicating that the file should be created but must not already exist, but the file does in fact already exist.
...the parent directory must already exist.
...And 3 more matches
Gyroscope - Web APIs
WebAPIGyroscope
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 thread, creates a structured clone of the value, and stores the cloned value in the object store.
...if a record already 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 already 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 already have permission by checking the value of the notification.permission read only property.
...we don't want to show it if permission has already 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 thread (or other worker), you cannot see it in a worker thread, 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
WebAPIRange
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
WebAPISVGAngle
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.alternatesettingread only returns the alternate setting number of this interface.
... usbalternateinterface.interfaceclassread only returns the class of this interface.
... usbalternateinterface.interfacesubclassread 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 already!
... we want to set her animation’s “playhead” in the middle, so she’s already 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 thread.
... 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 thread rather than on the main thread.
...And 3 more matches
Web Workers API - Web APIs
web workers makes it possible to run a script operation in a background thread separate from the main execution thread of a web application.
... the advantage of this is that laborious processing can be performed in a separate thread, allowing the main (usually the ui) thread 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 thread; 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 screenreaders 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 screenreader 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 already 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 already 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 spread 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 | spread-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 <spread-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 screenreader 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
WebHTMLElementinputpassword
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
WebHTMLElementinputtel
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
WebHTMLElementinputtext
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
WebHTMLElementinputurl
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
WebHTMLElementp
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
WebHTMLElementvideo
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
WebHTMLIndex
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
WebHTTPOverview
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 already set the correct type for .js files, but not yet for .mjs files.
... servers that already serve .mjs files correctly include github pages and http-server for node.js.
... this is ok if you are using such an environment already, 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 threads 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 thread.) 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 threads (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 threads is therefore available.
... webassembly shared memory the webassembly threads 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 already 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 already 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 already 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 already 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", "onready" 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 already 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 already loaded.
...And 2 more matches
Appendix: What you should know about open-source software licenses - Archive of obsolete content
reading a printed piece, while it is a use of it, is a “use” in a much weaker sense of the word.
...this is what we might call the reader’s use of the work, and it requires no permission from the author.
... in some situations, such as education or citation, use in the strong, authorial sense is permitted to readers.
...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 already 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 already 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
The Essentials of an Extension - Archive of obsolete content
you can read about different possible types in the install.rdf specification.
... you can read more about the typeof operator.
...here you can read more about let declarations.
...And 2 more matches
Performance best practices in extensions - Archive of obsolete content
avoid writing slow css read the "writing efficient css" guide.
... many common services are already cached for you in services.jsm.
... use asynchronous i/o this cannot be stressed enough: never do synchronous i/o on the main thread.
...And 2 more matches
cached - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
checking - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
downloading - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
error - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
noupdate - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
obsolete - Archive of obsolete content
read only.
...read only.
...read only.
...And 2 more matches
IO - Archive of obsolete content
ArchiveMozillaXULFileGuideIO
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 unread messages or labels.
...the example below sets the background color to grey for rows that have the 'readonly' and 'unread' 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 already 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
ArchiveMozillaXULtab
attributes accesskey, afterselected, beforeselected, command, crop, disabled, first-tab, image, label, last-tab, linkedpanel, oncommand, pending, pinned, selected, tabindex, unread, 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.
... unread type: boolean this attribute is set to true if the tab is unread; 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 unread.
...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 already 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 already 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/addfeedreader.xul feeds/addfeedreader.css new file that presents ui for adding a new feed reader.
... browser/feeds/addfeedreader.css new file; css used for the window to add a new feed reader.
... feeds/addfeedreader.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 already 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 already 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 already 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 already 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 already 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 already 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 already (so it's a new press), then looping through the cached states from the previous frame does the job — if the button was already pressed, then we ignore the new press and set it to false.
...And 2 more matches
Unconventional controls - Game development
there's already 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 already: 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 screenreader 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 screenreaders, to make it easily findable?
... the problem we have now is that when the dom changes to show a new decription, screenreaders 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 widespread 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 already 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 already 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 already 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 already has one or more attributes).
...take the <img> element that we already 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 already 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 already 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 widespread 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 already 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 already 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 already 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 already 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 already 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 already 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 already running app).
...# breakpoint set --name nsthread::processnextevent --thread-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.getthread().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 already 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 already 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 already 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 already 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 already 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.getforthread(); // 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 already, 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 thread or from a worker thread; calling instance method stat() of os.file either from the main thread or from a worker thread.
... using os.file.info example: determining if a file is a regular file the following snippet uses the main thread 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 threads 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 already.
... mozilla’s standards mode is, obviously, already compatible with other browsers that implement the same standards reasonably correctly.
...And 2 more matches
Power profiling overview
each core typically has hyper-threading, 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 threads provided in netscape portable runtime (nspr) are implemented using different mechanisms on the various platforms.
... on some platforms, nspr threads directly map one-to-one to the threads provided by the platform vendor, on other platforms nspr threads are basically user-level threads within a single process (with no kernel threads) and on still others nspr threads are user-level threads implemented on top of one or more kernel threads within single address space.
... nspr does not override the fork function and so, when fork is called from the nspr thread the results are different on the various platforms.
...And 2 more matches
PRIOMethods
syntax #include <prio.h> struct priomethods { prdesctype file_type; prclosefn close; prreadfn 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; pracceptreadfn acceptread; 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 threads waiting for a change in the state of monitored data.
...the calling thread 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 thread was in the monitor.
...And 2 more matches
PR_Cleanup
if the calling thread of this function is not the primordial thread, pr_failure.
... description pr_cleanup must be called by the primordial thread near the end of the main function.
...it does so by blocking the caller, if and only if it is the primordial thread, until all user threads have terminated.
...And 2 more matches
PR_EnterMonitor
description when the calling thread returns, it will have acquired the monitor's lock.
... attempts to acquire the lock for a monitor that is held by some other thread will result in the caller blocking.
... if the monitor's entry count is greater than zero and the calling thread 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 thread'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 threads of the runtime.
... pr_initialize does not return to its caller until all user threads have terminated.
...And 2 more matches
PR_Notify
the monitor object referenced must be one for which the calling thread currently holds the lock.
...when the notification occurs, the runtime promotes a thread that is waiting on the monitor to a ready state.
... if more than one thread is waiting, the selection of which thread gets promoted cannot be determined in advance.
...And 2 more matches
PR_NotifyAll
promotes all threads waiting on a specified monitor to a ready state.
...the monitor object referenced must be one for which the calling thread currently holds the lock.
... description a call to pr_notifyall causes all of the threads waiting on the monitor to be scheduled to be promoted to a ready state.
...And 2 more matches
PR_NotifyCondVar
description the calling thread 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 thread that is waiting on the condition variable to a ready state.
... if more than one thread is waiting, the selection of which thread gets promoted cannot be predicted.
...And 2 more matches
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
can i have multiple jss instances reading separate db's?
...jss only supports the native threading model (no green threads).
...the nt fiber problem affects applications that call blocking system calls from the primordial thread.
...And 2 more matches
PKCS #11 Module Specs
ciphers - comma separated list of ciphers this token will enable that isn't already 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 already been loaded.
...And 2 more matches
NSS tools : certutil
the certificate database should already exist; if one is not present, this command option will initialize one by default.
...the key database should already 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 already 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 already exist; if one is not present, this option will initialize one by default.
... the key database should already 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, threadsafe builds are the default, and should work out of the box on all posix platforms.
... support for js_threadsafe was recently removed, and threadsafe 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_threadsafe 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_threadsafe 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 thread accesses only one property at a time.
... threads.
...And 2 more matches
JS_CompileUTF8FileHandle
compile a script, reading the source code from a stdio file.
...in a js_threadsafe 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_threadsafe #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 thread-safe builds, and in non-thread-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 thread-safe.
...And 2 more matches
JS_MakeStringImmutable
make a jsstring thread-safe.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...therefore such strings must not be used by more than one thread 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, jsusehelperthreads usehelperthreads, 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 thread only.
...And 2 more matches
SpiderMonkey 1.8.7
no compartment may execute js code or call into jsapi on two os threads 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_alreadyhasownpropertybyid 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_getgcparameterforthread 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading charat operator[] first beginwriting endwriting setlength length isempty setisvoid isvoid assign assignliteral operator= replace append appendliteral operator+= insert cut truncate stripc...
...methods beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const prunichar**, const prunichar**) const - source returns the length, beginning, and end of a string in one operation.
... parameters prunichar** begin prunichar** end prunichar* beginreading() const - source endreading prunichar* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char* begin char* end char beginreading() const - source endreading char endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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 beginreading endreading 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 beginreading pruint32 beginreading(const char**, const char**) const - source returns the length, beginning, and end of a string in one operation.
... parameters char** begin char** end char* beginreading() const - source endreading char* endreading() 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
mozISpellCheckingEngine
read only.
...read only.
...read only.
...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
nsIAccessibleHyperLink
read only.
...read only.
...read only.
...And 2 more matches
nsIAppShell
this interface is designed to be used on the main application thread only.
...read only.
... resumenative() resumes the use of additional platform-specific methods to run() gecko events on the main application thread.
...And 2 more matches
nsIAppShellService
read only.
...read only.
...read only.
...And 2 more matches
nsICacheSession
does not block the calling thread.
...isstorageenabled() this method checks if the cache devices implied by the session storage policy are currently enabled for instantiation if they don't already exist.
...when called by multiple threads for write access, only one writable descriptor will be granted.
...And 2 more matches
nsIDOMOfflineResourceList
read only.
...read only.
... onupdateready 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
nsIEventListenerInfo
read only.
...read only.
...read only.
...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
nsIMicrosummaryGenerator
read only.
...read only.
...read only.
...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 thread.
...so, calling resolve without this flag may result in locking up the calling thread for a lengthy period of time.
... by passing this flag to resolve, one can failover to asyncresolve to avoid locking up the calling thread 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 setcaretreadonly(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.
... setcaretreadonly() 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
nsIWebNavigation
read only.
...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
nsIXULTemplateResult
read only.
...read only.
...read only.
...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 already 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 threads in an organized and secure way.
... mozilla svg project since you have come this far, you probably already 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 already, and it creates a new instance of the plug-in.
... note: plug-in api calls and callbacks use the main navigator thread.
...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_writeready 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 thread; calling them from other threads is not supported and may have unpredictable results.
... npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated).
...And 2 more matches
Examine and edit HTML - Firefox Developer Tools
navigating the html html breadcrumbs at the bottom on the html pane is a breadcrumbs toolbar.
... this shows the complete hierarchy through the document for the branch containing the selected element: hovering over a breadcrumb highlights that element in the page.
... the breadcrumbs 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
WebAPIAnimation
animation.effect gets and sets the animationeffectreadonly 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
WebAPIAudioNode
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
WebAPIBodyarrayBuffer
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 already 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 createreadinglist() { // 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 directoryreader = item.createreader(); let directorycontainer = document.createelement("ul"); container.appendchild(directorycontainer); directoryreader.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 filesystemdirectoryreader 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 thread that spawned it.
... the main scope that spawned the worker can send back information to the thread that spawned it using the worker.postmessage method.
... syntax postmessage(amessage, transferlist); parameters amessage the object to deliver to the main thread; 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 already 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 thread.
... filesystemdirectoryreader created by calling filesystemdirectoryentry.createreader(), 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, already 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 already exist.
... it returns an idbrequest object, and, in a separate thread, 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 thread, even one of these can cause performance problems.
...each of these has its own intersection detection routines, all running on the main thread.
...this way, sites no longer need to do anything on the main thread 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 already doing so.
...has no effect if the media is currently stopped already.
...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 currentstateread only returns the current state of a manipulation event.
... inertiadestinationxread only represents the predicted horizontal scroll offset after the inertia phase completes.
... inertiadestinationyread 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 notreadableerror, some problem occurred which prevented the device from being used.
... notreadableerror 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 already aac and the video codec is h.264, we can instruct ffmpeg not to perform transcoding.
... this means that metadata within the container is spread out and not lumped together.
... note: the fragmented version is slightly larger than the original, due to additional metadata spread 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.descriptionread only a domstring value of the server-specified metric description, or an empty string.
... performanceservertiming.durationread only a double that contains the server-specified metric duration, or value 0.0.
... performanceservertiming.nameread 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
WebAPIRTCError
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
StorageEvent - Web APIs
read only.
...read only.
...read only.
...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 already 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
WebAPIWebSocket
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 already have a xrsession object representing an ongoing webxr session.
... if we already 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 already?
...it's a commonly-used type and we already 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 alaready 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.closedread only allows you to write code that responds to an end to the streaming process.
... writablestreamdefaultwriter.desiredsizeread only returns the desired size required to fill the stream's internal queue.
... writablestreamdefaultwriter.readyread 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="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-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="thread-1 thread-2">end of the guitar solo</mark>, before fading away sharply.</p> <div role="comment" id="thread-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="thread-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="thread-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 already 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 already 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
WebCSSdisplay
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 already 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 already implemented in firefox yet.
...and it won't do anything if the unprefixed versions are already present.
...And 2 more matches
HTML5 Parser - Developer guides
WebGuideHTMLHTML5HTML5 Parser
parsing is now done in a separate thread from firefox’s main ui thread, 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 already 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
WebHTMLElementaudio
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 already be logged in, with their locale already set, you could provide the timezone in a hidden input type.
...exactly because you will already 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 already been loaded into the browser from the cache, the updated document will not be rendered until the document is reloaded (either manually or programatically).
... updateready there is a new version of the application cache available.
... there is a corresponding updateready 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
WebHTTPIndex
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 already 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 already 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 already.
...And 2 more matches
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
they run on a separate thread 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 thread, etc.
...And 2 more matches
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
191 spreadmethod svg, svg attribute the spreadmethod 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 already been developed.
... to reuse module instances that are already loaded.
...if options.source is provided then its value is evaluated, otherwise source is read from the supplied uri.
...}) require() as already 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({ onready: 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 onready function,array functions to call when the frame is ready to load content.
... you must specify an onready 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 filereader.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 filereader() 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 already built firefox successfully.
...if you already 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 already 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.
Jetpack Processes - Archive of obsolete content
read-only.
...read-only.
...read-write.
...read-write.
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 already 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 already 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 already 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 already 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 already running.
...if you are already 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 already running instance; sharing all its profile, sessions etc.
... note: if you already 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 already exist.
... selectsearch = firstrun || reason == addon_enable; // only add the engine if it doesn't already exist.
...var selectsearch = false; function removeobserver() { try { services.obs.removeobserver(searchobserver, engine_added); } // if we've already removed this observer, ignore the error.
... selectsearch = firstrun || reason == addon_enable; // only add the engine if it doesn't already 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 threads 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_pluginthreadasynccall npn_posturl npn_posturlnotify npn_releaseobject npn_releasevariantvalue npn_reloadplugins npn_removeproperty npn_requestread 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_writeready 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 already 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_thread/thread/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 already been formatted.
...sometimes a content element comes in incrementally, and invalidates the formatting of some of the frames that precede it, frame that have already 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 already 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 already 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 already 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 already 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 already 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 already 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 already 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 already be attached to the element.
... if a binding is attached and it already 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 already 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 already 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 already 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_already_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 already_exists -230 file already 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 already 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 already 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 already exists, then no action is taken.
...naturally, if the 'myfiles' directory already exists, it won't be recreated.
OpenClose - Archive of obsolete content
these are: if the menu is already open, or already in the process of being opened.
... naturally, attempting to open a menu that is already 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 already 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 already 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 already 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 already 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
ArchiveMozillaXULradio
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
ArchiveMozillaXULtree
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 already 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 thread, 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 threads 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 already built firefox 1.5.0.7 on the same machine with no problems.
... discussions final ff release already announced october 23rd: axel hecht posted an answer to cédric corazza posting.
... cédric's posting was about a french site which had already 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_pluginthreadasynccall thread safe way to request that the browser calls a plug-in function on the browser or plugin thread (the thread on which the plug-in was initiated).
... npn_requestread requests a range of bytes from a seekable stream.
... this initiates a read operation; the actual data is received through subsequent calls to npp_writeready() and npp_write().
...(remark: hence the name "npp_write" is misleading - just think of:"data_arrived") npp_writeready 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 already 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 already 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 already lower case.
... we found out already, 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 already, 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 already: 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 already 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 already 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 breadcrumb 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 thread 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 thread 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 already 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 already 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 screenreader: 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 already know, distributes space evenly between tracks.
...it has a grid defined already, 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 already 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 already 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 already 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 already included in our html.
...we've done this already as well.
Responsive design - Learn web development
the liquid site resulted in a squashed design on smaller screens (as seen below) and unreadably long line lengths on larger ones.
... the first was the idea of fluid grids, something which was already 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 unreadably 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 already 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 already 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 already provided you with a basic reset to build upon.
... we've already 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 already nicely-styled — you've already 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 already 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 already 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 screenreader 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 screenreader 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>&lt;q&gt;</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, screenreaders, 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 already 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 already 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 already 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 already 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 already 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 already.
...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 already worked through all the articles in this module.
... looping through the images we've already 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 already provided a line that stores a reference to the <button> in a constant called btn.
... details of what you have already tried, and what you would like us to do, e.g.
Third-party APIs - Learn web development
if you've already cloned the examples repository, you'll already have a copy of this file, which you can find in the javascript/apis/third-party-apis/mapquest directory.
...if you've already cloned the examples repository, you'll already 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 already zero before decrementing it — if the fetch request runs with a minus page url parameter, it could cause errors.
... if the pagenumber is already 0, we simply return out of the function, to avoid wasting processing power (if we are already 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 already 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 thread, 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 already 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 already been eaten by the evil circle, so there is no need to check it again.
... details of what you have already 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 already 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 already been added to the dom when mounted() is called.
... we're already 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 already 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 screenreaders 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 already 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 already have a profile called profile_name.
...if a private browsing window is already open, a new tab is opened in the existing window.
... execute the specified remote_command in an already running application process.
...useful with those command-line arguments that open their own windows but don't already 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 already written could be reused with or without changes.
... most of the time, the common component already 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 already work correctly.
... using the currentcolor keyword or inheriting is also good practice, because sometimes the needed value is already 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-thread io [fennec: android may warn about this with strictmode].
... threading issues enormous: correct use of locking and volatility; livelock and deadlock; ownership.
... [fennec: all view methods should be touched only on ui thread.] [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 targetread only eventtarget the event target (the topmost target in the dom tree).
... typeread only domstring the type of event.
... bubblesread only boolean whether the event normally bubbles or not.
... cancelableread 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 targetread only eventtarget the event target (the topmost target in the dom tree).
... typeread only domstring the type of event.
... bubblesread only boolean whether the event normally bubbles or not.
... cancelableread 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 already 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 already 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 thread, 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 already registered.
... addaddonlistener() adds a new addonlistener if the listener is not already registered.
... void removeaddonlistener( in addonlistener listener ) parameters listener the addonlistener to remove addtypelistener() adds a new typelistener if the listener is not already 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 already 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 already 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 already resolved to the pending promise value as its resolution.
...if the promise has already 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 already exists for your locale.
... here's what you do: look through the existing localization community directory to see if one already exists for your locale.
... if a community already 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 already familiar with this information, skip ahead to mozilla's svn repositories.
...if you already 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 already 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 thread waiting on this condvar.
... notifyall() nsresult notifyall(void); notify all threads waiting on this condvar.
... assertcurrentthreadownsmutex() assert that the current thread has successfully locked the mutex undergirding this condvar.
... assertnotcurrentthreadownsmutex() assert that the current thread has not successfully locked the mutex undergirding this condvar.
mozilla::Monitor
notify() nsresult notify(void); notify one thread waiting on this monitor.
... notifyall() nsresult notifyall(void); notify all threads waiting on this monitor.
... assertcurrentthreadin() assert that the current thread is in this monitor.
...assertnotcurrentthreadin() assert that the current thread 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_setcurrentthreadname.
... 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_thread=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_thread=main: these options specify that we only want cc logs for the main thread of content processes, to make shutdown less slow.
... if your leak is happening in a different process or thread, 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 thread wait on such notification.
... a call to pr_waitcondvar causes a thread to block until a specified condition variable receives notification of a change of state in its associated monitored data.
... other threads may notify the condition variable when changes occur.
... for an introduction to nspr thread synchronization, including locks and condition variables, see introduction to nspr.
PR_ClearInterrupt
clears the interrupt request for the calling thread.
... syntax #include <prthread.h> void pr_clearinterrupt(void); description interrupting is a cooperative process, so it's possible that the thread passed to pr_interrupt may never respond to the interrupt request.
... for example, the target thread may reach the agreed-on control point without providing an opportunity for the runtime to notify the thread of the interrupt request.
... in this case, the request for interrupt is still pending with the thread 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 threads waiting on a specified condition variable.
... description the calling thread 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 threads waiting on the specified condition variable to be promoted to a ready state.
... if no threads are waiting, the operation is no-op.
NSS FAQ
MozillaProjectsNSSFAQ
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 already 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 threading models.
...mozilla strongly recommends that multithreaded applications use the nspr or native os threading model.
... (in recent nspr releases, the nspr threading model is compatible with the native threading model if the os has native threads.) alternatively, you can adapt the open-source nspr implementation to be compatible with your existing application's threading 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 already) and the request path.
...(when issueing get requests, the "?query-string=data" portion should already 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 already) and the request path.
...(when issuing get requests, the "?query-string=data" portion should already 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 already 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 <prthread.h> #include <plgetopt.h> #include <prprf.h> /* nss headers */ #include <nss.h> #include <pk11func.h> #include "util.h" /* print a usage message and exit */ static void usage(const char *progname) { fprintf(stderr, "\nusage: %s -d <dbdirpath> [-p <plainpasswc>]" " [-f <passwdffile>]\n\n", progname); fprintf(stderr, "%-15s specify a db directory path\n\n", "-d <dbdirpath>"); fprintf(stderr, "%-15s specify a plaintext password\n\n", "-p <plainpasswc>"); fprintf(stderr, "%-15s specify a password file\n\...
... = 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_thread, pr_priority_normal, 0); /* create the database */ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup(); exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
... 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></prthread.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_isreadonly 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_initreadwrite 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_lockread mxr 3.2 and later nssrwlock_lockwrite mxr 3.2 and later nssrwlock_new mxr 3.2 and later nssrwlock_unlockread 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 already 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, threads, 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 already known to your relying party software (e.g.
pkfnc.html
pk11_findcertfromnickname pk11_findkeybyanycert pk11_getslotname pk11_gettokenname pk11_ishw pk11_ispresent pk11_isreadonly pk11_setpasswordfunc pk11_findcertfromnickname finds a certificate from its nickname.
... pk11_isreadonly finds out whether a slot is read-only.
... syntax #include <pk11func.h> #include <prtypes.h> prbool pk11_isreadonly(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 already exist; if one is not present, this option will initialize one by default.
...the certificate database should already 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
MozillaProjectsNSStoolsmodutil
if any of these databases already 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
multithreaded script execution dynamicscopes.java is a program that creates a single global scope object and then shares it across multiple threads.
... sharing the global scope allows both information to be shared across threads, and amortizes the cost of context.initstandardobjects by only performing that expensive operation once.
... implementing host objects first check out the tutorial if you haven't already.
...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 already 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 already 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 already 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_threadsafe 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 already an own property of the target object.
... in js_threadsafe 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 thread.
JS_DefineProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if obj already 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_getgcparameterforthread(jscontext *cx, jsgcparamkey key); // added in spidermonkeysidebar 17 void js_setgcparameterforthread(jscontext *cx, jsgcparamkey key, uint32_t value); // added in spidermonkeysidebar 17 name type description rt jsruntime * the runtime to configure.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
...jsgc_allocation_threshold_factor_avoid_interrupt is used when a gc is already 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_getgcparameterforthread js_setgcparameterforthread bug 624229 jsgc_mode bug 631733 jsgc_unused_chunks bug 674480 jsgc_total_chunks bug 641025 jsgc_slice_time_budget bug 673551 jsgc_mark_stack_limit bug 765435 jsgc_high_frequency_time_limit jsgc_high_frequency_low_limit jsgc_high_frequency_high_limit jsgc_high_frequency_heap_growth_max ...
Setting up CDT to work on SpiderMonkey
at this point, the indexer starts running and already 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 already 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 already 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 multithreaded, 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 already registered as a category to receive startup notification.
...a good place to get an nsiioservice is in the component's observe() method, which already has a pointer to the service manager.
Using XPCOM Utilities to Make Things Easier
« previousnext » this chapter goes back over the code you've already 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 already 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 already 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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 already 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 already 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 already defined functions provided by sqlite.
... note this callback is executed on the thread that the statement or trigger is executing on.
... if you use mozistorageconnection.executeasync() or, mozistoragestatement.executeasync() this callback will run on a different thread from the rest of your code.
... likewise, if you execute sql on a different thread, this callback will be executed on that thread.
nsIAccessibleEvent
read only.
...read only.
...read only.
...read only.
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 thread-safe.
... you should only use it from the main thread.
...if the destination already has an annotation with the same name as one on the source, it will be overwritten if aoverwritedest is set.
...if the destination already has an annotation with the same name as one on the source, it will be overwritten if aoverwritedest is set.
nsIApplicationCache
read only.
...read only.
...read only.
...read only.
nsIAsyncStreamCopier
atarget specifies the thread on which the copy will occur.
... a null value is permitted and causes the copy to occur on an unspecified background thread.
... 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 already 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 already been initialized.
nsICommandLine
read only.
...read only.
...read only.
...read only.
nsIComponentRegistrar
this method may only be called from the main thread.
...this method may only be called from the main thread.
...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) {}, onreadchanged: 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 onreadchanged(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...
... onreadchanged() called when the read state of news messages changes.
... void onreadchanged(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.
nsIDOMMozNetworkStats
read only.
...read only.
...read only.
...read only.
nsIDOMProgressEvent
read only.
...read only.
...read only.
... loadedarg the number of bytes already transferred.
nsIDOMStorageWindow
read only.
...read only.
...read only.
...read only.
nsIDeviceMotionData
read only.
...read only.
...read only.
...read only.
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 thread interface provides location information to the nsgeolocator via the nsidomgeolocationcallback interface.
...method overview boolean isready(); obsolete since gecko 1.9.2 void shutdown(); void startup(); void watch(in nsigeolocationupdate callback); methods isready() 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 isready(); 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 already occurred in this session.
... read only.
...read only.
nsIMicrosummary
read only.
...read only.
...read only.
...read only.
nsIMimeConverter
encoderdestroy() marks this header as read.
... thunderbird provides a utility function which performs this for the currently selected message: markcurrentmessageasread().
... void markread(in boolean read); parameters read if true, mark as read.
... if false mark as undread.
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 already 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 already 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 already 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 thread that called asynclisten() (the calling thread must have an nsieventtarget).
... the listener will be passed a reference to an already connected socket transport (nsisockettransport).
...this does not affect already 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 already converted.
...this means that the clause is already converted and is selected to convert.
... if the instance has a composition already, this throws an exception.
nsITimer
xpcom/threads/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 already fired doesn't restart the timer.
nsIToolkit
inherits from: nsisupports last changed in gecko 1.0 method overview void init(in prthread athread); methods init() initialize this toolkit with athread.
... void init( in prthread athread ); parameters athread the thread passed in runs the message pump.
... null can be passed in, in which case a new thread gets created and a message pump will run in that thread.
... see also prthread ...
nsIURI
read only.
...read only.
...read only.
...read only.
nsIUploadChannel
read only.
...most implementations of this interface require that the stream: implement threadsafe addref and release implement nsiinputstream.readsegments() implement nsiseekablestream.seek().
... history here is that we need to support both streams that already 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 already 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.
nsIWifiAccessPoint
read only.
...read only.
...read only.
...read only.
nsIWorkerGlobalScope
dom/interfaces/threads/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/threads/nsidomworkers.idlscriptable this interface represents an event in a web worker thread's event queue.
...read only.
...read only.
...read only.
nsIXULTemplateQueryProcessor
a breadth-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 already been called.
... exceptions thrown ns_error_unexpected if generateresults() has already been called.
...ns_error_unexpected if generateresults() has already been called.
XPCOM Interface Reference
nsicurrentcharsetlistenernsicyclecollectorlistenernsidbchangelistenernsidbfolderinfonsidnslistenernsidnsrecordnsidnsrequestnsidnsservicensidomcanvasrenderingcontext2dnsidomchromewindownsidomclientrectnsidomdesktopnotificationnsidomdesktopnotificationcenternsidomelementnsidomeventnsidomeventgroupnsidomeventlistenernsidomeventtargetnsidomfilensidomfileerrornsidomfileexceptionnsidomfilelistnsidomfilereadernsidomfontfacensidomfontfacelistnsidomgeogeolocationnsidomgeopositionnsidomgeopositionaddressnsidomgeopositioncallbacknsidomgeopositioncoordsnsidomgeopositionerrornsidomgeopositionerrorcallbacknsidomgeopositionoptionsnsidomglobalpropertyinitializernsidomhtmlaudioelementnsidomhtmlformelementnsidomhtmlmediaelementnsidomhtmlsourceelementnsidomhtmltimerangesnsidomjswindownsidommousescrolleventnsidom...
...fieldsnsimsgcustomcolumnhandlernsimsgdbhdrnsimsgdbviewnsimsgdbviewcommandupdaternsimsgdatabasensimsgfilternsimsgfiltercustomactionnsimsgfilterlistnsimsgfoldernsimsgheaderparsernsimsgidentitynsimsgincomingservernsimsgmessageservicensimsgprotocolinfonsimsgruleactionnsimsgsearchcustomtermnsimsgsearchnotifynsimsgsearchscopetermnsimsgsearchsessionnsimsgsearchtermnsimsgsearchvaluensimsgsendlaternsimsgthreadnsimsgwindownsimsgwindowcommandsnsimutablearraynsinavbookmarkobservernsinavbookmarksservicensinavhistorybatchcallbacknsinavhistorycontainerresultnodensinavhistoryfullvisitresultnodensinavhistoryobservernsinavhistoryquerynsinavhistoryqueryoptionsnsinavhistoryqueryresultnodensinavhistoryresultnsinavhistoryresultnodensinavhistoryresultobservernsinavhistoryresulttreeviewernsinavhistoryresultviewobserv...
...ortspruint64nsisupportsprimitivensisupportsprioritynsisupportsstringnsisupportsvoidnsisupportsweakreferencensisyncjpakensisyncmessagesendernsitxttohtmlconvnsitaggingservicensitaskbarpreviewnsitaskbarpreviewbuttonnsitaskbarpreviewcontrollernsitaskbarprogressnsitaskbartabpreviewnsitaskbarwindowpreviewnsitelemetrynsitextinputprocessornsitextinputprocessorcallbacknsitextinputprocessornotificationnsithreadnsithreadeventfilternsithreadinternalnsithreadmanagernsithreadobservernsithreadpoolnsithreadpoollistenernsitimernsitimercallbacknsitoolkitnsitoolkitprofilensitoolkitprofileservicensitraceablechannelnsitransactionnsitransactionlistnsitransactionlistenernsitransactionmanagernsitransferablensitransportnsitransporteventsinknsitransportsecurityinfonsitreeboxobjectnsitreecolumnnsitreecolumnsnsitreeconte...
...nsixformsnsmodelelementnsixmlhttprequestnsixmlhttprequesteventtargetnsixmlhttprequestuploadnsixpcexceptionnsixpcscriptablensixpconnectnsixsltexceptionnsixsltprocessornsixsltprocessorobsoletensixulappinfonsixulbrowserwindownsixulbuilderlistenernsixulruntimensixulsortservicensixultemplatebuildernsixultemplatequeryprocessornsixultemplateresultnsixulwindownsixmlrpcclientnsixmlrpcfaultnsizipentrynsizipreadernsizipreadercachensizipwriternsmsgfilterfileattribvaluensmsgfolderflagtypensmsgjunkstatusnsmsgkeynsmsglabelvaluensmsgpriorityvaluensmsgruleactiontypensmsgsearchattribnsmsgsearchopnsmsgsearchscopensmsgsearchtermnsmsgsearchtypevaluensmsgsearchvaluensmsgsearchwidgetvaluenspipromptservice 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 thread rooted at this message is open or closed in the ui.
... watched 0x00000100 indicates whether or not this thread is being watched.
... ignored 0x00040000 indicates whether or not the (sub-)thread 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 'unread 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 threadpane.
...for example, to request the 'show all threads' 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 already 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 already 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 already 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 "threadtree" whose columns (treecols) reside in "threadcols".
... 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="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colreplyto" persist="hidden ordinal width" currentview="unthreaded" 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 already 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 thread.
... if you would like to do stuff off of the main thread, in chromeworker's, then you should use xcb.
... xcb is thread safe.
Accessibility Inspector - Firefox Developer Tools
assistive technologies like screenreaders 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 already got them turned on in another browser tab, or got the firefox accessibility engine started already, e.g., you might be a screenreader 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 thread 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 threads, but debugger is an inherently single-threaded facility: its debuggees must all run in the same thread.
... since the global that created the worker is in a different thread, 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-threaded 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 thread in which the event occurred.
...if the designated global is already a debuggee, this has no effect.
... getnewestframe() return a debugger.frame instance referring to the youngest visible frame currently on the calling thread’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 thread or process and will continue updating even while long-running javascript delays the main thread.
... 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 thread 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 already 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 thread, 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 already 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 thread 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 contextread only the client data for the authentication, such as origin and challenge.
... authenticatorassertionresponse.authenticatordata secure contextread 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 contextread only an assertion signature over authenticatorassertionresponse.authenticatordata and authenticatorresponse.clientdatajson.
... authenticatorassertionresponse.userhandle secure contextread 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 already 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.deviceread only returns information about a bluetooth device through an instance of bluetoothdevice.
... bluetoothremotegattservice.isprimaryread only returns a boolean indicating whether this is a primary or secondary service.
... bluetoothremotegattservice.uuidread only returns a domstring representing the uuid of this service.
Body.body - Web APIs
WebAPIBodybody
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.getreader(), 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.getreader(); 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 already 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 already 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 dompointreadonly.
... although this interface is based on dompointreadonly, 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 dompointreadonly, 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 dompointreadonly 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 dompointreadonly object.
... it's used as an input parameter to the dompoint/dompointreadonly method frompoint().
...this same code will work to create a dompointreadonly 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 'dompointreadonly.frompoint()' in that specification.
DeviceMotionEvent - Web APIs
properties devicemotionevent.accelerationread only an object giving the acceleration of the device on the three axis x, y and z.
... devicemotionevent.accelerationincludinggravityread only an object giving the acceleration of the device on the three axis x, y and z with the effect of gravity.
... devicemotionevent.rotationrateread only an object giving the rate of change of the device's orientation on the three orientation axis alpha, beta and gamma.
... devicemotionevent.intervalread 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.activeelementread only returns the element within the shadow tree that has focus.
... documentorshadowroot.fullscreenelementread 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.stylesheetsread 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 checkreading () { if (checkreading.read) { return; } checkreading.read = this.scrollheight - this.scrolltop === this.clientheight; document.registration.accept.disabled = document.getelementbyid("nextstep").disabled = !checkreading.read; checkreading.noticebox.innerhtml = checkreading.read ?
... "thank you." : "please, scroll and read the following text."; } onload = function () { var otoberead = document.getelementbyid("rules"); checkreading.noticebox = document.createelement("span"); document.registration.accept.checked = false; checkreading.noticebox.id = "notice"; otoberead.parentnode.insertbefore(checkreading.noticebox, otoberead); otoberead.parentnode.insertbefore(document.createelement("br"), otoberead); otoberead.onscroll = checkreading; checkreading.call(otoberead); } 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 already 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("onreadystatechange",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("onreadystatechange",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 thread 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" already 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 already 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 filereader(); 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 filereader to read the file as text.
... the filereader'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 already in the process of loading media, that load process is aborted and the abort event is sent.
... if the element has already 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 already 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
WebAPIHeadersappend
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 already exist.
... the difference between set() and append() is that if the specified header already 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 already exists, append() will change its value to the specified value.
... if the specified header already 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
WebAPIHeadersset
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 already exist.
... the difference between set() and headers.append is that if the specified header already 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 already exist, set() will create it and set its value to the specified value.
... if the specified header does already 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
WebAPIHeaders
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 already exist.
... headers.set() sets a new value for an existing header inside a headers object, or adds the header if it does not already exist.
... note: to be clear, the difference between headers.set() and headers.append() is that if the specified header does already 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 thread.
... 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 thread, 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
WebAPIIDBRequesterror
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 already exists in the record.
... versionerror if you try to open a database with a version lower than the one it already 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.dataread only returns a domstring with the inserted characters.
... inputevent.datatransferread only returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editable content.
... inputevent.inputtyperead only returns the type of change for editable content such as, for example, inserting, deleting, or formatting text.
... inputevent.iscomposingread 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 already 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 already 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
WebAPIKeyboardEventkey
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 spreadsheet).
... window.addeventlistener("keydown", function (event) { if (event.defaultprevented) { return; // do nothing if the event was already processed } switch (event.key) { case "down": // ie/edge specific value case "arrowdown": // do something for "down arrow" key press.
MediaDeviceInfo - Web APIs
properties mediadeviceinfo.deviceidread only returns a domstring that is an identifier for the represented device that is persisted across sessions.
... mediadeviceinfo.groupidread only returns a domstring that is a group identifier.
... mediadeviceinfo.kindread only returns an enumerated value that is either "videoinput", "audioinput" or "audiooutput".
... mediadeviceinfo.labelread 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 already 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
WebAPINDEFWriterwrite
options optional ignoreread -- 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 already records on the tag.
... notreadableerror the ua is not allowed to access underlying nfc adapter (e.g., due to user preference).
... networkerror transfer failed after it already started (e.g., the tag was removed from the reader).
Node.nodeName - Web APIs
WebAPINodenodeName
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 == 'notreadableerror') { 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
WebAPIPlugin
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.maxchannelsread only an integer value indicating the maximum number of rtcdatachannels that can be open simultaneously.
... rtcsctptransport.maxmessagesizeread only an integer value indicating the maximum size, in bytes, of a message which can be sent using the rtcdatachannel.send() method.
... rtcsctptransport.stateread only a domstring enumerated value indicating the state of the sctp transport.
... rtcsctptransport.transportread 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 domrectreadonly 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.datasetread 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.ownersvgelementread only an svgsvgelement referring to the nearest ancestor <svg> element.
... svgelement.viewportelementread 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
WebAPISVGEvent
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
WebAPISVGTests
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
WebAPISensor
accelerometer ambientlightsensor gyroscope linearaccelerationsensor magnetometer orientationsensor properties sensor.activated read only returns a boolean indicating whether the sensor is active.
... sensor.hasreading 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.onreading 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 already 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
WebAPIText
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
WebAPITextRange
properties textrange.boundingheightread only returns the height of the rectangle bound to the textrange object.
... textrange.boundingleftread 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.boundingtopread 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.boundingwidthread 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
WebAPIURL
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.interfacenumberread only returns the interface number of this interface.
... usbinterface.alternateread only returns the currently selected alternative configuration of this interface.
... usbinterface.alternatesread only returns an array containing instances of the usbalternateinterface interface describing each of the alternative configurations possible for this interface.
... usbinterface.claimedread 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 already have video coming in from the remote peer (which we can see if the remote view's <video> element's srcobject property already 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 already 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 already 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 already being held in the hand represented by avatar.heldobject[hand].
... if an object is already held in that hand, it's dropped by calling the dropobject() function.
...since we're already 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 already 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
spread 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 spread across the timeline; repeating the animation lines up additional iterations of it along the timeline.
...in fact, group effects and sequence effects have already 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 already 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 already 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 already 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 already 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 already 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 already exists) update existing values.
WheelEvent - Web APIs
wheelevent.deltaxread only returns a double representing the horizontal scroll amount.
... wheelevent.deltayread only returns a double representing the vertical scroll amount.
... wheelevent.deltazread only returns a double representing the scroll amount for the z-axis.
... wheelevent.deltamoderead 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 thread that spawned it using the dedicatedworkerglobalscope.postmessage method.
... transfer example this example shows a firefox add-on that transfers an arraybuffer from the main thread to the chromeworker, and then the chromeworker transfers it back to the main thread.
... main thread 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 thread, 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 dompointreadonly specifying a 3-dimensional point, expressed in meters, describing the translation component of the transform.
... xrrigidtransform.orientation read only a dompointreadonly 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
WebAPIXRSession
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 already 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 already 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 already 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 spreadsheets 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 thread 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 already 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 already, 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 already 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 already 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 already 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 onreadystatechange 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 already 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 widespread 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 unreadable 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 unreadable, 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
WebHTMLElementimg
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 already 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
WebHTMLElementinputdate
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 already 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
WebHTMLElementinputemail
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
WebHTMLElementinputmonth
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
WebHTMLElementinputtime
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
WebHTMLElementinputweek
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
WebHTMLElementmetaname
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 unreadable 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 already 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 already 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 already 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 already been followed.
... sometimes, the server won't detect it: a redirection loop can spread 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 thread.
... examples using wait() given a shared int32array: const sab = new sharedarraybuffer(1024); const int32 = new int32array(sab); a reading thread is sleeping and waiting on location 0 which is expected to be 0.
...however, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread 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 already resolved promise if the iterable passed is empty.
...note, google chrome 58 returns an already resolved promise in this case.
... if an empty iterable is passed, then this method returns (synchronously) an already 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 already 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 already-compiled webassembly.module and returns a promise that resolves to an instance of that module.
... this overload is useful if the module has already 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 thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); 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 threaded (though background threads are supported for web workers).
... this means that user interaction, painting, and script execution are all on the same thread.
... if the thread is busy doing complex javascript execution, the main thread will not be available to react to user input, such as pressing a button.
...this makes the thread available for user interactions.
Web Performance
that means not running all your startup code in a single event handler on the app's main thread.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 thread 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 already 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 already 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
WebSVGTutorialPaths
after that, the parser begins reading for the next command.
...if the cursor was already somewhere on the page, no line is drawn to connect the two positions.
...you might have already 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 spread out horizontally.
Using the WebAssembly JavaScript API - WebAssembly
if you have already 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"), onready: 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"), onready: 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 already 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 already 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 already 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 already 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...
stylesheet/style - Archive of obsolete content
this property is read-only.
...this property is read-only.
...this property is read-only.
ui/button/action - Archive of obsolete content
read more about specifying icons in the reference documentation for the actionbutton constructor.
... label string the button's human-readable label.
...this is read-only.
ui/button/toggle - Archive of obsolete content
read more about specifying icons in the reference documentation for the togglebutton constructor.
... label string the button's human-readable label.
...this property is read-only.
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 already 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 already 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 filereader.prototype.readasdataurl() method is useful, for example, to get a preview of an image before uploading it.
... [article] note: the filereader() 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 threads.
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 already returned from execution.
... the code is hard to read and by that hard to maintain and review.
... someexistingobject.someproperty = "abc"; // we already 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 already 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 already 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 already displays the desired url--if one is already open.
...the following code demonstrates how to re-use an existing tab that already 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 already opened.
Localizing an extension - Archive of obsolete content
if you haven't already 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 already 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.
ActiveX Control for Hosting Netscape Plug-ins in IE - Archive of obsolete content
the control currently reads plug-ins from your most current netscape 4.x and ie installations.
... package it there is a subdirectory named cab/ which contains a script and a readme.txt for producing your own signed cab files.
... plug-ins cannot create writeable streams or seek in readable streams.
Embedding FAQ - Archive of obsolete content
however, there is a stripped down, uncommented code with eclipse libraries in this thread.
... 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 thread.
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 already exist.jetpack.storage.simple.notes = jetpack.storage.simple.notes || [];var notes = jetpack.storage.simple.notes;// updates the jetpack menu with the current notes.
Menu - Archive of obsolete content
ArchiveMozillaJetpackUIMenu
the api is fairly comprehensive, so you may want to start by reading through some examples.
...read-only.
...read-only.
Tabs - Archive of obsolete content
ArchiveMozillaJetpackUITabs
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 onready()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 onready()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/xmlurluriwidthintpersistboolautoreloadboolonclickfunctiononselectfunctiononreadyfunction)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 onreadycallback 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\.)?spreadfirefox\.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 already 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 already-posted source code, notification is required only for the initial posting." bxa and nsa have already 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 already 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: greader.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 already been reported.
...however, mozilla's implementation already 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 already 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 already 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 already exist on the phone in /data/app $ adb push tamarin-redux/platform/android/android_runner.sh /data/app/android_runner.s $ adb shell chmod 777 /data/app/android_runner.sh test it out with a simple .abc or no args for usage (should return exitcode=0) $ tamarin-redux/platform/android/android_shell.h hello.abc hello exitcode=0 running performance tests to run performance tests on android you don't ne...
...ed to pass --androidthreads or --threads=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 already focused.
... for example, if the user has already 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 already 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 already exists, nsifile.moveto() replaces the existing file.
MenuModification - Archive of obsolete content
the appenditem method will create a menupopup element if it doesn't already exist.
... if the menu already 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 already been added to the menu.
PopupEvents - Archive of obsolete content
the popupshown event the popupshown event is fired once a popup is already visible.
...you also cannot cancel the hiding of a menupopup when a user has made a selection from a menu, as it is already too late to do so.
... in this situation the command event has already been sent to the selected menuitem and the operation already carried out.
RDF Modifications - Archive of obsolete content
when parsing, any triples that already exist are not added again.
...assuming that the 'obelisk' photo doesn't have a description already, 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 already 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 thread 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 already 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.
Using the Editor from XUL - Archive of obsolete content
note: since we already know this when we have an <editor></editor> tag, we should remove the need to call this.
... the editor is now set up, and ready to go.
... now we are ready to actually insert the text.
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.
notificationbox - Archive of obsolete content
this property is read-only.
...this property is read-only.
...if another notification is already present with a higher priority, the new notification will be added behind it.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
<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 already 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, contentareadd.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/contentareadd.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/contentareadd.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 already 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 thread in javascript using nsithread.
... he wants to know how to create new threads using javascript for background download operations.
... neil deakin points out that "downloads and other network operations are always done in another thread so you shouldn't be creating one yourself".
NPByteRange - Archive of obsolete content
the only plug-in api call that uses the npbyterange type is npn_requestread(), 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_requestread().
... see also npn_requestread() ...
Why use RSS - Archive of obsolete content
if you are reading this, you probably already 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 already 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 already 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 isreadonly(); /** * 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 widespread 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 already 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 already 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 already 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 spread 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 already.
...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 already, 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 already hit with the ball.
Visual typescript game engine - Game development
already 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/ | | | | | ├── filebufferreader.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 already 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 already 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 already 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 thread 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 thread.
...the upside is that when a speculation succeeds, there's no need to reparse the part of the incoming file that was already scanned for scripts, style sheets and images.
A cool-looking box - Learn web development
prerequisites: before attempting this assessment, you should have already 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 already tried, and what you would like us to do, e.g.
Cascade and inheritance - Learn web development
source order we have already seen how source order matters to the cascade.
...we already 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 already 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 already 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 already 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 already 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 already: 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 already 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 already been visited (exists in the browser's history), styled using the :visited pseudo class.
... you've reached the end of this article, and already 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 already 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 already know about various software you need to build a website.
...your computer may already 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.
How much does it cost to do something on the Web? - Learn web development
prerequisites: you should already understand what software you need, the difference between a webpage, a website, etc., and what a domain name is.
... browsers you either already have a browser or can get one for free.
... read on about how to choose and install a text editor.
What are browser developer tools? - Learn web development
if the tools are already 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 already displayed, click on the debugger tab.
...to access the console in any browser: if the developer tools are already 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 already 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 already.
... note: if you already 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 screenreader 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 already 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 already 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 already 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 dreaded 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 spread 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 already 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 already worked through the rest of the course, with a particular emphasis on document and website structure.
... details of what you have already 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 already 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 already 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 already 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 already seen earlier in the course, reiterating the fact that many of the features you've already 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 already 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 thread), it is possible to keep the user engaged while they wait by showing a loading spinner, or a series of useful hints and tips (or jokes, or whatever else you think might be appropriate).
...if some assets are going to be slower to load than others, with elements loading after other content has already 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 already 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 already 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 spread 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 spread syntax.
Embedding API for Accessibility
mozilla already supports some of these options.
... this document lays out what we already 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 docreader and appreader 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 already 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 already works with bugzilla 5.0, and so if you upgraded to 5.0 already, 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 already attached, lots of people already cc'ed, etc.).
...reports of problems with specific websites that result from bad coding practices already 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 already 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 already a dictionary available for your locale.
... if there already 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 already running, then open windbg from the start menu (start->all programs->debugging tools for windows->windbg).
... if firefox is already running, open windbg from the start menu (start->all programs->debugging tools for windows->windbg).
... ask in the relevant bug or thread how best to share this very large file!
Debugging on Windows
you can click "start" button to run firefox then, already 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 thread.
Gecko Logging
it is enabled for all builds, thread-safe, and the preferred alternative to nspr logging.
... logging framework declaring a log module lazylogmodule defers the creation the backing logmodule in a thread-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/thread/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 already 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 already 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 already 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 already loaded.
... there is no mechanism to unload frame scripts which are already 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) already 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 already.
Webapps.jsm
importing components.utils.import("resource://gre/modules/webapps.jsm"); // exported symbol is domapplicationregistry method overview init: function() loadcurrentregistry: function() notifyappsregistrystart: function notifyappsregistrystart() notifyappsregistryready: function notifyappsregistryready() 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...
...penandreadpackage: 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, azipreader, 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 already 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 already 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 already 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 already, 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="breadcrumbs"> <?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="breadcrumbs"> <?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 already properly constructed the mozilla::monitor.
...notify() nsresult notify(void); notify one thread waiting on the underlying monitor.
... notifyall() nsresult notifyall(void); notify all threads 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 thread ::cpu_migrations .cpu_migrations migrations of the profiled thread 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 already 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 already.
... the first two values identify the thread.
... sed 's/^[^:]\+: //' # strip thread 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 already.
... 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 threads in the process, per second, during the sample period.
...the first column counts interrupt-level wakeups that resulted in a thread 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 spread 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 already 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 already).
... 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 already).
Locks
lock type lock functions in nspr, a mutex of type prlock controls locking, and associated condition variables communicate changes in state among threads.
...prmonitor is intended for use with java and reflects the java approach to thread synchronization.
... for an introduction to nspr thread 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 thread is already in the monitor (and this is a reentrant call) or another thread is holding the monitor's mutex.
...in the latter case, the calling thread is likely to find the monitor locked by another thread and waits for that thread to exit before continuing.
... note: pr_centermonitor and pr_cexitmonitor must be paired--that is, there must be an exit for every entry--or the object will never become available for any other thread.
PR_CallOnce
initially (before any threading 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 thread executes this function, other threads 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 thread currently holds the lock.
... if unsuccessful (the calling thread has not entered the monitor), pr_failure.
...threads 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 already 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 already 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 already 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 thread.
... implicit initialization assumes that the initiator is the primordial thread and that the thread is a user thread 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 threaded environment, especially initialization that must happen exactly once.
NSPR API Reference
introduction to nspr nspr naming conventions nspr threads thread scheduling setting thread priorities preempting threads interrupting threads nspr thread synchronization locks and monitors condition variables nspr sample code nspr types calling convention types algebraic types 8-, 16-, and 32-bit integer types signed integers unsigned integers 64-bit integer types floating-point integer type native os integer types miscellaneous types size type pointer difference types boolean types status type for return values threads threading types and constants threading functions creating, joining, and identifying threads controlling thread priorities contr...
...olling per-thread private data interrupting and yielding setting global thread concurrency getting a thread's scope process initialization identity and versioning name and version constants initialization and cleanup module initialization locks lock type lock functions condition variables condition variable type condition variable functions monitors monitor type monitor functions cached monitors cached monitor functions i/o types directory type file descriptor types file info types network address types types used with socket options functions type used with memory-mapped i/o offset interpretation for seek functions i/o functions functions that operate on pathnames functions that act on file descriptors directory i/o 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 thread pools thread pool types thread 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 thread safe way.
... new functions in cert.h cert_getcertisperm - retrieve the permanent storage status attribute of a certificate in a thread safe way.
... cert_getcertistemp - retrieve the temporary storage status attribute of a certificate in a thread safe way.
NSS 3.37 release notes
added hacl* poly1305 32-bit the code to support the npn protocol, which had already 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 already a private key with this name.
...int initnss() { int rv = 0; secstatus s; s = nss_initreadwrite("."); 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: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: rv = 0xyyyyyyyy for example, 1024[805ef10]: c_initialize 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getinfo 1024[805ef10]: rv = 0x0 1024[805ef10]: c_getslotlist 1024[805ef10]: rv = 0x0 2.
...to enable this mode, set: nspr_log_modules=nss_mod_log:3 nspr_log_file=<logfile> the output format is: osthreadid[nsprthreadid]: c_xxx osthreadid[nsprthreadid]: arg1 = 0xaaaaaaaa ...
... osthreadid[nsprthreadid]: argn = 0xaaaaaaaa osthreadid[nsprthreadid]: 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 - decthreads 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 already initialized.
... ckr_user_already_logged_in: the user is already logged in.
... usertype is cku_so and the normal user's pin is already initialized.
NSC_Login
the nss cryptographic module doesn't allow the so to log in if the normal user's pin is already initialized.
... ckr_user_already_logged_in: the user is already logged in.
... usertype is cku_so and the normal user's pin is already initialized.
NSPR functions
pr_cleanup error reporting nss uses nspr's thread-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 already 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 already 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 thread 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.thread(r) thread[thread-0,5,main] js> t.start() hi adding java objects the next example is runscript2.
The JavaScript Runtime
contexts and threads every thread that executes javascript must have an associated context.
... multiple threads (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 threads.
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_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
...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_threads); if (!rt) return 1; jscontext *cx = js_newcontext(rt, 8192); if (!cx) return 1; { // scope for our various stack objects (jsautorequest, rootedobject), so they all go // out of scope before we js_destroycontext.
... [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 -lpthread -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_unboxedread icgetpropstub_unboxedreadexpando 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 already compiled script.
JSRuntime
a program typically has only one jsruntime, even if it has many threads.
... threads only one thread may use a jscontext or jsruntime.
... earlier versions allowed using js_clearcontextthread and other functions to move a jscontext from one thread to another.
JS_ConvertArguments
in a js_threadsafe build, the caller must be in a request on this jscontext.
... variables for optional parameters must already 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 already a function, or use js_convertvalue() to convert a value to jstype_function safely.
JS_DefineConstDoubles
in a js_threadsafe 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 thread-safe builds, and in non-thread-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 thread-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 thread safety currently, threadsafe spidermonkey costs us 10-15% on some benchmarks vs.
... a non-threadsafe js shell.
SpiderMonkey 31
changes to introduce handles to the jsapi are not individually documented, because of the breadth of the changes involved.
... on posix platforms, building a threadsafe shell no longer requires nspr.
... js_threadsafe is going away, with future versions supporting only thread-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 breadth 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_threadsafe is going away, with future versions supporting only thread-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?
... thread sanitizer thread sanitizer (tsan) is a fast data race detector for c/c++ programs.
...more information on how tsan works can be found on the thread sanitizer wiki.
The Rust programming language
it prevents segmentation faults and guarantees thread safety, all with an easy-to-learn syntax.
... in addition, rust offers zero-cost abstractions, move semantics, guaranteed memory safety, threads 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 excludereadonlyfolders 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 already 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 thread-safe.
... you should only use it from the main thread.
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
MozillaTechXPCOMGlue
this is the case for xpcom components, because they are loaded into mozilla which already has full xpcom loaded and initialized.
...however, when using threadsafe together with the glue libraries from gecko 1.8 or later, a special step needs to be taken to use ns_impl_threadsafe_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 already 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 threads 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 already 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 already 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 threading module, whether or not it's a singleton, its implementation language, and so forth.
...since xpcom already 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 already.
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 already 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
MozillaTechXPCOMGuide
the problem would not exist with java's interfaces).making cross-thread calls using runnablesin the mozilla platform, most activities such as layout, dom operations, content javascript, and chrome javascript run on the main thread.
... however, it may be useful for c++ code in the mozilla platform to run tasks on another thread.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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer.
... endreading the endreading 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, endreading, 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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endr...
...eading(nsreadingiterator<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 nsreadingiterator<char>&, const nsreadingiterator<char>&) - source parameters nsreadingiterator<char>& start nsreadingiterator<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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterator<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 nsreadingiterator<short unsigned int>&, const nsreadingiterator<short unsigned int>&) - source parameters nsreadingiterator<short unsigned int>& start nsreadingiterator<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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() const - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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 beginreading endreading 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 beginreading char* beginreading() const - source reading iterators nsreadingiterator<char>& beginreading(nsreadingiterator<char>&) const - source deprecated reading iterators parameters nsreadingiterator<char>& iter char*& beginreading(const char*&) const - source parameters char*& iter endreading char* endreading() const - source nsreadingiterator<char>& endreading(nsreadingiterat...
...or<char>&) const - source parameters nsreadingiterator<char>& iter char*& endreading(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 beginreading endreading 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 beginreading prunichar* beginreading() const - source reading iterators nsreadingiterator<short unsigned int>& beginreading(nsreadingiterator<short unsigned int>&) const - source deprecated reading iterators parameters nsreadingiterator<short unsigned int>& iter prunichar*& beginreading(const prunichar*&) const - source parameters prunichar*& iter endreading prunichar* endreading() co...
...nst - source nsreadingiterator<short unsigned int>& endreading(nsreadingiterator<short unsigned int>&) const - source parameters nsreadingiterator<short unsigned int>& iter prunichar*& endreading(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...
amIWebInstallInfo
read only.
...read only.
...read only.
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 already 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.
nsIAccessibleTextChangeEvent
read only.
...read only.
...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_already_opened if set after calling asyncopen() on the channel.
...exceptions thrown ns_error_already_opened if set after calling asyncopen() on the channel.
...read only.
nsIApplicationCacheNamespace
read only.
...read only.
...read only.
nsIBrowserHistory
read only.
...read only.
... remarks visits are removed synchronously, but pages are expired asynchronously, off the main thread.
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 changenumunreadmessages(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 imapunreadpendingmessages long knownartsset string locale astring mailboxname astring nummessages long numunreadmessages 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 changenumunreadmessages() void changenumunreadmessages( 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...
nsIDOMGeoPositionError
read only.
... message domstring human readable error message.
... read only.
nsIDOMMozNetworkStatsData
read only.
...read only.
...read only.
nsIDOMOrientationEvent
read only.
... read only.
... read only.
nsIDOMStorage
read only.
...if the key does not already exist, a new key is added, associated with the specified value.
... if the key already exists, the existing value is replaced with the specified value.
nsIDocumentLoader
obsolete since gecko 1.8 nsiloadgroup getloadgroup(); obsolete since gecko 1.8 boolean isbusy(); obsolete since gecko 1.8 void stop(); attributes attribute type description container nsisupports read only.
... documentchannel nsichannel read only.
... loadgroup nsiloadgroup read only.
nsIDragSession
read only.
...read only.
...read only.
nsIFileProtocolHandler
olhandler last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) method overview nsifile getfilefromurlspec(in autf8string url); autf8string geturlspecfromactualfile(in nsifile file); autf8string geturlspecfromdir(in nsifile file); autf8string geturlspecfromfile(in nsifile file); nsiuri newfileuri(in nsifile afile); nsiuri readurlfile(in nsifile file); methods getfilefromurlspec() converts the url string into the corresponding nsifile if possible.
...readurlfile() takes a local file and tries to interpret it as an internet shortcut (for example .url files on windows).
... nsiuri readurlfile( in nsifile file ); parameters file the nsifile to read.
nsIFileView
read only.
...read only.
...read only.
nsIFrameLoader
read only.
...read only.
...read only.
nsIFrameLoaderOwner
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview [noscript, notxpcom] alreadyaddrefed_nsframeloader getframeloader(); void swapframeloaders(in nsiframeloaderowner aotherowner); attributes attribute type description frameloader nsiframeloader the frame loader owned by this nsiframeloaderowner.
... read only.
...[noscript, notxpcom] alreadyaddrefed_nsframeloader getframeloader(); parameters none.
nsILocalFileMac
docwithapp(in nsilocalfile aapptoopenwith, in boolean alaunchinbackground); void setfiletypeandcreatorfromextension(in string aextension); obsolete since gecko 1.9.2 void setfiletypeandcreatorfrommimetype(in string amimetype); obsolete since gecko 1.9.2 attributes attribute type description bundledisplayname astring returns the display name of the application bundle (usually the human readable name of the application) read only.
...read only.
... filesizewithresfork print64 returns the combined size of both the data fork and the resource fork (if present) rather than just the size of the data fork as returned by getfilesize() read only.
nsIMIMEInputStream
not allowed to be changed once the stream has been started to be read.
...may not be called once the stream has been started to be read.
...may not be called once the stream has been started to be read.
nsIMsgSearchCustomTerm
*/ readonly attribute acstring id; name /// name to display in term list.
...*/ readonly attribute astring name; needsbody /// does this term need the message body?
... readonly attribute boolean needsbody; methods getenabled /** * is this custom term enabled?
nsINavHistoryFullVisitResultNode
read only.
...read only.
...read only.
nsIParentalControlsService
read only.
...read only.
...read only.
nsIPermissionManager
read only.
...if the permission already exists for a given type, it will be modified.
...if the permission already exists for a given type, it will be modified.
nsIPlacesView
read only.
...read only.
...read only.
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 already 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.
nsIScriptError2
read only.
...read only.
...read only.
nsIServiceManager
return value true if the service has already been created.
... return value true if the service has already been created.
... because services are instantiated lazily, methods are provided to test whether or not a service has already 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 markmessageread(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.
... markmessageread() requires gecko 15.0(firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) void markmessageread( 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 unread.
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 unread.
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 thread on which the release of the callbacks will occur.
... may be null for "any thread".
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.
nsITransportSecurityInfo
read only.
...read only.
...read only.
nsITreeColumns
read only.
...read only.
...read only.
nsITreeSelection
read only.
...read only.
...read only.
nsITreeView
read only.
... cyclecell() called on the view when a cell in a non-selectable cycling column (for example, unread/flag/and so on.) is clicked.
... getparentindex() methods used by the tree to draw thread 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 already registered.
nsIWinTaskbar
read only.
...read only.
...fails if a jump list build operation has already been initiated, developers should make use of a single instance of nsijumplistbuilder for building lists within an application.
nsIWindowWatcher
note: this method may dispatch a "toplevel-window-ready" notification via nsiobserverservice if the window did not already exist.
...must already be escaped, if applicable.
...if a window with this name already exists, the openwindow call may just load aurl in it (if aurl is not null) and return it.
nsIWorkerFactory
dom/interfaces/threads/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: threads/workerfactory;1.
... to create an instance, use: var workerfactory = components.classes['@mozilla.org/threads/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 thread nsithread nsithreadeventfilter nsithreadinternal nsithreadmanager nsithreadobserver nsithreadpool nsithreadpoollistener nsitoolkit util nsiversioncomparator nsiweakreference nsifactory nsiinterfacereq...
...amcallback nsioutputstream nsioutputstreamcallback nsiscriptableinputstream nsistreamlistener url nsiioservice nsistandardurl user nsiprompt nsipromptservice zipfile nsizipentry nsizipreader nsizipreadercache 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 nsimsgthread 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_threadsafe_isupports macro.
... any xpcom function that returns an interface pointer, i.e., a `getter', must have already addrefed that pointer.
XPCOM tasks
p1 various threading issues, e.g., too many locks.
...a first step is moving all qi implementations to the table-like macros already 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 threads) 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 already, 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 already 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 already 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 already 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 already in toolkit, written specially for thunderbird.
...its main focus is on handling the folderpane, threadpane, 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 threadpanes 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_multithreaded = 0; let coinit_apartmentthreaded = 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_multithreaded but it wouldnt work so i used // coinit_apartmentthreaded 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_apartmentthreaded); 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 thread; calling them from other threads is not supported and may have unpredictable results.
... npn_pluginthreadasynccall thread-safe way to request that the browser calls a plug-in function on the browser or plug-in thread (the thread on which the plug-in was initiated).
... npn_requestread 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 thread.
...if the plug-in needs to receive periodic time messages, it should install a timer or fork a thread.
...before generating a paint message for the plug-in, the browser makes sure that the background is already drawn into the area to be updated.
Scripting plugins - Plugins
the new nppvariable enumeration is defined in npapi.h as: nppvpluginscriptablenpobject = 15 threading model this api is not designed to be thread safe.
... the threading 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 thread 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 thread.
... future revisions to this api might provide a mechanism for proxying calls from one thread to another to aid in using this api from other threads.
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_writeready and npp_write, and npp_destroystream.
...the default is _self, if the plug-in instance document is already 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-thread debugging api.
... both the debuggee and the code using debugger to observe it must run in the same thread.
... cross-thread, cross-process, and cross-device tools must use debugger to observe the debuggee from within the same thread, and then handle any needed communication themselves.
Index - Firefox Developer Tools
115 debug worker threads debugger, service workers, web workers, debug threads the debugger shows the source code for all running worker threads — 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 thread.
...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 breadcrumbs bar these shortcuts work when the breadcrumbs bar is focused.
... command windows macos linux move to the previous element in the breadcrumbs bar left arrow left arrow left arrow move to the next element in the breadcrumbs 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 already 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 breadcrumbs bar these shortcuts work when the breadcrumbs bar is focused.
... command windows macos linux move to the previous element in the breadcrumbs bar left arrow left arrow left arrow move to the next element in the breadcrumbs 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 already 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 already 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 already — 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 already running, you'll see two buttons next to it, labeled "debug" and "push".
... if it's not already 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 == 'notreadableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requesting permissions for multiple device sensors.
Accelerometer.x - Web APIs
WebAPIAccelerometerx
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.onreading 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
WebAPIAccelerometery
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.onreading 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
WebAPIAccelerometerz
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.onreading 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 thread.
... 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 thread.
... in turn, an audioworkletnode based on it runs on the main thread.
... 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
WebAPIBlobtext
usage notes the filereader method readastext() is an older method that performs a similar function.
...there are two key differences: blob.text() returns a promise, whereas filereader.readastext() is an event based api.
... blob.text() always uses utf-8 as encoding, while filereader.readastext() can use a different encoding depending on the blob's type and a specified encoding name.
Bluetooth - Web APIs
WebAPIBluetooth
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 already obtained permission for via a call to bluetooth.requestdevice().
Body.bodyUsed - Web APIs
WebAPIBodybodyUsed
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.lengthread only the number of properties.
... cssstyledeclaration.parentruleread 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
WebAPIClient
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
WebAPIDOMPointInitw
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 dompointreadonly object.
... there are two methods which use dompointinit: the static function dompointreadonly.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 dompointreadonly.tojson() method returns a dompointinit object that describes the same point as the original point.
DOMPointInit.y - Web APIs
WebAPIDOMPointInity
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 dompointreadonly object.
... there are two methods which use dompointinit: the static function dompointreadonly.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 dompointreadonly.tojson() method returns a dompointinit object that describes the same point as the original point.
DOMPointInit.z - Web APIs
WebAPIDOMPointInitz
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 dompointreadonly object.
... there are two methods which use dompointinit: the static function dompointreadonly.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 dompointreadonly.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 already 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 already 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
WebAPIDocumentlocation
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, animationeffecttimingreadonly.delay, plus its duration,duration, plus its end delay.
... element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including enddelay.
... the value of enddelay corresponds directly to animationeffecttimingreadonly.enddelay in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect.
Element.classList - Web APIs
WebAPIElementclassList
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 spread 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 stylepropertymapreadonly interface which provides a read-only representation of a css declaration block that is an alternative to cssstyledeclaration.
... syntax var stylepropertymapreadonly = element.computedstylemap() parameters none.
... return value a stylepropertymapreadonly 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 domrectreadonly.
...moreover, and unexpectedly, the es2015 and newer features such as object.assign() and object rest/spread 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 already there.
...the parent directory must already 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 already 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 filesystemdirectoryreader directoryreader filesystemdirectoryreadersync directoryreadersync 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
WebAPIFontFace
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 already 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.onreading will be called.
...the actual reading frequency depends device hardware and consequently may be less than requested.
Gyroscope.x - Web APIs
WebAPIGyroscopex
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.onreading 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
WebAPIGyroscopey
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.onreading 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
WebAPIGyroscopez
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.onreading 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 filereader 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 filereader(); 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 filereader(); 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.elementsread only the elements belonging to this field set.
... htmlfieldsetelement.formread only an htmlformcontrolscollection or htmlcollection referencing the containing form element, if this element is in a form.
... htmlfieldsetelement.typeread only the domstring "fieldset".
HTMLFormElement - Web APIs
htmlformelement.elements read only a htmlformcontrolscollection holding all form controls belonging to this form element.
... htmlformelement.lengthread 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
WebAPIIDBCursordelete
the delete() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, 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
WebAPIIDBCursorupdate
the update() method of the idbcursor interface returns an idbrequest object, and, in a separate thread, 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 already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain 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 thread, 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 already 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 already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; db.onerror = () => { console.log('error creating database'); }; // create an objectstore for this database var objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data ...
...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 already 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
WebAPIIDBTransactiondb
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 already exists): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (event) => { const db = event.target.result; // create an objectstore for this database const objectstore = db.createobjectstore('todolist', { keypath: 'tasktitle' }); // define what data items the objectstore will contain 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 already 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 already 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 already been committed or aborted.
... objectstore() returns an object store that has already 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
WebAPIImageData
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.onreading 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.onreading 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.onreading 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.onreading 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
WebAPIMagnetometerx
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.onreading 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
WebAPIMagnetometery
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.onreading 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
WebAPIMagnetometerz
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.onreading 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 already, 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, already 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 threads 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 thread at a time using advanced scheduling techniques.
...the number of logical processor cores can be used to measure the number of threads 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 threads 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 thread 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
WebAPINotation
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 already 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 already 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 already 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 already 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 already showing a payment panel.
... invalidstateerror the promise rejects with an invalidstateerror if the same payment has already been shown for this request (its state is interactive because it is being shown already).
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 already active.
... "denied" the "enable geolocation" button is revealed (this code needs to be here too, in case the permission state is already 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 already.
ProgressEvent - Web APIs
progressevent.lengthcomputable read only is a boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable.
... progressevent.loaded read only is an unsigned long long representing the amount of work already 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 already be part of any of the specified streams.
... exceptions invalidaccesserror the specified track (or all of its underlying streams) is already part of the rtcpeerconnection.
...compatible reusable rtcrtpsender instances meet these criteria: there is no track already 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 already using the same value.
... operationerror either the specified id is already in use or, if no id was specified, the webrtc layer was unable to automatically generate an id because all ids are in use.
RTCPeerConnection.createOffer() - Web APIs
the sdp offer includes information about any mediastreamtracks already attached to the webrtc session, codec, and options supported by the browser, and any candidates already 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 already in place.
... notreadableerror 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 already been set.
... invalidmodificationerror the configuration includes changed identity information, but the connection already has identity information specified.
... example in this example, it has already 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 == 'notreadableerror') { console.log("sensor is not available."); } }); sensor.start(); permissions example using orientation sensors requires requsting permissions for multiple device sensors.
Report - Web APIs
WebAPIReport
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
WebAPISVGMatrix
many of svg's graphics operations utilize 2x3 matrices of the form: [a c e] [b d f] which, when expanded into a 3x3 matrix for the purposes of matrix arithmetic, become: [a c e] [b d f] [0 0 1] an svgmatrix object can be designated as read only, which means that attempts to modify the object will result in an exception being thrown.
... warning: svg 2 replaced the svgmatrix interface by the more general dommatrix and dommatrixreadonly 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 thread 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 thread 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 thread 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 thread 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 thread 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 thread.
...}; examples this example shows a shared worker file — when a connection to the worker occurs from a main thread 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 thread 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 already 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 already 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.encodingread only is a domstring containing the name of the decoder, that is a string describing the method the textdecoder will use.
... textdecoder.prototype.fatalread only is a boolean indicating whether the error mode is fatal.
... textdecoder.prototype.ignorebomread 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.configurationvalueread only returns the configuration value of this configuration.
... usbconfiguration.configurationnameread only returns the name provided by the device to describe this configuration.
... usbconfiguration.interfacesread 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 already been gathered since the offer or answer was created.
... ice rollbacks when renegotiating a connection that's already active and a situation arises in which the negotiation fails, you don't really want to kill the already-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 already 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 already 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 already 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 already 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 already fully loaded and ready—that is, its readystate is complete—and the document is not already 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 already 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 already did this with settimeout(); see below).
...one important case to note is that the function or code snippet cannot be executed until the thread that called settimeout() has terminated.
... firing is deferred until the mainthread is deemed idle (similar to window.requestidlecallback()), or until the load event is fired.
Worklet - Web APIs
WebAPIWorklet
chrome: main thread gecko: paint thread css painting api audioworklet for audio processing with custom audionodes.
... web audio render thread web audio api animationworklet for creating scroll-linked and other high performance procedural animations.
... compositor thread 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 already.
... 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 already.
...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.onreadystatechange = 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 already 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.onreadystatechange = 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 dompointreadonly 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 already underway, we request the vr session and, if successful, set up the session in a method called onsessionstarted(), not shown.
... if a session is already underway when the button is clicked, we call the xrsession object's end() method to shut down the webxr session.
XRSystem - Web APIs
WebAPIXRSystem
onsessionstarted(xrsession); }); } else { // shut down the already 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 already a session running.
... if, on the other hand, there is already an ongoing xr session, we instead call end() to end the current session.
XRView - Web APIs
WebAPIXRView
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="thread-1">end of the guitar solo</span>, before fading away sharply.</p> <div role="comment" id="thread-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 screenreader 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 thread, "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 screenreaders.
...not only by sighted mouse users, but also by screenreader 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 spread 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 already be using.
...the two specifications share some common features, however, and if you have already 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 already 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 screenreader, 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 screenreader 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 screenreader 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-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )<track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)<fixed-size> = <fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )<fixed-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | auto<fixed-breadth> = <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-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )<track-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)<fixed-size> = <fixed-breadth> | minmax( <fixed-breadth> , <track-breadth> ) | minmax( <inflexible-breadth> , <fixed-breadth> )<fixed-repeat> = repeat( [ <positive-integer> ] , [ <line-names>?
...)where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | auto<fixed-breadth> = <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 already 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
WebGuideHTMLHTML5
there also is filereader.
... performance and integration web workers allows delegation of javascript evaluation to background threads, allowing these activities to prevent slowing down interactive events.
...you can learn more about these by reading advanced box effects.
Index - Developer guides
WebGuideIndex
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 already 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
WebHTMLElementa
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
WebHTMLElementbr
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
WebHTMLElementlabel
this means that, for example, a screenreader 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
WebHTMLElementmark
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 dreaded <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
WebHTMLElementtable
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
WebHTMLElementtime
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
WebHTMLElementtr
there are also several deprecated attributes, which you should avoid but may need to know when reading older code.
...because the other columns are already 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
WebHTMLElement
<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 spreadsheet document application/vnd.oasis.opendocument.spreadsheet .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.spreadsheetml.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 already configured to recognize.
...the data in media files is already 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 already known via hpkp.
...this allows for changing the server's public key without breaking accessibility for clients that have already 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 already loaded.
HTTP response status codes - HTTP
WebHTTPStatus
information responses 100 continue this interim response indicates that everything so far is ok and that the client should continue the request, or ignore the response if the request is already finished.
... 208 already 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 already created.
... you can achieve the same result using the spread 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 unreadable.'; // 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 unreadable.'; 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 unreadable.'; 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 unreadable.`; ...
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 already 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 thread is sleeping and waiting on location 0 which is expected to be 0.
...however, once the writing thread has stored a new value, it will be notified by the writing thread and return the new value (123).
... atomics.wait(int32, 0, 0); console.log(int32[0]); // 123 a writing thread stores a new value and notifies the waiting thread 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 already 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 spread operator.
Promise.race() - JavaScript
if the iterable contains one or more non-promise value and/or an already 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 already 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 already settled promise, then promise.race will resolve to the first of these values found in the array: var foreverpendingpromise = promise.race([]); var alreadyfulfilledprom = promise.resolve(100); var arr = [foreverpendingpromise, alreadyfulfilledprom, "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 thread loop).
... returns an already fulfilled promise, the promise returned by then gets fulfilled with that promise's value as its value.
... returns an already 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 thread.
...with a few security measures, postmessage() will no longer throw for sharedarraybuffer objects and shared memory across threads 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 unreadable." 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 unreadable." both of the above methods result in identical strings.
...read-only.
WebAssembly.Module - JavaScript
a webassembly.module object contains stateless webassembly code that has already 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 thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); 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 already 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 already 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 already 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 already 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 already 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 already 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
WebSVGElementuse
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 already set on mycircle.
... most attributes on use do not override those already 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 spreadmethod attribute.
... spreadmethod <?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" spreadmethod="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" spreadmethod="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" spreadmethod="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 already 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 already 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 already 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 already-rendered element.
... in addition, even if it is not already 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", onready: 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 already queued.
Classes and Inheritance - Archive of obsolete content
it is possible to read this section on its own.
... however, to fully appreciate how class works, and the problem it is supposed to solve, it is recommended that you read the entire article.
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 already 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 already 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({ onready: function onready() { 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.
Release notes - Archive of obsolete content
added tab.readystate.
... added a ready event to sidebars.
Adding a Button to the Toolbar - Archive of obsolete content
read more about specifying multiple icons.
...read more about updating state.
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 already 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 onready property, and will be passed the tab as an argument: var tabs = require("sdk/tabs"); tabs.open({ url: "http://www.example.com", onready: function onready(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", onready: 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 already bookmarked -- for example, to avoid creating a new bookmark for a site that's already 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 already 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 filereader; 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 filereader object.
JavaScript timers - Archive of obsolete content
using javascript timers within workers workers can use timeouts and intervals just like the main thread can.
... this can be useful, for example, if you want to have your worker thread 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 already 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 already 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 onreadystatechange 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 already familiar with building an extension.
... theming if you have xul buttons in your extension that do functions similar to ones that already exist in a browser — for example, a feed reader that reloads and stops — use icons from the browser's theme.
Multiple item extension packaging - Archive of obsolete content
the extension manager will read the install.rdf install manifest to determine if this is a multiple item package and then start the installation of the individual packages it contains automatically.
...so: don't add breadcrumbs!
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.
Adding sidebars - Archive of obsolete content
the code is easier to read and maintain this way.
...you can also read much more about trees in the xul tutorial page.
Custom XUL Elements with XBL - Archive of obsolete content
a field holds a value that can be changed, except when the readonly attribute is set.
...it is defined using a getter and setter method, allowing read-only and write-only properties, as well as more complex behavior.
Signing an extension - Archive of obsolete content
these instructions assume you're working on mac and you've already 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 already known.
...there already 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 already 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.
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
this is a readable file of javascript commands.
...unlike mozilla's binary registry.dat file, thunderbird's and firefox' profiles.ini file is a readable text file.
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 already disabled.
Creating a Firefox sidebar extension - Archive of obsolete content
other elements can be included, please read the xul tutorials for more information.
...emptysidebar@yourdomain.com now you're ready to test your extension!
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, contentareadndobserver);"> <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 already 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.
Using microformats - Archive of obsolete content
this object and its api make finding and reading microformats easy to do.
... note: if a microformat by the specified name already exists, it is replaced by the new one.
Helper Apps (and a bit of Save As) - Archive of obsolete content
if any read or write errors occur, abort the whole process: cancel the channel.
... possibly reflecting the os settings in our helper app preferences (readonly?
importUserCertificates - Archive of obsolete content
however, if this certificate has the same dn as one or more certificates that already 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 already 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 thread, 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/thread.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 onready()when the inherited document is fully loaded.
Me - Archive of obsolete content
ArchiveMozillaJetpackMetaMe
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({ onready: 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 already exist.
statusBar - Archive of obsolete content
onready (event) occurs when the item was loaded onunload (event) triggers when the item was removed.
... example jetpack.statusbar.append({ html: 'hello <i>world</i>!', onready: 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 already 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.
How to Write and Land Nanojit Patches - Archive of obsolete content
once the patch seems ready, copy it to the other two repositories and test it.
...then find the corresponding bug(s) and commit the (hopefully already-reviewed!) tr/tm portion of the patch(es) on top of your current, un-pushed tip.
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/breadcrumbs.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 / breadcrumbs 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 ...
Static Analysis for Windows Code under Linux - Archive of obsolete content
we highly recommend you to read the cross compiling manual and the dehydra build manual before you start the following reading.
... now, the gcc source with plugin supports is ready, we should now build a cross compiler from this source.
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 already).
... 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 already 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 already 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 already 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 already 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 ...
Binding Implementations - Archive of obsolete content
properties can be designated as constant using the readonly attribute.
...if a property is readonly and a setter is defined, then the setter is ignored.
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 already * 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 already * installed gecko browsers.
WinReg Object - Archive of obsolete content
this discussion assumes you are already familiar with the windows registry.
...reading registry values is immediate.
XPJS Components Proposal - Archive of obsolete content
it will load that .js file (if not already loaded) and call the nsgetfactory function.
... so when will it be ready?
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
ArchiveMozillaXULFileGuideTOC
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 already built into gecko, mozilla's html layout engine.
... "xul" already 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 already 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 already loaded and cached, the template builder can begin work right away.
...if the datasource is already 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 already 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) already generated a match for that result.
Static Content - Archive of obsolete content
instead, it looks to see if a menupopup already exists in the location where it would be generated.
...the builder will treat the element as already present as long as some element with the same tag name exists.
Template Builder Interface - Archive of obsolete content
the only difference is that the datasource has already loaded so the data will be the same.
...note that if one of the datasources is already loaded it will not be loaded again.
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 already 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.
Adding Style Sheets - Archive of obsolete content
all the xul examples so far have actually been using a style sheet already.
... importing style sheets we've already seen how to import style sheets for use.
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 already.
Broadcasters and Observers - Archive of obsolete content
command attribute forwarding we've already seen that elements such as buttons can be hooked up to commands.
...the checkbox already has a label, however, it will be overridden by the command's label.
Commands - Archive of obsolete content
in addition, text fields and other widgets have a number of commands which they already support that you can invoke.
...you will probably want to use the same id if a command is already 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 already in the global stylesheets.
... for example, rules are already 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 already 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 already exist or an error occurs.
... likewise the object referred to by the variable child which is to be removed must already 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 already 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 already visible.
Tree View Details - Archive of obsolete content
for instance, the caller might already 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 Spacers - Archive of obsolete content
we've already seen the flex attribute applied to spacers, but it can be applied to any element.
...it is recommended that you use lower numbers for readability.
Using Visual Studio as your XUL IDE - Archive of obsolete content
as you are already there, you can do the same for "xbl".
...if you already have a xml or xul file opened, visual studio will add the menu item xml to the main menu.
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!
Using the standard theme - Archive of obsolete content
note that you can also mix these two approaches, although it makes your code more readable when sticking to only one way.
...for more information on how to do this, read about theming a custom toolbar button.
Writing Skinnable XUL and CSS - Archive of obsolete content
read the spec!
...they are already derived skins and therefore should not inherit from global.
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 (already 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 already 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.
prefpane - Archive of obsolete content
properties contentheight (readonly) the height (in pixels) of current pane's content.
...this property is read only.
scale - Archive of obsolete content
ArchiveMozillaXULscale
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
ArchiveMozillaXULtabs
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 already 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 unread with a small mark in the cell.
XULRunner FAQ - Archive of obsolete content
it is already possible to run firefox on xulrunner now though and certain linux distributions already do this.
...please search to make sure that your bug has not already been reported.
MacFAQ - Archive of obsolete content
here's how to implement command-line trapping when the app is already 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 already 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 already 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 thread discusses where else can info about what happens at the meetings be found (since the agenda often seems bare).
2006-11-10 - Archive of obsolete content
the blog will be hosted at quality.mozilla.org until qmo is ready for primetime.
...he thinks he found a bug and needs to confirm if it's filed already?
Browser-side plug-in API - Archive of obsolete content
warning: you must only call these from the main thread; calling them from other threads 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_pluginthreadasynccall npn_poppopupsenabledstate npn_posturl npn_posturlnotify npn_pushpopupsenabledstate npn_reloadplugins npn_requestread 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 already 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_writeready() 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_writeready 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 already 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 already 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!
Create Your Own Firefox Background Theme - Archive of obsolete content
read more about the types of creative common licenses.
... preview your theme — you're ready to preview your theme!
Processing XML with E4X - Archive of obsolete content
compatibility issues prior to widespread 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 already 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 already 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 spread 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 already 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.thread.currentthread().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.
MSX Emulator (jsMSX) - Archive of obsolete content
yes, you read it: javascript!
...an uncompress javascript function able to read zip and lhz file streams is also necessary to load compressed rom files.
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 already 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.
Archived open Web documentation - Archive of obsolete content
i also just read a document on proper inheritance using apply().
... server-side javascript here's a radical idea: use one language to write entire web apps -- the same language which billions of web pages already use, every day.
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 threads 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 already 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 already 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 already.
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 already highly optimized in many javascript engines using fancy just-in-time (jit) compiling techniques.
... using a subset of javascript asm.js is already supported by major web browsers.
Initialize the framework - Game development
the id of the <canvas> to use for rendering if one already 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 already have basic to intermediate javascript knowledge.
...if you are not already 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 already 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 already 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").
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
a cdn (content delivery network) is a group of servers spread out over many locations.
... cdns are already configured with proper cache settings.
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 thread 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 thread is idle and free to respond to user interactions, including having event handlers registered.
Safe - MDN Web Docs Glossary: Definitions of Web-related terms
in other words, a method is safe if it leads to a read-only operation.
... even if safe methods have a read-only semantic, servers can alter their state: e.g.
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.
Creating fancy letterheaded paper - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
... details of what you have already tried, and what you would like us to do, e.g.
Handling different text directions - Learn web development
writing modes and block and inline layout we have already 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 already 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.
CSS selectors - Learn web development
you have met selectors already.
...you may also find the selectors more readable if each is on a new line.
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 already tried, and what you would like us to do, e.g.
CSS values and units - Learn web development
check out the page on mdn for the <image> data type if you want to read about them.
...we've already seen functions in action in the colors section — rgb(), hsl(), etc.
Test Your Skills: Fundamental layout comprehension - Learn web development
if you have worked through this module then you will have already covered the basics of what you need to know to do css layout today, and to work with older css as well.
... details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Grid Layout - Learn web development
grid layout two in this example we already have a grid defined.
... details of what you have already 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 already 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.
Test your skills: Media Queries and Responsive Design - Learn web development
open this in your browser and you will find a wireframed site which will load in a mobile device in a readable manner.
... details of what you have already tried, and what you would like us to do, e.g.
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 flatbread.</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 already 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.
Typesetting a community school homepage - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
... details of what you have already tried, and what you would like us to do, e.g.
What do common web layouts contain? - Learn web development
prerequisites: make sure you've already thought about what you want to accomplish with your web project.
...just remember, many people will still browse your site from desktops, so make your content usable/readable there as well.
How do I start to design my website? - Learn web development
again, there are so many web services already available for showcasing photos that it isn't worth the effort to build a new site just to spread the word about how cute our cats are.
...a next step might be to read how the internet works.
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 already follow all javascript best practices, there is no need to change your code.
Use JavaScript within a webpage - Learn web development
if you already 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: Advanced HTML text - Learn web development
semantically associate machine-readable dates with the dates in the text.
... details of what you have already tried, and what you would like us to do, e.g.
Adding vector graphics to the Web - Learn web development
if you have not already done so, please read images in html.
...in the input section below you'll see that we've already provided you with some samples to get you started.
Test your skills: HTML images - Learn web development
html images 2 in this task you already 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 already tried, and what you would like us to do, e.g.
Responsive images - Learn web development
prerequisites: you should already know the basics of html and how to add static images to a web page.
...by then, the original image would already have been loaded, and you would load the small image as well, which is even worse in responsive image terms.
Assessment: Structuring planet data - Learn web development
prerequisites: before attempting this assessment you should have already worked through all the articles in this module.
... details of what you have already tried, and what you would like us to do, e.g.
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 already 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 already 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 already 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 already worked through all the articles in this module.
... details of what you have already tried, and what you would like us to do, e.g.
Handling text — strings in JavaScript - Learn web development
this is a newer syntax that provides more flexible, easier to read strings.
...note that this also requires knowledge from the next article, so you might want to read that first.
Test your skills: Math - Learn web development
math 2 in the second task you are already provided with two calculations, with the results stored in the variables result and result2.
... details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Strings - Learn web development
you already 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 already 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 thread.
... 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 already know.
...this is in addition to the longer assessment articles that you'll find in some of the learning modules already.
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 spread syntax), plus the new todo.
Routing in Ember - Learn web development
at the moment, we already 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 already contains a getter that returns all todos, and a getter that returns incomplete todos.
Ember app structure and componentization - Learn web development
this already 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 screenreader to read out.
Creating our first Vue component - Learn web development
it also binds other attributes (data, which you’ve already seen, and others like methods, computed, etc.) directly to the instance.
... now we're ready to add multiple todoitem components to our app.
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 already 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.
Styling Vue components with CSS - Learn web development
there are already some styles present in the file.
...the label, however, already denotes the purpose of the form.
Implementing feature detection - Learn web development
javascript we already 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 already 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 already 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 already 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 already, 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 already, 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_allthreads.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 already 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 already 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 thread when not already on the concurrency limit of 15 loads.
... when the manifest is identical, the cache is activated, onupdateready 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 already 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 already 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 threads in the sampled application.
... when it's done parsing the data, you should now have a couple of rows with stacktraces for all the threads in the sampled application.
HTTP logging
windows if firefox is already 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 already 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 already 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 already 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
MozillaGeckoChromeAPIBrowser APIUsing
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 thread of your application, otherwise it won't work.
... there are many examples of products already 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 already provided for these elements.
...it is better to use the logic already 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 already separated to multiple clauses, that means that the composition string has already been converted by ime at least once.
...if all sent widgetcompositionevents and widgetselectionevents are already 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 threads 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, threads, 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 already supports many other interfaces.
... this technique works because nsbaseimplementation is already 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-threaded 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-threaded 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 already resolved htmlelement as a result of resolving the name htmlimageelement earlier, the recursion will stop right there.
...obj.__proto__.__proto__) has been set up already, 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 already installed or in the process of being installed.
...a new search will immediately fail if the addonrepository is already 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 already removed, this method has no effect.
...the newly added view will receive ondownloadadded notifications for all the downloads that are already 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 thread being profiled.
... cpu_migrations uint64 the number of times the profiled thread 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 already fulfilled with the specified value.
Using JavaScript code modules
if you're writing an extension for firefox 4 and already 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 already 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 thread from your jsm.
... to create a chromeworker for this purpose, you need to use the nsiworkerfactory interface: var workerfactory = components.classes['@mozilla.org/threads/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 already 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.
... threadlocal.h implements thread-local storage, aka "tls", also called thread-specific storage.
Fonts for Mozilla 2.0's MathML engine
on mac os x lion (10.7) and higher versions, stix fonts are already installed and can be used for mathml.
...all the fonts mentioned above may already 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 already-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 already 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 already.
mozilla::Mutex
assertcurrentthreadowns() assert that the current thread has locked this mutex.
...assertnotcurrentthreadowns() assert that the current thread 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 already have sizeof{in,ex}cludingthis functions, e.g.
Profiling with Xperf
it might already be installed by the windows sdk.
... check if c:\program files\microsoft windows performance toolkit already 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 already.
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 already 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 thread waiting for a change in the state of monitored data.
... pr_cnotifyall notifies all the threads waiting for a change in the state of monitored data.
PRCallOnceType
calling threads that observe this status block until inprogress is zero.
...this initialization must be accomplished before any threading 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 thread's current error text without altering the text as stored in the thread'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 thread's current error text.
PR_GetOSError
returns the current thread's last set os-specific error code.
...however, this information is preserved, along with a platform neutral error code, on a per thread basis.
PR_Init
syntax #include <prinit.h> void pr_init( prthreadtype type, prthreadpriority priority, pruintn maxptds); parameters pr_init has the following parameters: type this parameter is ignored.
... call pr_init as follows: pr_init(pr_user_thread, 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 already been called, pr_true.
... if pr_init has not already been called, pr_false.
PR_Lock
description when pr_lock returns, the calling thread is "in the monitor," also called "holding the monitor's lock." any thread that attempts to acquire the same lock blocks until the holder of the lock exits the monitor.
...calling it twice on the same thread results in undefined behavior.
PR_NewTCPSocket
to receive data, one can call pr_read or pr_recv.
...pr_acceptread 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_acceptread 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 thread pool for execution.
... syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob( prthreadpool *tpool, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_SetErrorText
description the text is copied into the thread structure and remains there until the next call to pr_seterror.
... if there is error text already present in the thread, 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_isreadonly 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 threading and i/o.
... what you should already 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 threading model (no green threads).
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 threading model (no green threads).
Build instructions for JSS 4.3.x
now you are ready to build jss.
... next, you should read the instructions on using jss.
JSS
MozillaProjectsNSSJSS
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 threading model (no green threads).
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 already 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 already 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 already 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_thread, pr_priority_normal, 0); /* create the database */ rv = nss_initreadwrite(dbdir); if (rv != secsuccess) { pr_fprintf(pr_stderr, "nss_initialize failed"); pr_cleanup(); exit(rv); } if (pl_strcmp(slotname, "internal") == 0) slot = pk11_getinternalkeyslot(); /* if creating new database, initialize the password.
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 already 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_pthreads 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 already 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_already_initialized: the library is already 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_pthreads boolean (1 to enable) on platforms where posix threads are available, but are not the os'es preferred threads library, this tells nss and nspr to build using pthreads.
NSS reference
nss initialization and shutdown nss_init nss_initreadwrite 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_isreadonly 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_initreadwrite 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_isreadonly 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_initreadwrite 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_lockread mxr 3.2 and later nssrwlock_lockwrite mxr 3.2 and later nssrwlock_new mxr 3.2 and later nssrwlock_unlockread 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, thread 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 threads 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 thread 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: thread safety andreas gal blog post bobby holley blog post sfink/contexts_and_compartments xpconnect security membranes ...
Creating JavaScript tests
read more advice on jstests here.
...you can read about them here.
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 // already 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_threadsafe build, the caller must be in a request on this jscontext.
...this variable must already be initialized.
JSAutoByteString
in a js_threadsafe 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 already 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 already have been allocated.
... description get and set a required slot, one that should already have been allocated.
JS_Add*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
...this variable must already be initialized.
JS_AliasElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if the element is currently out of scope, already 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_threadsafe build, the caller must be in a request on this jscontext.
...if the property is currently out of scope, already 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_threadsafe build, the caller must be in a request on this jscontext.
...see also mxr id search for js_bufferiscompilableunit js::evaluate js::compile js::compileoffthread js::compilefunction js_decompilescript ...
JS_CompileScript
in a js_threadsafe 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::compileoffthread 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_threadsafe build, the caller must be in a request on this jscontext.
JS_DeepFreezeObject
in a js_threadsafe 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 already deep-frozen.
JS_DefineElement
in a js_threadsafe 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_threadsafe build, the caller must be in a request on this jscontext.
...on error or exception (if the object cannot be created, the property already exists, or the property cannot be created), js_defineobject returns null.
JS_DefinePropertyWithTinyId
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if the property already exists or cannot be created, they return js_false.
JS_DeleteElement
in a js_threadsafe 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_threadsafe 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_threadsafe 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 multithreaded program this requires even greater care), or ensure that garbage collection does not occur.
JS_EnumerateResolvedStandardClasses
enumerate any already-resolved standard class ids.
... syntax jsidarray * js_enumerateresolvedstandardclasses(jscontext *cx, jsobject *obj, jsidarray *ida); name type description description js_enumerateresolvedstandardclasses enumerates any already-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 thread.
...in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InitStandardClasses
in a js_threadsafe 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 already established.
JS_InternString
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if an interned string already exists with the desired value, these functions return the existing string.
JS_LinkConstructorAndPrototype
in a js_threadsafe 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 thread.
... no other thread may use it or destroy it.
JS_NewDouble
in a js_threadsafe 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_threadsafe 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_threadsafe 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 thread some time after any thread triggered the callback using js_requestinterruptcallback.
JS_SetOperationCallback
in js_threadsafe 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 thread some time after any thread triggered the callback using js_triggeroperationcallback.
JS_SetParent
in a js_threadsafe 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 already been exposed to a script.
JS_SetPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
...if an exception is already being thrown, it is replaced with the new one given.
JS_SetProperty
in a js_threadsafe 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_threadsafe build, the caller must be in a request on this jscontext.
... jsprop_readonly property is read only.
JS_ValueToFunction
in a js_threadsafe 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 already a function, or use js_convertvalue() to convert a value to jstype_function safely.
JS_ValueToNumber
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if v is already a number, conversion succeeds.
JS_ValueToString
in a js_threadsafe build, the caller must be in a request on this jscontext.
... if v is already 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 threadsafe builds.
... the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-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 threadsafe builds.
... the team is considering the removal of tinyids js_threadsafe is going away, with future versions supporting only thread-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_threads 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_threadsafe is going away, with future versions supporting only thread-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 already 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 already 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 already bookmarked -- for example, to avoid creating a new bookmark for a site that's already 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 already 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 spread 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 already 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_already_initialized returned when an instance is already 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 beginreading the beginreading function returns a const pointer to the first element of the string's internal buffer.
... endreading the endreading 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 thread 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 threads.
IAccessibleTable2
this data is only guaranteed to be valid while the thread 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 threads.
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 thread.
... in contrast, mozistoragestatement may need to acquire the primitives and consequently can cause the main thread to lock for extended intervals while the asynchronous thread performs some long-running operation.
nsIAccessibleSelectable
read only.
...if the specified object is already selected, then it does nothing.
nsIAccessibleTableChangeEvent
read only.
...read only.
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 already has a value, or if apersist is true.
... var content_type = 'application/pdf'; // update the category manager in case the plugins are already 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 already converted.
...this means that the clause is already converted and is selected to convert.
nsIContentFrameMessageManager
read only.
...read only.
nsIContentPrefService
read only.
...read only.
nsIContentSniffer
note: implementations should consider the request read-only.
...example how to read content from adata.
nsICookieManager2
cookieexists() returns whether or not a matching cookie already exists.
... findmatchingcookie() obsolete since gecko 1.9 (firefox 3) find whether a matching cookie already exists, and how many cookies a given host has already set.
nsIDOMChromeWindow
messagemanager nsichromeframemessagemanager read only.
...read only.
nsIDOMFileException
not_readable_err 1 the specified file wasn't readable.
... see also nsidomfile nsidomfilelist nsidomfilereader ...
nsIDOMMozNetworkStatsManager
read only.
...read only.
nsIDOMSimpleGestureEvent
read only.
...read only.
nsIDOMStorage2
if the key does not already exist, a new key is added, associated with the specified value.
... if the key already exists, the existing value is replaced with the specified value.
nsIDOMWindow2
read only.
...read only.
nsIDOMXPathEvaluator
read more on implementing a user defined namespace resolver if you wish to take the latter approach.
...read more on implementing a user defined namespace resolver if you wish to take the latter approach.
nsIDOMXULSelectControlItemElement
inherits from: nsidomxulelement last changed in gecko 1.7 attributes attribute type description accesskey domstring command domstring control nsidomxulselectcontrolelement read only.
... crop domstring disabled boolean image domstring label domstring selected boolean read only.
nsIDebug2
read only.
...read only.
nsIDownloadManagerUI
read only.
... methods getattention() calls attention to the download manager's user interface if it's already open.
nsIEditorDocShell
read only.
...read only.
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.
nsIFormHistory2
read only.
...read only.
nsIHttpServer
* * @param port * the port upon which listening should happen, or -1 if no specific port is * desired * @throws ns_error_already_initialized * if this server is already 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 already 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 oninputstreamready(in nsiasyncinputstream astream); methods oninputstreamready() called to indicate that the stream is either readable or closed.
... void oninputstreamready( in nsiasyncinputstream astream ); parameters astream the stream whose nsiasyncinputstream.asyncwait() method was called.
nsILoadGroup
read only.
...read only.
nsILoginManagerCrypto
read only.
...read only.
nsILoginManagerStorage
read only.
...void initwithfile( in nsifile ainputfile, in nsifile aoutputfile ); parameters ainputfile the file from which to read stored logins.
nsIMemoryReporterManager
read only.
...read only.
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_already_opened if it is called more then once removeidentity() removes an identity from this account.
nsIMsgAccountManagerExtension
this attribute is readonly!
...this attribute is readonly!
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 already in either addrs or other_addrs.
... that argument is for passing in addresses that were already 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 already 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.
nsIMsgWindow
messagewindowdocshell nsidocshell readonly: this retrieves the nsidocshell object for the message pane.
... promptdialog nsiprompt readonly: this is the equivalent of calling getinterface on the rootdocshell object.
nsINavHistoryQueryResultNode
read only.
...read only.
nsIOutputStreamCallback
inherits from: nsisupports last changed in gecko 1.7 method overview void onoutputstreamready(in nsiasyncoutputstream astream); methods onoutputstreamready() called to indicate that the stream is either writable or closed.
... void onoutputstreamready( in nsiasyncoutputstream astream ); parameters astream the stream whose nsiasyncoutputstream.asyncwait() method was called.
nsIPasswordManager
void adduser(in autf8string ahost, in astring auser, in astring apassword); void removeuser(in autf8string ahost, in astring auser); void addreject(in autf8string ahost); void removereject(in autf8string ahost); attributes attribute type description enumerator nsisimpleenumerator readonly: an enumeration of the stored usernames and passwords as nsipassword objects.
... enumerator nsisimpleenumerator readonly: an enumeration of the rejected sites as nsipassword objects.
nsIPrinterEnumerator
read only.
...read only.
nsIPrivateBrowsingService
read only.
...read only.
nsIProcess2
xpcom/threads/nsiprocess.idlscriptable this interface represents an executable process.
...the observer will be notified on the main thread.
nsIProfile
read only.
... exceptions thrown ns_error_failure a profile already exists with the name newname.
nsIProfileLock
read only.
...read only.
nsIProperty
read only.
...read only.
nsIRadioInterfaceLayer
sid); void setupdatacall(in long radiotech, in domstring apn, in domstring user, in domstring passwd, in long chappap, in domstring pdptype); void starttone(in domstring dtmfchar); void stoptone(); void unregistercallback(in nsiriltelephonycallback callback); void unregisterdatacallcallback(in nsirildatacallback callback); attributes attribute type description currentstate jsval read only.
... obsolete since gecko 13.0 microphonemuted bool radiostate jsval read only.
nsIResumableChannel
read only.
... methods asyncopenat() obsolete since gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) open this channel, and read starting at the specified offset.
nsIScreen
read only.
...read only.
nsIScreenManager
read only.
...read only.
nsIScriptableUnicodeConverter
if the other apis you are reading data from or writing data to don't require you to use this legacy representation, you should use textdecoder and textencoder (available to chrome javascript via components.utils.importglobalproperties) instead of this api.
... examples see reading textual data and writing textual data for examples.
nsISearchSubmission
read only.
...read only.
nsISessionStartup
read only.
...read only.
nsIStructuredCloneContainer
read only.
...read only.
nsIStyleSheetService
sheets added via this api take effect on all documents, including already-loaded ones, immediately.
...the removal takes effect immediately, even for already-loaded documents.
nsIToolkitProfile
read only.
...read only.
nsITransaction
read only.
...both transactions must be in their undo state, dotransaction() methods already called.
nsITransactionManager
read only.
...read only.
nsITransportEventSink
aprogress the amount of data either read or written depending on the value of the status code.
...aprogressmax the maximum amount of data that will be read or written.
nsIUpdateManager
read only.
...read only.
nsIUpdatePrompt
if the app.update.silent preference is true or the user interface is already displayed the call will be a no-op.
...if the app.update.silent preference is true, the app.update.showinstalledui preference is false, or the user interface is already displayed the call will be a no-op.
nsIUploadChannel2
most implementations of this interface require that the stream: implement threadsafe addref and release implement nsiinputstream.readsegments() implement nsiseekablestream.seek().
...astreamhasheaders true if the stream already contains headers for the http request.
nsIWinAppHelper
method overview void fixreg(); obsolete since gecko 1.9 void postupdate(in nsilocalfile logfile); obsolete since gecko 1.9.2 attributes attribute type description usercanelevate boolean read only.
... returns true only if all the following conditions are all true at once: the operating system is at least windows vista user account control is enabled the user is an administrator the application is not already running with elevated permissions otherwise it returns false.
nsIWindowsShellService
a rgb value, where (r << 24 | g << 16 | b) obsolete since gecko 1.8 unreadmailcount unsigned long the number of unread mail messages for the current user.
... read only.
nsIXMLHttpRequest
the interface definition: //github.com/realityripple/uxp/blob/master/dom/xhr/nsixmlhttprequest.idl elevated privileges as mentioned in the "non-standard properties" the property of channel was read-only.
...the 'onload', 'onerror', and 'onreadystatechange' attributes moved to nsijsxmlhttprequest, but if you're coding in c++ you should avoid using those.
nsIXSLTException
read only.
...read only.
nsIXULWindow
read only.
...read only.
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 markread=4; const long killthread=5; const long watchthread=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 killsubthread=18; const long markunread=19; }; ...
nsMsgViewSortType
the nsmsgviewsorttype interface contains constants used for sorting the thunderbird threadpane.
... last changed in gecko 1.9 (firefox 3) constants name value description bynone 0x11 not sorted bydate 0x12 bysubject 0x13 byauthor 0x14 byid 0x15 bythread 0x16 bypriority 0x17 bystatus 0x18 bysize 0x19 byflagged 0x1a byunread 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 already have one.
...the second line of code in the if block should already be familiar to you.
Performance
the cache is threadsafe.
...this made shutdown very slow because the asyncio thread 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 thread 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 already_addrefed as a function result.
XPIDL Syntax
MozillaTechXPIDLSyntax
;" / 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 already 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
nsimsgthread nsimsgthread - this interface is used to interact with threads in thunderbird.
... nsimsgdbview nsimsgdbview - the nsimsgdbview interface handles the display of mail in the threadpane 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 already 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 thread that contains one or more glodamessages.
Folders and message lists
if a collapsed thread is in there and working with collapsed threads is enabled, this will include the headers for the messages in that collapsed thread.
...like selectedmessages, this also includes messages in selected collapsed threads when so enabled.
Styling the Folder Pane
hasunreadmessages-true afolder.getnumunread(false) > 0 indicates that the folder (but not subfolders) has unread messages.
... newmessages-true afolder.hasnewmessages subfoldershaveunreadmessages-true afolder.getnumunread(true) > afolder.getnumunread(false) indicates whether or not subfolders have unread 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 already).
...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="threadtree"> <treecols id="threadcols"> <splitter class="tree-splitter" /> <treecol id="colsuperfluous" persist="hidden ordinal width" currentview="unthreaded" 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 already 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 already 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 thread with which they were registered.
... there is no concurrency logic in js-ctypes, so invoking callbacks on other threads will cause things to crash.
Declaring types
types are declared in terms of other, already 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 already) 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 threads 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 already 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 already 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-thread calls: the call takes place in the thread 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 thread 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-thread calls: the call takes place in the same thread 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 threads 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 already 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 already 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.
Network request details - Firefox Developer Tools
receiving time taken to read the entire response from the server (or cache).
...database read/write, cpu time, file system access, etc.).
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 thread (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 thread 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 threadactor, 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 thread.
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.onreading 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.onreading will be called.
...the actual reading frequency depends device hardware and consequently may be less than requested.
Animation.effect - Web APIs
WebAPIAnimationeffect
the target effect may be either an effect object of a type based on animationeffectreadonly, such as keyframeeffect, or null.
... syntax var effect = animation.effect; animation.effect = animationeffectreadonly value a animationeffectreadonly 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
WebAPIAudioTracklabel
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 thread to provide very low latency audio processing.
... the worklet's code is run in the audioworkletglobalscope global execution context, using a separate web audio thread 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 contextread only client data for the authentication, such as origin and challenge.
... authenticatorattestationresponse.attestationobject secure contextread 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 thread, 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 filereader.
... 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 filereader.
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
WebAPIBlobarrayBuffer
this can happen, for example, if the reader used to fetch the blob's data throws an exception.
... usage notes while similar to the filereader.readasarraybuffer() method, arraybuffer() returns a promise rather than being an event-based api, as is the case with the filereader interface's method.
BlobEvent - Web APIs
WebAPIBlobEvent
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.connectedread only a boolean value that returns true while this script execution environment is connected to this.device.
... bluetoothremotegattserver.deviceread only a reference to the bluetoothdevice running the server.
Body.blob() - Web APIs
WebAPIBodyblob
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
WebAPIBodyjson
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
WebAPIBodytext
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
WebAPICSSRule
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 stylepropertymapreadonly 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 already 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 already 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
WebAPIClienturl
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 already 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 createreadinglist() { // 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.
CustomElementRegistry.whenDefined() - Web APIs
if the custom element is already defined, the promise is resolved immediately.
...the menu displays placeholder content until the actual menu content is ready to display.
CustomEvent.initCustomEvent() - Web APIs
if the event has already been dispatched, this method does nothing.
... living standard initial definition, but already deprecated in favor of the use of a constructor, customevent() ...
DOMError - Web APIs
WebAPIDOMError
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
WebAPIDOMPointInitx
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 dompointreadonly.
... dompointinit is used as an input when calling either dompointreadonly.frompoint() or dompoint.frompoint(), and is returned by the dompointreadonly.tojson() and dompoint.tojson() methods.
DOMQuad - Web APIs
WebAPIDOMQuad
it has a handy bounds attribute returning a domrectreadonly 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 already.
... } else { // storage access hasn't been granted already; // you may want to call requeststorageaccess().
Document.head - Web APIs
WebAPIDocumenthead
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 already in our very first example, when we described how whitespace is processed inside inline formatting contexts.
EffectTiming.delay - Web APIs
element.animate(), keyframeeffectreadonly(), 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 animationeffectreadonly, keyframeeffectreadonly, 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(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including direction.
... the value of direction corresponds directly to animationeffecttimingreadonly.direction in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect.
EffectTiming.duration - Web APIs
element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including duration.
... the value of duration corresponds directly to animationeffecttimingreadonly.duration in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect.
EffectTiming.easing - Web APIs
element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including easing.
... the value of easing corresponds directly to animationeffecttimingreadonly.easing in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect.
EffectTiming.iterationStart - Web APIs
element.animate(), keyframeeffectreadonly.keyframeeffectreadonly(), and keyframeeffect.keyframeeffect() all accept an object of timing properties including iterationstart.
... the value of iterationstart corresponds directly to animationeffecttimingreadonly.iterationstart in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, and keyframeeffect.
EffectTiming.iterations - Web APIs
element.animate(), keyframeeffectreadonly(), and keyframeeffect() all accept an object of timing properties including iterations.
... the value of iterations corresponds directly to animationeffecttimingreadonly.iterations in timing objects returned by animationeffectreadonly, keyframeeffectreadonly, 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 already in full-screen mode—detected by looking to see if document.fullscreenelement has a value—we call the video's requestfullscreen() method.
... if, on the other hand, full-screen mode is already in effect, we call document.exitfullscreen() to disable full-screen mode.
Element.scrollIntoViewIfNeeded() - Web APIs
the element.scrollintoviewifneeded() method scrolls the current element into the visible area of the browser window if it's not already within the visible area of the browser window.
... if the element is already 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 already 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 already 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
WebAPIEventbubbles
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); } // already bubbling dooutput(e); } note: only certain events can bubble.
Event.initEvent() - Web APIs
WebAPIEventinitEvent
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
WebAPIEventSourceclose
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 already 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
WebAPIFilelastModified
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
WebAPIFileList
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 filereader ...
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
createreader() creates a filesystemdirectoryreader 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: webkitcreatereader 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 already 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 already 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
WebAPIFormDataappend
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 already exist.
... the difference between formdata.set and append() is that if the specified key already 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
WebAPIFormDataset
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 already exist.
... the difference between set() and formdata.append is that if the specified key does already 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
WebAPIFormData
methods formdata.append() appends a new value onto an existing key inside a formdata object, or adds the key if it does not already exist.
... formdata.set() sets a new value for an existing key inside a formdata object, or adds the key/value if it does not already 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 already 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) willreadfrequently: boolean that indicates whether or not a lot of read-back operations are planned.
...this option is only available, if the flag gfx.canvas.willreadfrequently.enable is set to true (which, by default, is only the case for b2g/firefox os).
HTMLDialogElement.showModal() - Web APIs
exceptions if the dialog is already open (i.e.
... if the open attribute is already set on the <dialog> element), an invalidstateerror is thrown.
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.positionread 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.labelsread 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.rowsread 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.tbodiesread 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 already 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 already added.
...you may wish to do both in case another listener has already 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
WebAPIHistory
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 unreadlist = []; 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 unread list; unreadlist.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
WebAPIIDBCursorkey
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
WebAPIIDBCursorrequest
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
WebAPIIDBCursorsource
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 thread until the connection object is ready to return.
... if there is already 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
WebAPIIDBIndexcount
the count() method of the idbindex interface returns an idbrequest object, and in a separate thread, 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
WebAPIIDBIndexget
the get() method of the idbindex interface returns an idbrequest object, and, in a separate thread, 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
WebAPIIDBIndexgetKey
the getkey() method of the idbindex interface returns an idbrequest object, and, in a separate thread, 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
WebAPIIDBIndexlocale
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
WebAPIIDBIndexname
constrainterror an index is already 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 thread, 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 thread, 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
WebAPIIDBIndexunique
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
WebAPIIDBKeyRangelower
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
WebAPIIDBKeyRangeupper
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 thread, 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 already exists in the database.
... db = request.result; // run the displaydata() function to populate the task list with // all the to-do list data already 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 thread, 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
WebAPIIDBRequestresult
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
WebAPIIDBRequestsource
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 already 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 already controlling the page.
IntersectionObserverEntry.boundingClientRect - Web APIs
the intersectionobserverentry interface's read-only boundingclientrect property returns a domrectreadonly which in essence describes a rectangle describing the smallest rectangle that contains the entire target element.
... syntax var boundsrect = intersectionobserverentry.boundingclientrect; value a domrectreadonly 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 domrectreadonly 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 domrectreadonly 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 domrectreadonly corresponding to the target's root intersection rectangle, offset by the intersectionobserver.rootmargin if one is specified.
... syntax var rootbounds = intersectionobserverentry.rootbounds; value a domrectreadonly 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
WebAPILock
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
WebAPILockedFilemode
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 thread for 50 ms or more cause, among other issues: delayed "time to interactive".
... long task any uninterrupted period where the main ui thread 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.onreading 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
matchesread only a boolean that returns true if the document currently matches the media query list, or false if not.
... mediaread only a domstring representing a serialized media query.
MediaQueryListEvent - Web APIs
mediaquerylistevent.matchesread only a boolean that returns true if the document currently matches the media query list, or false if not.
... mediaquerylistevent.mediaread only a domstring representing a serialized media query.
MediaRecorderErrorEvent - Web APIs
error read only a domexception containing information about the error that occurred.
... read only.
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
WebAPIMediaStreamended
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 already 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 already-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
WebAPIMetadata
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
WebAPIMouseEventwhich
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 playready 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 already 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 already 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, ndefreader 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 already registered.
... therefore, it is a good idea to guard your call to register the protocol handler with a check to see if it is already 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
WebAPINodebaseURI
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
WebAPINodeparentNode
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 already node.parentnode.removechild(node); } notes document and documentfragment nodes can never have a parent, so parentnode will always return null.
Node.replaceChild() - Web APIs
WebAPINodereplaceChild
childnode.replacewith() may be easier to read and use.
...if it already exists in the dom, it is first removed.
Node.textContent - Web APIs
WebAPINodetextContent
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 already read the notification on the webpage in the case of a messaging app or the following song is already 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 already 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) willreadfrequently: boolean that indicates whether or not a lot of read-back operations are planned.
...this option is only available, if the flag gfx.canvas.willreadfrequently.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 thread, which will return an offscreencanvas object from an htmlcanvaselement object from the main thread.
... main.js (main thread 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.
PerformanceNavigationTiming.type - Web APIs
the type read-only property returns a string representing the type of navigation.
... this property is read only .
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.statusread 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 already depressed.
ProgressEvent() - Web APIs
lengthcomputable optional is a boolean flag indicating if the total work to be done, and the amount of work already done, by the underlying process is calculable.
... loaded optional is an unsigned long long representing the amount of work already 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 already done, by the underlying process is calculable.
... loaded is an unsigned long long representing the amount of work already 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 already existing for a given user.
... if the authenticator already 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 already 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 already 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 already 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 already been played are no longer included in the string).
...calling insertdtmf() replaces any already-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 already 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 already attached to the session, codecs and options supported by the browser, and any ice candidates already gathered.
... exceptions notreadableerror 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 already 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 already 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 already 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 already stopped, or is not in the connection's senders list, this method has no effect.
... if the connection has already 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
WebAPIRangeendOffset
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.onreading will be called.
...the actual reading frequency depends device hardware and consequently may be less than requested.
Request.mode - Web APIs
WebAPIRequestmode
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 domrectreadonly object containing the new size of the observed element when the callback is run.
... syntax var contentrect = resizeobserverentry.contentrect; value a domrectreadonly 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
WebAPISVGNumber
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
WebAPISVGRect
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, domrectreadonly.
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.typeread only returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
... screenorientation.angleread 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
WebAPISensoractivated
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
WebAPISensortimestamp
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 already 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 already 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 thread 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 already 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 thread 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 threads.
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 thread 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 thread 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
WebAPIStorage
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 already 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, stylepropertymapreadonly.
... methods inherits methods from its parent, stylepropertymapreadonly.
SyncEvent - Web APIs
WebAPISyncEvent
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.encodingread only always returns "utf-8".
...these sequences are not already precomputed because they serve to aesthetically illustrate how the polyfill works.
TimeEvent - Web APIs
WebAPITimeEvent
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
WebAPITypeInfo
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
WebAPIURL API
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 urlutilsreadonly, which has since been merged into the workerlocation interface.
USBInTransferResult - Web APIs
properties usbintransferresult.dataread only returns a dataview object containing the data received from the usb device, if any.
... usbintransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferPacket - Web APIs
properties usbisochronousintransferpacket.dataread only read only returns a dataview object containing the data received from the usb device in this packet, if any.
... usbisochronousintransferpacket.statusread only read only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBIsochronousInTransferResult - Web APIs
properties usbisochronousintransferresult.dataread only returns a dataview object containing the data received from the device.
... usbisochronousintransferresult.packetsread 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.byteswrittenread only returns the number of bytes from the packet that were sent to the device.
... usbisochronousouttransferpacket.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
USBOutTransferResult - Web APIs
properties usbouttransferresult.byteswrittenread only returns the number of bytes from the transfer request that were sent to the device.
... usbouttransferresult.statusread only returns the status of the transfer request, one of: "ok" - the transfer was successful.
VideoTrack.label - Web APIs
WebAPIVideoTracklabel
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.checkFramebufferStatus() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
...possible enum return values: gl.framebuffer_complete: the framebuffer is ready to display.
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.framebufferRenderbuffer() - 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.
WebGLRenderingContext.getFramebufferAttachmentParameter() - 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, gl.read_framebuffer or if attachment is not one of the accepted attachment points.
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 already 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 already 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 already 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, already 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 already 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 already 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; checkready(); }, true); video.addeventlistener('timeupdate', function() { timeupdate = true; checkready(); }, true); video.src = url; video.play(); function checkready() { 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 already 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
WebAPIWebSocketclose
if the connection is already 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 dompointreadonly 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 already 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(), keyframeeffectreadonly.keyframeeffectreadonly(), 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 thread (likely the main thread), and there's a way to offload all that work to the audio rendering thread, 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 already 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 ndefreader and ndefwriter objects respectively.
... ndefreader 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 filereader this api allows asynchronous read of blob and file objects.
... 46 (46) no support (yes) no support filereadersync this api allows synchronous read of blob and file objects.
Window.crypto - Web APIs
WebAPIWindowcrypto
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
WebAPIWindowinnerWidth
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
WebAPIWindowload event
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
WebAPIWindowlocation
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
WebAPIWindowscrollY
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 already 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 already 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...
WorkerGlobalScope.performance - Web APIs
the performance read-only property of the workerglobalscope interface returns a performance object to be used on the worker.
... this property is read only .
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 already 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.onreadystatechange.
... var request = new xmlhttprequest(); request.open("get", "foo.txt", true); request.send(); request.onreadystatechange = 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.onreadystatechange = 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 already active request (one for which open() has already been called) is the equivalent of calling abort().
... note: synchronous requests on the main thread can be easily disruptive to the user experience and should be avoided; in fact, many browsers have deprecated synchronous xhr support on the main thread 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 filereader 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 dompointreadonly 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 dompointreadonly 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
WebAPIXRPose
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 already.
...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 dompointreadonly 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 dompointreadonly 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 dompointreadonly 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 dompointreadonly 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 already 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 spread 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 already 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 already 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 spreadsheet.
...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 already 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 already 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
WebCSS:visited
the :visited css pseudo-class represents links that the user has already visited.
... html <a href="#test-visited-link">have you visited this link yet?</a><br> <a href="">you've already 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 already 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 already 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 imagereader = (function imagereader() { var freader = new filereader(); 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; freader.readasdataurl(file); return false; }; freader.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', imagereader.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.
Backwards Compatibility of Flexbox - CSS: Cascading Style Sheets
this is becoming less and less of a requirement today as support is widespread.
... conclusion while i’ve spent some time in this guide going through potential issues and fallbacks, flexbox is very much ready for you to be using in production work.
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.
Controlling Ratios of Flex Items Along the Main Axis - CSS: Cascading Style Sheets
.item { flex: 2 1 auto; } if you have read the article basic concepts of flexbox, then you will have already had an introduction to the properties.
...consider the following aspects, which we have already discussed in these guides: what sets the base size of the item?
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 already 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.
CSS Grid Layout and Progressive Enhancement - CSS: Cascading Style Sheets
floated elements as we have already seen, float and also clear have no effect on a grid item.
... further reading for an excellent explanation of feature queries, and how to use them well, see using feature queries in css.
Grid template areas - CSS: Cascading Style Sheets
naming a grid area you have already encountered the grid-area property.
... these can quickly become difficult to read for other developers, or even your future self.
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 thread of content broken up into newspaper-style columns.
... a continuous thread 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 screenreaders.
... in the previous example, we've already 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 spread or a left page in a right-to-left spread.) 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 spread or a left right in a right-to-left spread.) 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 spread or a left page in a right-to-left spread.) 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 spread or a left right in a right-to-left spread.) 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 spread 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 treads 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 treads, 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-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )<explicit-track-list> = [ <line-names>?
... <track-size> ]+ <line-names>?where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <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 spread 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 unreadable.
max() - CSS: Cascading Style Sheets
WebCSSmax
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
WebCSSminmax
syntax /* <inflexible-breadth>, <track-breadth> 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-breadth>, <track-breadth> values */ minmax(200px, 1fr) minmax(30%, 300px) minmax(400px, 50%) minmax(50%, min-content) minmax(300px, max-content) minmax(200px, auto) /* <inflexible-...
...breadth>, <fixed-breadth> 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
WebCSSorder
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
WebCSS
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 already 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 already 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.
Audio and video manipulation - Developer guides
video manipulation the ability to read the pixel values from each frame of a video can be very useful.
... read the data from the intermediary <canvas> element and manipulate it.
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
WebHTMLElementabbr
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
WebHTMLElementdata
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
WebHTMLElementdel
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.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
accessibility concerns each screen reader announces <dl> content differently.
... some screen readers, such as voiceover on ios, will not announce that <dl> content is a list.
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
an example for <em> could be: "just do it already!", or: "we had to do something about it".
... a person or software reading the text would pronounce the words in italics with an emphasis, using verbal stress.
<head>: The Document Metadata (Header) element - HTML: Hypertext Markup Language
WebHTMLElementhead
the html <head> element contains machine-readable information (metadata) about the document, like its title, scripts, and style sheets.
... note: <head> primarily holds information for machine processing, not human-readability.
<html>: The HTML Document / Root element - HTML: Hypertext Markup Language
WebHTMLElementhtml
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
WebHTMLElementiframe
due to widespread 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
WebHTMLElementinputimage
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
WebHTMLElementins
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
WebHTMLElementisindex
in this thread, 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 thread about isindex in november 1992, kevin hoadley questioned the need for an isindex element and proposed to drop it.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
<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
WebHTMLElements
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.
<title>: The Document Title element - HTML: Hypertext Markup Language
WebHTMLElementtitle
also, the title is the initial "hook" by which you grab the attention of readers glancing at the search results page.
... a common navigation technique for users of assistive technology is to read the page title and infer the content the page contains.
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 widespread 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
WebHTTPCORSErrors
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
WebHTTPCaching
you might have seen "caching" in your browser's settings already.
...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 already, 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 already 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 already 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
WebHTTPCookies
if your site authenticates users, it should regenerate and resend session cookies, even ones that already 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 already compressed and a second compression won't lead to smaller data to be transmitted.
... * matches any content encoding not already 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
WebHTTPHeaders
this is used to update caches (for safe requests), or to prevent to upload a new resource when one already 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 already cause things to be silently downloaded using js/dom hacks.
... privacy implications along with the referral and url-following implications already mentioned above, prefetching will generally cause the cookies of the prefetched site to be accessed.
A typical HTTP session - HTTP
WebHTTPSession
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 already 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).
Equality comparisons and sameness - JavaScript
they're brief and readable.
... hint: read the strict equality algorithm first.) es5 also describes, in section 9.12, the samevalue algorithm for use internally by the js engine.
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 already available and waiting to be handled).
...this differs from c, for instance, where if a function runs in a thread, it may be stopped at any point by the runtime system to run some other code in another thread.
Details of the object model - JavaScript
this chapter assumes that you are already 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 already existing class.
Indexed collections - JavaScript
as you already 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 already 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 already 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 already 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 already 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 already 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 already 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 already.
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 already, 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 thread 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 spread 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...
...// spread 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 already resolved promise if the iterable passed is empty.
... if an empty iterable is passed, then this method returns (synchronously) an already 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.
RegExp.prototype.sticky - JavaScript
sticky is a read-only property of an individual regular expression object.
...it is read-only.
RegExp.prototype.unicode - JavaScript
unicode is a read-only property of an individual regular expression instance.
...it is read-only.
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 already present in the registry.
... examples using symbol.for symbol.for('foo'); // create a new global symbol symbol.for('foo'); // retrieve the already 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.isconcatspreadable 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 thread.
... var importobject = { imports: { imported_func: function(arg) { console.log(arg); } } }; onmessage = function(e) { console.log('module received from main thread'); 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 spread 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 spread 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/spread properties for ecmascript proposal (stage 4) adds the rest syntax to destructuring.
... rest properties collect the remaining own enumerable property keys that are not already 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 already 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 already 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 already 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 already 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 already 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 already 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-threaded, 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 inftyreader 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 widespread for the autoplay attribute than for other means of playing media automatically.
...if others have it already, 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 breadth 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 already going to be strained just by a single audio stream playing.
Image file type and format guide - Web media technologies
however, software reading tiff files is only required to support the first image.
...while lossless webp is ideal for this purpose, support is not widespread yet, so png is a better choice unless you offer a fallback.
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 already).
...it's different with html, as the browser is actually streaming the data already 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 already allow us to build mobile friendly websites.
... some of the capabilities have already 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 already).
...it's different with html, as the browser is actually streaming the data already 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 already 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 already 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 dommatrixreadonly instead of svgmatrix implementation status unknown domrect or domrectreadonly instead of svgrect implementation status unknown dompoint or dompointreadonly 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...
Basic Transformations - SVG: Scalable Vector Graphics
« previousnext » now we're ready to start distorting our beautiful images.
...for this purpose, the translate() transformation stands ready.
How to fix a website with blocked mixed content - Web security
note that since mixed content blocking already 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 already exists and this just requires adding an "s" to links - http:// to https://.
Tutorials
intermediate level css layout at this point we've already 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 already 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
WebXSLT
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 already 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 already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
2015 MDN Fellowship Program - Archive of obsolete content
if you’ve read all of this and still have a question, contact diane tate at diane@mozilla.com.
Window: userproximity event - Archive of obsolete content
other properties property type description near read only boolean the current user proximity state.
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 already 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.
Two Types of Scripts - Archive of obsolete content
to learn all about content scripts read the working with content scripts guide.
hotkeys - Archive of obsolete content
the following commonly used hotkey combinations will not pass amo review: accel-z, accel-c, accel-x, accel-v or accel-q if you choose to use a key combination that's already defined, choose one which makes sense for the operation it will perform.
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...
l10n - Archive of obsolete content
usage to learn how to use this module to write localizable code, read the localization tutorial.
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.
system - Archive of obsolete content
var system = require("sdk/system"); console.log("id = " + system.id); name the human-readable name for the host application.
content/worker - Archive of obsolete content
the script may not be initialized yet, or may already 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.
event/target - Archive of obsolete content
such listeners are called only once next time event of the specified type is emitted: target.once('ready', function onready() { // do the thing once ready!
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", onready: 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 ...
system/runtime - Archive of obsolete content
all properties exposed are read-only.
util/array - Archive of obsolete content
add(array, element) if the given array does not already contain the given element, this function adds the element to the array and returns true.
util/collection - Archive of obsolete content
any items already contained in the collection are ignored.
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.
cfx to jpm - Archive of obsolete content
a guide to working with jpm if you're already familiar with cfx.
jpm-mobile - Archive of obsolete content
jpm usage is: jpm-mobile [command] [options] jpm supports the following global options: -h, --help - show a help message and exit -v, --version - print the jpm version number installation jpm-mobile is distributed using the node package manager npm, so to get jpm-mobile you need to have npm installed, if you haven't already.
Tools - Archive of obsolete content
cfx to jpm a guide to working with jpm if you're already familiar with cfx.
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() ?
Creating Event Targets - Archive of obsolete content
for example, you can listen to the tabs module's ready event or the panel object's show event.
Getting Started (jpm) - Archive of obsolete content
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.
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 already 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 thread's event queue rather than scheduled as a timeout: function executesoon(func) { services.tm.mainthread.dispatch(func, ci.nsithread.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 already 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...
Downloading JSON and JavaScript in extensions - Archive of obsolete content
sandboxing is not without its dangers and developers should read the sandboxing page carefully to make sure untrusted code is not leaked out of the sandbox.
Extension Versioning, Update and Compatibility - Archive of obsolete content
in the install.rdf of the already installed add-on updateurl must be specified in one of the following ways: the updateurl uses https, or there is no updateurl at all (which defaults to addons.mozilla.org which is https) the updateurl uses http and the updatekey entry is specified which will be used to verify the data in the update manifest.
Install Manifests - Archive of obsolete content
if there is no chrome.manifest, this property is still read by the add-on manager and a chrome.manifest is generated from old-style contents.rdf.
Interaction between privileged and non-privileged pages - Archive of obsolete content
the event bubbles up from the web page and reaches the extension (privileged code) where your listener catches it and reads the attribute values from the dom element where the event originated.
Listening to events in Firefox extensions - Archive of obsolete content
how events are used by firefox the firefox frontend already listens for a number of these progress events from web pages.
Adding menus and submenus - Archive of obsolete content
adding a new menu we already saw how to add menus in overlays and, as you may have imagined, you can nest submenus as deep as you want.
Appendix F: Monitoring DOM changes - Archive of obsolete content
you can read more about event delegation here.
Appendix E: DOM Building and Insertion (HTML & XUL) - Archive of obsolete content
textcontent and siblings', ['html:br', {}], ['html:input', {type:'checkbox', id:'mycheck'}], ['html:label', {for:'mycheck'}, 'here is text of label, click this text will check the box' ] ] ] ]; document.body.appendchild(jsontodom(json, document, {})); jquery templating for extensions which already use jquery, it is possible to use its builtin dom building functions for templating, though care must be taken when passing non-static strings to methods such as .append() and .html().
Getting Started with Firefox Extensions - Archive of obsolete content
you can read more about plugins and their development in the plugins page.
Useful Mozilla Community Sites - Archive of obsolete content
now all you need is a good idea (in case you didn't have one already) and get started.
XUL School Tutorial - Archive of obsolete content
it is recommended that you read through all of it at least once.
Security best practices in extensions - Archive of obsolete content
be sure to read using native json to find out the correct way to handle it.
Session store API - Archive of obsolete content
starting in firefox 3.5, notifications are sent after reading session store data and before using it, as well as immediately before writing it back to disk.
Updating addons broken by private browsing changes - Archive of obsolete content
after reading this document, contact josh matthews with further questions or clarifications, or file a bug if your extension has stopped working due to a change described here and you are having trouble updating it.
Using the Stylesheet Service - Archive of obsolete content
determining whether a sheet has been loaded if you are writing an extension and adding your stylesheet in an onload handler, you'll want to see if your sheet has already been added.
Add-ons - Archive of obsolete content
it assumes that you are already familiar with building an extension.
An Interview With Douglas Bowman of Wired News - Archive of obsolete content
we know that some users may prefer getting an un-styled version, because they'll finally be able to read our content in the browser they use.
Underscores in class and ID Names - Archive of obsolete content
this unfortunately complicated an already complex landscape.
Case Sensitivity in class and id Names - Archive of obsolete content
netscape 6's unusual sensitivity to case is based on a close reading of the html 4.01 specification.
Creating a dynamic status bar extension - Archive of obsolete content
or, if you've already got the code from the creating a status bar extension sample, you can follow this tutorial to update that existing code with new features.
Events - Archive of obsolete content
archived event pages domsubtreemodifiedmozaudioavailablemozbeforeresizemozorientationcachedchargingchangechargingtimechangecheckingdischargingtimechangedownloadingerrorlevelchangenoupdateobsoleteprogressupdateready ...
Install.js - Archive of obsolete content
['classic', 'modern'] extpostinstallmessage: null, // set to null for no post-install message // --- editable items end --- profileinstall: true, silentinstall: false, install: function() { var jarname = this.extshortname + '.jar'; var profiledir = install.getfolder('profile', 'chrome'); // parse http arguments this.parsearguments(); // check if extension is already installed in profile if (file.exists(install.getfolder(profiledir, jarname))) { if (!this.silentinstall) { install.alert('updating existing profile install of ' + this.extfullname + ' to version ' + this.extversion + '.'); } this.profileinstall = true; } else if (!this.silentinstall) { // ask user for install location, profile or browser dir?
No Proxy For configuration - Archive of obsolete content
so use this- dogwood.state.mo.us .intra.state.mo.us dor.intranet or dogwood.state.mo.us, .intra.state.mo.us, dor.intranet note that you don't need to (read shouldn't) put a * for all hosts with that domain ending.
Notes on HTML Reflow - Archive of obsolete content
incremental, when something in the frame tree changes; for example, when more content is read from the network, or some script manipulates the dom.
Source Navigator - Archive of obsolete content
this triggers a splash screen, followed by a "source-navigator projects" dialog as the following: i've already created a new project bin.proj before documenting this.
Working with BFCache - Archive of obsolete content
for more info about this, read how to use firefox caching.
Misc top level - Archive of obsolete content
in other words, any html file on your local disk can read any other file on your local disk.
Autodial for Windows NT - Archive of obsolete content
these addresses are stored in an os database, the ras autodial addresses db, and a set of heuristics are used to determine if an address is already in the database or not.
Bookmark Keywords - Archive of obsolete content
all we need now is a keyword, and our keymark will be ready to go.
Building TransforMiiX standalone - Archive of obsolete content
read the build instructions for your platform to get the requirements, which are the same as for mozilla.
Chromeless - Archive of obsolete content
for example, prism applications could not read/write files directly from/to the computer's file system.
Adding the structure - Archive of obsolete content
<statusbar id="status-bar" class="chromeclass-status" ondragdrop="nsdraganddrop.drop(event, contentareadndobserver);"> <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" status="none"/> <statusbarpanel class="statusbarpanel-iconic" id="offline-status"/> <statusbarpanel clas...
Enabling the behavior - updating the status periodically - Archive of obsolete content
our code is now ready to run, but mozilla doesn't know about it yet.
Getting Started - Archive of obsolete content
extract theme while you can hypothetically begin with any theme already designed for seamonkey 2, for the sake of consistency we'll speak as though everyone is editing classic (default seamonkey theme).
Getting Started - Archive of obsolete content
creating the install script getting it ready for the installation before we can package everything up for installation, we need to remove all references to classic.
Creating a Skin for Firefox/Getting Started - Archive of obsolete content
extract theme while you can hypothetically begin with any theme already designed for firefox, for the sake of consistency we'll speak as though everyone is editing the default firefox theme.
Dehydra Function Reference - Archive of obsolete content
read_file(filename) read a file a return it as a string.
Dehydra - Archive of obsolete content
dehydra was built as a gcc plugin, thus it is easy to use for projects that already support gcc.
Drag and Drop - Archive of obsolete content
at this point, the user has already released the mouse button.
Editor Embedding Guide - Archive of obsolete content
commandparam->setcstringvalue("state_attribute","left"); reading for reading you may go after individual name/value pairs you know are there or you may iterate through all the name/value pairs and programatically pull off data.
Error Console - Archive of obsolete content
for information about what javascript exceptions get logged into the error console, and how to make all exceptions get logged, read the article exception logging in javascript.
Extension Frequently Asked Questions - Archive of obsolete content
and read this faq!
External CVS snapshots in mozilla-central - Archive of obsolete content
those directories shall be considered read-only, changes shall be delivered to the upstream software projects.
Block and Line Layout Cheat Sheet - Archive of obsolete content
like nshtmlreflowstate, this is read-only data that is passed down from a parent frame to its children.
Building Firefox with Rust code - Archive of obsolete content
if you don't have rust already, use the rustup tool to install it and update as new releases become available, or use the ./mach bootstrap command.
Layout FAQ - Archive of obsolete content
instructions are available at jprof readme on more recent linux versions sysprof can also be used.
Repackaging Firefox - Archive of obsolete content
if you already have an extension that you want to bundle with firefox, and don't want to bundle an extra extension solely to set a few defaults, you can do everything you need to do in your existing extension.
GRE Registration - Archive of obsolete content
when installing a gre via the command line <tt>xulrunner.exe -register-global</tt>, xulrunner will detect that there is already an installation at hklm/software/mozilla.org/gre/<version> and will try alternate keys <version>_1 _2 until an available key is found.
Gecko Coding Help Wanted - Archive of obsolete content
it's really improved code readability, reduced code size, and sped up performance.
Introducing the Audio API extension - Archive of obsolete content
reading audio streams the loadedmetadata event when the metadata of the media element is available, it triggers a loadedmetadata event.
generateCRMFRequest() - Archive of obsolete content
after the "escrowauthoritycert" parameter, the method takes some javascript code that is invoked when the crmf request is ready.
Page modifications - 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!
Content - 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!
Extenders - 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!
Libraries - 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!
First run - 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!
Enabling Experimental Jetpack Features - 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!
Meta - 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!
File access - 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!
Settings - 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!
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!
Clipboard Test - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
Clipboard Test - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
Clipboard - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
System information - 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!
System - 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!
Notifications - 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!
Panel - Archive of obsolete content
ArchiveMozillaJetpackUIPanel
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!
Selection - 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!
UI - 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!
Clipboard - Archive of obsolete content
the namespace associated with this api is jetpack.clipboard which provides both read and write access to the clipboard.
Microsummary topics - Archive of obsolete content
daeb3-6760-47fa-8f4f-8e4fdea1fb16}"> \ <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\.)?spreadfirefox\.com/(index\.php)?</include> </pages> </generator> \ '; var domparser = components.classes["@mozilla.org/xmlextras/domparser;1"].
Modularization techniques - Archive of obsolete content
we also do cross-thread proxying calls using the typelib and nspr's event queues.
LIR - Archive of obsolete content
the lir instruction set is best learnt by reading nanojit/liropcode.tbl.
New Security Model for Web Services - Archive of obsolete content
when an attempt is made to access a resource at a previously-unknown uri, the sandbox reads a file at that domain with declarations to determine whether access is permitted to the script.
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.
HostWindow - Archive of obsolete content
location bar - a readonly textbox that contains the currently displayed url.
Priority Content - Archive of obsolete content
already completed migrations are listed here, and the full list will be transferred on this page once all articles are migrated.
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.
Same origin policy for XBL - Archive of obsolete content
note that step 2 already denied the load attempt for cases in which the chrome: uri isn't accessible to untrusted content.
Space Manager High Level Design - Archive of obsolete content
if the blockreflowstate already had a space manager instance associated with it, it is stored off before being replaced, and the returned to the blockreflowstate instance after the new one has been destroyed.
Merging TraceMonkey Repo - Archive of obsolete content
exercise caution, because leaving off the -l will re-merge and lose all of the resolutions you've already performed.
Standalone XPCOM - Archive of obsolete content
the one functional difference is that xpt files cannot be read from .zip files in standalone xpcom.
String Rosetta Stone - Archive of obsolete content
find a substring nsstring findinreadable(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 already canceled entering the private mode if (!asubject.data) { /* you should display some user interface here */ asubject.data = true; // cancel the operation } }, "last-pb-context-exiting", false); forcing a channel into private mode usually, network channels inherit the privacy status of the document that created them, which means that they work correctly most of the time.
Supporting private browsing mode - Archive of obsolete content
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 already canceled entering the private mode if (!asubject.data) { if (adata == "exit") { // if we are leaving the private mode /* you should display some user interface here */ asubject.data = true; // cancel the operation } } }, "private-browsing-cancel-vote", false); note: a well-mannered extension should display some sort of user interface to indicate that privat...
Cmdline tests - Archive of obsolete content
see test/cmdline/readme document for more information.
Tamarin-central rev 703:2cee46be9ce0 - Archive of obsolete content
the announcement sent to tamarin-devel can be read here.
The life of an HTML HTTP request - Archive of obsolete content
todo: how are nsiframes reflowed after a change when they already exist?
The new nsString class implementation (1999) - Archive of obsolete content
usage patterns how to use these classes to increase the portability, thread 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.
Mozilla Web Developer Community - Archive of obsolete content
css - mozilla.dev.tech.css dom - mozilla.dev.tech.dom html - mozilla.dev.tech.html plugins - mozilla.dev.tech.plugins xml - mozilla.dev.tech.xml documentation - see mdc:community more at http://www.mozilla.org/community/dev...er-forums.html mozillazine forums mozilla news and development help mozilla (testing and development) mozdev.org mozillazine planet mozilla spread firefox standards communities get involved in grass-roots web standards evangelism efforts through these groups: the web standards project, a grassroots coalition fighting for standards maccaws, making a commercial case for web standards a list apart, for people who make websites mozilla technology evangelism, get involved with mozilla evangelism you may also find helpful information on th...
XML in Mozilla - Archive of obsolete content
mozilla will read internal (dtd) subsets, and in special circumstances external dtds as explained above and will use this information to recognize id type attributes, default attribute values, and general entities.
Unix stub installer - Archive of obsolete content
read the top of the packages-unix file for it's simple syntax and semantics.
Windows stub installer - Archive of obsolete content
read the top of the packages-win file for it's simple syntax and semantics.
Windows Install - Archive of obsolete content
ent("insufficient disk space: " + dirpath); logcomment(" required : " + spacerequired + " k"); logcomment(" available: " + spaceavailable + " k"); return(false); } return(true); } function updatewinreg4ren8dot3() { var fprogram = getfolder("program"); var ftemp = getfolder("temporary"); //notes: // can't use a double backslash before subkey // - windows already puts it in.
dirCreate - Archive of obsolete content
description the input parameter is a filespecobject that you have already created with the install object's getfolder method.
execute - Archive of obsolete content
method of file object syntax int execute ( filespecobject executablefile, [string aparameters] ); parameters the execute method has the following parameters: executablefile a filespecobject representing the local file already on disk to be executed.
move - Archive of obsolete content
if the destination doesn't already exist a file name for the destination is assumed.
windowsGetShortName - Archive of obsolete content
if the path already conforms to 8.3, the return value is null.
execute - Archive of obsolete content
this means that in order to pass three command-line arguments (-c, -d, and -s) to the executable, you should format the args string as follows: err = file.execute(myfile, '"-c""-d""-s"', true); //technically, given the rules above, you could also pass the same //arguments with the following line, but the result is much less //readable: err = file.execute(myfile, "\"-c\"\"-d\"\"-s\"", true); also see the note about binaries on the macintosh platform in addfile.
getComponentFolder - Archive of obsolete content
returns an object representing the directory in which the component is installed, or null if the component could not be found or if subdirectory refers to a file that already exists.
getFolder - Archive of obsolete content
returns a filespecobject representing one of netscape's standard directories, or null in case of error or if subdirectory refers to a file that already exists.
WinProfile Object - Archive of obsolete content
the two methods of the winprofile object, getstring and writestring, allow you to read and write the data in the key/value pairs of a windows .ini file.
keyExists - Archive of obsolete content
method of winreg object syntax boolean keyexists ( string key); parameters the method has the following parameter: key a string representing the path to the key returns boolean value description if the user does not have read access to the given key, this will also return false.
valueExists - Archive of obsolete content
returns boolean value: true if the key exists and the user has read access to it, otherwise false.
Methods - Archive of obsolete content
keyexists returns whether the given key exists or is readable.
Installer Script - Archive of obsolete content
logcomment("plugins folder already exists"); 42.
A XUL Bestiary - Archive of obsolete content
the w3c has standardized on a particular dom and already has a candidate recommendation for an updated version.
cycler - Archive of obsolete content
this is used, for example, in a mail window, for a column that indicates that the message is read or unread with a small mark in the cell.
selected - Archive of obsolete content
this value is read-only.
textbox.label - Archive of obsolete content
« xul reference home label type: string if present and not empty, this will be exposed to screen readers through the label property.
value - 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.
visuallyselected - Archive of obsolete content
this value is read-only.
Attribute (XUL) - Archive of obsolete content
archcomplete onselect ontextcommand ontextentered ontextrevert ontextreverted onunload onwizardback onwizardcancel onwizardfinish onwizardnext open ordinal orient pack pageid pageincrement pagestep parent parsetype persist persistence phase pickertooltiptext placeholder popup position predicate preference preference-editable primary priority properties querytype readonly ref rel removeelement resizeafter resizebefore rows screenx screeny searchbutton searchsessions searchlabel selected selectedindex seltype setfocus showcaret showcommentcolumn showpopup size sizemode sizetopopup smoothscroll sort sortactive sortdirection sortresource sortresource2 spellcheck src state statedatasource statusbar statustext style subject subst...
findbar - Archive of obsolete content
findmode type: integer read only.
List of commands - Archive of obsolete content
crollpageup cmd_selectall cmd_switchdocumentdirection cmd_switchtextdirection cmd_textzoomenlarge cmd_textzoomreduce cmd_textzoomreset cmd_undo cmd_viewcomponentbar cmd_viewlinktoolbar cmd_viewlinktoolbar_false cmd_viewlinktoolbar_maybe cmd_viewlinktoolbar_true cmd_viewnavbar cmd_viewpersonaltoolbar cmd_viewtaskbar cmd_zoomwindow thanks for help of joe.user0 in compiling: http://readlist.com/lists/mozilla.or...l/3/15261.html .
addItemToSelection - Archive of obsolete content
« xul reference home additemtoselection( item ) return type: no return value selects the given item, without deselecting any other items that are already selected.
appendNotification - Archive of obsolete content
if another notification is already present with a higher priority, the new notification will be added behind it.
ensureElementIsVisible - Archive of obsolete content
if the item is already visible, no scrolling occurs.
ensureIndexIsVisible - Archive of obsolete content
if the item is already visible, no scrolling occurs.
ensureSelectedElementIsVisible - Archive of obsolete content
if the item is already visible, no scrolling occurs.
openWindow - Archive of obsolete content
if a window with that type is already open, this method will just switch that window to the front and focus it instead of opening another window.
reloadWithFlags - Archive of obsolete content
load_flags_bypass_cache: reload the page, ignoring if it is already in the cache.
Namespaces - Archive of obsolete content
it holds and allows disambiguation of items having the same name." if you are familiar with c++ namespaces, java packages, perl packages, or python module importing, you are already familiar with the namespace concept.
Extensions - Archive of obsolete content
you may wish to use these properties instead of determining the type yourself, as the code already handles various special and complex cases that would take a lot of code to deal with manually.
MenuItems - Archive of obsolete content
note that the checked state is updated before the command event fires, so if you use the menuitem's checked attribute within the command listener, it will already be in the new state.
Popup Guide - Archive of obsolete content
how popups are placed to read about how the position of a popup on screen is determined, and how to align popups to other elements, see positioning popups.
findMode - Archive of obsolete content
« xul reference findmode type: integer read only.
allNotifications - Archive of obsolete content
this property is read-only.
anchorNode - Archive of obsolete content
« xul reference anchornode type: nsidomelement this read-only property holds the dom node that was specified as the anchor when opening the popup.
browser.preferences - Archive of obsolete content
« xul reference preferences type: nsiprefservice this read-only property contains an nsipref object for getting and setting user preferences.
builderView - Archive of obsolete content
this property is read-only.
canGoBack - Archive of obsolete content
« xul reference 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 - Archive of obsolete content
« xul reference 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 - Archive of obsolete content
« xul reference contentdocument type: document this read-only property contains the document object in the element.
contentPrincipal - Archive of obsolete content
« xul reference contentprincipal type: nsiprincipal this read-only property contains the principal for the content loaded in the browser, which provides security context information.
contentTitle - Archive of obsolete content
« xul reference contenttitle type: string this read-only property contains the title of the document object in the browser.
contentView - Archive of obsolete content
this property is read-only.
contentViewerEdit - Archive of obsolete content
« xul reference contentvieweredit type: nsicontentvieweredit this read-only property contains the nsicontentvieweredit which handles clipboard operations on the document.
currentNotification - Archive of obsolete content
this property is read-only.
currentURI - Archive of obsolete content
« xul reference currenturi type: nsiuri this read-only property contains the currently loaded url.
dateLeadingZero - Archive of obsolete content
« xul reference dateleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the date when it is less than 10.
docShell - Archive of obsolete content
« xul reference docshell type: nsidocshell this read-only property contains the nsidocshell object for the document.
documentCharsetInfo - Archive of obsolete content
« xul reference documentcharsetinfo obsolete since gecko 12.0 type: nsidocumentcharsetinfo this read-only property contains the nsidocumentcharsetinfo object for the document which is used to handle which character set should be used to display the document.
editor - Archive of obsolete content
this property is read only.
hourLeadingZero - Archive of obsolete content
« xul reference hourleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the hour when it is less than 10.
inputField - Archive of obsolete content
this read only property holds a reference to this inner input element.
is24HourClock - Archive of obsolete content
« xul reference is24hourclock type: boolean a read only value indicating whether a 12-hour or 24-hour clock is used to display times.
itemCount - Archive of obsolete content
« xul reference itemcount type: integer read only property holding the number of child items.
locked - Archive of obsolete content
this property is read-only.
markupDocumentViewer - Archive of obsolete content
« xul reference markupdocumentviewer type: nsimarkupdocumentviewer this read-only property contains the nsimarkupdocumentviewer which is responsible for drawing the document.
menulist.inputField - Archive of obsolete content
this property is read only and applies to editable menulists only.
menupopup - Archive of obsolete content
this property is read-only.
minuteLeadingZero - Archive of obsolete content
« xul reference minuteleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the minute when it is less than 10.
monthLeadingZero - Archive of obsolete content
« xul reference monthleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the month when it is less than 10.
parentContainer - Archive of obsolete content
« xul reference parentcontainer type: menu element read only property that returns the containing menu element, or null if there isn't a containing menu.
popup - Archive of obsolete content
ArchiveMozillaXULPropertypopup
note: this property is readonly in thunderbird and seamonkey.
popupBoxObject - Archive of obsolete content
« xul reference popupboxobject type: nsipopupboxobject this read-only property holds the nsipopupboxobject that implements the popup.
scrollIncrement - Archive of obsolete content
« xul reference 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.
searchCount - Archive of obsolete content
this property is read only.
secondLeadingZero - Archive of obsolete content
« xul reference secondleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the second when it is less than 10.
securityUI - Archive of obsolete content
« xul reference securityui type: nsisecurebrowserui the read-only property holds an object which may be used to determine the security level of the loaded document.
selected - Archive of obsolete content
this property is read only.
selectedBrowser - Archive of obsolete content
« xul reference selectedbrowser type: browser element this read-only property returns the currently displayed browser element.
sessionHistory - Archive of obsolete content
« xul reference sessionhistory type: nsishistory this read-only property contains the nsishistory object which holds the session history.
spinButtons - Archive of obsolete content
« xul reference spinbuttons type: element the read-only property returns a reference to the spinbuttons element used by the number box.
state - Archive of obsolete content
ArchiveMozillaXULPropertystate
« xul reference state type: string this read only property indicates whether the popup is open or not.
textLength - Archive of obsolete content
this property is read-only.
textbox.label - Archive of obsolete content
the getter is mostly useful for screen readers.
tree.inputField - Archive of obsolete content
« xul reference home inputfield type: textbox element read-only property that holds the textbox that is used for editing.
triggerNode - Archive of obsolete content
« xul reference triggernode type: nsidomnode this read-only property holds the dom node that generated the event triggering the opening of the popup.
value - Archive of obsolete content
ArchiveMozillaXULPropertyvalue
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.
view - Archive of obsolete content
ArchiveMozillaXULPropertyview
trees built from rdf or those which use treeitems directly will already have a view.
webBrowserFind - Archive of obsolete content
« xul reference webbrowserfind type: nsiwebbrowserfind this read-only property contains an nsiwebbrowserfind object which can be used to search for text in the document.
webNavigation - Archive of obsolete content
« xul reference webnavigation type: nsiwebnavigation this read-only property contains the nsiwebnavigation object for the document.
webProgress - Archive of obsolete content
« xul reference webprogress type: nsiwebprogress this read-only property contains an nsiwebprogress object which is used to monitor the progress of a document loading.
yearLeadingZero - Archive of obsolete content
« xul reference yearleadingzero type: boolean a read only value indicating whether a leading zero should be displayed before the year when it is less than 1000.
Property - Archive of obsolete content
next nomatch notificationshidden object observes onfirstpage onlastpage open ordinal orient pack pagecount pageid pageincrement pageindex pagestep parentcontainer palette persist persistence placeholder pmindicator popup popupboxobject popupopen position predicate preferenceelements preferencepanes preferences priority radiogroup readonly readonly ref resource resultspopup scrollboxobject scrollincrement scrollheight scrollwidth searchbutton searchcount searchlabel searchparam searchsessions second secondleadingzero securityui selected selectedbrowser selectedcount selectedindex selecteditem selecteditems selectedpanel selectedtab selectionend selectionstart selstyle se...
Sorting and filtering a custom tree view - Archive of obsolete content
1 : -1; //if the column is passed and it's already sorted by that column, reverse sort if (column) { columnname = column.id; if (tree.getattribute("sortresource") == columnname) { order *= -1; } } else { columnname = tree.getattribute("sortresource"); } function columnsort(a, b) { if (prepareforcomparison(a[columnname]) > prepareforcomparison(b[columnname])) return 1 * order; if (prepareforcomparison(a[columnname]) < preparef...
Additional Navigation - Archive of obsolete content
here, the value of the ?start variable is already known for the potential result, so it will be filled in.
Attribute Substitution - Archive of obsolete content
however, for readability, you should restrict variable names to letters, numbers and perhaps hyphens to separate words.
Bindings - Archive of obsolete content
it has already determined, in this example, that three matches have been found.
Filtering - Archive of obsolete content
we'll use this method here since we've already seen examples of generating results from a container.
Result Generation - Archive of obsolete content
here we will use strings for the values so they are easier to read.
Things I've tried to do with XUL - Archive of obsolete content
from my reading of the code, just height="0" should work, but it doesn't seem to.
Code Samples - Archive of obsolete content
if the window already exists, this code just focusses it.
Custom toolbar button - Archive of obsolete content
when you have completed all the steps, you will have a structure like this in your profile directory: the profile directory and the extensions directory already exist.
Tree Widget Changes - Archive of obsolete content
for the most part these objects are readonly; you can modify the columns by just adjusting the treecol attributes directly.
Accesskey display rules - Archive of obsolete content
because the apis are already frozen.
Adding Labels and Images - Archive of obsolete content
this association is also important for accessibility, so that screen readers read aloud the label for the control as the user tabs to it.
Cross Package Overlays - Archive of obsolete content
<rdf:seq about="chrome://navigator/content/navigator.xul"> <rdf:li>chrome://findfile/content/foverlay.xul</rdf:li> </rdf:seq> mozilla reads this information and builds a list of overlays that are applied to other windows.
Features of a Window - Archive of obsolete content
« previousnext » we've already seen some features of windows.
Focus and Selection - Archive of obsolete content
also, the input event would not fire if a letter key was pressed and there were already more characters than will fit in the textbox.
Introduction - Archive of obsolete content
however, these types of applications do not have security restrictions placed on them, so they may access local files and read and write preferences, for example.
Keyboard Shortcuts - Archive of obsolete content
we've already seen in the section on menus that we can define an attribute called accesskey which specifies the key which a user can press to activate the menu or menu item.
Localization - Archive of obsolete content
you should already be familiar with entities if you have written html.
Manifest Files - Archive of obsolete content
note: starting in gecko 2.0, only the file named chrome.manifest is read automatically; if you need to read multiple manifest files, use the manifest command in that file to import additional manifests.
Manipulating Lists - Archive of obsolete content
the ensureindexisvisible() method is similar in that it also scrolls to show a row, but this method does not scroll if the item is already visible.
More Event Handlers - Archive of obsolete content
we already saw the event's target property in the last section.
More Wizards - Archive of obsolete content
remember to return false in this case, because you have already changed the page yourself.
Open and Save Dialogs - Archive of obsolete content
once the user selects a file or folder, it can be read from or written to.
Simple Menu Bars - Archive of obsolete content
we've already seen part of how to make menus using the menulist.
Stacks and Decks - Archive of obsolete content
we've already seen that buttons may contain other things besides the default.
Templates - Archive of obsolete content
if you don't understand this, try re-reading the last part of the previous section.
The Chrome URL - Archive of obsolete content
the packages included with mozilla will already be installed but you can register your own.
XBL Example - Archive of obsolete content
the value attribute is changed to read '1 of 3' or something similar.
XPCOM Examples - Archive of obsolete content
you might skip this example for the time being, except when you have already had that knowledge.
XPCOM Interfaces - Archive of obsolete content
it has one function supplied to javascript, queryinterface(), which we have already seen.
XUL Parser in Python/source - Archive of obsolete content
t class xulparser(xmllib.xmlparser): def unknown_starttag(self, t, a): name = strip(t) if name not in el_list: el_list[name] = {} for attr,val in a.items(): el_list[name][strip(attr)] = strip(val) def syntax_error(self, message): pass p = xulparser() cmd = 'dir /s /b *.xul' chrome_dir = 'c:\program files\netscape\netscape 6\chrome' os.chdir(chrome_dir) files = os.popen(cmd).readlines() for file in files: file = file.strip() print '** ' + file + ' **' data = open(file).read() p.feed(data) w.write('<html><h3>periodic table of xul elements</h3>') w.write('<table><style>.head {font-weight: bold; background-color: lightgrey;}</style>') elements = el_list.keys() elements.sort() for item in elements: w.write('<tr><td class="head">' + item + '</td></tr>\n') for a in el_l...
XUL Coding Style Guidelines - Archive of obsolete content
to make xul files easy to read and maintain, localization friendly, and portable across user agents, we need to have a set of coding style guidelines to ensure our objectives are achievable.
XUL Event Propagation - Archive of obsolete content
<menupopup> </menu> </box> adding an event listener in order to take advantage of event capturing (or event bubbling with elements that do not already have event listeners), you must add an event listener to the element that wants to capture events taking place below it.
label - Archive of obsolete content
ArchiveMozillaXULlabel
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.
preferences - Archive of obsolete content
</preferences> attributes these ought to be readonly; three of these could be merged into a single member attribute nsiprefservice service; the preferences service.
progressmeter - Archive of obsolete content
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.
stringbundle - Archive of obsolete content
for example, the following defines two properties: message.displayerror=an error occured trying to display this message message.namealreadyused=the name %s is already being used by another account.
toolbar - Archive of obsolete content
this means that the palette now only contains items not already in the toolbar.
treecell - 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.
XULRunner 1.8.0.1 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
XULRunner 1.8.0.4 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
XULRunner 1.9.1 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
XULRunner 1.9.2 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
XULRunner 1.9 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
XULRunner 2.0 Release Notes - Archive of obsolete content
please search to make sure that your bug has not already been reported.
Building XULRunner - Archive of obsolete content
please read and follow the general build documentation for instructions on how to get sources and set up build prerequisites.
Building XULRunner with Python - Archive of obsolete content
you should also read the the developer documentation on source code and building as wells as pyxpcom xulrunner with python promises to be a good platform for accessibility projects and both jambu alternative input and the iaccessible2 test tool are using it.
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.
XULRunner Hall of Fame - Archive of obsolete content
azardi free win/mac/linux epub 2/epub 3 desktop reader using html5 and latest css features of gecko for interactive e-books.
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.onreadystatechange = 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 already 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 already 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.
Mozprofile - Archive of obsolete content
please see the maintained documentation of mozprofile at http://mozbase.readthedocs.org/en/latest/mozprofile.html.
reftest opportunities files - Archive of obsolete content
note that bugs with the testcase keyword already have one or more testcases attached to the bug that can be used when creating the reftest.
Format - Archive of obsolete content
the survey questions and feedback are included in the thread.
2006-11-22 - Archive of obsolete content
read the article here meetings none ...
mozilla-dev-accessibility - Archive of obsolete content
weekly summaries 2006-10-06 2006-11-10 frequently asked questions read frequently asked questions ...
2006-10-13 - Archive of obsolete content
user questions about a open/saveas bug that already 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.
2006-10-20 - Archive of obsolete content
ie7 rss reader better - say reviewers a discussion revolving around the quality of rss readers in ie7, firefox and other assorted browsers.
2006-11-10 - Archive of obsolete content
this is already addressed in bug 244030.
2006-11-17 - Archive of obsolete content
however, david bienvenu stated that the options already exist in tb 2.0, just that it is a hidden.
2006-11-24 - Archive of obsolete content
additional links: bug 22687 and original newsgroup thread.
2006-09-29 - Archive of obsolete content
he has already tried archiving the changed files but unfortunately this does not work with a static build because the .exe files change every time.
2006-10-20 - Archive of obsolete content
he has already "studied" the makefiles but has had no success in achieving his goal.
2006-10-13 - Archive of obsolete content
discussions mozillatranslator 5.13 rfes mozillatranslator 5.13 is ready to be released in a few weeks.
2006-10-20 - Archive of obsolete content
uploading language packs to amo benjamin smedberg is ready to upload languange packs from here to addons.mozilla.org.
2006-10-27 - Archive of obsolete content
summary: mozilla.dev.l10n - october 27, 2006 announcements drafts of eulas for several lanugages available for review drafts of eulas for several lanugages available for review final ff release already announced a french site has already announced final ff 2.0 and gives download links on its own site.
2006-11-10 - Archive of obsolete content
trunk / 1_8 for kurdish firefox the firefox translations of the kurdish are only in trunk translating the firefox privacy policy the final and approved en-us version of privacy policy is available here and ready for localization team to translate.
2006-11-3 - Archive of obsolete content
check thread for complete details.
2006-12-01 - Archive of obsolete content
details in the thread.
2006-12-08 - Archive of obsolete content
seamonkey 1.1b es-es language and region packs language and region packs for seamonkey 1.1b is ready for downloading.
2006-07-17 - Archive of obsolete content
the survey questions and feedback are included in the thread.
2006-10-20 - Archive of obsolete content
help required designing new home for quality.mozilla.org - talented web designers and/or artists interested in helping the design for quality.mozilla.org please read this posting.
JS-Engine FAQ - Archive of obsolete content
newly created threads in js from mozilla_1_8_branch causes to hang in windows patch from bug 351602 should fix the problem.
2006-09-06 - Archive of obsolete content
threading in xpcom rules on threading in xpcom or to firefox extensions.
2006-09-30 - Archive of obsolete content
developers should use this sample instead: http://developer.mozilla.org/en/docs/xpcom_glue discussions dynamic load overlay a short discussion about the possibilities of loading and unloading xul overlay runtime reading binary data from file discusses about the code to read binary data from file how to build xpcom component on mac os x discusses about the make file code used to build xpcom components on mac os x successfully meetings none during this week.
2006-11-17 - Archive of obsolete content
for a summary of the changes and workarounds, read nickolay's post in the mozilla.dev.tech.xul newsgroup.
External resources for plugin creation - Archive of obsolete content
feature highlights include thread safety checks, unicode support (with std::wstring), activex support, built-in drawing model negotiation for mac, automatic type conversion (including javascript arrays and objects), advanced security features, and more.
NPAnyCallbackStruct - Archive of obsolete content
at the time the plug-in is called, the browser has already opened the file and written postscript for other parts of the page.
NPN_PostURL - Archive of obsolete content
npn_geturl reads data from the url and either displays it in the target window or delivers it to the plug-in.
NPN_ReloadPlugins - Archive of obsolete content
description npn_reloadplugins() reads the plugins directory for the current platform and reinstalls all of the plug-ins it finds there.
NPN_SetValue - Archive of obsolete content
the browser code reads this parameter as follows (nppvpluginwindowbool as an example): nperror np_export _setvalue(npp npp, nppvariable variable, void *value) { ...
NPN_Write - Archive of obsolete content
*/ err = npn_destroystream(instance, stream, npres_done); see also npp_newstream() npp_destroystream() npp_read() npstream npp ...
NPP_StreamAsFile - Archive of obsolete content
see also npp_newstream, npp_write, npp_writeready, npstream, npp ...
NPPrintCallbackStruct - Archive of obsolete content
at the time the plug-in is called, the browser has already opened the file and written postscript for other parts of the page.
NPAPI plug-in side API - Archive of obsolete content
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_writeready ...
Shipping a plugin as a Toolkit bundle - Archive of obsolete content
this allows a remote update file to be read periodically and an updated version of the plugin offered to the user or to mark the plugin as compatible with a wider range of applications.
The First Install Problem - Archive of obsolete content
unlike uuids, plids are human readable, and not lengthy "garbled" strings.
Writing a plugin for Mac OS X - Archive of obsolete content
before you go on reading this article, you may wish to grab the sample code located here, as it will be referenced during this tutorial.
XEmbed Extension for Mozilla Plugins - Archive of obsolete content
it's recommended that you have a look at the gecko plugin api reference since this document will include information that assumes that you are already familiar with the way that plugins are currently hosted as well as the apis.
Plugins - Archive of obsolete content
for example, the adobe reader plugin lets the user open pdf files directly inside the browser, and the quicktime and realplayer plugins are used to play special format videos in a web page.
Why RSS Slash is Popular - Counting Your Comments - Archive of obsolete content
although not necessary, people also often use other rss modules to get at (and read) the comments (since rss does not currently provide facilities for this either).
Why Well-Formed Web RSS Module is Popular - Syndicating Your Comments - Archive of obsolete content
sure rss has the <comments> element, but it points to a html page that isn't machine readable.
Proposal - Archive of obsolete content
the transform must already exist on the machine running newsgator; stylesheets will not be downloaded or installed automatically.
Encryption and Decryption - Archive of obsolete content
the scheme shown in figure 2 lets you freely distribute a public key, and only you will be able to read data encrypted using this key.
TCP/IP Security - Archive of obsolete content
ssl can ensure that data cannot be read by unauthorized parties.
Threats - Archive of obsolete content
this kind of malware is widespread on wordpress websites.
Vulnerabilities - Archive of obsolete content
one vulnerability might provide root-level access to a system, while another vulnerability might only permit read access to an insignificant file.
Table Reflow Internals - Archive of obsolete content
nt=445 block 03017e08 d=1695,300 cell 03017da8 d=1755,360 cell 0301a8cc r=2 a=2625,uc c=2565,uc cnt=446 block 0301a92c r=2 a=2565,uc c=2565,uc cnt=447 block 0301a92c d=2565,300 cell 0301a8cc d=2625,360 row 03017c08 d=4470,360 rowg 03017a7c d=4470,360 tbl 030178c4 d=4500,450 tblo 030176cc d=4500,450 table reflow optimizations if the table is already balanced, pass 1 constrains the width (like a normal pass 2) based on the current column widths.
Theme changes in Firefox 3 - Archive of obsolete content
it was already done this way in winstripe.
Updating an extension to support multiple Mozilla applications - Archive of obsolete content
if you haven't already 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 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.
Developing cross-browser and cross-platform pages - Archive of obsolete content
// bad sample if (navigator.appversion.charat(0) == "8") { if (navigator.appname == "netscape") { isns8 = true; alert("netscape 8"); }; } else if (navigator.appversion.indexof("msie") != -1) { isie = true; alert("internet explorer"); }; while this kind of checking in the above code can work in a crude sense, sharp readers may wonder what happens when internet explorer 8 is released or when an opera 8.x user visits the page or even when an user with any non-netscape browser starting with a "8" character in the appversion string visits that page.
Browser Detection and Cross Browser Support - Archive of obsolete content
using javascript objects to determine vendor/version as we already discussed, a common approach in the past was to use objects to classify browsers by vendor/version.
Displaying notifications (deprecated) - Archive of obsolete content
to see how to use the standard api, please read: using web notifications mobile only in gecko 2.0 available only in firefox mobile as of gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) firefox offers support for "desktop notifications"; these are notifications that are displayed to the user outside the context of the web content, using the standard notification system provided by the operating system.
E4X for templating - Archive of obsolete content
while it may be obvious after a study of the basics of e4x that it can be used for this purpose, if one adds a few common purpose functions (especially along with the convenience of javascript 1.8 expression closures), the templates can function more dynamically, offering the power and readability of templating languages such as smarty for php (though admittedly without the currently wider cross-browser support of xslt or the strictly-xml approach of phptal or seethrough templating).
E4X - Archive of obsolete content
ArchiveWebE4X
note: in gecko 1.8 based browsers such as firefox 1.5, e4x is already partially enabled for web page authors.
Array comprehensions - Archive of obsolete content
for future-facing usages, consider using array.prototype.map, array.prototype.filter, arrow functions, and spread syntax.
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 unreadable 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.isready) { 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.isready) { 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.isready) { 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.isready) { 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.isready){ 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 already loaded.
VBArray - Archive of obsolete content
remarks vbarrays are read-only, and cannot be created directly.
New in JavaScript 1.8.5 - Archive of obsolete content
global objects made read only: the nan, infinity, and undefined global objects have been made read only, per the ecmascript 5 specification.
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) spread operator for arrays (firefox 16) use symbol.iterator property (firefox 36) spread 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 thread) (building on npapi?), and as of java 6 update 12, extensions as well as applets can make use of this restored api.
Server-Side JavaScript - Archive of obsolete content
here's a radical idea: use one language to write entire web apps -- the same language which billions of web pages already use, every day.
Styling the Amazing Netscape Fish Cam Page - Archive of obsolete content
i hope that our little cruise through this aspect of the redesign has gotten you hooked on the idea of using simple markup and css to create interesting effects, if you weren't already.
background-size - Archive of obsolete content
it's hard to get reliable information about its css support without having this browser (read: multiple versions of this browser) installed.
XForms Custom Controls Examples - Archive of obsolete content
> </binding> output showing xhtml <binding id="output-xhtml" extends="chrome://xforms/content/xforms-xhtml.xml#xformswidget-output"> <content> <children includes="label"/> <xhtml:div class="xf-value" anonid="content"></xhtml:div> <children/> </content> <implementation implements="nsixformsuiwidget"> <field name="_domparser">null</field> <property name="domparser" readonly="true"> <getter> if (!this._domparser) this._domparser = new domparser(); return this._domparser; </getter> </property> <method name="refresh"> <body> // get new value, parse, and import it.
Developing Mozilla XForms - Archive of obsolete content
then start firefox out of the build directory: cd obj-*/dist/firefox ./firefox -no-remote -jsconsole -p yourprofilename the xforms extension that was built together with firefox should be already installed.
Troubleshooting XForms Forms - Archive of obsolete content
read here for more information.
XForms Output Element - Archive of obsolete content
introduction serves to show the instance data that the element is bound to in a read-only manner (see the spec).
Mozilla XForms User Interface - Archive of obsolete content
output serves to show the instance data that the element is bound to in a read-only manner (see the spec).
Using XForms and PHP - Archive of obsolete content
it is a very common error to read code with include(), or require(), functions, or another file access function, and have spaces or empty lines that are output before header() is called.
Choosing Standards Compliance Over Proprietary Practices - Archive of obsolete content
the development engineers can shift more readily between projects with little to no downtime.
Mozilla's DOCTYPE sniffing - Archive of obsolete content
quirks mode the following trigger quirks mode (this list needs to be comprehensive to ensure that pages already existing on the web trigger quirks mode): the following sites have been useful in preparing this list: w3c html validator, htmlhelp html validator.
Popup Window Controls - Archive of obsolete content
learn how to detect popup controls, how to ask your readers to enable popups for your site and how to get the benefits of popup windows without using popup windows.
XUL Parser in Python - Archive of obsolete content
or, since the dictionary is already storing the values of all the attributes it finds, you can write the values of a particular attribute (e.g., id) to the results file by checking the attribute in sys.argv[1]: for attr in a.keys(): if strip(attr) == sys.argv[1]: el_list[name][strip(attr)] = strip(a[attr]) and writing thevalues to the html results file instead of thekeys: for item in elements: w.write('<tr><td class="...
Examples - Game development
bananabread a multiplayer, 3d first-person shooter game developed using emscripten, webgl, and webrtc.
Introduction to game development for the Web - Game development
web workers workers give you the ability to spawn background threads running their own javascript code, to take advantage of modern, multi-core processors.
Publishing games - Game development
game monetization is essential to anyone who considers their game development work a serious endeavour on the path to becoming an independent game developer able to make a living, so read on and see what your options are.
Bounding volume collision detection with THREE.js - 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.
Explaining basic 3D theory - Game development
read the camera paragraph in the three.js article to learn about those.
Async scripts for asm.js - Game development
in gecko, async compilation allows the javascript engine to compile the asm.js off the main thread when the game is loading and cache the generated machine code so that the game doesn't need to be compiled on subsequent loads (starting in firefox 28).
Desktop mouse and keyboard controls - Game development
that way, if you already implemented the buttons as shown in the mobile touch controls article, it will work out of the box on the desktop too: var buttonenclave = this.add.button(10, 10, 'logo-enclave', this.clickenclave, this); the button will be placed ten pixels from the top left corner of the screen, use the logo-enclave image, and will execute the clickenclave() function when clicked.
Implementing game control mechanisms - Game development
it will be explained in the given articles themselves below, but you can play with it already, and use the code however you want for learning purposes.
Efficient animation for web games - Game development
though it is possibly overkill for simple games, you may also want to consider using web worker threads.
Square tilemaps implementation: Static 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.
Techniques for game development - Game development
using async scripts for asm.js especially when creating medium to large-sized games, async scripts are an essential technique to take advantage of, so that your game's javascript can be compiled off the main thread and be cached for future game running, resulting in a significant performance improvement for your users.
Bounce off the walls - Game development
the ball should bounce right after if touches the wall, not when it's already halfway in the wall, so let's adjust our statements a bit to include that.
Finishing up - Game development
compare your code that's all — the final version of the game is ready and set to go !
Mouse controls - Game development
we have already added keyboard controls, but we could easily add mouse controls too.
Move the ball - Game development
you already know how to draw a ball from working through the previous article, so now let's make it move.
2D breakout game using pure JavaScript - Game development
to get the most out of this series of articles you should already have basic to intermediate javascript knowledge.
Collision detection - Game development
compare your code you can check the finished code for this lesson in the live demo below, and play with it to understand better how it works: next steps we can hit the bricks and remove them, which is a nice addition to the gameplay already.
Extra lives - Game development
defining the new text labels defining the texts look like something we already did in the score lesson.
Load the assets and print them on screen - Game development
that's it — if you load your index.html file you will see the image already loaded and rendered on the canvas!
Player paddle and controls - Game development
update the previous line as follows: paddle.x = game.input.x || game.world.width*0.5; if you haven't already done so, reload your index.html and try it out!
Visual-js game engine - Game development
3) please read the following terms and conditions before using this application: disclaimer of warranty 'visual js' is provided "as-is" and without warranty of any kind, express, implied or otherwise, including without limitation, any warranty of merchantability or fitness for a particular purpose.
Plug-in Development Overview - Gecko Plugin API Reference
you can use these netscape methods: to identify the browser in which your plug-in is displayed: use the npn_useragent method to read this information.
Asynchronous - MDN Web Docs Glossary: Definitions of Web-related terms
for humans, e-mail is an asynchronous communication method; the sender sends an email and the recipient will read and reply to the message when it's convenient to do so, rather than doing so at once.
CRUD - MDN Web Docs Glossary: Definitions of Web-related terms
crud (create, read, update, delete) is an acronym for ways one can operate on stored data.
CSS Object Model (CSSOM) - MDN Web Docs Glossary: Definitions of Web-related terms
it allows users to read and modify the css style dynamically.
CSS preprocessor - MDN Web Docs Glossary: Definitions of Web-related terms
these features make the css structure more readable and easier to maintain.
Cipher - MDN Web Docs Glossary: Definitions of Web-related terms
in cryptography, a cipher is an algorithm that can encode cleartext to make it unreadable, and to decode it back.
Constant - MDN Web Docs Glossary: Definitions of Web-related terms
with variables, on the other hand, the programmer can assign a new value to a variable name already in use.
Control flow - MDN Web Docs Glossary: Definitions of Web-related terms
control flow means that when you read a script, you must not only read from start to finish but also look at program structure and how it affects order of execution.
Cross Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items align-self flex-wrap flex-direction flex further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Deserialization - MDN Web Docs Glossary: Definitions of Web-related terms
that has been transferred over a network, or stored in a data store) is translated into a readable object or other data structure.
Distributed Denial of Service - MDN Web Docs Glossary: Definitions of Web-related terms
the united states computer emergency readiness team (us-cert) defines symptoms of denial-of-service attacks to include: unusually slow network performance (opening files or accessing websites) unavailability of a particular website inability to access any website dramatic increase in the number of spam emails received—(this type of dos attack is considered an email bomb) disconnection of a wireless or wired internet connection ...
Encryption - MDN Web Docs Glossary: Definitions of Web-related terms
a ciphertext is intended to be unreadable by unauthorized readers.
First input delay - MDN Web Docs Glossary: Definitions of Web-related terms
the time between when content is painted to the page and when all the functionality becomes responsive to human interaction often varies based on the the size and complexity of the javascript needing to be downloaded, parsed, and executed on the main thread, and on the device speed or lack thereof (think low end mobile devices).
First interactive - MDN Web Docs Glossary: Definitions of Web-related terms
these metrics have been proposed by the web incubator community group and are already being used in various tools.
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 ...
Flex Container - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-content align-items flex flex-direction flex-flow flex-wrap justify-content further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: mastering wrapping of flex items ...
Flex Item - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference align-self flex-basis flex-grow flex-shrink order further reading css flexbox guide: basic concepts of flexbox css flexbox guide: ordering flex items css flexbox guide: controlling ratios of flex items along the main axis ...
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 ...
GPL - MDN Web Docs Glossary: Definitions of Web-related terms
users of a gpl-licensed program are granted the freedom to use it, read the source code, modify it and redistribute the changes they made, provided they redistribute the program (modified or unmodified) under the same license.
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 Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more further reading css grid layout guide: basic concepts of grid layout css grid layout guide: box alignment in grid layout css grid layout guide: grids, logical values and writing modes ...
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 Column - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-columns grid-auto-columns grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
Grid container - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-columns grid-template-rows grid-auto-columns grid-auto-rows grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
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 ...
Grid Row - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-template-rows grid-auto-rows grid grid-template further reading css grid layout guide: basic concepts of grid layout ...
Guard - MDN Web Docs Glossary: Definitions of Web-related terms
for more information, read fetch basic concepts: guard.
Gutters - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference grid-column-gap grid-row-gap grid-gap further reading css grid layout guide: basic concepts of grid layout definition of gutters in the css grid layout specification ...
I18N - MDN Web Docs Glossary: Definitions of Web-related terms
i18n (from "internationalization", a 20-letter word) is the best practice that enables products or services to be readily adapted to any target culture.
Immutable - MDN Web Docs Glossary: Definitions of Web-related terms
an object can be immutable for various reasons, for example: to improve performance (no planning for the object's future changes) to reduce memory use (make object references instead of cloning the whole object) thread-safety (multiple threads can reference the same object without interfering with one other) learn more general knowledge immutable on wikipedia ...
Jank - MDN Web Docs Glossary: Definitions of Web-related terms
jank refers to sluggishness in a user interface, usually caused by executing long tasks on the main thread, blocking rendering, or expending too much processor power on background processes.
Java - MDN Web Docs Glossary: Definitions of Web-related terms
it comes with a large library of readily usable functions, the java software development kit (sdk).
Long task - MDN Web Docs Glossary: Definitions of Web-related terms
it is an uninterrupted period where the main ui thread is busy for 50 ms or longer.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
— and what list items are already present.
Main Axis - MDN Web Docs Glossary: Definitions of Web-related terms
learn more property reference flex-basis flex-direction flex-grow flex-shrink justify-content flex further reading css flexbox guide: basic concepts of flexbox css flexbox guide: aligning items in a flex container css flexbox guide: controlling ratios of flex items along the main axis ...
Network throttling - MDN Web Docs Glossary: Definitions of Web-related terms
by emulating your user's experience via network throttling, you can more readily identify and fix load time issues.
Normative - MDN Web Docs Glossary: Definitions of Web-related terms
specifications might also contain sections that are marked as non-normative or informative, which means those are provided there for the purpose of helping the reader understand the specifications better or to showcase an example or best practice, which need not be followed as a rule.
Page prediction - MDN Web Docs Glossary: Definitions of Web-related terms
also, pre-loaded websites and embedded content can set and read their cookies as if they were visited even if they weren't.
Plaintext - MDN Web Docs Glossary: Definitions of Web-related terms
it is frequently used interchangeably with the term cleartext, which more loosely refers to any information, such as a text document, image, etc., that has not been encrypted and can be read by a human or computer without additional processing.
Prefetch - MDN Web Docs Glossary: Definitions of Web-related terms
if the user decides to click on one of the links, then the page will be rendered instantly as the content has already been downloaded.
Primitive - MDN Web Docs Glossary: Definitions of Web-related terms
if so, read how this code runs: for both the addtwo and addtwo_v2 functions calls, javascript looks up the value for the identifier foo.
Pseudo-class - MDN Web Docs Glossary: Definitions of Web-related terms
for example, the selector a:visited applies styles only to links that the user has already followed.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
as such, the type dompoint (or dompointreadonly) is used to store quaternions.
RAIL - MDN Web Docs Glossary: Definitions of Web-related terms
idle when using the main javascript thread, work in chunks for less than 50ms to free up the thread for user interactions.
RSS - MDN Web Docs Glossary: Definitions of Web-related terms
when you subscribe to a website's rss feed, the website sends information and updates to your rss reader in an rss document called a feed, so you don't need to check all your favorite websites manually.
RTF - MDN Web Docs Glossary: Definitions of Web-related terms
however, many word-processing programs can still read and write rtf.
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 ...
Shim - MDN Web Docs Glossary: Definitions of Web-related terms
a shim is a piece of code used to correct the behavior of code that already exists, usually by adding new api that works around the problem.
State machine - MDN Web Docs Glossary: Definitions of Web-related terms
a state machine reads a set of inputs and changes to a different state based on those inputs.
Symbol - MDN Web Docs Glossary: Definitions of Web-related terms
they are listed in the specification in the well-known symbols table: symbol.hasinstance symbol.isconcatspreadable symbol.iterator symbol.toprimitive …and so on.
Syntax - MDN Web Docs Glossary: Definitions of Web-related terms
frameworks are said to have a "clean" syntax if they produce simple, readable, concise results.
Tree shaking - MDN Web Docs Glossary: Definitions of Web-related terms
this is important for preparing code that is production ready, for example with clean structures and minimal file size.
UTF-8 - MDN Web Docs Glossary: Definitions of Web-related terms
the first 128 utf-8 characters precisely match the first 128 ascii characters (numbered 0-127), meaning that existing ascii text is already valid utf-8.
Web performance - MDN Web Docs Glossary: Definitions of Web-related terms
it is the frames per second and times the main thread is not available for user interactions.
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 universalbrowserread'); // 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.
Test your skills: CSS and JavaScript accessibility - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: HTML accessibility - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Advanced styling effects - Learn web development
note: there is another item that can be set in the box-shadow value — another length value can be optionally set just before the color value, which is a spread radius.
Test your skills: The Cascade - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Debugging CSS - Learn web development
if you need to ask for help, they will show the person helping you what you have already tried.
Images, media, and form elements - Learn web development
sizing images as you already know from following these lessons, everything in css generates a box.
Test your skills: Images and Form elements - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Overflow - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Overflowing content - Learn web development
let's read on!
Attribute selectors - Learn web development
next steps now we are done with attribute selectors, you can continue on to the next article and read about pseudo-class and pseudo-element selectors.
Test your skills: The Box Model - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Selectors - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: sizing - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: backgrounds and borders - Learn web development
details of what you would like us to do — for example what you have already tried, if you are stuck and need help,.
Test your skills: values and units - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Writing Modes and Logical Properties - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Flexbox - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: floats - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Multicol - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Multiple-column layout - Learn web development
sometimes, this breaking will happen in places that lead to a poor reading experience.
Test your skills: position - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Using your new knowledge - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
CSS first steps - Learn web development
we have already met many of the concepts discussed here; you can return to this one to recap if you find any later concepts confusing.
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
the use of such properties on production websites is not recommended — they have already created a huge web compatibility mess.
Styling text - Learn web development
get started prerequisites before starting this module, you should already have basic familiarity with html, as discussed in the introduction to html module, and be comfortable with css fundamentals, as discussed in introduction to css.
Learn to style HTML using CSS - Learn web development
css layout at this point we've already looked at css fundamentals, how to style text, and how to style and manipulate the boxes that your content sits inside.
How do you make sure your website works properly? - Learn web development
but we can already note it would have been better to use a cdn.
What HTML features promote accessibility? - Learn web development
you might want to allow someone to jump over a plethora of navigation links, for example, so they can just read a page’s main content rather than cycle through all of the links.
How do you host your website on Google App Engine? - Learn web development
run the following in the command line to select your project: gcloud config set project gaesamplesite then run the following command to go to your app's directory: cd sample-app you are now ready to deploy your application, i.e.
What is the difference between webpage, website, web server, and search engine? - Learn web development
however, there are a few basic terms you need to understand at the outset, since you'll hear these expressions all the time as you read on.
How do I use GitHub Pages? - Learn web development
go to the github pages section again, and you should see a line of the form "your site is ready to be published at https://xxxxxx." if you click on this url, you should go to a live version of your example, provided the home page is called index.html — it goes to this entry point by default.
Common questions - Learn web development
they provide a human-readable address for any web server available on the internet.
CSS property compatibility table for form controls - Learn web development
how to read the tables values for each property, there are four possible values: yes there's reasonably consistent support for the property across browsers.
Styling web forms - Learn web development
we already looked at some simple form styling in your first form, and the css building blocks module contains some useful form styling essentials too.
Test your skills: Basic controls - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Form structure - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Form validation - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: HTML5 controls - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Other controls - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Styling basics - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: HTML text basics - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Links - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Multimedia and embedding - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
HTML Tables - Learn web development
LearnHTMLTables
get started prerequisites before starting this module, you should already have covered the basics of html — see introduction to html.
Choosing the right approach - Learn web development
xhr.responsetype = type; xhr.onload = function() { callback(xhr.response); }; xhr.send(); } function displayimage(blob) { let objecturl = url.createobjecturl(blob); let image = document.createelement('img'); image.src = objecturl; document.body.appendchild(image); } loadasset('coffee.jpg', 'blob', displayimage); pitfalls nested callbacks can be cumbersome and hard to read (i.e.
Asynchronous JavaScript - Learn web development
this makes chaining promises simpler and easier to read.
Test your skills: Conditionals - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Events - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Functions - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Loops - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
JavaScript building blocks - Learn web development
you've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly.
Test your skills: Arrays - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: variables - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
JavaScript First Steps - Learn web development
storing the information you need — variables 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.
Solve common problems in your JavaScript code - Learn web development
json how do you structure json data, and read it from javascript?
Inheritance in JavaScript - Learn web development
in this example, we've used template literals rather than string concatenation to make the code easier to read.
Working with JSON - Learn web development
even though it closely resembles javascript object literal syntax, it can be used independently from javascript, and many programming environments feature the ability to read (parse) and generate json.
Object-oriented JavaScript for beginners - Learn web development
note that this set of tests relies on some of the knowledge taught in the next two articles, so you might want to read them first before you try the tests.
Object building practice - Learn web development
last of all, we use the fill() method, which basically states "finish drawing the path we started with beginpath(), and fill the area it takes up with the color we specified earlier in fillstyle." you can start testing your object out already.
Test your skills: JSON - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Object-oriented JavaScript - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Test your skills: Object basics - Learn web development
details of what you have already tried, and what you would like us to do, e.g.
Introducing JavaScript objects - Learn web development
guides object basics in the first article looking at javascript objects, we'll look at fundamental javascript object syntax, and revisit some javascript features we've already looked at earlier on in the course, reiterating the fact that many of the features you've already dealt with are in fact objects.
JavaScript — Dynamic client-side scripting - Learn web development
you've seen this stuff already in the course, but only in passing — here we'll discuss it all explicitly.
CSS performance optimization - Learn web development
to improve performance, the node being animated can be moved off the main thread and onto the gpu.
Measuring performance - Learn web development
this is a good start for getting an idea about what you are already doing well and what could be improved.
JavaScript performance - Learn web development
but javascript can also consume the main thread, the cpu, and the battery.
Multimedia: video - Learn web development
we have already taken a look at optimizing images.
The "why" of web performance - Learn web development
for example, this might be making a purchase, reading an article, or subscribing to a newsletter.
Properly configuring server MIME types - Learn web development
if your content was created using a vendor's software application, read the vendor's documentation to see what mime types should be reported for different media types.
Using Vue computed properties - Learn web development
if we have 2 of 5 items completed in our to-do list, our summary could read "3 items completed out of 5".
Vue conditional rendering: editing existing todos - Learn web development
ed; -moz-osx-font-smoothing: grayscale; color: #0b0c0c; display: block; margin-bottom: 5px; } input { display: inline-block; margin-top: 0.4rem; width: 100%; min-height: 4.4rem; padding: 0.4rem 0.8rem; border: 2px solid #565656; } form { display: flex; flex-direction: row; flex-wrap: wrap; } form > * { flex: 0 0 100%; } </style> note: walk through the above code then read the below description to make sure you understand everything the component is doing before moving on.
Adding a new todo form: Vue events, methods, and models - Learn web development
since name is already being trimmed by the .trim directive, we only need to test for the empty string.
Git and GitHub - Learn web development
if you haven't already got one, sign up now using the provided link.
Tools and testing - Learn web development
once you've started to become comfortable programming with core web technologies (like html, css, and javascript), and you start to get more experience, read more resources, and learn more tips and tricks, you'll start to come across all kind of tools, from javascript frameworks, to testing and automation tools, and more besides.
ChromeWorkers and the Chrome worker loader
that will regenerate the table of contents below for all readers.
omni.ja (formerly omni.jar)
several unzip tools and archives (except for the latest version of 7-zip) currently cannot read omni.ja, due to the optimization that is applied to the file.
Accessibility Information for Core Gecko Developers
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.
Accessibility/LiveRegionDevGuide
for more information about live regions, please read the aria properties spec or the live region report to learn about aria live region markup and the live region api support document for the latest firefox api with regards to live regions.
Information for External Developers Dealing with Accessibility
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.
Lightweight themes
read more about the types of creative common licenses.
Theme concepts
, } }, 'night': { images: { theme_frame: 'moon.jpg', }, colors: { frame: '#000', tab_background_text: '#fff', } } }; the theme.theme object is then passed to theme.update() to change the header theme, as in this code snippet from the same example: function settheme(theme) { if (currenttheme === theme) { // no point in changing the theme if it has already been set.
A bird's-eye view of the Mozilla framework
suppose the client already has an nsirdfdatasource object representing a sub-graph of an rdf graph and calls nsirdfdatasource.gettarget(resource, nc_link, true) to obtain an nsirdfnode representing a specific node in the graph, in this case a link to ahelp viewer document page.
Bugzilla
how to tell if a bug has already been reported it's useful (but not mandatory) for you to check if the problem you're reporting has been already tracked.
Building SpiderMonkey with UBSan
/bin/sh if [ -z $1 ] ; then echo "usage: $0 <dirname>" elif [ -d $1 ] ; then echo "directory $1 already exists" else autoconf2.13 autoconf213 mkdir $1 cd $1 llvm_root="$home/llvm" sanflag="-fsanitize=undefined -fno-sanitize=alignment,float-cast-overflow,float-divide-by-zero,vptr -dxmalloc=myxmalloc" \ cc="$llvm_root/build/release+asserts/bin/clang" \ cxx="$llvm_root/build/release+asserts/bin/clang++" \ cflags="$sanflag" \ cxxflags="$sanflag" \ moz_llvm_hacks=1 \ ../configure --enable-debug --disable-optimize make -j 8 fi 3.
Creating a Login Manager storage module
some work has already been done to integrate the login manager with the mac os x keychain (bug 106400) and gnome keyring manager (bug 309807).
Debugging Frame Reflow
below this is a line that reads: tblo 02d7b5f0 r=0 a=8940,uc c=0,0 cnt=870 here the uc shows that on initial reflow the available height for the outer table frame is unconstrained.
Debugging OpenGL
if you start up firefox with this variable defined, the following behavior changes occur: each time you issue an opengl call, a check is performed to ensure that the gl context is current, using a thread-local static variable to keep track of this.
Debugging
advanced debugging techniques understanding crash reports how to read crash reports, which are full of information yet often not easy to interpret and act on.
Adding APIs to the navigator object
you can read about creating and registering xpcom components in javascript.
Configuring Build Options
please read the following directions carefully before building, and follow them in order.
Makefiles - Best practices and suggestions
parallel make: add an explicit timestamp dependency (.done) that make can synchronize threaded calls on to avoid a race condition.
Old Thunderbird build
to build on windows, please read the prerequisites so you don't skip preparing the mapi headers needed to compile thunderbird.
Simple Thunderbird build
do not copy mapi.h, it is already in c:\program files (x86)\windows kits\10\include\10.0.17134.0\um\mapi.h.
Updating NSPR or NSS in mozilla-central
if a patch is no longer needed, remove the patch from the directory and update the readme file.
pymake
this should come back with "no makefile found." if it does, your pymake alias is connected and you are ready to type in pymake -f client.mk to start the build.
Interface development guide
if you're going to be changing an interface, be sure to read these first!
Contributing to the Mozilla code base
someone else is already working on it!
mach
the build team generally does not like one-off make targets that aren't part of building (read: compiling) the tree.
Developer guide
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 already an experienced contributor.
Experimental features in Firefox
read preloading content with rel="preload" for more details.
Limitations of frame scripts
file i/o you should not write to or read from the disk from a frame script, in particular, the profile directory.
Firefox UI considerations for web developers
providing a top sites ready icon the simple rule is to provide an icon which is at least 96x96 pixels in size, using a <link> element whose rel attribute is a reference to a file containing an icon of a supported type.
Firefox
firefox profiles if you find yourself using multiple firefox channels—or just multiple configurations—on a regular basis, you should read how to use multiple firefox profiles by turning firefox's profile manager and other profile management tools to your advantage.
MozBeforePaint
whenever you're ready to refresh your animation, you call the window.requestanimationframe() method.
Embedding the editor
if an embedder wants a fully native ui, then they'll have to code their own dialogs, and associated logic, but the apis should already be available to them.
Script security
cross-compartment access same-origin as we've already seen, the most common scenario for same-origin access is when objects belonging to the same window object interact.
Gecko
html parser threading description of multithreading in the html parser.
Getting Started with Chat
further reading irc channel operator's guide (new version) irc channel operator's guide (old version) [from 1995, but still quite useful] ...
Hacking with Bonsai
read the introduction to bonsai for more information about queries.
How to get a process dump with Windows Task Manager
creating the dump file ensure that firefox is not already running.
How to investigate Disconnect failures
the event viewer can be found on windows: computer management > event viewer > windows logs > application and here we look for errors that overlapped with the test run; we cannot see the freezes (the main thread is blocked).
Creating a New Protocol
the method signatures can be read from the generated pnewprotocolparent.h and pnewprotocolchild.h headers.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
as the internet has spread to non-english speaking people around the world, it has become increasingly clear that forcing them to use domain names written only in a subset of the latin alphabet is not ideal.
AddonInstall
void cancel( ) addlistener() adds a new installlistener if the listener is not already registered to monitor this specific addoninstall.
Interfacing with the Add-on Repository
the most common cause of failure (other than the search url preference being incorrect) is if there is already a pending request, since only one request can be in progress at a time.
PopupNotifications.jsm
only one notification for each id can be visible at a time; if one with the specified id already exists, it will be replaced with the newer notification.
Services.jsm
search nsibrowsersearchservice browser search service startup nsiappstartup application startup service storage mozistorageservice storage api service strings nsistringbundleservice string bundle service sysinfo nsipropertybag2 system info service telemetry nsitelemetry telemetry service tm nsithreadmanager thread manager service urifixup nsiurifixup uri fixup service urlformatter nsiurlformatter url formatter service vc nsiversioncomparator version comparator service wm nsiwindowmediator window mediator service ww nsiwindowwatcher window watcher service 1 mobile only 2 windows only 3 main process only 4 c...
openLocationLastURL.jsm
using the openlocationlasturl object to get or set the value of the open location edit box, simply read the value of, or set the value of, the openlocationlasturl.value field: var url = openlocationlasturl.value; openlocationlasturl.value = "http://www.mozilla.org/"; to reset the value of the edit box to the default (which is an empty string), you can call the reset() method: method overview reset() methods reset the reset() method resets the saved url to the default, which is an ...
JavaScript code modules
to which can be read, write, rename, create directories,etc.
L10n testing with xcode
you're ready to test your localization of firefox on ios.
Localization and Plurals
you may also need to localize the initial strings for your code, so it would be good to read through at least the usage section as well.
Localizing XLIFF files for iOS
editing the raw xliff file is also rather easy, especially if you're already familiar with xml.
Localizing extension metadata on addons.mozilla.org
you can already request for amo fields localization on the forums, and these fields will be added soon to the web translation system.
Localizing with Pontoon
read about implementing pontoon in your project or learn how to get involved on github.
Patching a Localization
more specifically, it's a problem with an already released localization.
Localization technical reviews
so before you request your technical review, be sure that it is as ready as it can be.
Setting up the infrastructure
copy the shell scripts from /addons/trunk/site/app/locale/ to your locale directory: extract-po.sh will be used to extract all english strings from your application's directories specified in source_dirs, merge the resulting template (*.pot) file with the existing (already containing translations) messages.po files for each locale (if they exist) and merge the new messages.po files to messages.mo files.
What every Mozilla translator should know
to keep the track of what's going on, it's also a good idea to read the planet mozilla l10n when you have a problem use the above mailing lists the person in charge of the mozilla l10n is axel hecht (l10n at mozilla.com), pike on irc another interesting way of getting help is the irc channel #l10n at irc.mozilla.org useful tools the l10n dashboard pontoon narro translate toolkit koala 0.1 mozillatranslator mercurial the hg is organized into sev...
gettext
read more about plurals in gettext at gnu.org.
Fonts for Mozilla's MathML engine
on debian/ubuntu/mint and other debian-based distributions, use the following command: sudo apt-get install fonts-lmodern fonts-stix on fedora and other fedora-based distributions, use the following command (stix-math-fonts is often already installed): sudo dnf install texlive-lm-math stix-math-fonts on opensuse and other opensuse-based distributions, use the following command: sudo zypper install texlive-lm-math stix-fonts on other linux distributions, consider installing appropriate texlive packages, which includes latin modern math and xits: sudo pacman -s texlive-core texlive-fontsextra # arch linux sudo urpmi texlive-dist...
MathML Torture Test
finally, you may want to check this table comparing how the tests are read by various screen readers for mozilla browsers.
MathML In Action
you already have a mathml-enabled build but what you see on the screenshot is not what you get?
Updates
may 23, 1999 reader opinion: mathml's viability - talkback may 14, 1999 mozilla mathml project underway may 1999 mozilla mathml project initiation ...
Various MathML Tests
testing mathml <mrow>: d ( a b ) x 2 + 4 * x + p q = 0 , with this <mfrac> hanging here d * t ( i + j n ) + p y * q p x * b x + a + c d in the middle of a lot of running text to try to explain what this means to those who care to read.
Mobile
read about how to develop web sites that look good on mobile devices and take advantage of the new possibilities they offer.
Mozilla Web Services Security Model
<webscriptaccess xmlns="http://www.mozilla.org/2002/soap/security"> <allow type="soapv"/> <allow type="soap"/> </webscriptaccess> good examples (needed.) references new security model for web services, the original proposal for the web-scripts-access.xml file format web services roadmap, documenting when web services features, including the security model, were first supported additional reading documentation of crossdomain.xml, a similar format used by macromedia flash player ...
mozilla::MutexAutoLock
constructors mutexautolock( in mozilla::mutex& lock; ); this parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::mutex.
mozilla::MutexAutoUnlock
constructors mutexautounlock( in mozilla::mutex& lock; ); this parameter is a reference so as to guarantee that your code has already properly constructed the mozilla::mutex.
Activity Monitor, Battery Status Menu and top
note: the power profiling overview is worth reading at this point if you haven't already.
BloatView
reading individual bloat logs full bloatview output contains per-class statistics on allocations and refcounts, and provides gross numbers on the amount of memory being leaked broken down by class.
DMD
building and running nightly firefox the easiest way to use dmd is with the normal nightly firefox build, which has dmd already enabled in the build.
GC and CC logs
set the environment variable moz_cc_log_thread to main to only log main thread ccs, or to worker to only log worker ccs.
Intel Power Gadget
note: the power profiling overview is worth reading at this point if you haven't already.
Measuring performance using the PerfMeasurement.jsm code module
when you're done benchmarking, you can read out each of the counters you asked for as properties: let report = "cpu cycles: " + monitor.cpu_cycles + "\n" + "cache refs: " + monitor.cache_references + "\n" + "cache misses: " + monitor.cache_misses + "\n"; monitor.reset(); alert(report); the reset() method clears all of the enabled counters, as you might expect.
Profiling with the Gecko Profiler and Local Symbols on Windows
the profiler automatically reads symbols from the pdb files that are generated during the build process.
about:memory
if you are using a communication channel where only text can be sent, such as a comment thread on a website, click on the "measure..." button.
dtrace
note: the power profiling overview is worth reading at this point if you haven't already.
perf
note: the power profiling overview is worth reading at this point if you haven't already.
turbostat
note: the power profiling overview is worth reading at this point if you haven't already.
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 already 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.getreadablefilesize(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.threadpane.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 thread 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.
Floating Point Number to String Conversion
clinger, "how to read floating point numbers accurately," proc.
Hash Tables
warning: the nspr hash table library functions are not thread safe.
Linked Lists
the macros are not thread 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; }; prthread *thread = pr_createthread(..., rootfunction, ...); algebraic types nspr provides the following type definitions with unambiguous bit widths for algebraic operations: 8-, 16-, and 32-bit integer types 64-bit integer types floating-point number type for convenience, nspr also provides type definitions with platform-dependent bit widths: native os integer types 8-, 16-, and 32-bit 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 already exist, or opens a connection with the existing shared memory segment if it already exists.
PL_HashTableAdd
if an entry with the same key already exists in the table, the freeentry function is invoked with the ht_free_value flag.
PRAccessHow
this is the declaration for the enumeration praccesshow, used in the how parameter of pr_access: #include <prio.h> typedef enum praccesshow { pr_access_exists = 1, pr_access_write_ok = 2, pr_access_read_ok = 3 } praccesshow; see pr_access for what each of these values mean.
PRDir
the function pr_opendir opens a specified directory and returns a pointer to a prdir structure, which can be passed to pr_readdir repeatedly to obtain successive entries (files or subdirectories in the open directory).
PRErrorCode
syntax #include <prerror.h> typedef print32 prerrorcode description the service nspr offers in this area is the ability to associate a thread-specific condition with an error number.
PR_Accept
pr_accept blocks the calling thread until either a new connection is successfully accepted or an error occurs.
PR_CExitMonitor
this may indicate that the address parameter is invalid or that the calling thread is not in the monitor.
PR_CloseDir
note that after a pr_closedir call, any prdirentry object returned by a previous pr_readdir call on the same prdir object becomes invalid.
PR_DestroyLock
caution the caller must ensure that no thread is currently in a lock-specific function.
PR_DestroyMonitor
there must be no thread (including the calling thread) in the monitor or waiting on the monitor.
PR_GetError
returns the current thread's last set platform-independent error code.
PR_GetFileInfo
to get equivalent information on a file that's already open, use pr_getopenfileinfo.
PR_GetFileInfo64
to get equivalent information on a file that's already open, use pr_getopenfileinfo64.
PR_GetOpenFileInfo
to get equivalent information on a file that's not already open, use pr_getfileinfo.
PR_GetOpenFileInfo64
to get equivalent information on a file that's not already open, use pr_getfileinfo64.
PR_JoinJob
blocks the current thread until a job has completed.
PR_LoadLibrary
the function suppresses duplicate loading if the library is already 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 already 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 already 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( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Connect
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_connect( prthreadpool *tpool, prjobiodesc *iod, const prnetaddr *addr, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Timer
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_timer( prthreadpool *tpool, printervaltime timeout, prjobfn fn, void * arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_QueueJob_Write
syntax #include <prtpool.h> nspr_api(prjob *) pr_queuejob_write( prthreadpool *tpool, prjobiodesc *iod, prjobfn fn, void *arg, prbool joinable ); parameters the function has the following parameters: tpool a pointer to a prthreadpool structure previously created by a call to pr_createthreadpool.
PR_Rename
if a file with the new name already 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 thread blocks until all bytes are sent, a timeout has occurred, or there is an error.
PR_SetError
sets error information within a thread context.
PR_USEC_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 microseconds in a millisecond.
PR_USEC_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 microseconds in a second.
PR_Unlock
attempting to release a lock that was locked by a different thread causes undefined behavior.
PR_WaitForPollableEvent
blocks the calling thread until the pollable event is set, and then atomically unsetting the event before returning.
PR_Write
description the thread invoking pr_write blocks until all the data is written or the write operation fails.
PR_Writev
description the thread calling pr_writev blocks until all the data is written or the write operation fails.
PR_dtoa
possible modes are: 0 shortest string that yields d when read in and rounded to nearest.
Running NSPR tests
6_rtm mozilla/nsprpub mkdir linux.debug cd linux.debug ../mozilla/nsprpub/configure gmake cd pr/tests gmake ../../../mozilla/nsprpub/pr/tests/runtests.sh the output of the test suite looks like this: nspr test results - tests begin mon mar 12 11:44:41 pdt 2007 nspr_test_logfile /dev/null test result accept passed acceptread passed acceptreademu passed affinity passed alarm passed anonfm passed atomic passed attach passed bigfile passed cleanup passed cltsrv passed concur passed cvar passed cv...
Building NSS
please read these instructions carefully before attempting to build.
NSS Certificate Download Specification
if the certificates contain a basicconstraints certificate extension that indicates they are ca certificates, and do not already exist in the local certificate database, they are added as untrusted cas.
Build instructions for JSS 4.4.x
build instructions for jss 4.4.x newsgroup: mozilla.dev.tech.crypto to build jss see upstream jss build/test instructions next, you should read the instructions on using jss.
Using JSS
MozillaProjectsNSSJSSUsing JSS
using jss newsgroup: mozilla.dev.tech.crypto if you have already built jss, or if you are planning to use a binary release of jss, here's how to get jss working with your code.
NSS_3.11.10_release_notes.html
bug 398680: assertion botch in ssl3_registerserverhelloextensionsender doing second handshake with ssl_forcehandshake bug 403240: threads hanging in nss_initlock bug 403888: memory leak in trustdomain.c bug 416067: certutil -l -h token doesn't report token authentication failure bug 417637: tstclnt crashes if -p option is not specified bug 421634: don't send an sni client hello extension bearing an ipv6 address bug 422918: add verisign class 3 public primary ca - g5 to nss bug 424152: add thawte primary root ca to nss ...
NSS_3.12.1_release_notes.html
levels of standards conformance strictness for cert_nametoasciiinvertible (see certt.h) cert_n2a_readable (maximum human readability) cert_n2a_strict (strict rfc compliance) cert_n2a_invertible (maximum invertibility) bugs fixed the following bugs have been fixed in nss 3.12.1.
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_initreadwrite(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_initreadwrite(sql:<configdir>) leaves behind a pkcs11.txu file if libnssckbi.so is in <configdir>.
NSS 3.12.6 release notes
note: the tls server name indication for clients is already fully implemented in nss.
NSS 3.14.2 release notes
bug 813857 - modification of certificate trust flags from multiple threads is now a thread-safe operation.
NSS 3.14.4 release notes
bug 894370 - (cve-2013-1739) avoid uninitialized data read in the event of a decryption failure.
NSS 3.15 release notes
bug 341127: fix the invalid read in rc4_wordconv.
NSS 3.16 release notes
it just verifies the signature, assuming that the certificate has been verified already.
NSS 3.21.3 release notes
bug 1206283 - fixed an out-of-bound read when parsing invalid utf-16.
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.23 release notes
this code is not ready for production use.
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.1 release notes
bug 1619056 - update readme: tls 1.3 is not experimental anymore.
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 3.52 release notes
bug 1619056 - update readme: tls 1.3 is not experimental anymore.
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 already 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 already 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 already 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 already 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 already 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
MozillaProjectsNSStoolscrlutil
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 threads 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: asyncread, asyncwrite nsitransport::asyncread 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 multithreading 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 already 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 already_addrefed<nsifoo>.
Rhino documentation
scopes and contexts describes how to use scopes and contexts for the best performance and flexibility, with an eye toward multithreaded 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 already enough be able to create a js::rooted<yourstruct> on the stack -- and then arrange for it to be called during tracing.
Getting SpiderMonkey source code
if you have problems with the instructions above, you can read the full details of using mercurial to get mozilla code here.
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_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoSaveExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoValueArray
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::AutoVectorRooter
for use when space has already been reserved.
JS::Call
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CloneFunctionObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Construct
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CreateError
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::CurrentGlobalOrNull
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::GetFirstArgumentAsTypeHint
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::GetSelfHostedFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::NewFunctionFromSpec
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::OrdinaryToPrimitive
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::PropertySpecNameToPermanentId
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ProtoKeyToId
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Remove*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Rooted
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToInt32
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToInt64
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToNumber
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToPrimitive
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint16
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint32
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::ToUint64
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS::Value
in some places, spidermonkey provides already-rooted js::values which you can use for variables.
JSDeletePropertyOp
in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
JSFastNative
in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
JSID_IS_STRING
in a js_threadsafe build, the caller must be in a request on this jscontext.
JSNative
in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
JSObjectOps.getProperty
each of these callbacks is responsible for everything involved with an individual property access operation, including: any locking necessary for thread safety; security checks; finding the property, including walking the prototype chain if needed; calling the lower-level jsclass hooks; calling getters or setters; and actually getting, setting, or deleting the property once it is found.
JSPrincipalsTranscoder
callback syntax typedef jsbool (*jsprincipalstranscoder)(jsxdrstate *xdr, jsprincipals **principalsp); name type description xdr jsxdrstate * the xdr reader/writer.
JSPropertySpec
if a property is read-only, its setter is never called.
JSTraceOp
jstraceop implementation can assume that no other threads mutates object state.
JSVAL_LOCK
if locking is successful, or v already cannot be garbage collected because it is not an object, string, or double value, jsval_lock evaluates to true.
JSXDRObjectOp
syntax typedef jsbool (* jsxdrobjectop)(jsxdrstate *xdr, jsobject **objp); name type description xdr jsxdrstate * the xdr reader or writer.
JS_AddArgumentFormatter
callback description the conversion function should return true on success, and return false after reporting an error or detecting an already-reported error.
JS_AddExternalStringFinalizer
in a js_threadsafe build, this function must be invoked on the primordial thread only, at startup—or else the entire program must single-thread itself while loading a module that calls this function.
JS_BindCallable
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CallFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearDateCaches
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearNonGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearRegExpStatics
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ClearScope
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CloneFunctionObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFileHandleForPrincipalsVersion
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileFunctionForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileScriptForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_CompileUCFunctionForPrincipalsVersion
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConstructObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConvertArgumentsVA
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ConvertValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileFunctionBody
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DecompileScriptObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefaultValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineFunctions
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineOwnProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DefineProperties
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DeleteProperty2
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DestroyContext
in a js_threadsafe build, it does not matter whether the calling thread is in a request on cx.
JS_DestroyScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DropExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_DumpNamedRoots
the javascript engine does not read from or write to this pointer at all.
JS_EncodeString
in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_EncodeStringToBuffer
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EnterLocalRootScope
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EnumerateStandardClasses
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EvaluateScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_EvaluateScriptForPrincipals
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteRegExp
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScriptPart
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ExecuteScriptVersion
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_FlattenString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ForgetLocalRoot
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ForwardGetPropertyTo
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_FreezeObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetArrayLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetArrayPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClassObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetClassPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetConstructor
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetEmptyStringValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetExternalStringClosure
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionCallback
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetFunctionScript
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForCompartmentOrNull
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetGlobalForScopeChain
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetLatin1FlatStringChars
in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLatin1InternedStringChars
in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLatin1StringCharsAndLength
in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_GetLocaleCallbacks
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetObjectPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetOptions
syntax uint32 js_getoptions(jscontext *cx); name type description cx jscontext * the context from which to read options.
JS_GetOwnPropertyDescriptor
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetParent
see the security section of the user guide for an introduction to the security model.) in some cases, javascript code can get an object's parent via the read-only obj.__parent__ property.
JS_GetPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyAttributes
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyAttrsGetterAndSetter
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyDefault
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPropertyDescriptor
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringCharAt
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringCharsAndLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_GetStringEncodingLength
in a js_threadsafe build, the caller must be in a request on this jscontext..
JS_HasArrayLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasInstance
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasOwnProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_HasProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToProtoKey
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IdToValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_Init
this method must be called before any other jsapi method is used on any thread.
JS_InitCTypesClass
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InitClass
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InstanceOf
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_InternJSString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsConstructing_PossiblyWithGivenThisObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsExtensible
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_IsIdentifier
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LeaveLocalRootScope
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LeaveLocalRootScopeWithResult
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LockGCThing
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LookupElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LookupProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_LooselyEqual
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_New
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewArrayObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewCompartmentAndGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDateObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDateObjectMsec
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDependentString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewDoubleValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewExternalString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewFunction
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewNumberValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewObjectForConstructor
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewPlainObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewPropertyIterator
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewRegExpObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewScriptObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewStringCopyN
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NewStringCopyZ
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_NextProperty
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ObjectIsDate
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ParseJSON
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PopArguments
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PreventExtensions
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PushArguments
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_PutEscapedString
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_RemoveExternalStringFinalizer
as with js_addexternalstringfinalizer, there is a threading restriction if you compile the engine js_threadsafe: this function may be called for a given finalizer pointer on only one thread; different threads may call to remove distinct finalizers safely.
JS_Remove*Root
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportError
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportErrorNumber
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ReportPendingException
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ResolveStandardClass
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_RestoreExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SameValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SaveExceptionState
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetAllNonReservedSlotsToUndefined
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetArrayLength
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetBranchCallback
in js_threadsafe builds, the javascript engine calls this callback only from within an active request on cx.
JS_SetElement
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetFunctionCallback
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetGlobalObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetPrivate
that object may already be using the private data field for something else; or there might not be a private data field in that object at all, in which case js_setprivate would overwrite an object property.
JS_SetPrototype
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetRegExpInput
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_SetScriptStackQuota
these structures also consume heap space, so js_setthreadstacklimit does not bound their size.
JS_StrictlyEqual
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_StringEqualsAscii
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_TypeOfValue
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToBoolean
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToECMAInt32
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToId
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToInt32
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToObject
in a js_threadsafe build, the caller must be in a request on this jscontext.
JS_ValueToSource
in a js_threadsafe build, the caller must be in a request on this jscontext.
JSDBGAPI
etframecalleeobject js_getscriptfilename js_getscriptbaselinenumber js_getscriptlineextent js_getscriptversion js_gettopscriptfilenameflags js_getscriptfilenameflags js_flagscriptfilenameprefix jsfilename_null jsfilename_system jsfilename_protected evaluating debug code js_evaluateinstackframe examining object properties typedef jspropertydesc jspd_enumerate jspd_readonly jspd_permanent jspd_alias jspd_argument jspd_variable jspd_exception jspd_error typedef jspropertydescarray js_propertyiterator js_getpropertydesc js_getpropertydescarray js_putpropertydescarray hooks js_setdebuggerhandler js_setsourcehandler js_setexecutehook js_setcallhook js_setobjecthook js_setthrowhook js_setdebugerrorhook js_setnewscripthook js_setdestroysc...
Running Automated JavaScript Tests
see the readme (in js/src/jit-tests) for details.
SavedFrame
function properties of the savedframe.prototype object tostring return this frame and its parents formatted as a human readable stack trace string.
Mozinfo
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?
Animated PNG graphics
MozillaTechAPNG
error handling apng is designed to allow incremental display of frames before the entire image has been read.
Gecko object attributes
for more information please read about schema datatypes.
ROLE_ALERT
assistive technologies typically respond to the role by reading the entire onscreen contents of containers advertising this role.
Gecko states
state_readonly the object is designated read-only.
Implementation Details
msaa at-spi how to find the content window and load the document in xul-based clients, screen readers may need to find the content window so that they know where to start grabbing the accessible tree, in order to load the current document into a buffer in their own process.
Accessibility API Implementation Details
at apis supportthis documentation explains how makers of screen readers, voice dictation packages, onscreen keyboards, magnification software and other assitive technologies can support gecko-based software.
Embedded Dialog API
any such code which isn't already a component needs to be.
Feed content access API
example: reading a feed from the web it's actually quite easy to read and parse a feed.
Life After XUL: Building Firefox Interfaces with HTML
in the meantime, some teams are already experimenting with html5-based interfaces.
Frecency algorithm
developer notes there are various development notes you can read about places that may offer additional insights: initial algorithm ideas implementation notes history the initial algorithm design was by mike connor and seth spitzer.
Places Developer Guide
bool getfolderreadonly(afolderid) accessing folder contents queries in places are executed through the main history service.
Places Expiration
all of expiration uses the storage async api, that ensures i/o is in a separate thread, plus it won't block any read thanks to the use of the wal journaling system.
Retrieving part of the bookmarks tree
you will want to read the section "using the results" in places:query system to understand the different result types.
Using the Places keywords API
placesutils.keywords.insert({ keyword: "my_keyword", url: "http://www.example.com/" postdata: "post+data=1&test=2" }).then(() => { /* success */ }, e => { /* failure */ }); note that setting an already existing keyword to a different url, will silently update the existing keyword to the new url.
Using the Places tagging service
current tags set for the url persist, and tags which are already set for the given url are ignored.
Preferences API
preferences api allows you to save and read strings, numbers, booleans, and references to files to the preferences store.
extISessionStorage
return type method boolean has(in astring aname) void set(in astring aname, in nsivariant avalue) nsivariant get(in astring aname, in nsivariant adefaultvalue) attributes attribute type description events readonly attribute extievents the events object for the storage supports: "change" methods has() determines if a storage item exists with the given name.
XML Extras
xmlhttprequest.open("ahost") ok file:// documents can access http:// documents but you need to enable universalbrowserread privilege in your scripts - see the javascript security: signed scripts document for more details.
Creating a Python XPCOM component
creating applications with mozilla already 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 already 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...
Avoiding leaks in JavaScript XPCOM components
further reading finding leaks in mozilla - how to debug leaks when they do occur.
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 "multithreaded dll." since this change is configuration dependent, you must make set the release configuration run-time library to the release multithreaded dll runtime and the debug configuration to the debug multithreaded dll runtime (this needs clarification): after making these changes, press ok.
Inheriting from implementation classes
} threadsafe if you want to make this threadsafe, you can replace ns_impl_isupports1(a, ia) with ns_impl_threadsafe_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.
How to build a binary XPCOM component using Visual Studio
to make the project, you start with a standard multi-thread dll project.
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 already 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 filereader 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 already), so it's guaranteed to behave predictably.
Components.utils.import
import throws if it encounters an error (like a syntax error) in the file it reads.
Using components
commonly, we start our scripts like so: var cc = components.classes; var ci = components.interfaces; if we want to get a hold of a component, we then do something like: var rc = cc["@mozilla.org/registry;1"]; var rs = rc.getservice(ci.nsiregistry); see also: xpcshell -- how to get a command line interface to javascript more info as was already stated, it is common to start addon scripts like: var cc = components.classes; var ci = components.interfaces; there is also another way to start, which is exactly equivalent to the above.
HOWTO
put the following at the end of your script: // do async processing // from <https://developer.mozilla.org/en/xpconnect/xpcshell/howto> print("doing async work"); gscriptdone = false; var gthreadmanager = cc["@mozilla.org/thread-manager;1"] .getservice(ci.nsithreadmanager); var mainthread = gthreadmanager.currentthread; while (!gscriptdone) mainthread.processnextevent(true); while (mainthread.haspendingevents()) mainthread.processnextevent(true); 2.
nsObserverService
it should be used from the main thread only.
NS_OVERRIDE
example class a has a method getfoo() which is overridden by class b: class a { virtual nsresult getfoo(nsifoo** aresult); }; class b : public a { ns_override virtual nsresult getfoo(nsifoo** aresult); }; later, the signature of a::getfoo() is changed to remove the output parameter: class a { - virtual nsresult getfoo(nsifoo** aresult); + virtual already_addrefed<nsifoo> getfoo(); }; b::getfoo() no longer overrides a::getfoo() as was originally intended.
HeapMinimize
static nsresult heapminimize( prbool aimmediate ); parameters aimmediate [in] if true, heap minimization will occur immediately if the call was made on the main thread.
IAccessible2
a use case is when a screen reader is grabbing an entire web page on a page load.
IAccessibleAction
the returned strings are the localized human readable key sequences to be used to activate each action, e.g.
IAccessibleEditableText
note that even a read only text object can support the copy capability so this interface is not limited to editable objects.
amIWebInstallListener
the default implementation displays a confirmation dialog when add-ons are ready to install and uses the observer service to notify when installations are blocked.
imgILoader
this must already be opened before this method is called, and there must have been no ondataavailable calls for it yet.
mozIAsyncFavicons
if the icon data already exists, we will not try to reload the icon unless aforcereload is true.
mozIJSSubScriptLoader
ignorecache boolean if present and set to true, the cache will be bypassed when reading the file.
mozIPersonalDictionary
read only.
mozIStoragePendingStatement
note: for read statements, such as select, once you cancel the statement, you will receive no further notifications about results.
mozIThirdPartyUtil
(we have already checked that auri is not foreign with respect to the channel uri.) otherwise, return the result of isthirdpartywindow() with arguments of the channel's bottommost window and the channel uri, respectively.
nsIAbstractWorker
dom/interfaces/threads/nsidomworkers.idlscriptable this interface is an abstract interface used to implement the web workers architecture.
nsIAccessibleCaretMoveEvent
read only.
nsIAccessibleEditableText
read only.
nsIAccessibleHyperText
read only.
nsIAccessibleStateChangeEvent
read only.
nsIAccessibleStates
state_readonly 0x00000040 the object is designated read-only.
nsIAccessibleTreeCache
ssible(in long arow, in nsitreecolumn acolumn); void invalidatecache(in long arow, in long acount); void treeviewchanged(); void treeviewinvalidated(in long astartrow, in long aendrow, in long astartcol, in long aendcol); methods getcachedtreeitemaccessible() returns the tree item from the cache for the cell in the specified row and column; the nsiaccessible is created if it doesn't already exist in the cache.
nsIAccessibleWin32Object
read only.
nsIArray
read only.
nsIAuthPrompt2
it must not throw when the prompt could already be potentially shown to the user.
nsIAutoCompleteObserver
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void onsearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); void onupdatesearchresult(in nsiautocompletesearch search, in nsiautocompleteresult result); methods onsearchresult() called when a search is complete and the results are ready.
nsIBidiKeyboard
read only.
nsIBinaryOutputStream
this might be used, for example, to implement network protocols or to produce architecture-neutral binary disk files, that is ones that can be read and written by both big-endian and little-endian platforms.
nsIBrowserBoxObject
attributes attribute type description docshell nsidocshell read only.
nsICacheService
read only.
nsIChromeFrameMessageManager
aallowdelayedload if true, the script will be loaded when the remote frame becomes available; otherwise, the script will only be loaded if the frame is already available.
nsICommandLineRunner
read only.
nsIComponentManager
void removebootstrappedmanifestlocation( in interface nsilocalfile alocation ); parameters examples using addbootstrappedmanifestlocation in a bootstrapped extension for firefox 8 and 9: alocation the directory or xpi to stop reading the chrome.manifest from.
nsIConsoleMessage
[binaryname(messagemoz)] read only.
nsIConsoleService
note: to guard against stack overflows from listeners which could log messages (this could be done inadvertently through listeners implemented in javascript), we do not call any listeners when another error is already being logged.
nsIContainerBoxObject
attributes attribute type description docshell nsidocshell read only.
nsIContentViewManager
read only.
nsICookieManager
read only.
nsICookiePromptService
cookiesfromhost the number of cookies there are already for this host.
nsIDNSRecord
read only.
nsIDOMElement
read only.
nsIDOMFile
last changed in gecko 1.9.2 (firefox 3.6 / thunderbird 3.1 / fennec 1.0) inherits from: nsisupports this interface implements the dom file object; for complete documentation, read up on that.
nsIDOMFileError
it implements the dom fileerror object; for details, please read that article.
nsIDOMFontFaceList
read only.
nsIDOMGeoGeolocation
read only.
nsIDOMHTMLTimeRanges
read only.
nsIDOMMouseScrollEvent
read only.
nsIDOMNavigatorDesktopNotification
attributes attribute type description moznotification nsidomdesktopnotificationcenter read only.
nsIDOMStorageEventObsolete
read only.
nsIDOMXULSelectControlElement
el, in domstring value); long getindexofitem(in nsidomxulselectcontrolitemelement item); nsidomxulselectcontrolitemelement getitematindex(in long index); nsidomxulselectcontrolitemelement insertitemat(in long index, in domstring label, in domstring value); nsidomxulselectcontrolitemelement removeitemat(in long index); attributes attribute type description itemcount unsigned long read only.
nsIDictionary
if the key is already present, the new value replaces the old one.
nsIDirIndexParser
read only.
nsIDirectoryEnumerator
read only.
nsIDirectoryServiceProvider
example this code creates a global, read-only string called currdir with the value of the current working directory.
nsIDownloadProgressListener
amessage a user-readable status message intended to be displayed visibly on the screen.
nsIDragService
this disables dragging if it is not already disabled.
nsIEditorBoxObject
attributes attribute type description docshell nsidocshell read only.
nsIEditorIMESupport
read only.
nsIEnvironment
xpcom/threads/nsienvironment.idlscriptable scriptable access to the current process environment.
nsIEventListenerService
read only.
nsIExternalProtocolService
getapplicationdescription() gets a human-readable description for the application responsible for handling a specific protocol.
nsIFeedProcessor
void parsefromstream( in nsiinputstream stream, in nsiuri uri ); parameters stream pointer to the nsiinputstream from which to read and parse the feed.
nsIFeedProgressListener
if the document is a standalone item or entry, the handlefeedatfirstentry() method will not already have been called, and the received nsifeedentry will have a null parent value.
nsIFileOutputStream
the deferred open will be performed when one of the following is called: seek() tell() write() flush() defer_open is useful if we use the stream on a background thread, so that the opening and possible stating of the file happens there as well.
nsIFocusManager
read only.
nsIGeolocationUpdate
note: this must be called on the main thread.
nsIGlobalHistory2
uris that are not already in global history will not be added.
nsIHttpActivityObserver
read only.
nsIIFrameBoxObject
attributes attribute type description docshell nsidocshell read only.
nsIINIParser
xpcom/ds/nsiiniparser.idlscriptable an instance of nsiiniparser can be used to read values from an ini file.
nsIINIParserWriter
when you're done and ready to write the ini file to disk, call the writefile() method.
nsIIOService
note: nsiioservice may only be used from the main thread.
nsIIdleService
read only.
nsIJumpListItem
read only.
nsILoginManager
exceptions thrown an exception is thrown if the login information is already stored in the login manager.
nsIMacDockSupport
this can be used, for example, to display the number of unread 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 thread.
nsIMessageBroadcaster
read only.
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 already 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.
nsIMsgCustomColumnHandler
it can be used in the thunderbird threadpane for extensions to overlay their own columns.
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 threadpane 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 ...
nsINavHistoryQueryOptions
excludereadonlyfolders boolean set to true to exclude read-only folders from the query results.
nsINavHistoryResult
read only.
nsINavHistoryResultObserver
although this attribute is read-write, you should not alter it directly; instead, call nsinavhistoryresult.addobserver() to add an observer to a result.
nsINavHistoryResultTreeViewer
read only.
nsINavHistoryResultViewObserver
oncyclecell() called when a cell in a non-selectable cycling column (such as unread or flagged in thunderbird) is clicked.
nsINavHistoryResultViewer
although this attribute is read-write, you should not alter it directly; instead, use the nsinavhistoryresult.viewer attribute to set the viewer.
nsINavHistoryService
if the uri does not have an entry in the history database already, one will be created with no visits, no title, hidden, not typed.
nsINavHistoryVisitResultNode
read only.
nsIObserver
s.interfaces.nsiobserverservice); observerservice.addobserver(this, "mytopicid", false); }, unregister: function() { var observerservice = components.classes["@mozilla.org/observer-service;1"] .getservice(components.interfaces.nsiobserverservice); observerservice.removeobserver(this, "mytopicid"); } } instantiation - this should be fired once you're ready to start observing (for example a window's load event).
nsIProcessScriptLoader
for example data:,dump("foo\n"); aallowdelayedload boolean if this flag is false, the process script will only be loaded into child processes that are already running at the time of the call.
nsIProgressEventSink
astatusarg status code argument to be used with the string bundle service to convert the status message into localized, human readable text.
nsIPropertyBag
read only.
nsIRunnable
nsirunnable is generated from nsirunnable.idl here is the prototype of nsirunnable.idl /** * represents a task which can be dispatched to a thread for execution.
nsISHEntry
obsolete since gecko 1.8 expirationstatus boolean indicates whether the page is already expired in cache.
nsISecurityCheckedComponent
code that has the "universalbrowserread" capability is allowed to perform certain actions that allow it to read information from the local system.
nsISelection2
read only.
nsISelectionPrivate
read only.
nsIServerSocketListener
the transport is in the connected state, and read/write streams can be opened using the normal nsitransport api.
nsISessionStore
if it's false, the tabs in astate are added to the tabs already in the window.
nsISound
note that nsisound instances may play the sounds using another thread; however, this is not controlled by the caller.
nsIStreamConverter
note: the returned stream may not already be converted.
nsISupportsPriority
xpcom/threads/nsisupportspriority.idlscriptable this interface exposes the general notion of a scheduled object with an integral priority value.
nsITaggingService
tags in atags which are already set for the given uri are ignored.
nsITaskbarWindowPreview
if the enablecustomdrawing attribute is true, the controller you implement will start receiving calls to its nsitaskbarpreviewcontroller.drawpreview() and nsitaskbarpreviewcontroller.drawthumbnail() methods, as well as reads of its width, height, and thumbnailaccessratio attributes.
nsITimerCallback
xpcom/threads/nsitimer.idlscriptable defines the callback interface for nsitimer events.
nsIToolkitProfileService
read only.
nsITraceableChannel
var data = istream.readbytes(acount); this.receivedchunks.push(data); ostream.writebytes(data, acount); this.originallistener.ondataavailable(arequest, acontext, sstream.newinputstream(0), aoffset, acount); }, onstartrequest: function(arequest, acontext) { this.originallistener.onstartrequest(arequest, acontext); }, onstoprequest: function(arequest, acontext, astatuscode) { this.responsebody = this.recei...
nsITransactionList
read only.
nsITransferable
isprivatedata boolean although this is not a read-only attribute, you should generally avoid changing it, since doing so may cause it not to actually reflect the status of the context in which the transferable was created.
nsITreeContentView
read only.
nsIVariant
attributes attribute type description datatype pruint16 read only.
nsIWebBrowser
read only.
nsIWebContentHandlerRegistrar
mail" already exist as webservice handlers.
nsIWebPageDescriptor
read only.
nsIWebappsSupport
isapplicationinstalled() checks is a web application is already installed.
nsIWindowMediator
getting most recent window the following code is useful when you need any of the windows of given type, or to check if a window of a particular type (for example your extension's options dialog) is already open.
nsIWorker
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents a dom worker thread.
nsIWorkerMessagePort
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents a worker thread's message port, which is used to allow the worker to post messages back to its creator.
nsIWorkerScope
dom/interfaces/threads/nsidomworkers.idlscriptable this interface represents the global scope in which a worker's script runs.
nsIWritablePropertyBag
if a property already exists with the given name, it is overwritten.
nsMsgSearchAttrib
bvalue cc = 7; const nsmsgsearchattribvalue toorcc = 8; const nsmsgsearchattribvalue alladdresses = 9; const nsmsgsearchattribvalue location = 10; /* result list only */ const nsmsgsearchattribvalue messagekey = 11; /* message result elems */ const nsmsgsearchattribvalue ageindays = 12; const nsmsgsearchattribvalue folderinfo = 13; /* for "view thread context" from result */ const nsmsgsearchattribvalue size = 14; const nsmsgsearchattribvalue anytext = 15; const nsmsgsearchattribvalue keywords = 16; // keywords are the internal representation of tags.
NS_CStringGetData
« xpcom api reference summary the ns_cstringgetdata function gives the caller read access to the string's internal buffer.
XPCOM string functions
this is a low-level api.ns_cstringgetdatathe ns_cstringgetdata function gives the caller read access to the string's internal buffer.ns_cstringgetmutabledatathe ns_cstringgetmutabledata function gives the caller write access to the string's internal buffer.ns_cstringinsertdatathe ns_cstringinsertdata function appends data to the existing value of a nsacstring instance.
nsIAbCard/Thunderbird3
l(in string name, in boolean value); void deleteproperty(in autf8string name); autf8string translateto(in autf8string atype); void copy(in nsiabcard srccard) boolean equals(in nsiabcard card) astring generatephoneticname(in boolean alastnamefirst) attributes attribute type description properties nsisimpleenumerator readonly: a list of all the properties that this card has as an enumerator, whose members are all nsiproperty objects.
nsICookie2 MOZILLA 1 8 BRANCH
read only.
nsMsgViewFlagsType
for example, the 'unread only' view would use the flag: components.interfaces.nsmsgviewflagstype.kunreadonly constants name value description knone 0x0 kthreadeddisplay 0x1 kshowignored 0x8 kunreadonly 0x10 kexpandall 0x20 kgroupbysort 0x40 ...
nsMsgViewType
for example, to request the 'show all threads' view use the constant: components.interfaces.nsmsgviewtype.eshowallthreads constants name value description eshowallthreads 0 eshowthreadswithunread 2 eshowwatchedthreadswithunread 3 eshowquicksearchresults 4 eshowvirtualfolderresults 5 eshowsearch 6 ...
Using nsCOMPtr
just keep reading.
Using nsIDirectoryService
customizing the locations is important if, for example, your application already has a profile directory or other resource directories.
Using the Gecko SDK
introduction it is assumed that you already know something about xpcom component development.
XPCOM ownership guidelines
such a function is the perfect example of something that creates an object with a longer lifespan that itself, and gives away ownership (by producing a pointer that is already addrefed) --- in this case, to the caller.
xptcall FAQ
it is used to facilitate cross language and cross thread method calls.
XTF
MozillaTechXTF
documentation xtf readme the xtf readme.
Testing Mozilla code
it uses a compile-time instrumentation to check all reads and writes during the execution.
Account Provisioner
if the user already has an email account, the user can switch to the original account setup wizard.
Address Book examples
use the nsiabcollection.readonly attribute to determine the read-only status of an address book adding contacts create a card and set its properties using the nsiabcard interface (see the interface documentation for property names supported by the application): let card = components.classes["@mozilla.org/addressbook/cardproperty;1"] .createinstance(components.interfaces.nsiabcard); card.setproperty(...
Address book sync client design
add // if it's new, mod if it's been modified, // ret if it was already sent to the server // but an error occured, etc.
LDAP Support
it assumes you are already familiar with configuring preferences for deployed builds in addition to setting up thunderbird to use an ldap directory.
Mail and RDF
you should learn about rdf before reading this document or you will be hopelessly confused.
Mail composition back end
const struct nsmsgattachedfile *preloaded_attachments, - attachments that are already locally stored on disk (note: both attachments and preloaded_attachments cannot be specified on a single call void *relatedpart /* nsmsgsendpart */, - a related part for multipart related operations nsimsgsendlistener **alistenerarray) = 0; - an array of listeners for the send operation.
Mail event system
then we could // verify that our listener fired by checking if listenerhasfired and // totalmessageslistenerhasfired are true // this is left as an exercise for the reader.
Thunderbird Configuration Files
if you don't already have one, consider running the following code in a terminal.
Filter Incoming Mail
by example, to modify the mail subject : var newmaillistener = { msgadded: function(amsghdr) { if( !amsghdr.isread ) { // here we are, a new mail has popped // let get a javascript string object from the subject property // querying mime conversion interface var mimeconvert = components.classes["@mozilla.org/messenger/mimeconverter;1"] .getservice(components.interfaces.nsimimeconverter); var subject = mimeconvert.decodemimeheader(amsghdr.subject, null, false, true); // here with have a string to modify with javascript.
Use SQLite
be careful of multi-thread access to your database.
Theme Packaging
so: don't add breadcrumbs!
Tips and Tricks from the newsgroups
please feel free to add links to threads.
Using the Multiple Accounts API
(left as an exercise for the reader.)this will work but it is not supported.
Thunderbird
currently one of the most popular open source email clients, it is used by tens of millions of people around the world to bring together all their email accounts, chat, newsgroup and feed reading in a familiar high-productivity environment.
Toolkit version format
a few examples of valid version parts: 0 (as in 1.0): <number-a>=0 5a (as in 1.5a): <number-a>=5, <string-b>=a 5pre4 (as in 3.5pre4): <number-a>=5, <string-b>=pre, <number-c>=4 * (as in 1.0.*): <string-b>=* a few special parsing rules are applied for backwards compatibility and readability: if the version part is a single asterisk, it is interpreted as an infinitely-large number: 1.5.0.* is the same as 1.5.0.(infinity) if string-b is a plus sign, number-a is incremented to be compatible with the firefox 1.0.x version format: 1.0+ is the same as 1.1pre the rationale behind splitting a version part into a sequence of strings and numbers is that when comparing version...
Using Mozilla code in other projects
building xul applications the joy of xul an introduction to xul; a must read for new developers.
Working with ArrayBuffers
introductory reading the pointer types section of the type conversion page explains the fundamentals of this operation.
Using js-ctypes
we see that it needs to be defined like this: int winapi messagebox( _in_opt_ hwnd hwnd, _in_opt_ lpctstr lptext, _in_opt_ lpctstr lpcaption, _in_ uint utype ); so we read this article here on defining types and replicate it: declaring types var lib = ctypes.open("user32.dll"); or even without the extension.
js-ctypes
documentation if you are brand new to js-ctypes, and have no idea about it, the pages you should read first is - ctypes.open followed by standard os libraries.
PKCS #11 Netscape Trust Objects - Network Security Services
this is not a new design, but documentation of the method already in use.
Flash Activation: Browser Comparison - Plugins
that function can then issue the call into the plugin, knowing that everything is set up and ready to go.
Plug-in Development Overview - Plugins
you can use these netscape methods: to identify the browser in which your plug-in is displayed: use the npn_useragent method to read this information.
Plug-in Side Plug-in API - Plugins
npp_writeready determines maximum number of bytes that the plug-in can consume.
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.
3D view - Firefox Developer Tools
conversely, you can click on elements in the breadcrumb bar to change which element is selected in the 3d view.
Inspecting web app manifests - Firefox Developer Tools
list of manifest members we won't provide an exhaustive list of all the members that can appear in a web manifest here; you can already find that in our web manifest documentation.
Access debugging in add-ons - Firefox Developer Tools
the following items are accessible in the context of chrome://browser/content/debugger.xul (or, in version 23 beta, chrome://browser/content/devtools/debugger.xul): window.addeventlistener("debugger:editorloaded") - called when the read-only script panel loaded.
Examine, modify, and watch variables - Firefox Developer Tools
these are useful in that they let you inspect invariants in your code that you know are there but aren't necessarily in the code ready for inspection.
Pretty-print a minified file - Firefox Developer Tools
after you click the icon, the source code looks like this: the pretty print source icon is available only if the source file is minified (i.e., not an original file), and is not already "prettified".
UI Tour - Firefox Developer Tools
within the scopes pane, you can create watchpoints that pause the debugger when a value is read or assigned.
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.
Debugger.Script - Firefox Developer Tools
breakpoint handler method calls are cross-compartment, intra-thread calls: the call takes place in the same thread that hit the breakpoint, and in the compartment containing the handler function (typically the debugger’s compartment).
Deprecated tools - Firefox Developer Tools
more details on the mailing-list thread.
Migrating from Firebug - Firefox Developer Tools
this functionality is already integrated into the devtools using the chromelogger protocol and doesn't require any extensions to be installed.
Page inspector 3-pane mode - Firefox Developer Tools
note: the 3-pane inspector is already enabled in nightly/developer edition before firefox 62.
Examine and edit CSS - Firefox Developer Tools
read more about css source map support in the style editor documentation.
Use the Inspector API - Firefox Developer Tools
ready called on first markuploaded.
Animation inspector (Firefox 41 and 42) - Firefox Developer Tools
the animation inspector enables you to: see information about all animations running in the page play/pause all animations play/pause/rewind/fast-forward each animation jump to a specific point in an animation highlight and inspect the animated node adjust the playback rate of each animation see whether an animation is running in the compositor thread (a lightning bolt icon is displayed next to such animations) ...
Call Tree - Firefox Developer Tools
this screenshot tells us something we probably already knew: bubble sort is a very inefficient algorithm.
Flame Chart - Firefox Developer Tools
the flame chart displays a lot of data, so to get readable results, it's usually necessary to zoom in.
Frame rate - Firefox Developer Tools
if we select one of these slices of the recording, the main waterfall view underneath it is zoomed into it, and we can see the function that's causing the problem: we have a javascript function from a click event that's blocking the main thread for 170 milliseconds.
Cookies - Firefox Developer Tools
last accessed — date and time when the cookie was last read.
Storage Inspector - Firefox Developer Tools
for the time being, the storage inspector only gives you a read-only view of storage.
Tips - Firefox Developer Tools
click on the last breadcrumb button to scroll the selection into view in the inspector.
Validators - Firefox Developer Tools
html tidy html tidy is a tool that can be used to report errors in an html page and to format web pages for better reading.
The JavaScript input interpreter - 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.
about:debugging - Firefox Developer Tools
next, disable every debugging setting already activated and repeat the steps described before.
AbortController.signal - Web APIs
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.
AbortController - Web APIs
properties abortcontroller.signal read only returns a abortsignal object instance, which can be used to communicate with/abort a dom request.
AbortSignal.aborted - Web APIs
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).
AbortSignal.onabort - Web APIs
the onabort read-only property of the fetchsignal interface is an event handler invoked when an abort event fires, i.e.
AbortSignal - Web APIs
abortsignal.aborted read only a boolean that indicates whether the request(s) the signal is communicating with is/are aborted (true) or not (false).
AbstractRange.collapsed - Web APIs
the collapsed read-only property of the abstractrange interface returns true if the range's start position and end position are the same.
AbstractRange.startContainer - Web APIs
the read-only startcontainer property of the abstractrange interface returns the start node for the range.
AbstractRange.startOffset - Web APIs
the read-only startoffset property of the abstractrange interface returns the offset into the start node of the range's start position.
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.onreading = () => { 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.onreading = () => { 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.
Ambient Light Sensor API - Web APIs
interfaces ambientlightsensor returns an interface for accessing ambientlightsensorreadings.
AnalyserNode.frequencyBinCount - Web APIs
the frequencybincount read-only property of the analysernode interface is an unsigned integer half that of the analysernode.fftsize.
AnalyserNode.getByteFrequencyData() - Web APIs
the frequencies are spread linearly from 0 to 1/2 of the sample rate.
AnalyserNode.getFloatFrequencyData() - Web APIs
the frequencies are spread linearly from 0 to 1/2 of the sample rate.
AnalyserNode - Web APIs
analysernode.frequencybincount read only is an unsigned long value half that of the fft size.
Animation() - Web APIs
syntax var animation = new animation([effect][, timeline]); parameters effect optional the target effect, as an object based on the animationeffectreadonly interface, to assign to the animation.
Animation.finished - Web APIs
the animation.finished read-only property of the web animations api returns a promise which resolves once the animation has finished playing.
Animation.pause() - Web APIs
WebAPIAnimationpause
rm: 'translatey(0)' }, { transform: 'translatey(-80%)' } ], { fill: 'forwards', easing: 'steps(4, end)', duration: alicechange.effect.timing.duration / 2 }); // doesn't actually need to be eaten until a click event, so pause it initially: nommingcake.pause(); additionally, when resetting : // an all-purpose function to pause the animations on alice, the cupcake, and the bottle that reads "drink me." var stopplayingalice = function() { alicechange.pause(); nommingcake.pause(); drinking.pause(); }; // when the user releases the cupcake or the bottle, pause the animations.
Animation.pending - Web APIs
WebAPIAnimationpending
the read-only animation.pending property of the web animations api indicates whether the animation is currently waiting for an asynchronous operation such as initiating playback or pausing a running animation.
Animation.playState - Web APIs
this property is read-only for css animations and transitions.
Animation.replaceState - Web APIs
the read-only animation.replacestate property of the web animations api returns the replace state of the animation.
Animation.startTime - Web APIs
you can read this value to determine what the start time is currently set at, and you can change this value to make the animation start at a different time.
AnimationEffect - Web APIs
the animationeffect interface of the web animations api defines current and future animation effects like keyframeeffect, which can be passed to animation objects for playing, and keyframeeffectreadonly (which is used by css animations and transitions).
AnimationEvent.animationName - Web APIs
the animationevent.animationname read-only property is a domstring containing the value of the animation-name css property associated with the transition.
AnimationEvent.elapsedTime - Web APIs
the animationevent.elapsedtime read-only property 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 - Web APIs
summary the animationevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on.
AnimationPlaybackEvent.currentTime - Web APIs
the currenttime read-only property of the animationplaybackevent interface represents the current time of the animation that generated the event at the moment the event is queued.
AnimationPlaybackEvent.timelineTime - Web APIs
the timelinetime read-only property of the animationplaybackevent interface represents the time value of the animation's timeline at the moment the event is queued.
AnimationTimeline.currentTime - Web APIs
the currenttime read-only property of the web animations api's animationtimeline interface returns the timeline's current time in milliseconds, or null if the timeline is inactive.
AnimationTimeline - Web APIs
properties animationtimeline.currenttime read only returns the time value in milliseconds for this timeline or null if this timeline is inactive.
Attr.localName - Web APIs
WebAPIAttrlocalName
the attr.localname read-only property returns the local part of the qualified name of an attribute.
Attr.namespaceURI - Web APIs
WebAPIAttrnamespaceURI
the attr.namespaceuri read-only property returns the namespace uri of the attribute, or null if the element is not in a namespace.
Attr.prefix - Web APIs
WebAPIAttrprefix
the attr.prefix read-only property returns the namespace prefix of the specified attribute, or null if no prefix is specified.
AudioBuffer.copyFromChannel() - Web APIs
the value of startinchannel is outside the current range of samples that already exist in the source buffer; that is, it's greater than its current length.
AudioBufferSourceNode.detune - Web APIs
syntax var source = audioctx.createbuffersource(); source.detune.value = 100; // value in cents note: though the audioparam returned is read-only, the value it represents is not.
AudioBufferSourceNode.start() - Web APIs
invalidstateerror start() has already been called.
AudioBufferSourceNode - Web APIs
the most recent call replaces the previous one, if the audiobuffersourcenode has not already reached the end of the buffer.
AudioContext.outputLatency - Web APIs
the outputlatency read-only property of the audiocontext interface provides an estimation of the output latency of the current audio context.
AudioContext.resume() - Web APIs
the promise is rejected if the context has already been closed.
AudioContext.suspend() - Web APIs
the promise is rejected if the context has already been closed.
AudioListener.forwardX - Web APIs
the forwardx read-only property of the audiolistener interface is an audioparam representing the x value of the direction vector defining the forward direction the listener is pointing in.
AudioListener.forwardY - Web APIs
the forwardy read-only property of the audiolistener interface is an audioparam representing the y value of the direction vector defining the forward direction the listener is pointing in.
AudioListener.forwardZ - Web APIs
the forwardz read-only property of the audiolistener interface is an audioparam representing the z value of the direction vector defining the forward direction the listener is pointing in.
AudioListener.positionX - Web APIs
the positionx read-only property of the audiolistener interface is an audioparam representing the x position of the listener in 3d cartesian space.
AudioListener.positionY - Web APIs
the positiony read-only property of the audiolistener interface is an audioparam representing the y position of the listener in 3d cartesian space.
AudioListener.positionZ - Web APIs
the positionz read-only property of the audiolistener interface is an audioparam representing the z position of the listener in 3d cartesian space.
AudioListener.upX - Web APIs
WebAPIAudioListenerupX
the upx read-only property of the audiolistener interface is an audioparam representing the x value of the direction vector defining the up direction the listener is pointing in.
AudioListener.upY - Web APIs
WebAPIAudioListenerupY
the upy read-only property of the audiolistener interface is an audioparam representing the y value of the direction vector defining the up direction the listener is pointing in.
AudioListener.upZ - Web APIs
WebAPIAudioListenerupZ
the upz read-only property of the audiolistener interface is an audioparam representing the z value of the direction vector defining the up direction the listener is pointing in.
AudioListener - Web APIs
this is why these values are not marked read only, which is how they appear in the specification's idl.
AudioNode.connect() - Web APIs
WebAPIAudioNodeconnect
an audioparam will take the rendered audio data from any audionode output connected to it and convert it to mono by down-mixing (if it is not already mono).
AudioNode.context - Web APIs
WebAPIAudioNodecontext
the read-only context property of the audionode interface returns the associated baseaudiocontext, that is the object representing the processing graph the node is participating in.
AudioParam.defaultValue - Web APIs
the defaultvalue read-only property of the audioparam interface represents the initial value of the attributes as defined by the specific audionode creating the audioparam.
AudioParam.maxValue - Web APIs
the maxvalue read-only property of the audioparam interface represents the maximum possible value for the parameter's nominal (effective) range.
AudioParam.minValue - Web APIs
the minvalue read-only property of the audioparam interface represents the minimum possible value for the parameter's nominal (effective) range.
AudioParam.setTargetAtTime() - Web APIs
depending on your use case, getting 95% toward the target value may already be enough; in that case, you could set timeconstant to one third of the desired duration.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
as a result, the value you read from the value property may not always exactly equal what you set it to.
AudioScheduledSourceNode.start() - Web APIs
if no value is passed then the duration will be equal to the length of the audio buffer minus the offset value return value undefined exceptions invalidstatenode the node has already been started.
AudioScheduledSourceNode.stop() - Web APIs
if the node has already stopped, this method has no effect.
AudioTrack.language - Web APIs
the read-only audiotrack property language returns a string identifying the language used in the audio track.
AudioTrack.sourceBuffer - Web APIs
the read-only audiotrack property sourcebuffer returns the sourcebuffer that created the track, or null if the track was not created by a sourcebuffer or the sourcebuffer has been removed from the mediasource.sourcebuffers attribute of its parent media source.
AudioTrackList.length - Web APIs
the read-only audiotracklist property length returns the number of entries in the audiotracklist, each of which is an audiotrack representing one audio track in the media element.
AudioTrackList - Web APIs
length read only the number of tracks in the list.
AudioWorkletGlobalScope.registerProcessor - Web APIs
return value undefined exceptions notsupportederror the name is an empty string, or a constructor under the given name is already registered.
AudioWorkletNode.parameters - Web APIs
the read-only parameters property of the audioworkletnode interface returns the associated audioparammap — that is, a map-like collection of audioparam objects.
AudioWorkletNode.port - Web APIs
the read-only port property of the audioworkletnode interface returns the associated messageport.
AudioWorkletProcessor.parameterDescriptors (static getter) - Web APIs
the read-only parameterdescriptors property of an audioworkletprocessor-derived class is a static getter, which returns an iterable of audioparamdescriptor-based objects.
AudioWorkletProcessor.port - Web APIs
the read-only port property of the audioworkletprocessor interface returns the associated messageport.
AuthenticatorAssertionResponse.signature - Web APIs
the signature read-only property of the authenticatorassertionresponse interface is an arraybuffer object which is the signature of the authenticator for both authenticatorassertionresponse.authenticatordata and a sha-256 hash of the client data (authenticatorassertionresponse.clientdatajson).
AuthenticatorResponse.clientDataJSON - Web APIs
it has two properties: status: a string which is either "supported" which indicates the client support token binding but did not negotiate with the relying party or "present" when token binding was used already id: a domstring which is the base64url encoding of the token binding id which was used for the communication.
BaseAudioContext.audioWorklet - Web APIs
the audioworklet read-only property of the baseaudiocontext interface returns an instance of audioworklet that can be used for adding audioworkletprocessor-derived classes which implement custom audio processing.
BaseAudioContext.currentTime - Web APIs
the currenttime read-only property of the baseaudiocontext interface returns a double representing an ever-increasing hardware timestamp in seconds that can be used for scheduling audio playback, visualizing timelines, etc.
BaseAudioContext.state - Web APIs
the state read-only property of the baseaudiocontext interface returns the current state of the audiocontext.
BatteryManager.chargingTime - Web APIs
syntax var time = battery.chargingtime on return, time is the remaining time in seconds until the battery, which is a batterymanager object, is fully charged, or 0 if the battery is already fully charged.
BiquadFilterNode.Q - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.q.value = 100; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.detune - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.detune.value = 100; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.frequency - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.frequency.value = 3000; note: though the audioparam returned is read-only, the value it represents is not.
BiquadFilterNode.gain - Web APIs
syntax var audioctx = new audiocontext(); var biquadfilter = audioctx.createbiquadfilter(); biquadfilter.gain.value = 25; note: though the audioparam returned is read-only, the value it represents is not.
BlobEvent.data - Web APIs
WebAPIBlobEventdata
the blobevent.data read-only property represents a blob associated with the event.
BlobEvent.timecode - Web APIs
the timecode readonlyinline property of the blobevent interface 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.
Bluetooth.getAvailability() - Web APIs
syntax var readerpromise = bluetooth.getavailability(); parameters none.
Bluetooth.getDevices() - Web APIs
syntax var readerpromise = bluetooth.getdevices(); parameters none.
BluetoothAdvertisingData.appearance - Web APIs
the appearance read-only property of the bluetoothadvertisingdata interface returns one of the values defined by the org.bluetooth.characteristic.gap.appearance characteristic.
manufacturerData - Web APIs
the manufacturerdata read-only property of the bluetoothadvertisingdata interface returns a map that relates company identifier codes to arraybuffers.
rssi - Web APIs
the rssi read-only property of the bluetoothadvertisingdata interface returns the power at which the device’s packets are being received, measured in dbm.
serviceData - Web APIs
the servicedata read-only property of the bluetoothadvertisingdata interface returns a map that relates uuids to arraybuffers.
txPower - Web APIs
the txpower read-only property of the bluetoothadvertisingdata interface returns the transmission power at which the device is broadcasting, measured in dbm.
BluetoothCharacteristicProperties.authenticatedSignedWrites - Web APIs
the authenticatedsignedwrites read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if signed writing to the characteristic value is permitted.
BluetoothCharacteristicProperties.broadcast - Web APIs
the broadcast read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the broadcast of the characteristic value is permitted using the server characteristic configuration descriptor.
BluetoothCharacteristicProperties.indicate - Web APIs
the indicate read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if indications of the characteristic value with acknowledgement is permitted.
BluetoothCharacteristicProperties.notify - Web APIs
the notify read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if notifications of the characteristic value without acknowledgement is permitted.
BluetoothCharacteristicProperties.reliableWrite - Web APIs
the reliablewrite read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if reliable writes to the characteristic is permitted.
BluetoothCharacteristicProperties.writableAuxiliaries - Web APIs
the writableauxiliaries read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if reliable writes to the characteristic descriptor is permitted.
BluetoothCharacteristicProperties.write - Web APIs
the write read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the writing to the characteristic with response is permitted.
BluetoothCharacteristicProperties.writeWithoutResponse - Web APIs
the writewithoutresponse read-only property of the bluetoothcharacteristicproperties interface returns a boolean that is true if the writing to the characteristic without response is permitted.
adData - Web APIs
the bluetoothdevice.addata read-only property returns instance of bluetoothadvertisingdata containing the most recent advertising data received for the device.
deviceClass - Web APIs
the bluetoothdevice.deviceclass read-only property returns a number representing the bluetooth devices "class of device".
BluetoothDevice.gatt - Web APIs
the bluetoothdevice.gatt read-only property returns a reference to the device's bluetoothremotegattserver.
gattServer - Web APIs
the bluetoothdevice.gattserver read-only property returns a reference to the device's gatt server or null if the device is disconnected.
id - Web APIs
the bluetoothdevice.id read-only property returns a domstring that uniquely identifies a device.
BluetoothDevice.name - Web APIs
the bluetoothdevice.name read-only property returns a domstring that provides a human-readable name for the device.
BluetoothDevice.paired - Web APIs
the bluetoothdevice.paired read-only property returns a boolean value indicating whether the device is paired with the system.
productID - Web APIs
the bluetoothdevice.productid read-only property returns the 16-bit product id field in the pnp_id characteristic in the device_information service.
productVersion - Web APIs
the bluetoothdevice.productversion read-only property returns the 16-bit product version field in the pnp_id characteristic in the device_information service.
BluetoothDevice.uuids - Web APIs
the bluetoothdevice.uuids read-only property lists the uuids of gatt services provided by the device, that the current origin is allowed to access.
vendorID - Web APIs
the bluetoothdevice.vendorid read-only property returns the 16-bit vendor id field in the pnp_id characteristic in the device_information service.
vendorIDSource - Web APIs
the bluetoothdevice.vendoridsource read-only property returns the vendor id source field in the pnp_id characteristic in the device_information service.
BluetoothRemoteGATTCharacteristic.properties - Web APIs
the bluetoothremotegattcharacteristic.properties read-only property returns a bluetoothcharacteristicproperties instance containing the properties of this characteristic.
BluetoothRemoteGATTCharacteristic.service - Web APIs
the bluetoothremotegattcharacteristic.service read-only property returns the bluetoothgattservice this characteristic belongs to.
BluetoothRemoteGATTCharacteristic.uuid - Web APIs
the bluetoothremotegattcharacteristic.uuid read-only property returns domstring containing the uuid of the characteristic, for example '00002a37-0000-1000-8000-00805f9b34fb' for the heart rate measurement characteristic.
characteristic - Web APIs
the bluetoothremotegattdescriptor.characteristic read-only property returns the bluetoothremotegattcharacteristic this descriptor belongs to.
uuid - Web APIs
the bluetoothremotegattdescriptor.uuid read-only property returns the uuid of the characteristic descriptor, for example '00002902-0000-1000-8000-00805f9b34fb' for theclient characteristic configuration descriptor.
BluetoothRemoteGATTServer.connected - Web APIs
the bluetoothremotegattserver.connected read-only property returns a boolean value that returns true while this script execution environment is connected to this.device.
BluetoothRemoteGATTServer.device - Web APIs
the bluetoothremotegattserver.device read-only property returns a reference to the bluetoothdevice running the server.
device - Web APIs
the bluetoothgattservice.device read-only property returns information about a bluetooth device through an instance of bluetoothdevice.
isPrimary - Web APIs
the bluetoothgattservice.isprimary read-only property returns a boolean that indicates whether this is a primary service.
uuid - Web APIs
the bluetoothgattservice.uuid read-only property returns a domstring representing the uuid of this service.
Body.formData() - Web APIs
WebAPIBodyformData
the formdata() method of the body mixin takes a response stream and reads it to completion.
BroadcastChannel - Web APIs
broadcastchannel.name read only returns a domstring, the name of the channel.
BudgetState.budgetAt - Web APIs
the budgetat read-only property of the budgetstate interface returns the anticipated processing budget at the specified time.
BudgetState.time - Web APIs
WebAPIBudgetStatetime
the time read-only property of the budgetstate interface returns a timestamp at which the budgetat value is valid.
ByteLengthQueuingStrategy.ByteLengthQueuingStrategy() - Web APIs
examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ...
ByteLengthQueuingStrategy.size() - Web APIs
examples const queuingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ...
ByteLengthQueuingStrategy - Web APIs
examples const queueingstrategy = new bytelengthqueuingstrategy({ highwatermark: 1 }); const readablestream = new readablestream({ start(controller) { ...
CSS.paintWorklet (Static property) - Web APIs
WebAPICSSpaintWorklet
paintworklet is a static, read-only property of the css interface that provides access to the paintworklet, which programmatically generates an image where a css property expects a file.
CSS.registerProperty() - Web APIs
exceptions invalidmodificationerror the given name has already been registered.
CSSKeyframeRule - Web APIs
csskeyframe.style read only returns a cssstyledeclaration of the css style associated with the keyframe.
CSSKeyframesRule - Web APIs
csskeyframesrule.cssrules read only returns a cssrulelist of the css rules in the media rule.
CSSMathProduct.values - Web APIs
the cssmathproduct.values read-only property of the cssmathproduct interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum.values - Web APIs
WebAPICSSMathSumvalues
the cssmathsum.values read-only property of the cssmathsum interface returns a cssnumericarray object which contains one or more cssnumericvalue objects.
CSSMathSum - Web APIs
a cssmathsum is the object type returned when the stylepropertymapreadonly.get() method is used on a css property whosevalue is created with a calc() function.
CSSMathValue.operator - Web APIs
the cssmathvalue.operator read-only property of the cssmathvalue interface indicates the operator that the current subtype represents.
CSSNamespaceRule.namespaceURI - Web APIs
the cssnamespacerule.namespaceuri read-only property returns a domstring containing the text of the uri of the given namespace.
CSSNamespaceRule.prefix - Web APIs
the cssnamespacerule.prefix read-only property returns a domstring with the name of the prefix associated to this namespace.
CSSNamespaceRule - Web APIs
interface cssnamespacerule : cssrule { readonly attribute domstring namespaceuri; readonly attribute domstring?
CSSOMString - Web APIs
while browser implementations that use utf-8 internally to represent strings in memory can use usvstring when the specification says cssomstring, implementations that already represent strings as 16-bit sequences might choose to use domstring instead.
CSSPrimitiveValue.primitiveType - Web APIs
the primitivetype read-only property of the cssprimitivevalue interface represents the type of a css value.
CSSPrimitiveValue.setFloatValue() - Web APIs
an no_modification_allowed_err is raised if this property is read-only.
CSSPrimitiveValue.setStringValue() - Web APIs
an no_modification_allowed_err is raised if this property is read-only.
CSSPrimitiveValue - Web APIs
cssprimitivevalue.primitivetype read only an unsigned short representing the type of the value.
CSSPseudoElement.element - Web APIs
the element read-only property of the csspseudoelement interface returns a reference to the originating element of the pseudo-element, in other words its parent element.
CSSPseudoElement.type - Web APIs
the type read-only property of the csspseudoelement interface returns the type of the pseudo-element as a string, represented in the form of a css selector.
CSSStyleDeclaration.length - Web APIs
the read-only property returns an integer that represents the number of style declarations in this css declaration block.
CSSStyleDeclaration.parentRule - Web APIs
the cssstyledeclaration.parentrule read-only property returns a cssrule that is the parent of this style block, e.g.
CSSStyleDeclaration.removeProperty() - Web APIs
exceptions domexception no_modification_allowed_err: if the property or declaration block is read only.
CSSStyleDeclaration.setProperty() - Web APIs
the following values are accepted: string value "important" keyword undefined string empty value "" return value undefined exceptions domexception (nomodificationallowederror): if the property or declaration block is read only.
CSSStyleRule.selectorText - Web APIs
this is readonly in some browsers; to set stylesheet rules dynamically cross-browser, see using dynamic styling information.
CSSStyleRule.styleMap - Web APIs
the stylemap read-only property of the cssstylerule interface returns a stylepropertymap object which provides access to the rule's property-value pairs.
CSSStyleSheet.cssRules - Web APIs
the read-only cssstylesheet property cssrules returns a live cssrulelist which provides a real-time, up-to-date list of every css rule which comprises the stylesheet.
CSSStyleSheet.ownerRule - Web APIs
the read-only cssstylesheet property ownerrule returns the cssimportrule corresponding to the @import at-rule which imported the stylesheet into the document.
CSSStyleSheet.rules - Web APIs
while rules is unlikely to be removed soon, its availability is not as widespread and using it will result in compatibility problems for your site or app.
CSSUnitValue.unit - Web APIs
WebAPICSSUnitValueunit
the cssunitvalue.unit read-only property of the cssunitvalue interface returns a usvstring indicating the type of unit.
CSSUnparsedValue.length - Web APIs
the length read-only property of the cssunparsedvalue interface returns the number of items in the object.
CSSValue.cssValueType - Web APIs
the cssvaluetype read-only property of the cssvalue interface represents the type of the current computed css property value.
CSSValue - Web APIs
WebAPICSSValue
cssvalue.cssvaluetyperead only an unsigned short representing a code defining the type of the value.
CSSValueList.length - Web APIs
the length read-only property of the cssvaluelist interface represents the number of cssvalues in the list.
CSSValueList - Web APIs
cssvaluelist.lengthread only an unsigned long representing the number of cssvalues in the list.
CSSVariableReferenceValue.fallback - Web APIs
the fallback read-only property of the cssvariablereferencevalue interface returns the custom property fallback value of the cssvariablereferencevalue.
CSSVariableReferenceValue - Web APIs
cssvariablereferencevalue.fallback read only returns the built-in css value for the custom name.
Determining the dimensions of elements - Web APIs
note that all these properties are read-only.
Using dynamic styling information - Web APIs
var el = document.getelementbyid('some-element'); el.setattribute('style', 'background-color:darkblue;'); be aware, however, that setattribute removes all other style properties that may already have been defined in the element's style object.
CSS Painting API - Web APIs
paintsize returns the read-only values of the output bitmap's width and height.
Using the CSS properties and values API - Web APIs
the first is that, once a property is registered, there's no way to update it, and trying to re-register it with javascript will throw an error indicating it's already been defined.
CSS Typed Object Model API - Web APIs
generally, css values can be read and written in javascript as strings, which can be slow and cumbersome.
Cache - Web APIs
WebAPICache
the code then uses cache.match() to see if there's already a matching font in the cache, and if so, returns it.
CanvasCaptureMediaStreamTrack.canvas - Web APIs
the canvascapturemediastreamtrack canvas read-only property returns the htmlcanvaselement from which frames are being captured.
CanvasCaptureMediaStreamTrack - Web APIs
canvascapturemediastreamtrack.canvas read only returns the htmlcanvaselement object whose surface is captured in real-time.
CanvasRenderingContext2D.addHitRegion() - Web APIs
(if you don't see the full smiley, check the browser compatibility table to see if your current browser supports hit regions already; you might need to activate a preference.) playable code <canvas id="canvas" width="400" height="200" class="playable-canvas"></canvas> <div class="playable-buttons"> <input id="edit" type="button" value="edit" /> <input id="reset" type="button" value="reset" /> </div> <textarea id="code" class="playable-code" style="height:250px"> ctx.beginpath(); ctx.arc(100, 100, 75, 0, 2 * math.pi, fa...
CanvasRenderingContext2D.canvas - Web APIs
the canvasrenderingcontext2d.canvas property, part of the canvas api, is a read-only reference to the htmlcanvaselement object that is associated with a given context.
CanvasRenderingContext2D.closePath() - Web APIs
if the shape has already been closed or has only one point, this function does nothing.
CanvasRenderingContext2D.drawImage() - Web APIs
use .complete === true and .onload to determine when it is ready.
CanvasRenderingContext2D.drawWidgetAsOnScreen() - Web APIs
unlike drawwindow(), this api uses the operating system to snapshot the widget on-screen, rather than reading from gecko's own compositor.
CanvasRenderingContext2D.font - Web APIs
let f = new fontface('test', 'url(x)'); f.load().then(function() { // ready to use the font in a canvas context }); specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.font' in that specification.
CanvasRenderingContext2D.getTransform() - Web APIs
the transformation matrix is described by: [acebdf001]\left[ \begin{array}{ccc} a & c & e \\ b & d & f \\ 0 & 0 & 1 \end{array} \right] note: the returned object is not live, so updating it will not affect the current transformation matrix, and updating the current transformation matrix will not affect an already returned dommatrix.
A basic ray-caster - Web APIs
after realizing, to my delight, that the nifty <canvas> element i'd been reading about was not only soon to be supported in firefox, but was already supported in the current version of safari, i had to try a little experiment.
Advanced animations - Web APIs
adding velocity now that we have a ball, we are ready to add a basic animation like we have learned in the last chapter of this tutorial.
Applying styles and colors - Web APIs
by overlaying ever more circles on top of each other, we effectively reduce the transparency of the circles that have already been drawn.
Basic animations - Web APIs
the requestanimationframe method provides a smoother and more efficient way for animating by calling the animation frame when the system is ready to paint the frame.
Basic usage of canvas - Web APIs
this can look something like this: <canvas id="stockgraph" width="150" height="150"> current stock price: $3.15 + 0.15 </canvas> <canvas id="clock" width="150" height="150"> <img src="images/clock.png" width="150" height="150" alt=""/> </canvas> telling the user to use a different browser that supports canvas does not help users who can't read the canvas at all, for example.
Drawing shapes with canvas - Web APIs
if the shape has already been closed or there's only one point in the list, this function does nothing.
Drawing text - Web APIs
function draw() { var ctx = document.getelementbyid('canvas').getcontext('2d'); ctx.font = '48px serif'; ctx.stroketext('hello world', 10, 50); } <canvas id="canvas" width="300" height="100"></canvas> draw(); styling text in the examples above we are already making use of the font property to make the text a bit larger than the default size.
Client.frameType - Web APIs
WebAPIClientframeType
the frametype read-only property of the client interface indicates the type of browsing context of the current client.
Client.id - Web APIs
WebAPIClientid
the id read-only property of the client interface returns the universally unique identifier of the client object.
Client.type - Web APIs
WebAPIClienttype
the type read-only property of the client interface indicates the type of client the service worker is controlling.
Clients.openWindow() - Web APIs
m' }, }; self.registration.shownotification('you\'ve got messages!', notificationobject); } // notification click event listener self.addeventlistener('notificationclick', e => { // close the notification popout e.notification.close(); // get all the window clients e.waituntil(clients.matchall({ type: 'window' }).then(clientsarr => { // if a window tab matching the targeted url already exists, focus that; const hadwindowtofocus = clientsarr.some(windowclient => windowclient.url === e.notification.data.url ?
Clients - Web APIs
WebAPIClients
addeventlistener('notificationclick', event => { event.waituntil(async function() { const allclients = await clients.matchall({ includeuncontrolled: true }); let chatclient; // let's see if we already have a chat window open: for (const client of allclients) { const url = new url(client.url); if (url.pathname == '/chat/') { // excellent, let's use it!
Clipboard.writeText() - Web APIs
text may be read back using either read() or readtext().
ClipboardEvent - Web APIs
clipboardevent.clipboarddata read only is a datatransfer object containing the data affected by the user-initiated cut, copy, or paste operation, along with its mime type.
CloseEvent() - Web APIs
"reason", optional and defaulting to '', of type domstring, that is a human-readable reason why the server closed the connection.
CloseEvent.initCloseEvent() - Web APIs
reason a domstring describing the reason of the close in shuman-readable way.
Comment - Web APIs
WebAPIComment
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
WebAPIConsolegroup
the console.groupcollapsed() method is similar, but the new block is collapsed and requires clicking a disclosure button to read it.
console - Web APIs
WebAPIConsole
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
WebAPIContentIndexadd
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.
ContentIndexEvent - Web APIs
id read only a string which identifies the deleted content index via it's id.
Credential.name - Web APIs
WebAPICredentialname
it should be a human-readable, public name.
Crypto.subtle - Web APIs
WebAPICryptosubtle
the crypto.subtle read-only property returns a subtlecrypto which can then be used to perform low-level cryptographic operations.
Crypto - Web APIs
WebAPICrypto
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 already contains an entry with the same name or the same constructor (or is otherwise already 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.
CustomElementRegistry - Web APIs
if such a custom element is already defined, the returned promise is immediately fulfilled.
CustomEvent.detail - Web APIs
the detail readonly property of the customevent interface returns any data passed when initializing the event.
DOMConfiguration - Web APIs
eters: "canonical-form", "cdata-sections", "check-character-normalization", "comments", "datatype-normalization", "element-content-whitespace", "entities", "error-handler", "infoset", "namespaces", "namespace-declarations", "normalize-characters","schema-location", "schema-type", "split-cdata-sections", "validate", "validate-if-schema", "well-formed" properties domconfiguration.parameternames read only is a domstringlist methods domconfiguration.cansetparameter() returns a boolean domconfiguration.getparameter() returns a domuserdata domconfiguration.setparameter() sets a parameter specification http://www.w3.org/tr/dom-level-3-cor...mconfiguration ...
DOMException.code - Web APIs
WebAPIDOMExceptioncode
the code read-only property of the domexception interface returns a short that contains one of the error code constants, or 0 if none match.
DOMException.message - Web APIs
the message read-only property of the domexception interface returns a domstring representing a message or description associated with the given error name.
DOMException.name - Web APIs
WebAPIDOMExceptionname
the name read-only property of the domexception interface returns a domstring that contains one of the strings associated with an error name.
DOMImplementationList - Web APIs
properties domimplementationlist.length read only returns an integer.
DOMParser - Web APIs
WebAPIDOMParser
these properties can also be read to fetch html fragments corresponding to the corresponding dom subtree.
DOMPoint.DOMPoint() - Web APIs
WebAPIDOMPointDOMPoint
that function accepts as input a dompointinit compatible object, including a dompoint or dompointreadonly.
Binary strings - Web APIs
WebAPIDOMStringBinary
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 (i.e., using binary strings).
DOMString - Web APIs
WebAPIDOMString
as javascript already uses such strings, domstring is mapped directly to a string.
DOMStringList - Web APIs
properties domstringlist.length read only returns the length of the list.
DOMTokenList.length - Web APIs
the length read-only property of the domtokenlist interface is an integer representing the number of objects stored in the object.
DOMTokenList - Web APIs
properties domtokenlist.length read only is an integer representing the number of objects stored in the object.
DataTransfer.items - Web APIs
the read-only datatransfer property items property is a list of the data transfer items in a drag operation.
DataTransfer.mozItemCount - Web APIs
this property is read only .
DataTransfer.mozSetDataAt() - Web APIs
if data of the given format already exists, it is replaced in the same position as the old data.
DataTransfer.mozSourceNode - Web APIs
this property is read only .
DataTransfer.mozUserCancelled - Web APIs
this property is read only .
DataTransfer.setData() - Web APIs
if data for the given type already exists, the existing data is replaced in the same position.
DataTransfer.types - Web APIs
the datatransfer.types read-only property returns an array of the drag data formats (as strings) that were set in the dragstart event.
DataTransferItem.kind - Web APIs
the read-only datatransferitem.kind property returns a datatransferitem representing the drag data item kind: some text or some file.
DataTransferItem.type - Web APIs
the read-only datatransferitem.type property returns the type (format) of the datatransferitem object representing the drag data item.
DataTransferItemList.add() - Web APIs
exceptions notsupportederror a string data parameter was provided, and the list already contains an item whose kind is "plain unicode string" and whose type is equal to the specified type parameter.
DataTransferItemList.clear() - Web APIs
while handling drop, the drag data store is in read-only mode, and this method silently does nothing.
DataTransferItemList.length - Web APIs
the read-only length property of the datatransferitemlist interface returns the number of items currently in the drag item list.
DataTransferItemList.remove() - Web APIs
exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be removed.
DataTransferItemList - Web APIs
properties datatransferitemlist.length read only an unsigned long that is the number of drag items in the list.
DedicatedWorkerGlobalScope.close() - Web APIs
note: there is also a way to stop the worker from the main thread: the worker.terminate method.
DedicatedWorkerGlobalScope.name - Web APIs
the name read-only property of the dedicatedworkerglobalscope interface returns the name that the worker was (optionally) given when it was created.
DelayNode.delayTime - Web APIs
syntax var audioctx = new audiocontext(); var mydelay = audioctx.createdelay(5.0); mydelay.delaytime.value = 3.0; note: though the audioparam returned is read-only, the value it represents is not.
DelayNode - Web APIs
WebAPIDelayNode
delaynode.delaytime read only is an a-rate audioparam representing the amount of delay to apply, specified in seconds.
DeprecationReportBody - Web APIs
message a string containing a human-readable description of the deprecation, including information such as what newer feature has superceded it, if any.
Using light sensors - Web APIs
window.addeventlistener("devicelight", function (event) { // read out the lux value var luminosity = event.value; alert(luminosity); }); example: window.addeventlistener('devicelight', function(event) { var bodybg= document.body.style; //event.value is the lux value returned by the sensor on the device if (event.value < 100) { alert('hey, you!
DeviceLightEvent - Web APIs
for example this may be useful to adjust the screen's brightness based on the current ambient light level in order to save energy or provide better readability.
DeviceMotionEvent.rotationRate - Web APIs
syntax var rotationrate = devicemotionevent.rotationrate; value the rotationrate property is a read only object describing the rotation rates of the device around each of its axes: alpha the rate at which the device is rotating about its z axis; that is, being twisted about a line perpendicular to the screen.
DeviceMotionEventAcceleration: x - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the x axis in a devicemotioneventacceleration object.
DeviceMotionEventAcceleration: y - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the y axis in a devicemotioneventacceleration object.
DeviceMotionEventAcceleration: z - Web APIs
summary this read-only property indicates the amount of acceleration that occurred along the z axis in a devicemotioneventacceleration object.
DeviceMotionEventRotationRate: alpha - Web APIs
syntax var alpha = devicerotationrate.alpha; this property is read-only.
DeviceMotionEventRotationRate: beta - Web APIs
syntax var beta = devicerotationrate.beta; this property is read-only.
DeviceMotionEventRotationRate: gamma - Web APIs
syntax var gamma = devicerotationrate.gamma; this property is read-only.
Document.URL - Web APIs
WebAPIDocumentURL
the url read-only property of the document interface returns the document location as a string.
Document.all - Web APIs
WebAPIDocumentall
the document interface's read-only all property returns an htmlallcollection rooted at the document node.
Document.anchors - Web APIs
WebAPIDocumentanchors
the anchors read-only property of the document interface returns a list of all of the anchors in the document.
Document.characterSet - Web APIs
the document.characterset read-only property returns the character encoding of the document that it's currently rendered with.
Document.createDocumentFragment() - Web APIs
syntax var fragment = document.createdocumentfragment(); value a newly created, empty, documentfragment object, which is ready to have nodes inserted into it.
Document.createNSResolver() - Web APIs
read more on how to create a user defined namespace resolver if you wish to take the latter approach.
Document.defaultView - Web APIs
syntax var win = document.defaultview; this property is read-only.
Document.doctype - Web APIs
WebAPIDocumentdoctype
syntax doctype = document.doctype; doctype is a read-only property.
Document.documentURI - Web APIs
the documenturi read-only property of the document interface returns the document location as a string.
Document.documentURIObject - Web APIs
the document.documenturiobject read-only property returns an nsiuri object representing the uri of the document.
Document.embeds - Web APIs
WebAPIDocumentembeds
the embeds read-only property of the document interface returns a list of the embedded <object> elements within the current document.
Document.execCommand() - Web APIs
contentreadonly makes the content document either read-only or editable.
Document.featurePolicy - Web APIs
the featurepolicy read-only property of the document interface returns the featurepolicy interface which provides a simple api for inspecting the feature policies applied to a specific document.
Document.fonts - Web APIs
WebAPIDocumentfonts
examples doing operation after all fonts are loaded document.fonts.ready.then(function() { // any operation that needs to be done only after all the fonts // have finished loading can go here.
Document.forms - Web APIs
WebAPIDocumentforms
the forms read-only property of the document interface returns an htmlcollection listing all the <form> elements contained in the document.
Document.hidden - Web APIs
WebAPIDocumenthidden
the document.hidden read-only property returns a boolean value indicating if the page is considered hidden or not.
Document.images - Web APIs
WebAPIDocumentimages
the images read-only property of the document interface returns a collection of the images in the current html document.
Document.lastModified - Web APIs
(see: bug 4363 – document.lastmodified returns date in utc time, but should return it in local time) if you want to know whether an external page has changed, please read this paragraph about the xmlhttprequest() api.
Document.links - Web APIs
WebAPIDocumentlinks
the links read-only property of the document interface returns a collection of all <area> elements and <a> elements in a document with a value for the href attribute.
Document.origin - Web APIs
WebAPIDocumentorigin
the document.origin read-only property returns the document's origin.
Document.plugins - Web APIs
WebAPIDocumentplugins
the plugins read-only property of the document interface returns an htmlcollection object containing one or more htmlembedelements representing the <embed> elements in the current document.
Document.queryCommandEnabled() - Web APIs
notes for 'cut' and 'copy' commands the method only returns true when called from a user-initiated thread.
Document.requestStorageAccess() - Web APIs
conditions for granting storage access storage access is granted based on a series of checks described here: if the document already has been granted access, resolve.
Document.scrollingElement - Web APIs
the scrollingelement read-only property of the document interface returns a reference to the element that scrolls the document.
Document.styleSheetSets - Web APIs
the stylesheetsets read-only property returns a live list of all of the currently-available style sheet sets.
Document.timeline - Web APIs
WebAPIDocumenttimeline
the timeline readonly property of the document interface represents the default timeline of the current document.
Document.visibilityState - Web APIs
the document.visibilitystate read-only property returns the visibility of the document, that is in which context this element is now visible.
Document.write() - Web APIs
WebAPIDocumentwrite
writing to a document that has already loaded without calling document.open() will automatically call document.open().
DocumentOrShadowRoot.activeElement - Web APIs
the activeelement read-only property of the document and shadowroot interfaces returns the element within the dom or shadow dom tree that currently has focus.
DocumentOrShadowRoot.styleSheets - Web APIs
the stylesheets read-only property of the documentorshadowroot interface returns a stylesheetlist of cssstylesheet objects, for stylesheets explicitly linked into or embedded in a document.
Events and the DOM - Web APIs
it inflates the markup, and makes it less readable.
Introduction to the DOM - Web APIs
however, you design your test pages, testing the interfaces as you read about them is an important part of learning how to use the dom effectively.
Locating DOM elements using selectors - Web APIs
you may find examples and details by reading the documentation for the element.queryselector() and element.queryselectorall() methods, as well as in the article code snippets for queryselector.
DragEvent.dataTransfer - Web APIs
this property is read only .
DragEvent - Web APIs
WebAPIDragEvent
properties dragevent.datatransfer read only the data that is transferred during a drag and drop interaction.
DynamicsCompressorNode.attack - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
DynamicsCompressorNode.knee - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
DynamicsCompressorNode.ratio - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
DynamicsCompressorNode.reduction - Web APIs
the reduction read-only property of the dynamicscompressornode interface is a float representing the amount of gain reduction currently applied by the compressor to the signal.
DynamicsCompressorNode.release - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
DynamicsCompressorNode.threshold - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
EffectTiming.fill - Web APIs
WebAPIEffectTimingfill
"auto" if the animation effect the fill mode is being applied to is a keyframe effect (keyframeeffect or keyframeeffectreadonly), "auto" is equivalent to "none".
EffectTiming - Web APIs
the effecttiming dictionary, part of the web animations api, is used by element.animate(), keyframeeffectreadonly(), and keyframeeffect() to describe timing properties for animation effects.
Element.accessKey - Web APIs
WebAPIElementaccessKey
the element.accesskey property is seldom used because of its multiple conflicts with already present key bindings in browsers.
Element.attachShadow() - Web APIs
exceptions exception explanation invalidstateerror the element you are trying to attach to is already a shadow host.
Element.clientLeft - Web APIs
clientleft is read-only.
Element.clientTop - Web APIs
WebAPIElementclientTop
it is a read-only, integer property of element.
Element.clientWidth - Web APIs
the clientwidth property is read–only.
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: copy event - Web APIs
however, the handler cannot read the clipboard data.
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: cut event - Web APIs
WebAPIElementcut event
the handler cannot read the clipboard data.
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: fullscreenchange event - Web APIs
remember that by the time the fullscreenchange event is handled, the status of the element has already changed.
Element.getAttributeNS() - Web APIs
examples the following svg document reads the value of the foo attribute in a custom namespace.
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
WebAPIElementinnerHTML
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.localName - Web APIs
WebAPIElementlocalName
the element.localname read-only property returns the local part of the qualified name of an element.
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.openOrClosedShadowRoot - Web APIs
the element.openorcloseshadowroot read-only property represents the shadow root hosted by the element, regardless if its mode is open or closed.
Element.outerHTML - Web APIs
WebAPIElementouterHTML
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.
Element.prefix - Web APIs
WebAPIElementprefix
the element.prefix read-only property returns the namespace prefix of the specified element, or null if no prefix is specified.
Element.scrollLeftMax - Web APIs
the element.scrollleftmax read-only property returns a number representing the maximum left scroll offset possible for the element.
Element.scrollTopMax - Web APIs
the element.scrolltopmax read-only property returns a number representing the maximum top scroll offset possible for the element.
Element.scrollWidth - Web APIs
the element.scrollwidth read-only property is a measurement of the width of an element's content, including content not visible on the screen due to overflow.
Element.setAttribute() - Web APIs
if the attribute already exists, the value is updated; otherwise a new attribute is added with the specified name and value.
Element.setAttributeNode() - Web APIs
html <div id="one" align="left">one</div> <div id="two">two</div> javascript let d1 = document.getelementbyid('one'); let d2 = document.getelementbyid('two'); let a = d1.getattributenode('align'); d2.setattributenode(a.clonenode(true)); // returns: 'left' alert(d2.attributes[1].value); notes if the attribute named already exists on the element, that attribute is replaced with the new one and the replaced one is returned.
Element.shadowRoot - Web APIs
the element.shadowroot read-only property represents the shadow root hosted by the element.
Element.tagName - Web APIs
WebAPIElementtagName
the tagname read-only property of the element interface returns the tag name of the element on which it's called.
ElementCSSInlineStyle.style - Web APIs
setting styles styles should not be set by assigning a string directly to the style property (as in elt.style = "color: blue;"), since it is considered read-only, as the style attribute returns a cssstyledeclaration object which is also read-only.
Encrypted Media Extensions API - Web APIs
mediakeystatusmap is a read-only map of media key statuses by key ids.
Event.cancelable - Web APIs
WebAPIEventcancelable
the cancelable read-only property of the event interface indicates whether the event can be canceled, and therefore prevented as if the event never happened.
Event.composed - Web APIs
WebAPIEventcomposed
the read-only composed property of the event interface returns a boolean which indicates whether or not the event will propagate across the shadow dom boundary into the standard dom.
Event.currentTarget - Web APIs
the currenttarget read-only property of the event interface identifies the current target for the event, as the event traverses the dom.
Event.defaultPrevented - Web APIs
the defaultprevented read-only property of the event interface returns a boolean indicating whether or not the call to event.preventdefault() canceled the event.
Event.eventPhase - Web APIs
WebAPIEventeventPhase
the eventphase read-only property of the event interface indicates which phase of the event flow is currently being evaluated.
Event.isTrusted - Web APIs
WebAPIEventisTrusted
the istrusted read-only property of the event interface is a boolean that is true when the event was generated by a user action, and false when the event was created or modified by a script or dispatched via eventtarget.dispatchevent().
Event.timeStamp - Web APIs
WebAPIEventtimeStamp
the timestamp read-only property of the event interface returns the time (in milliseconds) at which the event was created.
Event.type - Web APIs
WebAPIEventtype
the type read-only property of the event interface returns a string containing the event's type.
EventSource.url - Web APIs
WebAPIEventSourceurl
the url read-only property of the eventsource interface returns a domstring representing the url of the source.
EventSource.withCredentials - Web APIs
the withcredentials read-only property of the eventsource interface returns a boolean indicating whether the eventsource object was instantiated with cors credentials set.
ExtendableMessageEvent.data - Web APIs
the data read-only property of the extendablemessageevent interface returns the event's data.
ExtendableMessageEvent.lastEventId - Web APIs
the lasteventid read-only property of the extendablemessageevent interface represents, in server-sent events, the last event id of the event source.
ExtendableMessageEvent.origin - Web APIs
the origin read-only property of the extendablemessageevent interface returns the origin of the client that sent the message.
ExtendableMessageEvent.ports - Web APIs
the ports read-only property of the extendablemessageevent interface returns the array containing the messageport objects representing the ports of the associated message channel (the channel the message is being sent through.) syntax var myports = extendablemessageevent.ports; value an array of messageport objects.
ExtendableMessageEvent.source - Web APIs
the source read-only property of the extendablemessageevent interface returns a reference to the client object from which the message was sent.
FederatedCredential.protocol - Web APIs
the protocol property of the federatedcredential interface returns a read-only domstring containing a credential's federated identity protocol.
FetchEvent.preloadResponse - Web APIs
the preloadresponse read-only property of the fetchevent interface returns a promise that resolves to the navigation preload response if navigation preload was triggered or undefined otherwise.
FetchEvent.client - Web APIs
WebAPIFetchEventclient
the fetchevent.client read-only property returns the client that the current service worker is controlling.
FetchEvent.clientId - Web APIs
the clientid read-only property of the fetchevent interface returns the id of the client that the current service worker is controlling.
FetchEvent.isReload - Web APIs
the isreload read-only property of the fetchevent interface returns true if the event was dispatched by the user attempting to reload the page, and false otherwise.
FetchEvent.navigationPreload - Web APIs
the navigationpreload read-only property of the fetchevent interface returns a promise that resolves to the instance of navigationpreloadmanager associated with the current service worker registration.
FetchEvent.replacesClientId - Web APIs
the replacesclientid read-only property of the fetchevent interface is the id of the client that is being replaced during a page navigation.
FetchEvent.request - Web APIs
the request read-only property of the fetchevent interface returns the request that triggered the event handler.
FetchEvent.respondWith() - Web APIs
invalidstateerror the event has not been dispatched or respondwithwith() has already been invoked.
FetchEvent.resultingClientId - Web APIs
the resultingclientid read-only property of the fetchevent interface is the id of the client that replaces the previous client during a page navigation.
Fetch API - Web APIs
WebAPIFetch API
aborting a fetch browsers have started to add experimental support for the abortcontroller and abortsignal interfaces (aka the abort api), which allow operations like fetch and xhr to be aborted if they have not already completed.
File.getAsBinary() - Web APIs
WebAPIFilegetAsBinary
note: this method is obsolete; you should use the filereader method readasbinarystring() or readasarraybuffer() instead.
File.getAsDataURL() - Web APIs
WebAPIFilegetAsDataURL
note: this method is obsolete; you should use the filereader method readasdataurl() instead.
File.getAsText() - Web APIs
WebAPIFilegetAsText
note: this method is obsolete; you should use the filereader method readastext() instead.
File.lastModifiedDate - Web APIs
the file.lastmodifieddate read-only property returns the last modified date of the file.
File.type - Web APIs
WebAPIFiletype
for example "image/png" for png images example <input type="file" multiple onchange="showtype(this)"> function showtype(fileinput) { var files = fileinput.files; for (var i = 0; i < files.length; i++) { var name = files[i].name; var type = files[i].type; alert("filename: " + name + " , type: " + type); } } note: based on the current implementation, browsers won't actually read the bytestream of a file to determine its media type.
File.webkitRelativePath - Web APIs
the file.webkitrelativepath is a read-only property that contains a usvstring which specifies the file's path relative to the directory selected by the user in an <input> element with its webkitdirectory attribute set.
onerror - Web APIs
the filereader onerror handler receives an event object, not an error object, as a parameter, but an error can be accessed from the filereader object, as instanceoffilereader.error // callback from a <input type="file" onchange="onchange(event)"> function onchange(event) { var file = event.target.files[0]; var reader = new filereader(); reader.onerror = function(event) { alert("failed to read file!\n\n" + reader.error); reader.abort(); // (...does this do anything useful in an onerror handler?) }; reader.readastext(file); } ...
FileRequest - Web APIs
properties filerequest.lockedfile read only the lockedfile object from which the request was started.
FileSystem.name - Web APIs
WebAPIFileSystemname
the read-only name property of the filesystem interface indicates the file system's name.
FileSystem.root - Web APIs
WebAPIFileSystemroot
the read-only root property of the filesystem interface specifies a filesystemdirectoryentry object representing the root directory of the file system, for use with the file and directory entries api.
FileSystemDirectoryEntry.removeRecursively() - Web APIs
fileerror.not_readable_err the directory is not accessible; perhaps it's in use by another application or is locked at the operating system level.
FileSystemEntry.filesystem - Web APIs
the read-only filesystem property of the filesystementry interface contains a filesystem object that represents the file system on which the entry resides.
FileSystemEntry.fullPath - Web APIs
the read-only fullpath property of the filesystementry interface returns a usvstring specifying the full, absolute path from the file system's root to the file represented by the entry.
FileSystemEntry.isDirectory - Web APIs
the read-only isdirectory property of the filesystementry interface is true if the entry represents a directory (meaning it's a filesystemdirectoryentry) and false if it's not.
FileSystemEntry.isFile - Web APIs
the read-only isfile property of the filesystementry interface is true if the entry represents a file (meaning it's a filesystemfileentry) and false if it's not.
FileSystemEntry.name - Web APIs
the read-only name property of the filesystementry interface returns a usvstring specifying the entry's name; this is the entry within its parent directory (the last component of the path as indicated by the fullpath property).
FileSystemFlags.create - Web APIs
syntax filesystemflags.create = 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 already exists.
FocusEvent.relatedTarget - Web APIs
the focusevent.relatedtarget read-only property is the secondary target, depending on the type of event: event name target relatedtarget blur the eventtarget losing focus the eventtarget receiving focus (if any).
FontFace.display - Web APIs
WebAPIFontFacedisplay
the display property of the fontface interface determines how a font face is displayed based on whether and when it is downloaded and ready to use.
FontFace.loaded - Web APIs
WebAPIFontFaceloaded
the loaded read-only property of the fontface interface 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 - Web APIs
WebAPIFontFacestatus
the status read-only property of the fontface interface returns an enumerated value indicating the status of the font, one of "unloaded", "loading", "loaded", or "error".
FontFaceSetLoadEvent.fontfaces - Web APIs
the fontfaces read-only property of the fontfaceloadeventinit interface returns an array of fontface instances, each of which represents a single usable font.
FontFaceSetLoadEvent - Web APIs
properties fontfacesetloadevent.fontfacesread only returns an array of fontface instances each of which represents a single usable font.
Force Touch events - Web APIs
event properties the following property is known to be available on the webkitmouseforcewillbegin, mousedown, webkitmouseforcechanged, webkitmouseforcedown, webkitmouseforceup, mousemove, and mouseup event objects: mouseevent.webkitforce read only the amount of pressure currently being applied to the trackpad/touchscreen constants these constants are useful for determining the relative intensity of the pressure indicated by mouseevent.webkitforce: mouseevent.webkit_force_at_mouse_down read only minimum force necessary for a normal click mouseevent.webkit_force_at_force_mouse_down read only minimum force necessary for a ...
Using FormData Objects - Web APIs
submitting forms and uploading files via ajax without formdata objects if you want to know how to serialize and submit a form via ajax without using formdata objects, please read this paragraph.
FormDataEvent.formData - Web APIs
the formdata read only property of the formdataevent interface contains the formdata object representing the data contained in the form when the event was fired.
Guide to the Fullscreen API - Web APIs
if fullscreen mode is already active (fullscreenelement is non-null), we call document.exitfullscreen().
Fullscreen API - Web APIs
if full-screen mode is already active (fullscreenelement is not null), we call exitfullscreen() on the document to shut off full-screen mode.
GainNode.gain - Web APIs
WebAPIGainNodegain
note: though the audioparam returned is read-only, the value it represents is not.
GainNode - Web APIs
WebAPIGainNode
gainnode.gain read only is an a-rate audioparam representing the amount of gain to apply.
Gamepad.axes - Web APIs
WebAPIGamepadaxes
syntax readonly attribute double[] axes; example function gameloop() { if(navigator.webkitgetgamepads) { var gp = navigator.webkitgetgamepads()[0]; } else { var gp = navigator.getgamepads()[0]; } if(gp.axes[0] != 0) { b -= gp.axes[0]; } else if(gp.axes[1] != 0) { a += gp.axes[1]; } else if(gp.axes[2] != 0) { b += gp.axes[2]; } else if(gp.axes[3] != 0) { a -= gp.axes[3]; } ball.style.left = a*2 + "px"; ball.style.to...
Gamepad.buttons - Web APIs
WebAPIGamepadbuttons
syntax readonly attribute gamepadbutton[] buttons; example the following code is taken from my gamepad api button demo (you can view the demo live, and find the source code on github.) note the code fork — in chrome navigator.getgamepads needs a webkit prefix and the button values are stores as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the butto...
Gamepad.connected - Web APIs
WebAPIGamepadconnected
syntax readonly attribute boolean connected; example var gp = navigator.getgamepads()[0]; console.log(gp.connected); value a boolean.
Gamepad.hand - Web APIs
WebAPIGamepadhand
the hand read-only property of the gamepad interface returns an enum defining what hand the controller is being held in, or is most likely to be held in.
Gamepad.hapticActuators - Web APIs
the hapticactuators read-only property of the gamepad interface returns an array containing gamepadhapticactuator objects, each of which represents haptic feedback hardware available on the controller.
Gamepad.id - Web APIs
WebAPIGamepadid
syntax readonly attribute domstring id; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a string.
Gamepad.index - Web APIs
WebAPIGamepadindex
syntax readonly attribute long index; example window.addeventlistener("gamepadconnected", function() { var gp = navigator.getgamepads()[0]; gamepadinfo.innerhtml = "gamepad connected at index " + gp.index + ": " + gp.id + "."; }); value a number.
Gamepad.mapping - Web APIs
WebAPIGamepadmapping
syntax readonly attribute domstring mapping; example var gp = navigator.getgamepads()[0]; console.log(gp.mapping); value a string.
Gamepad.timestamp - Web APIs
WebAPIGamepadtimestamp
syntax readonly attribute domhighrestimestamp timestamp; example var gp = navigator.getgamepads()[0]; console.log(gp.timestamp); value a domhighrestimestamp.
GamepadButton.value - Web APIs
syntax readonly attribute double value; example var gp = navigator.getgamepads()[0]; if(gp.buttons[0].value > 0) { // respond to analog button being pressed in } value a double.
GamepadEvent.gamepad - Web APIs
syntax readonly attribute gamepad gamepad; example the gamepad property being called on a fired window.gamepadconnected event.
GamepadEvent - Web APIs
properties gamepadevent.gamepad read only returns a gamepad object, providing access to the associated gamepad data for the event fired.
GamepadHapticActuator.type - Web APIs
the type read-only property of the gamepadhapticactuator interface returns an enum representing the type of the haptic hardware.
GeolocationCoordinates.accuracy - Web APIs
the geolocationcoordinates.accuracy read-only property is a strictly positive double representing the accuracy, with a 95% confidence level, of the geolocationcoordinates.latitude and geolocationcoordinates.longitude properties expressed in meters.
GeolocationCoordinates.altitude - Web APIs
the geolocationcoordinates.altitude read-only property is a double representing the altitude of the position in meters, relative to sea level.
GeolocationCoordinates.altitudeAccuracy - Web APIs
the geolocationcoordinates.altitudeaccuracy read-only property is a strictly positive double representing the accuracy, with a 95% confidence level, of the altitude expressed in meters.
GeolocationCoordinates.heading - Web APIs
the geolocationcoordinates.heading read-only property is a double representing the direction in which the device is traveling.
GeolocationCoordinates.latitude - Web APIs
the geolocationcoordinates.latitude read-only property is a double representing the latitude of the position in decimal degrees.
GeolocationCoordinates.longitude - Web APIs
the geolocationcoordinates interface's read-only longitude property is a double-precision floating point value which represents the longitude of a geographical position, specified in decimal degrees.
GeolocationCoordinates.speed - Web APIs
the geolocationcoordinates.speed read-only property is a double representing the velocity of the device in meters per second.
GeolocationPosition.coords - Web APIs
the geolocationposition.coords read-only property returns a geolocationcoordinates object representing a geographic position.
GeolocationPosition.timestamp - Web APIs
the geolocationposition.timestamp read-only property returns a domtimestamp object, represents the date and the time of the creation of the geolocationposition object it belongs to.
GeolocationPositionError.code - Web APIs
the geolocationpositionerror.code read-only property is an unsigned short representing the error code.
Using the Geolocation API - Web APIs
this object type contains two properties, a code indicating what type of error has been returned, and a human-readable message that describes what the error code means.
Geolocation API - Web APIs
for further information on geolocation usage, read using the geolocation api.
GlobalEventHandlers.onemptied - Web APIs
the emptied event is fired when the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
GlobalEventHandlers.onplaying - Web APIs
the playing event is fired when playback is ready to start after having been paused or delayed due to lack of media data.
Audio() - Web APIs
determining when playback can begin there are three ways you can tell when enough of the audio file has loaded to allow playback to begin: check the value of the readystate property.
msAudioCategory - Web APIs
the msaudiocategory property of the html <audio> element, is a read/write proprietary attribute, specific to internet explorer and microsoft edge.
msAudioDeviceType - Web APIs
the msaudiodevicetype property of the html <audio> element, is a read/write proprietary attribute, specific to internet explorer and microsoft edge.
HTMLButtonElement.labels - Web APIs
the htmlbuttonelement.labels read-only property returns a nodelist of the <label> elements associated with the <button> element.
HTMLCanvasElement.mozFetchAsStream() - Web APIs
the htmlcanvaselement.mozfetchasstream() internal method used to create a new input stream that, when ready, would provide the contents of the canvas as image data.
HTMLCanvasElement.transferControlToOffscreen() - Web APIs
the htmlcanvaselement.transfercontroltooffscreen() method transfers control to an offscreencanvas object, either on the main thread or on a worker.
HTMLCanvasElement - Web APIs
htmlcanvaselement.transfercontroltooffscreen() transfers control to an offscreencanvas object, either on the main thread or on a worker.
HTMLCollection - Web APIs
properties htmlcollection.length read only returns the number of items in the collection.
HTMLDataElement - Web APIs
htmldataelement.value is a domstring reflecting the value html attribute, containing a machine-readable form of the element's value.
HTMLDataListElement - Web APIs
#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="396" y="94" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmldatalistelement</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties inherits properties from its parent, htmlelement htmldatalistelement.options read only is a htmlcollection representing a collection of the contained option elements.
HTMLDialogElement.open - Web APIs
the property is now read only — it is possible to set the value to programmatically show or hide the dialog.
accessKeyLabel - Web APIs
the htmlelement.accesskeylabel read-only property returns a string that represents the element's assigned access key (if any); otherwise it returns an empty string.
HTMLElement.innerText - Web APIs
html <h3>source element:</h3> <p id="source"> <style>#source { color: red; } #text { text-transform: uppercase; }</style> <span id=text>take a look at<br>how this text<br>is interpreted below.</span> <span style="display:none">hidden text</span> </p> <h3>result of textcontent:</h3> <textarea id="textcontentoutput" rows="6" cols="30" readonly>...</textarea> <h3>result of innertext:</h3> <textarea id="innertextoutput" rows="6" cols="30" readonly>...</textarea> javascript const source = document.getelementbyid("source"); const textcontentoutput = document.getelementbyid("textcontentoutput"); const innertextoutput = document.getelementbyid("innertextoutput"); textcontentoutput.value = source.textcontent; innertextoutput.value = so...
HTMLElement.isContentEditable - Web APIs
the htmlelement.iscontenteditable read-only property returns a boolean that is true if the contents of the element are editable; otherwise it returns false.
HTMLElement.offsetLeft - Web APIs
the htmlelement.offsetleft read-only property returns the number of pixels that the upper left corner of the current element is offset to the left within the htmlelement.offsetparent node.
HTMLElement.offsetParent - Web APIs
the htmlelement.offsetparent read-only property returns a reference to the element which is the closest (nearest in the containment hierarchy) positioned ancestor element.
HTMLElement.offsetTop - Web APIs
the htmlelement.offsettop read-only property returns the distance of the current element relative to the top of the offsetparent node.
HTMLFormElement.length - Web APIs
the htmlformelement.length read-only property returns the number of controls in the <form> element.
HTMLHtmlElement - Web APIs
you can retrieve the htmlhtmlelement object for a given document by reading the value of the document.documentelement property.
HTMLHyperlinkElementUtils.origin - Web APIs
the htmlhyperlinkelementutils.origin read-only property is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or 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); for url using file: scheme, the value is browser dependant; for url using the blob: scheme, the origin of the url following blob:.
HTMLHyperlinkElementUtils.toString() - Web APIs
it is a read-only version of htmlhyperlinkelementutils.href.
HTMLHyperlinkElementUtils - Web APIs
htmlhyperlinkelementutils.origin read only this returns a usvstring containing the origin of the url (that is its scheme, its domain and its port).
HTMLIFrameElement.contentWindow - Web APIs
this attribute is read-only, but its properties can be manipulated like the global window object.
HTMLIFrameElement.featurePolicy - Web APIs
the featurepolicy read-only property of the htmliframeelement interface returns the featurepolicy interface which provides a simple api for introspecting the feature policies applied to a specific frame.
HTMLImageElement.currentSrc - Web APIs
the read-only htmlimageelement property currentsrc indicates the url of the image which is currently presented in the <img> element it represents.
HTMLImageElement.longDesc - Web APIs
this can be used by readers both as an explanation, but also as a substitute for visually-impaired users.
HTMLImageElement.naturalHeight - Web APIs
the htmlimageelement interface's naturalheight property is a read-only value which returns the intrinsic (natural), density-corrected height of the image in css pixels.
HTMLImageElement.naturalWidth - Web APIs
the htmlimageelement interface's read-only naturalwidth property returns the intrinsic (natural), density-corrected width of the image in css pixels.
HTMLImageElement.x - Web APIs
the read-only htmlimageelement property x indicates the x-coordinate of the <img> element's left border edge relative to the root element's origin.
HTMLImageElement.y - Web APIs
the read-only htmlimageelement property y indicates the y-coordinate of the <img> element's top border edge relative to the root element's origin.
HTMLInputElement.labels - Web APIs
the htmlinputelement.labels read-only property returns a nodelist of the <label> elements associated with the <input> element.
HTMLInputElement.setRangeText() - Web APIs
html <input type="text" id="text-box" size="30" value="this text has not been updated."> <button onclick="selecttext()">update text</button> javascript function selecttext() { const input = document.getelementbyid('text-box'); input.focus(); input.setrangetext('already', 14, 17, 'select'); } result specifications specification status comment html living standardthe definition of 'htmlinputelement.setselectionrange()' in that specification.
HTMLInputElement.setSelectionRange() - Web APIs
for example, on input of type number: "failed to read the 'selectionstart' property from 'htmlinputelement': the input element's type ('number') does not support selection".
HTMLInputElement.webkitEntries - Web APIs
the read-only webkitentries property of the htmlinputelement interface contains an array of file system entries (as objects based on filesystementry) representing files and/or directories selected by the user using an <input> element of type file, but only if that selection was made using drag-and-drop: selecting a file in the dialog will leave the property empty (bug 1326031).
HTMLIsIndexElement - Web APIs
htmlisindexelement.form read only is a htmlformelement representing the <form> element it belongs too.
HTMLLabelElement.control - Web APIs
the read-only htmllabelelement.control property returns a reference to the control (in the form of an object of type htmlelement or one of its derivatives) with which the <label> element is associated, or null if the label isn't associated with a control.
HTMLLabelElement.form - Web APIs
the read-only htmllabelelement.form property returns an htmlformelement object which represents the form of which the label's associated control is a part, or null if there is either no associated control, or if that control isn't in a form.
HTMLLabelElement.htmlFor - Web APIs
that means that this script-accessible property is used to set and read the value of the content property for, which is the id of the label's associated control element.
HTMLLegendElement - Web APIs
htmllegendelement.form read only is a htmlformelement representing the form that this legend belongs to.
HTMLMapElement - Web APIs
htmlmapelement.areas read only is a live htmlcollection representing the <area> elements associated to this <map>.
HTMLMediaElement.audioTracks - Web APIs
the read-only audiotracks property on htmlmediaelement objects returns an audiotracklist object listing all of the audiotrack objects representing the media element's audio tracks.
HTMLMediaElement.buffered - Web APIs
the htmlmediaelement.buffered read-only property returns a new 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.duration - Web APIs
the read-only htmlmediaelement property duration indicates the length of the element's media in seconds.
HTMLMediaElement: emptied event - Web APIs
the emptied event is fired when the media has become empty; for example, this event is sent if the media has already been loaded (or partially loaded), and the load() method is called to reload it.
HTMLMediaElement: loadstart event - Web APIs
bubbles no cancelable no interface event event handler property onloadstart examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } video { grid-area: video; } .ev...
HTMLMediaElement.networkState - Web APIs
also, readystate is have_nothing.
HTMLMediaElement.pause() - Web APIs
the htmlmediaelement.pause() method will pause playback of the media, if the media is already in a paused state this method will have no effect.
HTMLMediaElement.paused - Web APIs
the read-only htmlmediaelement.paused property tells whether the media element is paused.
HTMLMediaElement: playing event - Web APIs
the playing event is fired when playback is ready to start after having been paused or delayed due to lack of data.
HTMLMediaElement: progress event - Web APIs
bubbles no cancelable no interface event event handler property onprogress examples live example html <div class="example"> <button type="button">load video</button> <video controls width="250"></video> <div class="event-log"> <label>event log:</label> <textarea readonly class="event-log-contents"></textarea> </div> </div> css .event-log-contents { width: 18rem; height: 5rem; border: 1px solid black; margin: .2rem; padding: .2rem; } .example { display: grid; grid-template-areas: "button log" "video log"; } button { grid-area: button; width: 10rem; margin: .5rem 0; } video { grid-area: video; } .ev...
HTMLMediaElement.seekToNextFrame() - Web APIs
if the seek fails because the media is already at the last frame, a seeked event occurs, followed immediately by an ended event.
HTMLMediaElement.seekable - Web APIs
the seekable read-only property of the htmlmediaelement returns a timeranges object that contains the time ranges that the user is able to seek to, if any.
HTMLMediaElement.sinkId - Web APIs
the htmlmediaelement.sinkid read-only property returns a domstring that is the unique id of the audio device delivering output.
HTMLMedia​Element​.textTracks - Web APIs
the read-only texttracks property on htmlmediaelement objects returns a texttracklist object listing all of the texttrack objects representing the media element's text tracks, in the same order as in the list of text tracks.
HTMLMediaElement.videoTracks - Web APIs
the read-only videotracks property on htmlmediaelement objects returns a videotracklist object listing all of the videotrack objects representing the media element's video tracks.
HTMLMeterElement.labels - Web APIs
the htmlmeterelement.labels read-only property returns a nodelist of the <label> elements associated with the <meter> element.
HTMLMeterElement - Web APIs
htmlmeterelement.labelsread only a nodelist of <label> elements that are associated with the element.
HTMLObjectElement.contentDocument - Web APIs
the contentdocument read-only property of the htmlobjectelement interface returns a document representing the active document of the object element's nested browsing context, if any; otherwise null.
HTMLObjectElement.contentWindow - Web APIs
the contentwindow read-only property of the htmlobjectelement interface returns a windowproxy representing the window proxy of the object element's nested browsing context, if any; otherwise null.
HTMLObjectElement.form - Web APIs
the form read-only property of the htmlobjectelement interface retuns a htmlformelement representing the object element's form owner, or null if there isn't one.
HTMLObjectElement.validationMessage - Web APIs
the validationmessage read-only property of the htmlobjectelement interface returns a domstring representing a localized message that describes the validation constraints that the control does not satisfy (if any).
HTMLObjectElement.validity - Web APIs
the validity read-only property of the htmlobjectelement interface returns a validitystate with the validity states that this element is in.
HTMLObjectElement.willValidate - Web APIs
the willvalidate read-only property of the htmlobjectelement interface returns a boolean that indicates whether the element is a candidate for constraint validation.
Option() - Web APIs
note that a value of true does not set the option to selected if it is not already selected.
HTMLOptionsCollection - Web APIs
x="286" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">htmloptionscollection</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties name type description length unsigned long as optionally allowed by the spec, this property isn't read-only.
HTMLOrForeignElement - Web APIs
propertiesdataset read only the dataset read-only property of the htmlorforeignelement interface provides read/write access to all the custom data attributes (data-*) set on the element.nonce the nonce property of the htmlorforeignelement interface returns the cryptographic number used once that is used by content security policy to determine whether a given fetch will be allowed to proceed.tabindexthe tabindex property of the htmlorforeignele...
HTMLOutputElement.labels - Web APIs
the htmloutputelement.labels read-only property returns a nodelist of the <label> elements associated with the <output> element.
HTMLProgressElement.labels - Web APIs
the htmlprogresselement.labels read-only property returns a nodelist of the <label> elements associated with the <progress> element.
HTMLSelectElement.form - Web APIs
the htmlselectelement.form read-only property returns a htmlformelement representing the form that this element is associated with.
HTMLSelectElement.labels - Web APIs
the htmlselectelement.labels read-only property returns a nodelist of the <label> elements associated with the <select> element.
HTMLSelectElement.options - Web APIs
the htmlselectelement.options read-only property returns a htmloptionscollection of the <option> elements contained by the <select> element.
HTMLSelectElement.selectedOptions - Web APIs
the read-only htmlselectelement property selectedoptions contains a list of the <option> elements contained within the <select> element that are currently selected.
HTMLSelectElement.type - Web APIs
the htmlselectelement.type read-only property returns the form control's type.
HTMLStyleElement.type - Web APIs
the htmlstyleelement.type read-only property returns the type of the current style.
HTMLStyleElement - Web APIs
linkstyle.sheet read only returns the stylesheet object associated with the given element, or null if there is none htmlstyleelement.scoped is a boolean value indicating if the element applies to the whole document (false) or only to the parent's sub-tree (true).
HTMLTableRowElement.rowIndex - Web APIs
the htmltablerowelement.rowindex read-only property represents the position of a row in relation to the whole <table>.
HTMLTableSectionElement - Web APIs
htmltablesectionelement.rows read only returns a live htmlcollection containing the rows in the section.
HTMLTemplateElement - Web APIs
content read only a read-only documentfragment which contains the dom subtree representing the <template> element's template contents.
HTMLTextAreaElement.labels - Web APIs
the htmltextareaelement.labels read-only property returns a nodelist of the <label> elements associated with the <textarea> element.
HTMLTimeElement.dateTime - Web APIs
the htmltimeelement.datetime property is a domstring that reflects the datetime html attribute, containing a machine-readable form of the element's date and time value.
HTMLTimeElement - Web APIs
htmltimeelement.datetime is a domstring that reflects the datetime html attribute, containing a machine-readable form of the element's date and time value.
HTMLVideoElement.msHorizontalMirror - Web APIs
mshorizontalmirror is a read/write property which gets or sets whether a video element is flipped horizontally in the display.
HTMLVideoElement.msIsLayoutOptimalForPlayback - Web APIs
msislayoutoptimalforplayback is a read-only property which indicates whether the video can be rendered more efficiently.
HTMLVideoElement.msIsStereo3D - Web APIs
msisstereo3d is a read-only property which determines whether the system considers the loaded video source to be stereo 3-d or not.
msStereo3DPackingMode - Web APIs
msstereo3dpackingmode is a read/write property which gets or sets the frame-packing mode for stereo 3-d video content.
msStereo3DRenderMode - Web APIs
msstereo3drendermode is a read/write property which gets or sets whether the system display is set to stereo display (if stereo-capable).
HTMLVideoElement.msZoom - Web APIs
mszoom is a read/write property which gets or sets whether the video frame is trimmed, on the top and bottom or left and right, to fit the video display.
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 already disabled.
Recommended Drag Types - Web APIs
when this stream is read, it should provide the data bits for the image, as if the image was a file of that type.
HashChangeEvent.newURL - Web APIs
the newurl read-only property of the hashchangeevent interface returns the new url to which the window is navigating.
HashChangeEvent.oldURL - Web APIs
the oldurl read-only property of the hashchangeevent interface returns the previous url from which the window was navigated.
History.length - Web APIs
WebAPIHistorylength
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: "already 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
WebAPIIDBCursoradvance
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.close() - Web APIs
WebAPIIDBDatabaseclose
the close() method of the idbdatabase interface returns immediately and closes the connection in a separate thread.
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) already exists in the connected database.
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
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
WebAPIIDBIndexkeyPath
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
WebAPIIDBKeyRangebound
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
WebAPIIDBKeyRangeonly
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 = '&lt;td&gt;' + cursor.value.id + '&lt;/td&gt;' + '&lt;td&gt;' +...
FileHandle.getFile() - Web APIs
summary the getfile method allows to retrieve a read-only snapshot of the handled file in the form of a file object.
FileHandle.open() - Web APIs
it can be readonly or readwrite.
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 already 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 thread, 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 already 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 already 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...
IDBRequest.onsuccess - 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...
IDBTransaction.objectStoreNames - Web APIs
the objectstorenames read-only property of the idbtransaction interface returns a domstringlist of names of idbobjectstore objects.
IDBTransaction.commit() - Web APIs
examples // open a read/write db transaction, ready for adding the data var transaction = db.transaction(["mydb"], "readwrite"); // report on the success of opening the transaction transaction.oncomplete = function(event) { note.innerhtml += '<li>transaction completed: database modification finished.</li>'; }; transaction.onerror = function(event) { note.innerhtml += '<li>transaction not opened due to error.
IDBVersionChangeEvent.newVersion - Web APIs
the newversion read-only property of the idbversionchangeevent interface returns the new version number of the database.
IDBVersionChangeEvent.oldVersion - Web APIs
the oldversion read-only property of the idbversionchangeevent interface returns the old version number of the database.
IDBVersionChangeEvent.version - Web APIs
syntax readonly attribute unsigned long long?
IDBVersionChangeRequest.setVersion() - Web APIs
the idbversionchangerequest.setversion method updates the version of the database, returning immediately and running a versionchange transaction on the connected database in a separate thread.
IDBVersionChangeRequest - Web APIs
returns immediately and runs a versionchange transaction on the connected database in a separate thread.
IdleDeadline.didTimeout - Web APIs
the read-only didtimeout property on the idledeadline interface is a boolean value which indicates whether or not the idle callback is being invoked because the timeout interval specified when window.requestidlecallback() was called has expired.
IdleDeadline - Web APIs
properties idledeadline.didtimeout read only a boolean whose value is true if the callback is being executed because the timeout specified when the idle callback was installed has expired.
ImageBitmap.height - Web APIs
the read-only imagebitmap.height property returns the imagebitmap object's height in css pixels.
ImageBitmap.width - Web APIs
WebAPIImageBitmapwidth
the read-only imagebitmap.width property returns the imagebitmap object's width in css pixels.
ImageCapture.track - Web APIs
the track read-only property of the imagecapture interface returns a reference to the mediastreamtrack passed to the imagecapture() constructor.
ImageCapture - Web APIs
properties imagecapture.track read only returns a reference to the mediastreamtrack passed to the constructor.
ImageData.data - Web APIs
WebAPIImageDatadata
the readonly imagedata.data property returns a uint8clampedarray that contains the imagedata object's pixel data.
ImageData.height - Web APIs
WebAPIImageDataheight
the readonly imagedata.height property returns the number of rows in the imagedata object.
ImageData.width - Web APIs
WebAPIImageDatawidth
the readonly imagedata.width property returns the number of pixels per row in the imagedata object.
InputDeviceCapabilities - Web APIs
properties inputdevicecapabilities.firestoucheventsread only a boolean that indicates whether the device dispatches touch events.
InputEvent.data - Web APIs
WebAPIInputEventdata
the data read-only property of the inputevent interface returns a domstring with the inserted characters.
InputEvent.dataTransfer - Web APIs
the datatransfer read-only property of the inputevent interface returns a datatransfer object containing information about richtext or plaintext data being added to or removed from editible content.
InputEvent.inputType - Web APIs
the inputtype read-only property of the inputevent interface returns the type of change made to editible content.
InputEvent.isComposing - Web APIs
the inputevent.iscomposing read-only property returns a boolean value indicating if the event is fired after compositionstart and before compositionend.
InstallEvent - Web APIs
installevent.activeworker read only returns the serviceworker that is currently controlling the page.
IntersectionObserver.root - Web APIs
the intersectionobserver interface's read-only root property identifies the element or document whose bounds are treated as the bounding box of the viewport for the element which is the observer's target.
IntersectionObserver.rootMargin - Web APIs
the intersectionobserver interface's read-only rootmargin property is a string with syntax similar to that of the css margin property.
IntersectionObserver.thresholds - Web APIs
the intersectionobserver interface's read-only thresholds property returns the list of intersection thresholds that was specified when the observer was instantiated with intersectionobserver().
IntersectionObserverEntry.intersectionRatio - Web APIs
the intersectionobserverentry interface's read-only intersectionratio property tells you how much of the target element is currently visible within the root's intersection ratio, as a value between 0.0 and 1.0.
IntersectionObserverEntry.isIntersecting - Web APIs
the intersectionobserverentry interface's read-only isintersecting property is a boolean value which is true if the target element intersects with the intersection observer's root.
IntersectionObserverEntry.target - Web APIs
the intersectionobserverentry interface's read-only target property indicates which targeted element has changed its amount of intersection with the intersection root.
IntersectionObserverEntry.time - Web APIs
the intersectionobserverentry interface's read-only time property is a domhighrestimestamp that indicates the time at which the intersection change occurred relative to the time at which the document was created.
InterventionReportBody - Web APIs
message a string containing a human-readable description of the intervention, including information such how the intervention could be avoided.
KeyboardEvent.altKey - Web APIs
the keyboardevent.altkey read-only property is a boolean that indicates if the alt key (option or ⌥ on os x) was pressed (true) or not (false) when the event occured.
KeyboardEvent.charCode - Web APIs
the charcode read-only property of the keyboardevent interface returns the unicode value of a character key pressed during a keypress event.
KeyboardEvent.code - Web APIs
window.addeventlistener("keydown", function(event) { if (event.defaultprevented) { return; // do nothing if event already handled } switch(event.code) { case "keys": case "arrowdown": // handle "back" updateposition(-moverate); break; case "keyw": case "arrowup": // handle "forward" updateposition(moverate); break; case "keya": case "arrowleft": // handle "turn left" angle -= turnrate; break; case "keyd": case "arrowright": ...
KeyboardEvent.ctrlKey - Web APIs
the keyboardevent.ctrlkey read-only property returns a boolean that indicates if the control key was pressed (true) or not (false) when the event occured.
KeyboardEvent.isComposing - Web APIs
the keyboardevent.iscomposing read-only property returns a boolean value indicating if the event is fired within a composition session, i.e.
KeyboardEvent.keyCode - Web APIs
the deprecated keyboardevent.keycode read-only property represents a system and implementation dependent numerical code identifying the unmodified value of the pressed key.
KeyboardEvent.keyIdentifier - Web APIs
the deprecated keyboardevent.keyidentifier read-only property returns a "key identifier" string that can be used to determine what key was pressed.
KeyboardEvent.location - Web APIs
the keyboardevent.location read-only property returns an unsigned long representing the location of the key on the keyboard or other input device.
KeyboardEvent.metaKey - Web APIs
the keyboardevent.metakey read-only property returning a boolean that indicates if the meta key was pressed (true) or not (false) when the event occurred.
KeyboardEvent.repeat - Web APIs
the repeat read-only property of the keyboardevent interface returns a boolean that is true if the given key is being held down such that it is automatically repeating.
KeyboardEvent.shiftKey - Web APIs
the keyboardevent.shiftkey read-only property is a boolean that indicates if the shift key was pressed (true) or not (false) when the event occurred.
KeyboardEvent.which - Web APIs
the which read-only property of the keyboardevent interface returns the numeric keycode of the key pressed, or the character code (charcode) for an alphanumeric key pressed.
KeyboardLayoutMap.entries - Web APIs
the entries read-only property of the keyboardlayoutmap interface 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 - Web APIs
the keys read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the keys for each index in the array.
KeyboardLayoutMap.size - Web APIs
the size read-only property of the keyboardlayoutmap interface returns the number of elements in the map.
KeyboardLayoutMap.values - Web APIs
the values read-only property of the keyboardlayoutmap interface returns a new array iterator object that contains the values for each index in the map.
Keyboard API - Web APIs
navigator.keyboard read only returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
KeyframeEffectOptions - Web APIs
the keyframeeffectoptions dictionary, part of the web animations api, is used by element.animate(), keyframeeffectreadonly() and keyframeeffect() to describe timing properties for animation effects.
LinkStyle - Web APIs
WebAPILinkStyle
linkstyle.sheet read only returns the cssstylesheet object associated with the given element, or null if there is none.
Location: ancestorOrigins - Web APIs
the ancestororigins read-only property of the location interface is a static domstringlist containing, in reverse order, the origins of all ancestor browsing contexts of the document associated with the given location object.
Location: origin - Web APIs
WebAPILocationorigin
the origin read-only property of the location interface is a usvstring containing the unicode serialization of the origin of the represented url; that is: for url using the http or 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); for url using file: scheme, the value is browser dependant; for url using the blob: scheme, the origin of the url following blob:.
Location: toString() - Web APIs
WebAPILocationtoString
it is a read-only version of location.href.
Location - Web APIs
WebAPILocation
location.origin read only returns a usvstring containing the canonical form of the origin of the specific location.
Locks.mode - Web APIs
WebAPILockmode
the mode read-only property of the lock interface returns the access mode passed to lockmanager.request() when the lock was requested.
Locks.name - Web APIs
WebAPILockname
the name read-only property of the lock interface returns the name passed to lockmanager.request selected when the lock was requested.
LockedFile.active - Web APIs
WebAPILockedFileactive
if the object is inactive then it is impossible to perform any read or write operation with it.
LockedFile.flush() - Web APIs
WebAPILockedFileflush
this allows fast writing and reading operations.
LockedFile.oncomplete - Web APIs
these events occur each time a read or write operation is successful.
MIDIMessageEvent - Web APIs
note: even though the web midi api specifies a receivedtime property that returns a domhighrestimestamp, chrome (the only implementation at the time of writing) does not support that property since the basic event.timestamp property already returns a domhighrestimestamp in chrome.
MediaDeviceInfo.deviceId - Web APIs
the deviceid readonly property of the mediadeviceinfo interface returns a domstring that is an identifier for the represented device and is persisted across sessions.
MediaDeviceInfo.groupId - Web APIs
the groupid readonly property of the mediadeviceinfo interface returns a domstring that is a group identifier.
MediaDeviceInfo.kind - Web APIs
the kind readonly property of the mediadeviceinfo interface returns an enumerated value, that is either "videoinput", "audioinput" or "audiooutput".
MediaDeviceInfo.label - Web APIs
the label readonlyinline property of the mediadeviceinfo interface returns a domstring, that is a label describing this device (for example "external usb webcam").
MediaDevices.getDisplayMedia() - Web APIs
notreadableerror the user selected a screen, window, tab, or other source of screen data, but a hardware or operating system level error or lockout occurred, preventing the sharing of the selected source.
MediaDevices.ondevicechange - Web APIs
the fulfillment handler is called when the device list is ready.
MediaElementAudioSourceNode.mediaElement - Web APIs
the mediaelementaudiosourcenode interface's read-only mediaelement property indicates the htmlmediaelement that contains the audio track from which the node is receiving audio.
MediaElementAudioSourceNode - Web APIs
mediaelement read only the htmlmediaelement used when constructing this mediastreamaudiosourcenode.
MediaError.code - Web APIs
WebAPIMediaErrorcode
the read-only property mediaerror.code returns a numeric value which represents the kind of error that occurred on a media element.
MediaError.message - Web APIs
the read-only property mediaerror.message returns a domstring which contains a human-readable string offering specific diagnostic details related to the error described by the mediaerror object, or an empty string ("") if no diagnostic information can be determined or provided.
MediaError - Web APIs
mediaerror.message a domstring object containing a human-readable string which provides specific diagnostic information to help the reader understand the error condition which occurred; specifically, it isn't simply a summary of what the error code means, but actual diagnostic information to help in understanding what exactly went wrong.
message - Web APIs
the mediakeymessageevent.message read-only property returns an arraybuffer with a message from the content decryption module.
MediaKeyMessageEvent.messageType - Web APIs
the mediakeymessageevent.messagetype read-only property indicates the type of message.
MediaKeySession.closed - Web APIs
the mediakeysession.closed read-only property returns a promise signaling when a mediakeysession closes.
expiration - Web APIs
the mediakeysession.expiration read-only property returns 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.
keyStatuses - Web APIs
the mediakeysession.keystatuses read-only property returns a reference to a read-only mediakeystatusmap of the current session's keys and their statuses.
sessionId - Web APIs
the mediakeysession.sessionid read-only property contains a unique string generated by the cdm for the current media object and its associated keys or licenses.
MediaKeyStatusMap.entries() - Web APIs
the entries() read-only property of the mediakeystatusmap interface returns a new iterator object, containing an array of [key, value] pairs for each element in the status map, in insertion order.
MediaKeyStatusMap.size - Web APIs
the size read-only property of the mediakeystatusmap interface returns the number of key/value pairs in the status map.
keySystem - Web APIs
the mediakeysystemaccess.keysystem read-only property returns a domstring identifying the key system being used.
MediaKeySystemAccess - Web APIs
properties mediakeysystemaccess.keysystem read only returns a domstring identifying the key system being used.
audioCapabilities - Web APIs
the mediakeysystemconfiguration.audiocapabilities read-only property returns an array of supported audio type and capability pairs.
distinctiveIdentifier - Web APIs
the mediakeysystemconfiguration.distinctiveidentifier read-only property indicates whether a persistent distinctive identifier is required.
initDataTypes - Web APIs
the mediakeysystemconfiguration.initdatatypes read-only property returns a list of supported initialization data type names.
persistentState - Web APIs
the mediakeysystemconfiguration.persistentstate read-only property indicates whether the ability to persist state is required.
videoCapabilities - Web APIs
the mediakeysystemconfiguration.videocapabilities read-only property returns an array of supported video type and capability pairs.
MediaList - Web APIs
WebAPIMediaList
medialist.length read only returns the number of media queries in the medialist.
MediaQueryList.matches - Web APIs
the matches read-only property of the mediaquerylist interface is a boolean that returns true if the document currently matches the media query list, or false if not.
MediaQueryList.media - Web APIs
the media read-only property of the mediaquerylist interface is a domstring representing a serialized media query.
MediaQueryListEvent.matches - Web APIs
the matches read-only property of the mediaquerylistevent interface is a boolean that returns true if the document currently matches the media query list, or false if not.
MediaQueryListEvent.media - Web APIs
the media read-only property of the mediaquerylistevent interface is a domstring representing a serialized media query.
MediaRecorder.audioBitsPerSecond - Web APIs
the audiobitspersecond read-only property of the mediarecorder interface returns the audio encoding bit rate in use.
MediaRecorder.mimeType - Web APIs
the mimetype read-only property returns the mime media type that was specified when creating the mediarecorder object, or, if none was specified, which was chosen by the browser.
MediaRecorder.ondataavailable - Web APIs
this occurs in four situations: when the media stream ends, any media data not already delivered to your ondataavailable handler is passed in a single blob.
MediaRecorder.pause() - Web APIs
if you call pause() while already paused, it silently does nothing.
MediaRecorder.resume() - Web APIs
syntax mediarecorder.resume() errors an invalidstate error is raised if the resume() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — the recording cannot be resumed if it is not already paused; if mediarecorder.state is already "recording", resume() has no effect.
MediaRecorder.start() - Web APIs
invalidstateerror the mediarecorder is not in the inactive state; you can't start recording media if it's already being recorded.
MediaRecorder.state - Web APIs
the mediarecorder.state read-only property returns the current state of the current mediarecorder object.
MediaRecorder.stop() - Web APIs
syntax mediarecorder.stop() errors an invalidstate error is raised if the stop() method is called while the mediarecorder object’s mediarecorder.state is "inactive" — it makes no sense to stop media capture if it is already stopped.
MediaRecorder.stream - Web APIs
the mediarecorder.stream read-only property returns the stream that was passed into the mediarecorder() constructor when the mediarecorder was created.
MediaRecorder.videoBitsPerSecond - Web APIs
the videobitspersecond read-only property of the mediarecorder interface returns the video encoding bit rate in use.
MediaRecorderErrorEvent.error - Web APIs
the read-only error property in the mediarecordererrorevent interface is a domexception object providing details about the exception that was thrown by a mediarecorder instance.
MediaSettingsRange.max - Web APIs
the max read-only property of the mediasettingsrange interface returns the maximum value of the settings range.
MediaSettingsRange.min - Web APIs
the min read-only property of the mediasettingsrange interface returns the minimum value of the settings range.
MediaSettingsRange.step - Web APIs
the step read-only property of the mediasettingsrange interface returns the minimum difference between consecutive values of the settings range.
MediaSource.MediaSource() - Web APIs
for further investigation.) var video = document.queryselector('video'); 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); } ...
active - Web APIs
the active read-only property of the mediastream interface returns a boolean value which is true if the stream is currently active; otherwise, it returns false.
MediaStream.addTrack() - Web APIs
if the specified track is already in the stream's track set, this method has no effect.
MediaStream.id - Web APIs
WebAPIMediaStreamid
the mediastream.id() read-only property is a domstring containing 36 characters denoting a unique identifier (guid) for the object.
MediaStreamAudioSourceNode.mediaStream - Web APIs
the mediastreamaudiosourcenode interface's read-only mediastream property indicates the mediastream that contains the audio track from which the node is receiving audio.
MediaStreamAudioSourceNode - Web APIs
mediastream read only the mediastream used when constructing this mediastreamaudiosourcenode.
MediaStreamEvent.stream - Web APIs
the read-only property mediastreamevent.stream returns the mediastream associated with the event.
MediaStreamEvent - Web APIs
mediastreamevent.stream read only contains the mediastream containing the stream associated with the event.
MediaStreamTrack.id - Web APIs
the mediastreamtrack.id read-only property returns a domstring containing a unique identifier (guid) for the track, which is generated by the user agent.
MediaStreamTrack.kind - Web APIs
the mediastreamtrack.kind read-only property returns a domstring set to "audio" if the track is an audio track and to "video", if it is a video track.
MediaStreamTrack.label - Web APIs
the mediastreamtrack.label read-only property returns a domstring containing a user agent-assigned label that identifies the track source, as in "internal microphone".
MediaStreamTrack.muted - Web APIs
the muted read-only property of the mediastreamtrack interface returns a boolean value indicating whether or not the track is currently unable to provide media output.
MediaStreamTrack.remote - Web APIs
the mediastreamtrack.remote read-only property allows javascript to know whether a webrtc mediastreamtrack is from a remote source or a local one.
MediaStreamTrack.stop() - Web APIs
immediately after calling stop(), the readystate property is set to ended.
MediaStreamTrackEvent - Web APIs
track read only a mediastreamtrack object representing the track which was added to the stream.
MediaTrackConstraints.cursor - Web APIs
ting a representation of the cursor position if the stream doesn't include the rendered cursor, you can determine the need to do so by using code like this: let insertfakecursorflag = false; if (displaystream.getvideotracks()[0].getsettings().cursor === "never") { insertfakecursorflag = true; } following this code, insertfakecursorflag is true if there's no cursor rendered into the stream already.
MediaTrackSupportedConstraints.aspectRatio - Web APIs
the mediatracksupportedconstraints dictionary's aspectratio property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the aspectratio constraint.
MediaTrackSupportedConstraints.autoGainControl - Web APIs
the mediatracksupportedconstraints dictionary's autogaincontrol property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the autogaincontrol constraint.
MediaTrackSupportedConstraints.channelCount - Web APIs
the mediatracksupportedconstraints dictionary's channelcount property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the channelcount constraint.
MediaTrackSupportedConstraints.deviceId - Web APIs
the mediatracksupportedconstraints dictionary's deviceid property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the deviceid constraint.
MediaTrackSupportedConstraints.echoCancellation - Web APIs
the mediatracksupportedconstraints dictionary's echocancellation property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the echocancellation constraint.
MediaTrackSupportedConstraints.facingMode - Web APIs
the mediatracksupportedconstraints dictionary's facingmode property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the facingmode constraint.
MediaTrackSupportedConstraints.frameRate - Web APIs
the mediatracksupportedconstraints dictionary's framerate property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the framerate constraint.
MediaTrackSupportedConstraints.groupId - Web APIs
the mediatracksupportedconstraints dictionary's groupid property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the groupid constraint.
MediaTrackSupportedConstraints.height - Web APIs
the mediatracksupportedconstraints dictionary's height property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the height constraint.
MediaTrackSupportedConstraints.latency - Web APIs
the mediatracksupportedconstraints dictionary's latency property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the latency constraint.
MediaTrackSupportedConstraints.noiseSuppression - Web APIs
the mediatracksupportedconstraints dictionary's noisesuppression property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the noisesuppression constraint.
MediaTrackSupportedConstraints.sampleRate - Web APIs
the mediatracksupportedconstraints dictionary's samplerate property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the samplerate constraint.
MediaTrackSupportedConstraints.sampleSize - Web APIs
the mediatracksupportedconstraints dictionary's samplesize property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the samplesize constraint.
MediaTrackSupportedConstraints.volume - Web APIs
the mediatracksupportedconstraints dictionary's volume property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the volume constraint.
MediaTrackSupportedConstraints.width - Web APIs
the mediatracksupportedconstraints dictionary's width property is a read-only boolean value which is present (and set to true) in the object returned by mediadevices.getsupportedconstraints() if and only if the user agent supports the width constraint.
Using the Media Capabilities API - Web APIs
the mediacapabilities interface the mediacapabilities is available using the mediacapabilities property which is provided by both the navigator object and the workernavigator object; in other words, the media capabilities api is available both on the main thread and from workers.
Media Source API - Web APIs
mse allows us to replace the usual single track src value fed to media elements with a reference to a mediasource object, which is a container for information like the ready state of the media for being played, and references to multiple sourcebuffer objects that represent the different chunks of media that make up the entire stream.
MessageChannel.port1 - Web APIs
the port1 read-only property of the messagechannel interface returns the first port of the message channel — the port attached to the context that originated the channel.
MessageChannel.port2 - Web APIs
the port2 read-only property of the messagechannel interface returns the second port of the message channel — the port attached to the context at the other end of the channel, which the message is initially sent to.
MessageEvent.data - Web APIs
WebAPIMessageEventdata
the data read-only property of the messageevent interface represents the data sent by the message emitter.
MessageEvent.lastEventId - Web APIs
the lasteventid read-only property of the messageevent interface is a domstring representing a unique id for the event.
MessageEvent.origin - Web APIs
the origin read-only property of the messageevent interface is a usvstring representing the origin of the message emitter.
MessageEvent.ports - Web APIs
the ports read-only property of the messageevent interface is an array of messageport objects representing the ports associated with the channel the message is being sent through (where appropriate, e.g.
MessageEvent.source - Web APIs
the source read-only property of the messageevent interface is a messageeventsource (which can be a windowproxy, messageport, or serviceworker object) representing the message emitter.
Metadata.modificationTime - Web APIs
the read-only modificationtime property of the metadata interface is a date object which specifies the date and time the file system entry (or the data referenced by the entry) was last modified.a file system entry is considered to have been modified if the metadata or the contents of the referenced file (or directory, or whatever other kind of file system entry might exist on the platform in use) has changed.
Metadata.size - Web APIs
WebAPIMetadatasize
the read-only size property of the metadata interface specifies the size, in bytes, of the referenced file or other file system object on disk.
MouseEvent.altKey - Web APIs
WebAPIMouseEventaltKey
the mouseevent.altkey read-only property is a boolean that indicates whether the alt key was pressed or not when a given mouse event occurs.
MouseEvent.button - Web APIs
WebAPIMouseEventbutton
the mouseevent.button read-only property indicates which button was pressed on the mouse to trigger the event.
MouseEvent.buttons - Web APIs
the mouseevent.buttons read-only property indicates which buttons are pressed on the mouse (or other input device) when a mouse event is triggered.
MouseEvent.clientX - Web APIs
the clientx read-only property of the mouseevent interface provides the horizontal coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
MouseEvent.clientY - Web APIs
the clienty read-only property of the mouseevent interface provides the vertical coordinate within the application's client area at which the event occurred (as opposed to the coordinate within the page).
MouseEvent.ctrlKey - Web APIs
the mouseevent.ctrlkey read-only property is a boolean that indicates whether the ctrl key was pressed or not when a given mouse event occurs.
MouseEvent.metaKey - Web APIs
the mouseevent.metakey read-only property is a boolean that indicates whether the meta key was pressed or not when a given mouse event occurs.
MouseEvent.movementX - Web APIs
the movementx read-only property of the mouseevent interface provides the difference in the x coordinate of the mouse pointer between the given event and the previous mousemove event.
MouseEvent.movementY - Web APIs
the movementy read-only property of the mouseevent interface provides the difference in the y coordinate of the mouse pointer between the given event and the previous mousemove event.
MouseEvent.mozInputSource - Web APIs
the mouseevent.mozinputsource read-only property on mouseevent provides information indicating the type of device that generated the event.
MouseEvent.offsetX - Web APIs
the offsetx read-only property of the mouseevent interface provides the offset in the x coordinate of the mouse pointer between that event and the padding edge of the target node.
MouseEvent.offsetY - Web APIs
the offsety read-only property of the mouseevent interface provides the offset in the y coordinate of the mouse pointer between that event and the padding edge of the target node.
MouseEvent.pageX - Web APIs
WebAPIMouseEventpageX
the pagex read-only property of the mouseevent interface returns the x (horizontal) coordinate (in pixels) at which the mouse was clicked, relative to the left edge of the entire document.
MouseEvent.pageY - Web APIs
WebAPIMouseEventpageY
the pagey read-only property of the mouseevent interface returns the y (vertical) coordinate in pixels of the event relative to the whole document.
MouseEvent.region - Web APIs
WebAPIMouseEventregion
the mouseevent.region read-only property returns the id of the canvas hit region affected by the event.
MouseEvent.relatedTarget - Web APIs
the mouseevent.relatedtarget read-only property is the secondary target for the mouse event, if there is one.
MouseEvent.screenX - Web APIs
the screenx read-only property of the mouseevent interface provides the horizontal coordinate (offset) of the mouse pointer in global (screen) coordinates.
MouseEvent.screenY - Web APIs
the screeny read-only property of the mouseevent interface provides the vertical coordinate (offset) of the mouse pointer in global (screen) coordinates.
MouseEvent.shiftKey - Web APIs
the mouseevent.shiftkey read-only property is a boolean that indicates whether the shift key was pressed or not when a given mouse event occurs.
MouseScrollEvent - Web APIs
lean cancelablearg, in nsidomabstractview viewarg, in long detailarg, in long screenxarg, in long screenyarg, in long clientxarg, in long clientyarg, in boolean ctrlkeyarg, in boolean altkeyarg, in boolean shiftkeyarg, in boolean metakeyarg, in unsigned short buttonarg, in nsidomeventtarget relatedtargetarg, in long axis); attributes attribute type description axis read only long indicates scroll direction.
msFirstPaint - Web APIs
msfirstpaint is a read-only property which gets the time when the document loaded by the window object began to be displayed to the user.
msPlayToDisabled - Web APIs
msplaytodisabled is a read/write property which gets and sets if the playto device is enabled or disabled.
msPlayToPrimary - Web APIs
msplaytoprimary is a read/write property which gets or sets the primary dlna playto device.
msPlayToSource - Web APIs
msplaytosource is a read-only property which gets the source associated with the media element for use by the playtomanager.
msRealTime - Web APIs
msrealtime is a read/write property which specifies whether or not to enable low-latency playback on the media element.
MutationObserver.disconnect() - Web APIs
note: all notifications of mutations that have already been detected, but not yet reported to the observer, are discarded.
NDEFMessage - Web APIs
attributes ndefmessage.records read only represents a list of ndef records defining the ndef message.
NDEFWriter() - Web APIs
ndef tags, within the reader's magnetic induction field.
NameList - Web APIs
WebAPINameList
properties namelist.length read only methods namelist.contains() returns a boolean.
NamedNodeMap - Web APIs
namednodemap.length read only returns the amount of objects in the map.
Navigator.battery - Web APIs
WebAPINavigatorbattery
the battery read-only property returns a batterymanager which provides information about the system's battery charge level and whether the device is charging and exposes events that fire when these parameters change.
Navigator.connection - Web APIs
the navigator.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.
Navigator.cookieEnabled - Web APIs
the property is read-only.
Navigator.deviceMemory - Web APIs
the devicememory read-only property of the navigator interface returns the approximate amount of device memory in gigabytes.
Navigator.geolocation - Web APIs
the navigator.geolocation read-only property returns a geolocation object that gives web content access to the location of the device.
Navigator.keyboard - Web APIs
the keyboard read-only property of the navigator interface returns a keyboard object which provides access to functions that retrieve keyboard layout maps and toggle capturing of key presses from the physical keyboard.
Navigator.locks - Web APIs
WebAPINavigatorlocks
the locks read-only property of the navigator interface returns a lockmanager object which provides methods for requesting a new lock object and querying for an existing lock object.
Navigator.maxTouchPoints - Web APIs
the maxtouchpoints read-only property of the navigator interface returns the maximum number of simultaneous touch contact points are supported by the current device.
Navigator.mediaCapabilities - Web APIs
the navigator.mediacapabilities read-only property returns a mediacapabilities object that can expose information about the decoding and encoding capabilities for a given format and output capabilities as defined by the media capabilities api.
Navigator.mediaDevices - Web APIs
the navigator.mediadevices read-only property returns a mediadevices object, which provides access to connected media input devices like cameras and microphones, as well as screen sharing.
Navigator.mediaSession - Web APIs
the read-only navigator property mediasession returns a mediasession object that can be used to share with the browser metadata and other information about the current playback state of media being handled by a document.
Navigator.oscpu - Web APIs
WebAPINavigatoroscpu
cos version x.y linux 64-bit (32-bit build) output of uname -s plus "i686 on x86_64" linux output of uname -sm x.y refers to the version of the operating system example function osinfo() { alert(window.navigator.oscpu); } osinfo(); // alerts "windows nt 6.0" for example usage notes unless your code is privileged (chrome or at least has the universalbrowserread privilege), it may get the value of the general.oscpu.override preference instead of the true platform.
Navigator.permissions - Web APIs
the navigator.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.
Navigator.productSub - Web APIs
the navigator.productsub read-only property returns the build number of the current browser.
Navigator.registerContentHandler() - Web APIs
example navigator.registercontenthandler( "application/vnd.mozilla.maybe.feed", "http://www.example.tld/?foo=%s", "my feed reader" ); notes for firefox 2 and above, only the application/vnd.mozilla.maybe.feed, application/atom+xml, and application/rss+xml mime types are supported.
Navigator.registerProtocolHandler() - Web APIs
title a human-readable title string for the handler.
Navigator.serviceWorker - Web APIs
the navigator.serviceworker read-only property returns the serviceworkercontainer object for the associated document, which provides access to registration, removal, upgrade, and communication with the serviceworker.
Navigator.vibrate() - Web APIs
WebAPINavigatorvibrate
if a vibration pattern is already in progress when this method is called, the previous pattern is halted and the new one begins instead.
Navigator.wakeLock - Web APIs
the wakelock read-only property returns a wakelock interface which allows a document to acquire a screen wake lock.
Navigator.xr - Web APIs
WebAPINavigatorxr
the read-only xr property provided by the navigator or workernavigator interface returns an xr object which can be used to access the webxr device api.
NavigatorID.userAgent - Web APIs
the navigatorid.useragent read-only property returns the user agent string for the current browser.
NavigatorLanguage.language - Web APIs
the navigatorlanguage.language read-only property returns a string representing the preferred language of the user, usually the language of the browser ui.
NavigatorLanguage.languages - Web APIs
the navigatorlanguage.languages read-only property returns an array of domstrings representing the user's preferred languages.
NavigatorOnLine - Web APIs
navigatoronline.online read only returns a boolean indicating whether the browser is working online.
NavigatorStorage.storage - Web APIs
the navigatorstorage.storage read-only property returns the singleton storagemanager object used to access the overall storage capabilities of the browser for the current site or app.
NavigatorStorage - Web APIs
properties storage read only secure context returns the storagemanager singleton object which is used to access the storage manager.
NetworkInformation.downlink - Web APIs
the downlink read-only property of the networkinformation interface returns the effective bandwidth estimate in megabits per second, rounded to the nearest multiple of 25 kilobits per seconds.
NetworkInformation.downlinkMax - Web APIs
the networkinformation.downlinkmax read-only property returns the maximum downlink speed, in megabits per second (mbps), for the underlying connection technology.
NetworkInformation.effectiveType - Web APIs
the effectivetype read-only property of the networkinformation interface returns the effective type of the connection meaning one of 'slow-2g', '2g', '3g', or '4g'.
NetworkInformation.rtt - Web APIs
the networkinformation.rtt read-only property returns the estimated effective round-trip time of the current connection, rounded to the nearest multiple of 25 milliseconds.
NetworkInformation.saveData - Web APIs
the networkinformation.savedata read-only property of the networkinformation interface returns true if the user has set a reduced data usage option on the user agent.
NetworkInformation.type - Web APIs
the networkinformation.type read-only property returns the type of connection a device is using to communicate with the network.
Node.appendChild() - Web APIs
WebAPINodeappendChild
so if the node already has a parent, the node is first removed, then appended at the new position.
Node.baseURIObject - Web APIs
this property is read-only; attempting to write to it will throw an exception.
Node.childNodes - Web APIs
WebAPINodechildNodes
the node.childnodes read-only property returns a live nodelist of child nodes of the given element where the first child node is assigned index 0.
Node.firstChild - Web APIs
WebAPINodefirstChild
the node.firstchild read-only property returns the node's first child in the tree, or null if the node has no children.
Node.insertBefore() - Web APIs
WebAPINodeinsertBefore
if the given node already exists in the document, insertbefore() moves it from its current position to the new position.
Node.isConnected - Web APIs
WebAPINodeisConnected
the isconnected read-only property of the node interface returns a boolean indicating whether the node is connected (directly or indirectly) to the context object, for example the document object in the case of the normal dom, or the shadowroot in the case of a shadow dom.
Node.lastChild - Web APIs
WebAPINodelastChild
the node.lastchild read-only property returns the last child of the node.
Node.localName - Web APIs
WebAPINodelocalName
the node.localname read-only property returns the local part of the qualified name of this node.
Node.namespaceURI - Web APIs
WebAPINodenamespaceURI
the node.namespaceuri read-only property returns the namespace uri of the node, or null if the node is not in a namespace.
Node.nextSibling - Web APIs
WebAPINodenextSibling
the node.nextsibling read-only property returns the node immediately following the specified one in their parent's childnodes, or returns null if the specified node is the last child in the parent element.
Node.nodeType - Web APIs
WebAPINodenodeType
the read-only node.nodetype property is an integer that identifies what the node is.
Node.ownerDocument - Web APIs
the ownerdocument read-only property of the node interface returns the top-level document object of the node.
Node.parentElement - Web APIs
the node.parentelement read-only property returns the dom node's parent element, or null if the node either has no parent, or its parent isn't a dom element.
Node.prefix - Web APIs
WebAPINodeprefix
the node.prefix read-only property returns the namespace prefix of the specified node, or null if no prefix is specified.
Node.previousSibling - Web APIs
the node.previoussibling read-only property returns the node immediately preceding the specified one in its parent's childnodes list, or null if the specified node is the first in that list.
Node.rootNode - Web APIs
WebAPINoderootNode
the node.rootnode read-only property returns a node object representing the topmost node in the tree, or the current node if it's the topmost node in the tree.
NodeIterator.expandEntityReferences - Web APIs
the nodeiterator.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the nodeiterator.
NodeIterator.filter - Web APIs
the nodeiterator.filter read-only method returns a nodefilter object, that is an object implement an acceptnode(node) method, used to screen nodes.
NodeIterator.pointerBeforeReferenceNode - Web APIs
the nodeiterator.pointerbeforereferencenode read-only property returns a boolean flag that indicates whether the nodefilter is anchored before (if this value is true) or after (if this value is false) the anchor node indicated by the nodeiterator.referencenode property.
NodeIterator.referenceNode - Web APIs
the nodeiterator.referencenode read-only returns the node to which the iterator is anchored; as new nodes are inserted, the iterator remains anchored to the reference node as specified by this property.
NodeIterator.root - Web APIs
WebAPINodeIteratorroot
the nodeiterator.root read-only property represents the node that is the root of what the nodeiterator traverses.
NodeIterator.whatToShow - Web APIs
the nodeiterator.whattoshow read-only property represents an unsigned integer representing a bitmask signifying what types of nodes should be returned by the nodeiterator.
NonDocumentTypeChildNode.nextElementSibling - Web APIs
the nondocumenttypechildnode.nextelementsibling read-only property 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 - Web APIs
the nondocumenttypechildnode.previouselementsibling read-only property 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.
Notification.body - Web APIs
WebAPINotificationbody
the body read-only property of the notification interface indicates the body string of the notification, as specified in the body option of the notification() constructor.
Notification.data - Web APIs
WebAPINotificationdata
the data read-only property of the notification interface returns a structured clone of the notification's data, as specified in the data option of the notification() constructor.
Notification.dir - Web APIs
WebAPINotificationdir
the dir read-only property of the notification interface indicates the text direction of the notification, as specified in the dir option of the notification() constructor.
Notification.icon - Web APIs
WebAPINotificationicon
the icon read-only property of the notification interface contains the url of an icon to be displayed as part of the notification, as specified in the icon option of the notification() constructor.
Notification.image - Web APIs
the image read-only property of the notification interface contains the url of an image to be displayed as part of the notification, as specified in the image option of the notification() constructor.
Notification.lang - Web APIs
WebAPINotificationlang
the lang read-only property of the notification interface indicates the language used in the notification, as specified in the lang option of the notification() constructor.
Notification.permission - Web APIs
the permission read-only property of the notification interface indicates the current permission granted by the user for the current origin to display web notifications.
Notification.renotify - Web APIs
the renotify read-only property of the notification interface specifies whether the user should be notified after a new notification replaces an old one, as specified in the renotify option of the notification() constructor.
Notification.requireInteraction - Web APIs
the requireinteraction read-only property of the notification interface returns a boolean indicating that a notification should remain active until the user clicks or dismisses it, rather than closing automatically.
Notification.silent - Web APIs
the silent read-only property of the notification interface specifies whether the notification should be silent, i.e., no sounds or vibrations should be issued, regardless of the device settings.
Notification.tag - Web APIs
WebAPINotificationtag
the tag read-only property of the notification interface signifies an identifying tag for the notification, as specified in the tag option of the notification() constructor.
Notification.timestamp - Web APIs
the timestamp read-only property of the notification interface returns a domtimestamp, as specified in the timestamp option of the notification() constructor.
Notification.title - Web APIs
the title read-only property of the notification interface indicates the title of the notification, as specified in the title parameter of the notification() constructor.
Notification.vibrate - Web APIs
the vibrate read-only property of the notification interface specifies a a vibration pattern for the device's vibration hardware to emit when the notification fires.
NotificationEvent.action - Web APIs
example self.registration.shownotification("new articles available", { actions: [{action: "get", title: "get now."}] }); self.addeventlistener('notificationclick', function(event) { event.notification.close(); if (event.action === 'get') { synchronizereader(); } else { clients.openwindow("/reader"); } }, false); specifications specification status comment notifications apithe definition of 'action' in that specification.
NotifyAudioAvailableEvent - Web APIs
properties framebuffer read only a float32array containing the raw 32-bit floating-point audio data obtained from decoding the audio (e.g., the raw data being sent to the audio hardware vs.
OVR_multiview2.framebufferTextureMultiviewOVR() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
OfflineAudioCompletionEvent.renderedBuffer - Web APIs
the renderedbuffer read-only property of the offlineaudiocompletionevent interface is an audiobuffer containing the result of processing an offlineaudiocontext.
OfflineAudioCompletionEvent - Web APIs
offlineaudiocompletionevent.renderedbuffer read only an audiobuffer containing the result of processing an offlineaudiocontext.
OfflineAudioContext.OfflineAudioContext() - Web APIs
for more detail, read audio buffers: frames, samples and channels from our basic concepts guide.
OfflineAudioContext: complete event - Web APIs
flineaudiocontext.oncomplete examples when processing is complete, you might want to use the oncomplete handler the prompt the user that the audio can now be played, and enable the play button: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.addeventlistener('complete', () => { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; }) you can also set up the event handler using the offlineaudiocontext.oncomplete property: let offlineaudioctx = new offlineaudiocontext(); offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specif...
OfflineAudioContext.oncomplete - Web APIs
offlineaudioctx.oncomplete = function() { console.log('offline audio processing now complete'); showmodaldialog('song processed and ready to play'); playbtn.disabled = false; } specifications specification status comment web audio apithe definition of 'oncomplete' in that specification.
OfflineAudioContext - Web APIs
offlineaudiocontext.length read only an integer representing the size of the buffer in sample-frames.
OscillatorNode.detune - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.detune.setvalueattime(100, audioctx.currenttime); // value in cents note: though the audioparam returned is read-only, the value it represents is not.
OscillatorNode.frequency - Web APIs
syntax var oscillator = audioctx.createoscillator(); oscillator.frequency.setvalueattime(440, audioctx.currenttime); // value in hertz note: though the audioparam returned is read-only, the value it represents is not.
OverconstrainedError.constraint - Web APIs
the constraint read-only property of the overconstrainederror interface returns the constraint that was supplied in the constructor, meaning the contraint that was not satisfied.
OverconstrainedError.message - Web APIs
the message read-only property of the overconstrainederror interface returns the text supplied in the constructor.
OverconstrainedError.name - Web APIs
the name read-only property of the overconstrainederror interface will always return 'overconstrainederror'.
PageTransitionEvent.persisted - Web APIs
the persisted read-only property indicates if a webpage is loading from a cache.
PageTransitionEvent - Web APIs
pagetransitionevent.persisted read only indicates if the document is loading from a cache.
Paint​Worklet​.device​Pixel​Ratio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PaintWorklet.devicePixelRatio - Web APIs
the paintworklet.devicepixelratio read-only property of the paintworklet interface returns the current device's ratio of physical pixels to logical pixels.
PaintWorklet.registerPaint - Web APIs
invalidmodificationerror thrown when the a worklet already exists with the specified name.
PannerNode.orientationX - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.orientationY - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.orientationZ - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.positionX - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.positionY - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode.positionZ - Web APIs
the audioparam contained by this property is read only; however, you can still change the value of the parameter by assigning a new value to its audioparam.value property.
PannerNode - Web APIs
this is why these values are not marked read only, which is how they appear in the webidl.
ParentNode.childElementCount - Web APIs
the parentnode.childelementcount read-only property returns an unsigned long representing the number of child elements of the given element.
ParentNode.children - Web APIs
the parentnode property children is a read-only property that returns a live htmlcollection which contains all of the child elements of the node upon which it was called.
ParentNode.firstElementChild - Web APIs
the parentnode.firstelementchild read-only property returns the object's first child element, or null if there are no child elements.
ParentNode.lastElementChild - Web APIs
the parentnode.lastelementchild read-only property returns the object's last child element or null if there are no child elements.
ParentNode.replaceChildren() - Web APIs
it then calls replacechildren() on the list to transfer the options to, using the spread operator to pass in all the options contained in both constants.
PasswordCredential.iconURL - Web APIs
the iconurl read-only property of the passwordcredential interface returns a usvstring containing a url pointing to an image for an icon.
PasswordCredential.name - Web APIs
the name read-only property of the passwordcredential interface returns a usvstring containing a human-readable public name for display in a credential chooser.
PasswordCredential.password - Web APIs
the password read-only property of the passwordcredential interface returns a usvstring containing the password of the credential.
Path2D - Web APIs
WebAPIPath2D
if the shape has already been closed or has only one point, this function does nothing.
PaymentAddress.addressLine - Web APIs
the addressline read-only property of the paymentaddress interface is an array of domstring objects, each specifying a line of the address that is not covered by one of the other properties of paymentaddress.
PaymentAddress.city - Web APIs
the city read-only property of the paymentaddress interface returns a string containing the city or town portion of the address.
PaymentAddress.country - Web APIs
the country read-only property of the paymentaddress interface is a string identifying the address's country using the iso 3166-1 alpha-2 standard.
PaymentAddress.dependentLocality - Web APIs
the read-only dependentlocality property of the paymentaddress interface is a string containing a sublocality designation within a city, such as a neighborhood, borough, district, or, in the united kingdom, a dependent locality.
PaymentAddress.languageCode - Web APIs
the languagecode read-only property of the paymentaddress interface returns a string containing the bcp-47 language code for the address.
PaymentAddress.organization - Web APIs
the organization read-only property of the paymentaddress interface returns a string containing the name of the organization, firm, company, or institution at the address.
PaymentAddress.phone - Web APIs
the read-only phone property of the paymentaddress interface returns a string containing the telephone number of the recipient or contact person.
PaymentAddress.postalCode - Web APIs
the postalcode read-only property of the paymentaddress interface returns a string containing a code used by a jurisdiction for mail routing, for example, the zip code in the united states or the postal index number (pin code) in india.
PaymentAddress.recipient - Web APIs
the read-only recipient property of the paymentaddress interface returns a string containing the name of the recipient, purchaser, or contact person at the payment address.
PaymentAddress.region - Web APIs
the read-only region property of the paymentaddress interface returns a string containing the top-level administrative subdivision of the country in which the address is located.
PaymentAddress.regionCode - Web APIs
the regioncode read-only attribute of the paymentaddress interface returns a one-, two-, or three-alphanumeric code (domstring) representing the region of the address (e.g., "ca" for california, or "11" for lisbon, portugal).
PaymentAddress.sortingCode - Web APIs
the sortingcode read-only property of the paymentaddress interface returns a string containing a postal sorting code such as is used in france.
PaymentDetailsUpdate.error - Web APIs
the paymentdetailsupdate dictionary's error property is a human-readable domstring which provides an error message to be displayed if the specified information doesn't offer any valid shipping options.
PaymentItem - Web APIs
label secure context a string specifying a human-readable name or description of the item or service being charged for.
PaymentMethodChangeEvent.methodDetails - Web APIs
the read-only methoddetails property of the paymentmethodchangeevent interface is an object containing any data the payment handler may provide to describe the change the user has made to their payment method.
PaymentMethodChangeEvent.methodName - Web APIs
the read-only methodname property of the paymentmethodchangeevent interface is a string which uniquely identifies the payment handler currently selected by the user.
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
the id read-only attribute of the paymentrequest interface returns a unique identifier for a particular paymentrequest instance.
PaymentRequest.shippingAddress - Web APIs
the shippingaddress read-only property of the paymentrequest interface returns the shipping address provided by the user.
PaymentRequest.shippingOption - Web APIs
the shippingoption read-only attribute of the paymentrequest interface returns either the id of a selected shipping option, null (if no shipping option was set to be selected) or a shipping option selected by the user.
PaymentRequest.shippingType - Web APIs
the shippingtype read-only property of the paymentrequest interface returns one of "shipping", "delivery", "pickup", or null if one was not provided by the constructor.
PaymentRequestEvent.instrumentKey - Web APIs
the instrumentkey read-only property of the paymentrequestevent interface 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.
PaymentRequestEvent.methodData - Web APIs
the methoddata read-only property of the paymentrequestevent interface 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.
PaymentRequestEvent.modifiers - Web APIs
the modifiers read-only property of the paymentrequestevent interface returns an array of objects containing changes to payment details.
paymentRequestId - Web APIs
the paymentrequestid read-only property of the paymentrequestevent interface returns the id of the paymentrequest object.
PaymentRequestEvent.paymentRequestOrigin - Web APIs
the paymentrequestorigin read-only property of the paymentrequestevent interface returns the origin where the paymentrequest object was initialized.
PaymentRequestEvent.topOrigin - Web APIs
the toporigin read-only property of the paymentrequestevent interface returns the top level payee origin where the paymentrequest object was initialized.
PaymentRequestEvent.total - Web APIs
the total readonly property of the paymentrequestevent interface returns a paymentcurrencyamount object containing the total amount being requested for payment.
PaymentResponse.complete() - Web APIs
invalidstateerror the payment has already completed, or complete() was called while a request to retry the payment is pending.
PaymentResponse.details - Web APIs
the details read-only property of the paymentresponse interface returns a json-serializable object that provides a payment method specific message used by the merchant to process the transaction and determine a successful funds transfer.
PaymentResponse.methodName - Web APIs
the methodname read-only property of the paymentresponse interface returns a string uniquely identifying the payment handler selected by the user.
PaymentResponse.payerEmail - Web APIs
the payeremail read-only property of the paymentresponse interface returns the email address supplied by the user.
PaymentRequest.payerName - Web APIs
the payername read-only property of the paymentresponse interface returns the name supplied by the user.
PayerResponse.payerPhone - Web APIs
the payerphone read-only property of the paymentresponse interface returns the phone number supplied by the user.
PaymentResponse.requestId - Web APIs
the requestid read-only property of the paymentresponse interface rreturns the free-form identifier supplied by the paymentresponse() constructor by details.id.
PaymentResponse.retry() - Web APIs
if show() is rejected, the payment request failed, usually because either there's already one being processed, because the user agent doesn't support any of the specified payment methods, or because of a security issue.
PaymentResponse.shippingAddress - Web APIs
the shippingaddress read-only property of the paymentrequest interface returns a paymentaddress object containing the shipping address provided by the user.
PaymentResponse.shippingOption - Web APIs
the shippingoption read-only property of the paymentrequest interface returns the id attribute of the shipping option selected by the user.
performance.mark() - Web APIs
WebAPIPerformancemark
if the name given to this method already exists in the performancetiming interface, syntaxerror is thrown.
Performance.navigation - Web APIs
the legacy performance.navigation read-only property returns a performancenavigation object representing the type of navigation that occurs in the given browsing context, such as the number of redirections needed to fetch the resource.
Performance.timeOrigin - Web APIs
the timeorigin read-only property of the performance interface returns the high resolution timestamp of the start time of the performance measurement.
Performance.timing - Web APIs
the legacy performance.timing read-only property returns a performancetiming object containing latency-related performance information.
PerformanceEntry.duration - Web APIs
this property is read only .
PerformanceEntry.entryType - Web APIs
this property is read only.
PerformanceEntry.name - Web APIs
this property is read only.
PerformanceEntry.startTime - Web APIs
this property is read only .
PerformanceLongTaskTiming.attribution - Web APIs
the attribution readonly property of the performancelongtasktiming interface returns a sequence of taskattributiontiming instances.
PerformanceLongTaskTiming - Web APIs
="1" width="250" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="326" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">performancelongtasktiming</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties performancelongtasktiming.attribution read only returns a sequence of taskattributiontiming instances.
PerformanceNavigation.redirectCount - Web APIs
the legacy performancenavigation.redirectcount read-only property returns an unsigned short representing the number of redirects done before reaching the page.
PerformanceNavigation.type - Web APIs
the legacy performancenavigation.type read-only property returns an unsigned short containing a constant describing how the navigation to this page was done.
PerformanceNavigationTiming.domContentLoadedEventEnd - Web APIs
the domcontentloadedeventend read-only property returns a timestamp representing the time value equal to the time immediately after the current document's domcontentloaded event completes.
PerformanceNavigationTiming.domContentLoadedEventStart - Web APIs
the domcontentloadedeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent fires the domcontentloaded event at the current document.
PerformanceNavigationTiming.loadEventEnd - Web APIs
the loadeventend read-only property returns a timestamp which is equal to the time when the load event of the current document is completed.
PerformanceNavigationTiming.loadEventStart - Web APIs
the loadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the load event of the current document is fired.
PerformanceNavigationTiming.redirectCount - Web APIs
this property is read only .
PerformanceNavigationTiming.unloadEventEnd - Web APIs
the unloadeventend read-only property returns a timestamp representing the time value equal to the time immediately after the user agent finishes the unload event of the previous document.
PerformanceNavigationTiming.unloadEventStart - Web APIs
the unloadeventstart read-only property returns a timestamp representing the time value equal to the time immediately before the user agent starts the unload event of the previous document.
PerformanceResourceTiming.connectEnd - Web APIs
the connectend read-only property returns the timestamp immediately after the browser finishes establishing the connection to the server to retrieve the resource.
PerformanceResourceTiming.connectStart - Web APIs
the connectstart read-only property returns the timestamp immediately before the user agent starts establishing the connection to the server to retrieve the resource.
PerformanceResourceTiming.decodedBodySize - Web APIs
the decodedbodysize read-only property returns the size (in octets) received from the fetch (http or cache) of the message body, after removing any applied content-codings.
PerformanceResourceTiming.domainLookupEnd - Web APIs
the domainlookupend read-only property returns the timestamp immediately after the browser finishes the domain name lookup for the resource.
PerformanceResourceTiming.domainLookupStart - Web APIs
the domainlookupstart read-only property returns the timestamp immediately before the browser starts the domain name lookup for the resource.
PerformanceResourceTiming.encodedBodySize - Web APIs
the encodedbodysize read-only property represents the size (in octets) received from the fetch (http or cache), of the payload body, before removing any applied content-codings.
PerformanceResourceTiming.fetchStart - Web APIs
the fetchstart read-only property represents a timestamp immediately before the browser starts to fetch the resource.
PerformanceResourceTiming.initiatorType - Web APIs
the initiatortype read-only property is a string that represents the type of resource that initiated the performance event.
PerformanceResourceTiming.nextHopProtocol - Web APIs
the nexthopprotocol read-only property is a string representing the network protocol used to fetch the resource, as identified by the alpn protocol id (rfc7301).
PerformanceResourceTiming.redirectEnd - Web APIs
the redirectend read-only property returns a timestamp immediately after receiving the last byte of the response of the last redirect.
PerformanceResourceTiming.redirectStart - Web APIs
the redirectstart read-only property returns a timestamp representing the start time of the fetch which that initiates the redirect.
PerformanceResourceTiming.requestStart - Web APIs
the requeststart read-only property returns a timestamp of the time immediately before the browser starts requesting the resource from the server, cache, or local resource.
PerformanceResourceTiming.responseEnd - Web APIs
the responseend read-only property returns a timestamp immediately after the browser receives the last byte of the resource or immediately before the transport connection is closed, whichever comes first.
PerformanceResourceTiming.responseStart - Web APIs
the responsestart read-only property returns a timestamp immediately after the browser receives the first byte of the response from the server, cache, or local resource.
PerformanceResourceTiming.secureConnectionStart - Web APIs
the secureconnectionstart read-only property returns a timestamp immediately before the browser starts the handshake process to secure the current connection.
PerformanceResourceTiming.serverTiming - Web APIs
the servertiming read-only property returns an array of performanceservertiming entries containing server timing metrics.
PerformanceResourceTiming.transferSize - Web APIs
the transfersize read-only property represents the size (in octets) of the fetched resource.
PerformanceResourceTiming.workerStart - Web APIs
the workerstart read-only property of the performanceresourcetiming interface returns a domhighrestimestamp immediately before dispatching the fetchevent if a service worker thread is already running, or immediately before starting the service worker thread if it is not already running.
PerformanceServerTiming.description - Web APIs
the description read-only property returns a domstring value of the server-specified metric description, or an empty string.
PerformanceServerTiming.duration - Web APIs
the duration read-only property returns a double that contains the server-specified metric duration, or value 0.0.
PerformanceServerTiming.name - Web APIs
the name read-only property returns a domstring value of the server-specified metric name.
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.
PerformanceTiming.responseStart - Web APIs
the legacy performancetiming.responsestart read-only property returns an unsigned long long representing the moment in time (in milliseconds since the unix epoch) when the browser received the first byte of the response from the server, cache, or local resource.
PerformanceTiming.secureConnectionStart - Web APIs
the legacy performancetiming.secureconnectionstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, where the secure connection handshake starts.
PerformanceTiming.unloadEventEnd - Web APIs
the legacy performancetiming.unloadeventend read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event handler finishes.
PerformanceTiming.unloadEventStart - Web APIs
the legacy performancetiming.unloadeventstart read-only property returns an unsigned long long representing the moment, in miliseconds since the unix epoch, the unload event has been thrown.
PermissionStatus.state - Web APIs
the state read-only property of the permissionstatus interface returns the state of a requested permission.
Permissions - Web APIs
safari ios no support nosamsung internet android full support 9.0clipboard-read permissionchrome full support 64edge full support 79firefox no support noie no support noopera ?
PhotoCapabilities.fillLightMode - Web APIs
the filllightmode read-only property of the photocapabilities interface returns all available fill light options of the source device.
PhotoCapabilities.imageHeight - Web APIs
the imageheight read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image height range supported by the user agent.
imageWidth - Web APIs
the imagewidth read-only property of the photocapabilities interface returns a mediasettingsrange object indicating the image width range supported by the user agent.
PhotoCapabilities.redEyeReduction - Web APIs
the redeyereduction read-only property of the photocapabilities interface returns an enum indicating the red-eye reduction capability of the source.
PluginArray - Web APIs
properties pluginarray.lengthread only the number of plugins in the array.
PointerEvent.height - Web APIs
the height read-only property of the pointerevent interface represents the height of the pointer's contact geometry, along the y-axis (in css pixels).
PointerEvent.isPrimary - Web APIs
the isprimary read-only property of the pointerevent interface indicates whether or not the pointer device that created the event is the primary pointer.
PointerEvent.pointerId - Web APIs
the pointerid read-only property of the pointerevent interface is an identifier assigned to a given pointer event.
PointerEvent.pointerType - Web APIs
the pointertype read-only property of the pointerevent interface indicates the device type (mouse, pen, or touch) that caused a given pointer event.
PointerEvent.pressure - Web APIs
the pressure read-only property of the pointerevent interface indicates the normalized pressure of the pointer input.
PointerEvent.tangentialPressure - Web APIs
the tangentialpressure read-only property of the pointerevent interface represents the normalized tangential pressure of the pointer input (also known as barrel pressure or cylinder stress).
PointerEvent.tiltX - Web APIs
the tiltx read-only property of the pointerevent interface is the angle (in degrees) between the y-z plane of the pointer and the screen.
PointerEvent.tiltY - Web APIs
the tilty read-only property of the pointerevent interface is the angle (in degrees) between the x-z plane of the pointer and the screen.
PointerEvent.twist - Web APIs
the twist read-only property of the pointerevent interface represents the clockwise rotation of the pointer (e.g., pen stylus) around its major axis, in degrees.
PointerEvent.width - Web APIs
the width read-only property of the pointerevent interface represents the width of the pointer's contact geometry along the x-axis, measured in css pixels.
ProcessingInstruction - Web APIs
="_top"><rect x="436" y="1" width="210" height="50" fill="#f4f7f8" stroke="#d4dde4" stroke-width="2px" /><text x="541" y="30" font-size="12px" font-family="consolas,monaco,andale mono,monospace" fill="#4d4e53" text-anchor="middle" alignment-baseline="middle">processinginstruction</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties target (domstring) read only a name identifying the application to which the instruction is targeted, specification specification status comment domthe definition of 'processinginstruction' in that specification.
ProgressEvent.lengthComputable - Web APIs
the progressevent.lengthcomputable read-only property is a boolean flag indicating if the resource concerned by the progressevent has a length that can be calculated.
ProgressEvent.loaded - Web APIs
the progressevent.loaded read-only property is an integer representing the amount of work already performed by the underlying process.
ProgressEvent.total - Web APIs
the progressevent.total read-only property is an integer representing the total amount of work that the underlying process is in the progress of performing.
PromiseRejectionEvent.reason - Web APIs
the promiserejectionevent reason read-only property is any javascript value or object which provides the reason passed into promise.reject().
PublicKeyCredential.id - Web APIs
the id read-only property of the publickeycredential interface is a domstring, inherited from credential, which represents the identifier of the current publickeycredential instance.
PublicKeyCredential.rawId - Web APIs
the rawid read-only property of the publickeycredential interface is an arraybuffer object containing the identifier of the credentials.
PublicKeyCredential.response - Web APIs
the response read-only property of the publickeycredential interface is an authenticatorresponse object which is sent from the authenticator to the user agent for the creation/fetching of credentials.
PublicKeyCredentialCreationOptions.rp - Web APIs
name a domstring giving a human-readable name for the relying party.
PushEvent.data - Web APIs
WebAPIPushEventdata
the data read-only property of the pushevent interface returns a reference to a pushmessagedata object containing data sent to the pushsubscription.
PushEvent - Web APIs
WebAPIPushEvent
additional properties: pushevent.data read only returns a reference to a pushmessagedata object containing data sent to the pushsubscription.
PushManager.getSubscription() - Web APIs
(no live demo is available.) // we need the service worker registration to check for a subscription navigator.serviceworker.ready.then(function(serviceworkerregistration) { // do we already have a push message subscription?
PushManager.supportedContentEncodings - Web APIs
the supportedcontentencodings read-only property of the pushmanager interface returns an array of supported content codings that can be used to encrypt the payload of a push message.
PushSubscription.expirationTime - Web APIs
the expirationtime read-only property of the pushsubscription interface returns a domhighrestimestamp of the subscription expiration time associated with the push subscription, if there is one, or null otherwise.
PushSubscription.subscriptionId - Web APIs
the endpoint read-only property of the pushsubscription interface returns a domstring containing the subscription id associated with the push subscription.
PushSubscription.toJSON() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { var mysubscription = subscription.tojson(); // do something with subscription details }) }); specifications specification status comment push apithe definition of 'pushsubscription: tojson' in that specification.
PushSubscription.unsubscribe() - Web APIs
example navigator.serviceworker.ready.then(function(reg) { reg.pushmanager.getsubscription().then(function(subscription) { subscription.unsubscribe().then(function(successful) { // you've successfully unsubscribed }).catch(function(e) { // unsubscription failed }) }) }); specifications specification status comment push apithe definition of 'unsubscribe()' in that specification.
Web Push API Notifications best practices - Web APIs
for example, safari 12.1 now requires—and other browsers either already do, or are planning[1] to do so—that the user interact with the page in some way before the page can request permission to perform push notifications.
Push API - Web APIs
WebAPIPush API
serviceworkerregistration.pushmanager read only returns a reference to the pushmanager interface for managing push subscriptions including subscribing, getting an active subscription, and accessing push permission status.
RTCCertificate - Web APIs
properties rtccertificate.expires read only returns the expiration date of the certificate.
RTCConfiguration.iceServers - Web APIs
if the list of servers is changed while a connection is already active by calling the the rtcpeerconnection method setconfiguration(), no immediate effect occurs.
RTCConfiguration - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
RTCDTMFSender.insertDTMF() - Web APIs
return value undefined exceptions invalidstateerror the dtmf tones couldn't be sent because the track has been stopped, or is in a read-only or inactive state.
RTCDTMFToneChangeEvent.tone - Web APIs
the read-only property rtcdtmftonechangeevent.tone returns the dtmf character which has just begun to play, or an empty string ("").
RTCDTMFToneChangeEvent - Web APIs
properties in addition to the properties of event, this interface offers the following: rtcdtmftonechangeevent.tone read only a domstring specifying the tone which has begun playing, or an empty string ("") if the previous tone has finished playing.
RTCDataChannel.bufferedAmount - Web APIs
the read-only rtcdatachannel property bufferedamount returns the number of bytes of data currently queued to be sent over the data channel.
RTCDataChannel.id - Web APIs
WebAPIRTCDataChannelid
the read-only rtcdatachannel property id returns an id number (between 0 and 65,534) which uniquely identifies the rtcdatachannel.
RTCDataChannel.label - Web APIs
the read-only rtcdatachannel property label returns a domstring containing a name describing the data channel.
RTCDataChannel.maxPacketLifeTime - Web APIs
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.
RTCDataChannel.maxRetransmits - Web APIs
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.
RTCDataChannel.negotiated - Web APIs
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).
RTCDataChannel.onbufferedamountlow - Web APIs
*/ dc.onbufferedamountlow = function() { if (source.position <= source.length) { dc.send(source.readfile(65536)); } } specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcdatachannel.onbufferedamountlow' in that specification.
RTCDataChannel: open event - Web APIs
bubbles no cancelable no interface rtcdatachannelevent event handler property onopen examples this example adds to the rtcdatachannel dc a handler for the open event that adjusts the user interface to indicate that a chat window is ready to be used after a connection has been established.
RTCDataChannel.ordered - Web APIs
the read-only rtcdatachannel property ordered indicates whether or not the data channel guarantees in-order delivery of messages; the default is true, which indicates that the data channel is indeed ordered.
RTCDataChannel.protocol - Web APIs
the read-only rtcdatachannel property protocol returns a domstring containing the name of the subprotocol in use.
RTCDataChannel.reliable - Web APIs
the read-only rtcdatachannel property reliable indicates whether or not the data channel is reliable.
RTCDataChannel.send() - Web APIs
exceptions invalidstateerror since the data channel uses a separate transport channel from the media content, it must establish its own connection; if it hasn't finished doing so (that is, its readystate is "connecting"), this error occurs without sending or buffering the data.
RTCDataChannel.stream - Web APIs
the deprecated (and never part of the official specification) read-only rtcdatachannel property stream returns an id number (between 0 and 65,535) which uniquely identifies the rtcdatachannel.
RTCDataChannelEvent() - Web APIs
dc is a data channel which already exists.
RTCDataChannelEvent.channel - Web APIs
the read-only property rtcdatachannelevent.channel returns the rtcdatachannel associated with the event.
RTCDataChannelEvent - Web APIs
constructorrtcdatachannelevent() the rtcdatachannelevent() constructor creates a new rtcdatachannelevent.propertiesalso inherits properties from: eventchannel read only the read-only property rtcdatachannelevent.channel returns the rtcdatachannel associated with the event.methodsthis interface has no methods, but inherits methods from: event examples in this example, the datachannel event handler is set up to save the data channel reference and set up handlers for the events which need to be monitored.
RTCDtlsTransport.iceTransport - Web APIs
the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport.
RTCDtlsTransport.state - Web APIs
the state read-only property of the rtcdtlstransport interface provides information which describes a datagram transport layer security (dtls) transport state.
RTCDtlsTransport - Web APIs
ransport" target="_top"><rect x="1" y="1" 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">rtcdtlstransport</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} propertiesicetransport read only the read-only rtcdtlstransport property icetransport contains a reference to the underlying rtcicetransport.state read only the state read-only property of the rtcdtlstransport interface provides information which describes a datagram transport layer security (dtls) transport state.methodsthis interface has no methods.
RTCErrorEvent - Web APIs
properties in addition to the standard properties available on the event interface, rtcerrorevent also includes the following: error read only an rtcerror object specifying the error which occurred; this object includes the type of error that occurred, information about where the error occurred (such as which line number in the sdp or what sctp cause code was at issue).
RTCIceCandidate.address - Web APIs
the rtcicecandidate interface's read-only address property is a string providing the address of the device which is the source of the candidate.
RTCIceCandidate.candidate - Web APIs
the read-only property candidate on the rtcicecandidate interface returns a domstring describing the candidate in detail.
RTCIceCandidate.component - Web APIs
the read-only component property on the rtcicecandidate interface is a string which indicates whether the candidate is an rtp or an rtcp candidate.
RTCIceCandidate.foundation - Web APIs
the rtcicecandidate interface's read-only foundation property is a string which uniquely identifies the candidate across multiple transports.
RTCIceCandidate.port - Web APIs
the rtcicecandidate interface's read-only port property contains the port number on the device at the address given by ip at which the candidate's peer can be reached.
RTCIceCandidate.priority - Web APIs
the rtcicecandidate interface's read-only priority property specifies the candidate's priority according to the remote peer; the higher this value is, the better the remote peer considers the candidate to be.
RTCIceCandidate.protocol - Web APIs
the rtcicecandidate interface's read-only protocol property is a string which indicates whether the candidate uses udp or tcp as its transport protocol.
RTCIceCandidate.relatedAddress - Web APIs
the rtcicecandidate interface's read-only relatedaddress property is a string indicating the related address of a relay or reflexive candidate.
RTCIceCandidate.relatedPort - Web APIs
the rtcicecandidate interface's read-only relatedport property indicates the port number of reflexive or relay candidates.
RTCIceCandidate.sdpMLineIndex - Web APIs
the read-only sdpmlineindex property on the rtcicecandidate interface is a zero-based index of the m-line describing the media associated with the candidate.
RTCIceCandidate.sdpMid - Web APIs
the read-only property sdpmid on the rtcicecandidate interface returns a domstring specifying the media stream identification tag of the media component with which the candidate is associated.
RTCIceCandidate.tcpType - Web APIs
the rtcicecandidate interface's read-only tcptype property is included on tcp candidates to provide additional details about the candidate type.
RTCIceCandidate.type - Web APIs
the rtcicecandidate interface's read-only type specifies the type of candidate the object represents.
RTCIceCandidate.usernameFragment - Web APIs
the read-only usernamefragment property on the rtcicecandidate interface is a string indicating the username fragment ("ufrag") that uniquely identifies a single ice interaction session.
RTCIceCandidatePairStats.writable - Web APIs
note: this property was removed from the specification in early 2017 because you can determine whether or not an incoming ice request is available to read by checking to see if responsesreceived is greater than 0 and that the time specified by consentexpiredtimestamp has not passed: if (icpstats.responsesreceived > 0 && icpstats.consentexpiredtimestamp < performance.now()) { /* at least one ice response has been received */ } ...
RTCIceCandidatePairStats - Web APIs
readable optional a boolean value indicating whether or not data can be sent over the connection described by the candidate pair.
RTCIceCandidateStats - Web APIs
for host candidates, true means that any network resources (usually a network socket) associated with the candidate have already been released.
RTCIceServer.url - Web APIs
WebAPIRTCIceServerurl
the urls property lets you include them both in one server, which is more readily maintainable.
RTCIceTransport.component - Web APIs
the read-only rtcicetransport property component specifies whether the object is serving to transport rtp or rtcp.
RTCIceTransport.gatheringState - Web APIs
the read-only rtcicetransport property gatheringstate returns a domstring from the enumerated type rtcicegathererstate that indicates what gathering state the ice agent is currently in: "new", "gathering", or "complete".
RTCIceTransport.role - Web APIs
the read-only rtcicetransport property role indicates which ice role the transport is fulfilling: that of the controlling agent, or the agent that is being controlled.
RTCIceTransport.state - Web APIs
the read-only rtcicetransport property state returns the current state of the ice transport, so you can determine the state of ice gathering in which the ice agent currently is operating.
RTCIdentityErrorEvent.idp - Web APIs
the read-only property rtcidentityerrorevent.idp returns the domstring describing the domain name of the identity provider (idp) generating the error response event.
RTCIdentityErrorEvent.loginUrl - Web APIs
the read-only property rtcidentityerrorevent.loginurl is a domstring giving the url where the user can complete the authentication.
RTCIdentityErrorEvent.protocol - Web APIs
the read-only property rtcidentityerrorevent.protocol is a domstring describing the idp protocol in use.
RTCIdentityEvent.assertion - Web APIs
the read-only property rtcidentityevent.assertion returns the domstring containing a blob being the coded assertion associated with the event.
RTCIdentityEvent - Web APIs
rtcidentityevent.assertion read only returns the domstring containing a blob being the assertion generated.
RTCInboundRtpStreamStats.fecPacketsDiscarded - Web APIs
this can happen if all the packets covered by the fec packet have already been received or recovered using another fec packet, or if the fec packet arrived outside the recovery window and the lost rtp packets have already been skipped during playback as a result.
RTCInboundRtpStreamStats.fecPacketsReceived - Web APIs
this can happen if the packets covered by the fec packets have already been received successfully or have already been reconstructed using a previously-received fec packet.
RTCPeerConnection() - Web APIs
you may find in some cases that connections can be established more quickly by allowing the ice agent to start fetching ice candidates before you start trying to connect, so that they're already available for inspection when rtcpeerconnection.setlocaldescription() is called.
RTCPeerConnection.addIceCandidate() - Web APIs
syntax apromise = pc.addicecandidate(candidate); addicecandidate(candidate, successcallback, failurecallback); parameters candidate optional an object conforming to the rtcicecandidateinit dictionary, or an rtcicecandidate object; the contents of the object should be constructed from a message received over the signaling channel, describing a newly received ice candidate that's ready to be delivered to the local ice agent.
RTCPeerConnection.getConfiguration() - Web APIs
example this example adds a new certificate to an active connection if it doesn't already have one in use.
RTCPeerConnection.iceConnectionState - Web APIs
the read-only property rtcpeerconnection.iceconnectionstate returns an enum of type rtciceconnectionstate which state of the ice agent associated with the rtcpeerconnection.
RTCPeerConnection.iceGatheringState - Web APIs
the read-only property rtcpeerconnection.icegatheringstate returns an enum of type rtcicegatheringstate that describes connection's ice gathering state.
RTCPeerConnection.localDescription - Web APIs
the read-only property rtcpeerconnection.localdescription returns an rtcsessiondescription describing the session for the local end of the connection.
RTCPeerConnection.ondatachannel - Web APIs
example pc.ondatachannel = function(ev) { console.log('data channel is created!'); ev.channel.onopen = function() { console.log('data channel is open and ready to be used.'); }; }; specifications specification status comment webrtc 1.0: real-time communication between browsersthe definition of 'rtcpeerconnection.ondatachannel' in that specification.
RTCPeerConnection.onnegotiationneeded - Web APIs
if the session is modified in a manner that requires negotiation while a negotiation is already in progress, no negotiationneeded event will fire until negotiation completes, and only then if negotiation is still needed.
RTCPeerConnection.pendingLocalDescription - Web APIs
the read-only property rtcpeerconnection.pendinglocaldescription returns an rtcsessiondescription object describing a pending configuration change for the local end of the connection.
RTCPeerConnection.pendingRemoteDescription - Web APIs
the read-only property rtcpeerconnection.pendingremotedescription returns an rtcsessiondescription object describing a pending configuration change for the remote end of the connection.
RTCPeerConnection.remoteDescription - Web APIs
the read-only property rtcpeerconnection.remotedescription returns a rtcsessiondescription describing the session (which includes configuration and media information) for the remote end of the connection.
RTCPeerConnection.removeStream() - Web APIs
if the negotiation already happened, a new one will be needed for the remote peer to be able to use it.
RTCPeerConnection.sctp - Web APIs
the read-only sctp property on the rtcpeerconnection interface returns an rtcsctptransport describing the sctp transport over which sctp data is being sent and received.
RTCPeerConnection.setLocalDescription() - Web APIs
if setlocaldescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
RTCPeerConnection.setRemoteDescription() - Web APIs
keep in mind that if setremotedescription() is called while a connection is already in place, it means renegotiation is underway (possibly to adapt to changing network conditions).
RTCPeerConnection.signalingState - Web APIs
the read-only signalingstate property on the rtcpeerconnection interface returns one of the string values specified by the rtcsignalingstate enum; these values describe the state of the signaling process on the local end of the connection while connecting or reconnecting to another peer.
RTCPeerConnectionIceErrorEvent.address - Web APIs
examples this example creates a handler for icecandidateerror events which creates human readable messages describing the local network interface for the connection as well as the ice server that was being used to try to open the connection, then calls a function to display those as well as the event's errortext property's contents.
RTCPeerConnectionIceEvent.candidate - Web APIs
the read-only candidate property of the rtcpeerconnectioniceevent interface returns the rtcicecandidate associated with the event.
RTCPeerConnectionIceEvent - Web APIs
rtcpeerconnectioniceevent.candidate read only contains the rtcicecandidate containing the candidate associated with the event, or null if this event indicates that there are no further candidates to come.
RTCRtpContributingSource.audioLevel - Web APIs
the read-only audiolevel property of the rtcrtpcontributingsource interface indicates the audio level contained in the last rtp packet played from the described source.
RTCRtpContributingSource.rtpTimestamp - Web APIs
the read-only rtptimestamp property of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the source-generated time at which the media contained int he packet was first sampled or obtained.
RTCRtpContributingSource.source - Web APIs
the read-only source property of the rtcrtpcontributingsource interface returns the source identifier of a particular stream of rtp packets.
RTCRtpContributingSource.timestamp - Web APIs
the read-only timestamp property of the rtcrtpcontributingsource interface returns a domhighrestimestamp indicating the most recent time of playout of an rtp packet from the source.
RTCRtpEncodingParameters - Web APIs
this value can only be set when creating the transceiver; after that, this value is read only.
RTCRtpReceiver.track - Web APIs
the track read-only property of the rtcrtpreceiver interface returns the mediastreamtrack associated with the current rtcrtpreceiver instance.
RTCRtpReceiver.transport - Web APIs
the read-only transport property of an rtcrtpreceiver object provides the rtcdtlstransport object used to interact with the underlying transport over which the receiver is exchanging real-time transport control protocol (rtcp) packets.
RTCRtpSendParameters.encodings - Web APIs
this value can only be set when creating the transceiver; after that, this value is read only.
RTCRtpSender.dtmf - Web APIs
WebAPIRTCRtpSenderdtmf
the read-only dtmf property on the rtcrtpsender interface returns a rtcdtmfsender object which can be used to send dtmf tones over the rtcpeerconnection .
RTCRtpSender.setStreams() - Web APIs
if you specify streams to which the track already belongs, that stream is unaffected.
RTCRtpSender.track - Web APIs
the track read-only property of the rtcrtpsender interface returns the mediastreamtrack which is being handled by the rtcrtpsender.
RTCRtpSender.transport - Web APIs
the read-only transport property of an rtcrtpsender object provides the rtcdtlstransport object used to interact with the underlying transport over which the sender is exchanging real-time transport control protocol (rtcp) packets.
RTCRtpSynchronizationSource.voiceActivityFlag - Web APIs
the read-only voiceactivityflag property of the rtcrtpsynchronizationsource interface indicates whether or not the most recent rtp packet on the source includes voice activity.
RTCRtpTransceiver.currentDirection - Web APIs
the read-only rtcrtptransceiver property currentdirection is a string which indicates the current directionality of the transceiver.
RTCRtpTransceiver.mid - Web APIs
the read-only rtcrtptransceiver interface's mid property specifies the negotiated media id (mid) which the local and remote peers have agreed upon to uniquely identify the stream's pairing of sender and receiver.
RTCRtpTransceiver.receiver - Web APIs
the read-only receiver property of webrtc's rtcrtptransceiver interface indicates the rtcrtpreceiver responsible for receiving and decoding incoming media data for the transceiver's stream.
RTCRtpTransceiver.sender - Web APIs
the read-only sender property of webrtc's rtcrtptransceiver interface indicates the rtcrtpsender responsible for encoding and sending outgoing media data for the transceiver's stream.
RTCRtpTransceiver.stop() - Web APIs
this method does nothing if the transceiver is already stopped.
RTCRtpTransceiver.stopped - Web APIs
the read-only stopped property on the rtcrtptransceiver interface indicates whether or not the transceiver's associated sender and receiver have both been stopped.
RTCSctpTransport.state - Web APIs
the state read-only property of the rtcsctptransport interface provides information which describes a stream control transmission protocol (sctp) transport state.
RTCSessionDescription.sdp - Web APIs
the property rtcsessiondescription.sdp is a read-only domstring containing the sdp which describes the session.
RTCSessionDescription.type - Web APIs
the property rtcsessiondescription.type is a read-only value of type rtcsdptype which describes the description's type.
RTCTrackEvent.receiver - Web APIs
the read-only receiver property of the rtctrackevent interface indicates the rtcrtpreceiver which is used to receive data containing media for the track to which the event refers.
RTCTrackEvent.streams - Web APIs
the webrtc api interface rtctrackevent's read-only streams property specifies an array of mediastream objects, one for each of the streams that comprise the track being added to the rtcpeerconnection.
RTCTrackEvent.track - Web APIs
the webrtc api interface rtctrackevent's read-only track property specifies the mediastreamtrack that has been added to the rtcpeerconnection.
RTCTrackEvent.transceiver - Web APIs
the webrtc api interface rtctrackevent's read-only transceiver property indicates the rtcrtptransceiver affiliated with the event's track.
Range.collapse() - Web APIs
WebAPIRangecollapse
to determine if a range is already collapsed, see the range.collapsed property.
Range.collapsed - Web APIs
WebAPIRangecollapsed
the range.collapsed read-only property returns a boolean flag indicating whether the start and end points of the range are at the same position.
Range.endContainer - Web APIs
the range.endcontainer read-only property returns the node within which the range ends.
Range.startContainer - Web APIs
the range.startcontainer read-only property returns the node within which the range starts.
Range.startOffset - Web APIs
WebAPIRangestartOffset
the range.startoffset read-only property returns a number representing where in the startcontainer the range starts.
Report.body - Web APIs
WebAPIReportbody
the body read-only property of the report interface returns the body of the report, which is a reportbody object containing the detailed report information.
Report.type - Web APIs
WebAPIReporttype
the type read-only property of the report interface returns the type of report generated, e.g.
Report.url - Web APIs
WebAPIReporturl
the url read-only property of the report interface returns the url of the document that generated the report.
Request() - Web APIs
WebAPIRequestRequest
body: any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
Request.cache - Web APIs
WebAPIRequestcache
the cache read-only property of the request interface contains the cache mode of the request.
Request.clone() - Web APIs
WebAPIRequestclone
clone() throws a typeerror if the response body has already been used.
Request.context - Web APIs
WebAPIRequestcontext
the deprecated context read-only property of the request interface contains the context of the request (e.g., audio, image, iframe).
Request.credentials - Web APIs
the credentials read-only property of the request interface indicates whether the user agent should send cookies from the other domain in the case of cross-origin requests.
Request.destination - Web APIs
the destination read-only property of the request interface returns a string describing the type of content being requested.
Request.headers - Web APIs
WebAPIRequestheaders
the headers read-only property of the request interface contains the headers object associated with the request.
Request.integrity - Web APIs
WebAPIRequestintegrity
the integrity read-only property of the request interface contains the subresource integrity value of the request.
Request.method - Web APIs
WebAPIRequestmethod
the method read-only property of the request interface contains the request's method (get, post, etc.) syntax var mymethod = request.method; value a bytestring indicating the method of the request.
Request.redirect - Web APIs
WebAPIRequestredirect
the redirect read-only property of the request interface contains the mode for how redirects are handled.
Request.referrer - Web APIs
WebAPIRequestreferrer
the referrer read-only property of the request interface is set by the user agent to be the referrer of the request.
Request.referrerPolicy - Web APIs
the referrerpolicy read-only property of the request interface returns the referrer policy, which governs what referrer information, sent in the referer header, should be included with the request.
Request.url - Web APIs
WebAPIRequesturl
the url read-only property of the request interface contains the url of the request.
ResizeObserverEntry.target - Web APIs
the target read-only property of the resizeobserverentry interface returns a reference to the element or svgelement that is being observed.
Response() - Web APIs
WebAPIResponseResponse
this can be null (which is the default value), or one of: blob buffersource formdata readablestream urlsearchparams usvstring init optional an options object containing any custom settings that you want to apply to the response, or an empty object (which is the default value).
Response.clone() - Web APIs
WebAPIResponseclone
clone() throws a typeerror if the response body has already been used.
Response.headers - Web APIs
WebAPIResponseheaders
the headers read-only property of the response interface contains the headers object associated with the response.
Response.ok - Web APIs
WebAPIResponseok
the ok read-only property of the response interface contains a boolean stating whether the response was successful (status in the range 200-299) or not.
Response.redirected - Web APIs
the read-only redirected property of the response interface indicates whether or not the response is the result of a request you made which was redirected.
Response.status - Web APIs
WebAPIResponsestatus
the status read-only property of the response interface contains the status code of the response (e.g., 200 for a success).
Response.statusText - Web APIs
the statustext read-only property of the response interface contains the status message corresponding to the status code (e.g., ok for 200).
Response.type - Web APIs
WebAPIResponsetype
the type read-only property of the response interface contains the type of the response.
Response.url - Web APIs
WebAPIResponseurl
the url read-only property of the response interface contains the url of the response.
SVGAElement.target - Web APIs
the svgaelement.target read-only property of svgaelement returns an svganimatedstring object that specifies the portion of a target window, frame, pane into which a document is to be opened when a link is activated.
SVGAElement - Web APIs
svgaelement.target read only it corresponds to the target attribute of the given element.
SVGAnimatedBoolean - Web APIs
interface overview also implement none methods none properties readonly boolean baseval readonly boolean animval normative document svg 1.1 (2nd edition) properties name type description baseval boolean the base value of the given attribute before applying any animations.
SVGAnimatedEnumeration - Web APIs
interface overview also implement none methods none properties unsigned short baseval readonly unsigned short animval normative document svg 1.1 (2nd edition) properties name type description baseval unsigned short the base value of the given attribute before applying any animations.
SVGAnimatedInteger - Web APIs
interface overview also implement none methods none properties readonly long baseval readonly long animval normative document svg 1.1 (2nd edition) properties name type description baseval long the base value of the given attribute before applying any animations.
SVGAnimatedLength - Web APIs
interface overview also implement none methods none properties readonly svglength baseval readonly svglength animval normative document svg 1.1 (2nd edition) properties name type description baseval svglength the base value of the given attribute before applying any animations.
SVGAnimatedNumber - Web APIs
interface overview also implement none methods none properties float baseval readonly float animval normative document svg 1.1 (2nd edition) properties name type description baseval float the base value of the given attribute before applying any animations.
SVGAnimatedPathData - Web APIs
if the given attribute or property is being animated, contains the current animated value of the attribute or property, and both the object itself and its contents are read only.
SVGAnimatedPoints - Web APIs
interface overview also implement none methods none properties readonly svgpointlist points readonly svgpointlist animatedpoints normative document svg 1.1 (2nd edition) properties name type description points svgpointlist provides access to the base (i.e., static) contents of the points attribute.
SVGAnimatedString.animVal - Web APIs
if the given attribute or property is not currently being animated, then it contains the same value as baseval the animval property is a read only property.
SVGAnimatedString - Web APIs
properties svganimatedstring.animval read only this is a domstring representing the animation value.
SVGAnimationElement - Web APIs
svganimationelement.targetelement read only an svgelement representing the element which is being animated.
cx - Web APIs
the cx read-only property of the svgcircleelement interface reflects the cx attribute of a <circle> element and by that defines the x-coordinate of the circleʼs center.
cy - Web APIs
the cy read-only property of the svgcircleelement interface reflects the cy attribute of a <circle> element and by that defines the y-coordinate of the circleʼs center.
r - Web APIs
the r read-only property of the svgcircleelement interface reflects the r attribute of a <circle> element and by that defines the radius of the circle.
SVGClipPathElement - Web APIs
svgclippathelement.clippathunits read only an svganimatedenumeration corresponding to the clippathunits attribute of the given <clippath> element.
SVGFEComponentTransferElement - Web APIs
svgfecomponenttransferelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element.
SVGFEMergeNodeElement - Web APIs
svgfemergenodeelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element.
SVGFETileElement - Web APIs
svgfetileelement.in1 read only an svganimatedstring corresponding to the in attribute of the given element.
SVGGeometryElement - Web APIs
svggeometryelement.pathlength read only this property reflects the pathlength attribute.
SVGGraphicsElement: copy event - Web APIs
however, the handler cannot read the clipboard data.
SVGGraphicsElement: cut event - Web APIs
the handler cannot read the clipboard data.
SVGGraphicsElement - Web APIs
svggraphicselement.transform read only an svganimatedtransformlist reflecting the computed value of the transform property and its corresponding transform attribute of the given element.
SVGImageElement.height - Web APIs
the height read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the height attribute of the given <image> element.
SVGImageElement.preserveAspectRatio - Web APIs
the preserveaspectratio read-only property of the svgimageelement interface returns an svganimatedpreserveaspectratio corresponding to the preserveaspectratio attribute of the given <image> element.
SVGImageElement.width - Web APIs
the width read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the width attribute of the given <image> element.
SVGImageElement.x - Web APIs
WebAPISVGImageElementx
the x read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the x attribute of the given <image> element.
SVGImageElement.y - Web APIs
WebAPISVGImageElementy
the y read-only property of the svgimageelement interface returns an svganimatedlength corresponding to the y attribute of the given <image> element.
SVGStopElement - Web APIs
svgstopelement.offset read only an svganimatednumber corresponding to the offset of the given element.
SVGStylable - Web APIs
interface overview also implement none methods cssvalue getpresentationattribute(in domstring name) properties readonly svganimatedstring classname readonly cssstyledeclaration style normative document svg 1.1 (2nd edition) properties name type description classname svganimatedstring corresponds to attribute class on the given element.
SVGTransformable - Web APIs
interface overview also implement none methods none properties readonly svganimatedtransformlist transform normative document svg 1.1 (2nd edition) properties name type description transform svganimatedtransformlist corresponds to attribute transform on the given element.
SVGURIReference - Web APIs
target="_top"><rect x="1" y="1" width="150" height="50" fill="#f4f7f8" 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">svgurireference</text></a></svg></div> a:hover text { fill: #0095dd; pointer-events: all;} properties svgurireference.href read only an svganimatedstring that represents the value of the href attribute, and, on elements that are defined to support it, the deprecated xlink:href attribute.
Screen.availHeight - Web APIs
the read-only screen interface's availheight property returns the height, in css pixels, of the space available for web content on the screen.
Screen.colorDepth - Web APIs
WebAPIScreencolorDepth
the screen.colordepth read-only property returns the color depth of the screen.
Screen.height - Web APIs
WebAPIScreenheight
the screen.height read-only property returns the height of the screen in pixels.
Screen.orientation - Web APIs
the orientation read-only property of the screen interface returns the current orientation of the screen.
ScreenOrientation.angle - Web APIs
the angle read-only property of the screenorientation interface returns the document's current orientation angle.
ScreenOrientation.type - Web APIs
the type read-only property of the screenorientation interface returns the document's current orientation type, one of "portrait-primary", "portrait-secondary", "landscape-primary", or "landscape-secondary".
Screen Wake Lock API - Web APIs
there are plenty of use cases for keeping a screen on, including reading an ebook, map navigation, following a recipe, presenting to an audience, scanning a qr/barcode or applications that use voice or gesture control, rather than tactile input (the default way to keep a screen awake).
ScriptProcessorNode: audioprocess event - Web APIs
the audioprocess event of the scriptprocessornode interface is fired when an input buffer of a script processor is ready to be processed.
SecurityPolicyViolationEvent.blockedURI - Web APIs
the blockeduri read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the resource that was blocked because it violates a policy.
SecurityPolicyViolationEvent.columnNumber - Web APIs
the columnnumber read-only property of the securitypolicyviolationevent interface is the column number in the document or worker at which the violation occurred.
SecurityPolicyViolationEvent.disposition - Web APIs
the disposition read-only property of the securitypolicyviolationevent interface indicates how the violated policy is configured to be treated by the user agent.
SecurityPolicyViolationEvent.documentURI - Web APIs
the documenturi read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.effectiveDirective - Web APIs
the effectivedirective read-only property of the securitypolicyviolationevent interface is a domstring representing the directive whose enforcement uncovered the violation.
SecurityPolicyViolationEvent.lineNumber - Web APIs
the linenumber read-only property of the securitypolicyviolationevent interface is the line number in the document or worker at which the violation occurred.
SecurityPolicyViolationEvent.originalPolicy - Web APIs
the originalpolicy read-only property of the securitypolicyviolationevent interface is a domstring containing the policy whose enforcement uncovered the violation.
SecurityPolicyViolationEvent.referrer - Web APIs
the referrer read-only property of the securitypolicyviolationevent interface is a usvstring representing the referrer of the resources whose policy was violated.
SecurityPolicyViolationEvent.sample - Web APIs
the sample read-only property of the securitypolicyviolationevent interface is a domstring representing a sample of the resource that caused the violation.
SecurityPolicyViolationEvent.sourceFile - Web APIs
the sourcefile read-only property of the securitypolicyviolationevent interface is a usvstring representing the uri of the document or worker in which the violation was found.
SecurityPolicyViolationEvent.statusCode - Web APIs
the statuscode read-only property of the securitypolicyviolationevent interface is a number representing the http status code of the document or worker in which the violation occurred.
SecurityPolicyViolationEvent.violatedDirective - Web APIs
the violateddirective read-only property of the securitypolicyviolationevent interface is a domstring representing the directive whose enforcement uncovered the violation.
Selection.addRange() - Web APIs
example currently only firefox supports multiple selection ranges, other browsers will not add new ranges to the selection if it already contains one.
Selection.anchorNode - Web APIs
the selection.anchornode read-only property returns the node in which the selection begins.
Selection.anchorOffset - Web APIs
the selection.anchoroffset read-only property returns the number of characters that the selection's anchor is offset within the selection.anchornode.
Selection.focusNode - Web APIs
the selection.focusnode read-only property returns the node in which the selection ends.
Selection.focusOffset - Web APIs
the selection.focusoffset read-only property returns the number of characters that the selection's focus is offset within the selection.focusnode.
Selection.isCollapsed - Web APIs
the selection.iscollapsed read-only property returns a boolean which indicates whether or not there is currently any text selected.
Selection.rangeCount - Web APIs
the selection.rangecount read-only property returns the number of ranges in the selection.
Selection.type - Web APIs
WebAPISelectiontype
the type read-only property of the selection interface returns a domstring describing the type of the current selection.
Selection API - Web APIs
the selection api provides functionality for reading and manipulating the range of text selected by the user.
SensorErrorEvent.error - Web APIs
the error read-only property of the sensorerrorevent interface returns the domexception object passed in the event's contructor.
SensorErrorEvent - Web APIs
properties sensorerrorevent.error read only returns the domexception object passed in the event's contructor.
ServiceWorker.state - Web APIs
the state read-only property of the serviceworker interface returns a string representing the current state of the service worker.
ServiceWorkerContainer.controller - Web APIs
the controller read-only property of the serviceworkercontainer interface returns a serviceworker object if its state is activated (the same object returned by serviceworkerregistration.active).
ServiceWorkerGlobalScope.caches - Web APIs
the caches read-only property of the serviceworkerglobalscope interface returns the cachestorage object associated with the service worker.
ServiceWorkerGlobalScope.clients - Web APIs
the clients read-only property of the serviceworkerglobalscope interface returns the clients object associated with the service worker.
ServiceWorkerGlobalScope: message event - Web APIs
// in the page being controlled if (navigator.serviceworker) { navigator.serviceworker.register('service-worker.js'); navigator.serviceworker.addeventlistener('message', event => { // event is a messageevent object console.log(`the service worker sent me a message: ${event.data}`); }); navigator.serviceworker.ready.then( registration => { registration.active.postmessage("hi service worker"); }); } the service worker can receive the message by listening to the message event: // in the service worker addeventlistener('message', event => { // event is an extendablemessageevent object console.log(`the client sent me a message: ${event.data}`); event.source.postmessage("hi client"); }); specifi...
onnotificationclose - Web APIs
notifications created on the main thread or in workers which aren't service workers using the notification() constructor will instead receive a close event on the notification object itself.
ServiceWorkerGlobalScope.registration - Web APIs
the registration read-only property of the serviceworkerglobalscope interface returns a reference to the serviceworkerregistration object, which represents the service worker's registration.
ServiceWorkerGlobalScope.skipWaiting() - Web APIs
the following example causes a newly installed service worker to progress into the activating state, regardless of whether there is already an active service worker.
ServiceWorkerRegistration.getNotifications() - Web APIs
example navigator.serviceworker.register('sw.js'); var options = { tag : 'user_alerts' }; navigator.serviceworker.ready.then(function(registration) { registration.getnotifications(options).then(function(notifications) { // do something with your notifications }) }); specifications specification status comment notifications apithe definition of 'serviceworkerregistration.getnotifications()' in that specification.
ServiceWorkerRegistration.navigationPreload - Web APIs
the navigationpreload read-only property of the serviceworkerregistration interface returns the navigationpreloadmanager associated with the current service worker registration.
ServiceWorkerRegistration.periodicSync - Web APIs
the periodicsync read-only property of the serviceworkerregistration interface returns a reference to the periodicsyncmanager interface, which manages periodic background synchronization processes.
ServiceWorkerRegistration.scope - Web APIs
the scope read-only property of the serviceworkerregistration interface returns a unique identifier for a service worker registration.
ServiceWorkerRegistration.showNotification() - Web APIs
examples navigator.serviceworker.register('sw.js'); function shownotification() { notification.requestpermission(function(result) { if (result === 'granted') { navigator.serviceworker.ready.then(function(registration) { registration.shownotification('vibration sample', { body: 'buzz!
ServiceWorkerState - Web APIs
activated the service worker in this state is considered an active worker ready to handle functional events.
ShadowRoot.delegatesFocus - Web APIs
the delegatesfocus read-only property of the shadowroot interface returns a boolean that indicates whether delegatesfocus was set when the shadow was attached (see element.attachshadow()).
ShadowRoot.host - Web APIs
WebAPIShadowRoothost
the host read-only property of the shadowroot returns a reference to the dom element the shadowroot is attached to.
SharedWorkerGlobalScope.applicationCache - Web APIs
the applicationcache read-only property of the sharedworkerglobalscope interface returns the applicationcache object for the worker (see using the application cache).
SharedWorkerGlobalScope.close() - Web APIs
note: there is also a way to stop the worker from the main thread: the worker.terminate method.
SharedWorkerGlobalScope.name - Web APIs
the name read-only property of the sharedworkerglobalscope interface returns the name that the sharedworker was (optionally) given when it was created.
Slottable: assignedSlot - Web APIs
the assignedslot read-only property of the slottable interface returns an htmlslotelement representing the <slot> element the node is inserted in.
Slottable - Web APIs
WebAPISlottable
properties slottable.assignedslot read only returns the <slot> the node is inserted in.
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
WebAPISourceBuffermode
if timestamps already 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.length - Web APIs
the length read-only property of the sourcebufferlist interface returns the number of sourcebuffer objects in the list.
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.
SpeechRecognitionAlternative.confidence - Web APIs
the confidence read-only property of the speechrecognitionresult interface returns a numeric estimate of how confident the speech recognition system is that the recognition is correct.
SpeechRecognitionAlternative.transcript - Web APIs
the transcript read-only property of the speechrecognitionresult interface returns a string containing the transcript of the recognised word(s).
SpeechRecognitionError.error - Web APIs
the error read-only property of the speechrecognitionerror interface returns the type of error raised.
SpeechRecognitionError.message - Web APIs
the message read-only property of the speechrecognitionerror interface returns a message describing the error in more detail.
SpeechRecognitionErrorEvent.error - Web APIs
the error read-only property of the speechrecognitionerrorevent interface returns the type of error raised.
SpeechRecognitionErrorEvent.message - Web APIs
the message read-only property of the speechrecognitionerrorevent interface returns a message describing the error in more detail.
SpeechRecognitionEvent.emma - Web APIs
the emma read-only property of the speechrecognitionevent interface returns an extensible multimodal annotation markup language (emma) — xml — representation of the result.
SpeechRecognitionEvent.interpretation - Web APIs
the interpretation read-only property of the speechrecognitionevent interface returns the semantic meaning of what the user said.
SpeechRecognitionEvent.resultIndex - Web APIs
the resultindex read-only property of the speechrecognitionevent interface returns the lowest index value result in the speechrecognitionresultlist "array" that has actually changed.
SpeechRecognitionEvent.results - Web APIs
the results read-only property of the speechrecognitionevent interface returns a speechrecognitionresultlist object representing all the speech recognition results for the current session.
SpeechRecognitionResult.isFinal - Web APIs
the isfinal read-only property of the speechrecognitionresult interface is 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 - Web APIs
the length read-only property of the speechrecognitionresult interface returns the length of the "array" — the number of speechrecognitionalternative objects contained in the result (also referred to as "n-best alternatives".) the number of alternatives contained in the result depends on what the speechrecognition.maxalternatives property was set to when the speech recognition was first initiated.
SpeechRecognitionResultList.length - Web APIs
the length read-only property of the speechrecognitionresultlist interface returns the length of the "array" — the number of speechrecognitionresult objects in the list.
SpeechRecognitionResultList - Web APIs
properties speechrecognitionresultlist.length read only returns the length of the "array" — the number of speechrecognitionresult objects in the list.
SpeechSynthesis.paused - Web APIs
the paused read-only property of the speechsynthesis interface is a boolean that returns true if the speechsynthesis object is in a paused state, or false if not.
SpeechSynthesis.pending - Web APIs
the pending read-only property of the speechsynthesis interface is a boolean that returns true if the utterance queue contains as-yet-unspoken utterances.
SpeechSynthesis.resume() - Web APIs
the resume() method of the speechsynthesis interface puts the speechsynthesis object into a non-paused state: resumes it if it was already paused.
SpeechSynthesis.speaking - Web APIs
the speaking read-only property of the speechsynthesis interface is a boolean that returns true if an utterance is currently in the process of being spoken — even if speechsynthesis is in a paused state.
SpeechSynthesisErrorEvent - Web APIs
speechsynthesiserrorevent.error read only returns an error code indicating what has gone wrong with a speech synthesis attempt.
SpeechSynthesisEvent.charIndex - Web APIs
the charindex read-only property of the speechsynthesisutterance interface returns the index position of the character in the speechsynthesisutterance.text that was being spoken when the event was triggered.
SpeechSynthesisEvent.elapsedTime - Web APIs
the elapsedtime read-only property of the speechsynthesisutterance interface returns the elapsed time in seconds after the speechsynthesisutterance.text started being spoken that the event was triggered at.
SpeechSynthesisEvent.name - Web APIs
the name read-only property of the speechsynthesisutterance interface 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 - Web APIs
the utterance read-only property of the speechsynthesisutterance interface returns the speechsynthesisutterance instance that the event was triggered on.
SpeechSynthesisUtterance - Web APIs
it contains the content the speech service should read and information about how to read it (e.g.
SpeechSynthesisVoice.default - Web APIs
the default read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is the default voice for the current app (true), or not (false.) note: for some devices, it might be the default voice for the voice's language.
SpeechSynthesisVoice.lang - Web APIs
the lang read-only property of the speechsynthesisvoice interface returns a bcp 47 language tag indicating the language of the voice.
SpeechSynthesisVoice.localService - Web APIs
the localservice read-only property of the speechsynthesisvoice interface returns a boolean indicating whether the voice is supplied by a local speech synthesizer service (true), or a remote speech synthesizer service (false.) this property is provided to allow differentiation in the case that some voice options are provided by a remote service; it is possible that remote voices might have extra latency, bandwidth or cost associated with them, so such distinction may be useful.
SpeechSynthesisVoice.name - Web APIs
the name read-only property of the speechsynthesisvoice interface returns a human-readable name that represents the voice.
SpeechSynthesisVoice.voiceURI - Web APIs
the voiceuri read-only property of the speechsynthesisvoice interface returns the type of uri and location of the speech synthesis service for this voice.
StaticRange.collapsed - Web APIs
the collapsed read-only property of the staticrange interface returns true if the range's start position and end position are the same.
StaticRange.startContainer - Web APIs
the read-only startcontainer property of the staticrange interface returns the start node for the range.
StaticRange.startOffset - Web APIs
the read-only startoffset property of the staticrange interface returns the offset into the start node of the range's start position.
StereoPannerNode.pan - Web APIs
note: though the audioparam returned is read-only, the value it represents is not.
StereoPannerNode - Web APIs
stereopannernode.pan read only is an a-rate audioparam representing the amount of panning to apply.
Storage.length - Web APIs
WebAPIStoragelength
the length read-only property of the storage interface returns the number of data items stored in a given storage object.
Storage.setItem() - Web APIs
WebAPIStoragesetItem
the setitem() method of the storage interface, when passed a key name and value, will add that key to the given storage object, or update that key's value if it already exists.
StorageManager - Web APIs
storagemanager.persisted() secure context returns a promise that resolves to true if persistence has already been granted for your site's storage.
StorageQuota.supportedTypes - Web APIs
the supportedtypes read-only property of the storagequota interface returns a list of the available storage types.
StorageQuota - Web APIs
properties storagequota.supportedtypes read only returns a list of the available storage types.
Storage API - Web APIs
the storage api gives sites' code the ability to find out how much space they can use, how much they are already using, and even control whether or not they need to be alerted before the user agent disposes of site data in order to make room for other things.
Using the Storage Access API - Web APIs
since embedded content won’t know which storage policy is in use by the user, it’s best to always check whether the embedded frame has storage access before attempting to read or write from storage.
Stylesheet.href - Web APIs
WebAPIStyleSheethref
this property is read-only in firefox, opera, google chrome, and safari, and it is read/write in internet explorer.
StyleSheet.media - Web APIs
WebAPIStyleSheetmedia
it is a read-only, array-like medialist object and can be removed with deletemedium() and added with appendmedium().
SubmitEvent.submitter - Web APIs
the read-only submitter property found on the submitevent interface specifies the submit button or other element that was invoked to cause the form to be submitted.
SubmitEvent - Web APIs
submitter read only an htmlelement object which identifies the button or other element which was invoked to trigger the form being submitted.
SyncEvent.lastChance - Web APIs
the syncevent.lastchance read-only property of the syncevent interface returns true if the user agent will not make further synchronization attempts after the current attempt.
registration - Web APIs
the registration read-only property of the syncevent interface returns a reference to a syncregistration object.
SyncEvent.tag - Web APIs
WebAPISyncEventtag
the syncevent.tag read-only property of the syncevent interface returns the developer-defined identifier for this syncevent.
TaskAttributionTiming.containerId - Web APIs
the containerid readonly property of the taskattributiontiming interface returns the container's id attribute.
TaskAttributionTiming.containerName - Web APIs
the containername readonly property of the taskattributiontiming interface returns the container's name attribute.
TaskAttributionTiming.containerSrc - Web APIs
the containersrc readonly property of the taskattributiontiming interface returns the container's src attribute.
TaskAttributionTiming.containerType - Web APIs
the containertype readonly property of the taskattributiontiming interface returns the type of frame container, one of iframe, embed, or object.
Text.isElementContentWhitespace - Web APIs
the text.iselementcontentwhitespace read-only property returns a boolean flag indicating whether or not the text node's content consists solely of whitespace.
Text.splitText() - Web APIs
WebAPITextsplitText
exceptions thrown a domexception with a value of index_size_err is thrown if the specified offset is negative or is greater than the number of 16-bit units in the node's text; a domexception with a value of no_modification_allowed_err is thrown if the node is read-only.
Text.wholeText - Web APIs
WebAPITextwholeText
the text.wholetext read-only property returns the full text of all text nodes logically adjacent to the node.
TextDecoder.prototype.encoding - Web APIs
the textdecoder.prototype.encoding read-only property returns a domstring containing the name of the decoding algorithm used by the specific decoder.
TextEncoder.encoding - Web APIs
the textencoder.encoding read-only property returns a domstring containing the name of the encoding algorithm used by the specific encoder.
TextMetrics.actualBoundingBoxAscent - Web APIs
the read-only actualboundingboxascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the top of the bounding rectangle used to render the text, in css pixels.
TextMetrics.actualBoundingBoxDescent - Web APIs
the read-only actualboundingboxdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the bottom of the bounding rectangle used to render the text, in css pixels.
TextMetrics.actualBoundingBoxLeft - Web APIs
the read-only actualboundingboxleft property of the textmetrics interface is a double giving the distance parallel to the baseline 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 - Web APIs
the read-only actualboundingboxright property of the textmetrics interface is a double giving the distance parallel to the baseline 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.
TextMetrics.alphabeticBaseline - Web APIs
the read-only alphabeticbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the alphabetic baseline of the line box, in css pixels.
TextMetrics.emHeightAscent - Web APIs
the read-only emheightascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the top of the em square in the line box, in css pixels.
TextMetrics.emHeightDescent - Web APIs
the read-only emheightdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the bottom of the em square in the line box, in css pixels.
TextMetrics.fontBoundingBoxAscent - Web APIs
the read-only fontboundingboxascent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the top of the highest bounding rectangle of all the fonts used to render the text, in css pixels.
TextMetrics.fontBoundingBoxDescent - Web APIs
the read-only fontboundingboxdescent property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline attribute to the bottom of the bounding rectangle of all the fonts used to render the text, in css pixels.
TextMetrics.hangingBaseline - Web APIs
the read-only hangingbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the hanging baseline of the line box, in css pixels.
TextMetrics.ideographicBaseline - Web APIs
the read-only ideographicbaseline property of the textmetrics interface is a double giving the distance from the horizontal line indicated by the canvasrenderingcontext2d.textbaseline property to the ideographic baseline of the line box, in css pixels.
TextMetrics.width - Web APIs
WebAPITextMetricswidth
the read-only width property of the textmetrics interface contains the text's advance width (the width of that inline box) in css pixels.
TextTrack.mode - Web APIs
WebAPITextTrackmode
you can read this value to determine the current mode, and you can change this value to switch modes.
TextTrackCue - Web APIs
texttrackcue.track read only the texttrack that this cue belongs to, or null if it doesn't belong to any.
TextTrackList.length - Web APIs
the read-only texttracklist property length returns the number of entries in the texttracklist, each of which is a texttrack representing one track in the media element.
TextTrackList - Web APIs
length read only the number of tracks in the list.
TimeRanges.length - Web APIs
WebAPITimeRangeslength
the timeranges.length read-only property returns the number of ranges in the object.
TimeRanges - Web APIs
properties timeranges.length read only returns an unsigned long representing the number of time ranges represented by the time range object.
msManipulationViewsEnabled - Web APIs
the msmanipulationviewsenabled read-only property returns true if manipulation features are support available, such as touch panning and zooming using css rules.
Touch.clientX - Web APIs
WebAPITouchclientX
the touch.clientx read-only property returns the x coordinate of the touch point relative to the viewport, not including any scroll offset.
Touch.clientY - Web APIs
WebAPITouchclientY
the touch.clienty read-only property returns the y coordinate of the touch point relative to the browser's viewport, not including any scroll offset.
Touch.force - Web APIs
WebAPITouchforce
the touch.force read-only property returns the amount of pressure the user is applying to the touch surface for a touch point.
Touch.pageX - Web APIs
WebAPITouchpageX
the touch.pagex read-only property returns the x coordinate of the touch point relative to the viewport, including any scroll offset.
Touch.pageY - Web APIs
WebAPITouchpageY
the touch.pagey read-only property returns the y coordinate of the touch point relative to the viewport, including any scroll offset.
TouchEvent.altKey - Web APIs
WebAPITouchEventaltKey
this property is read only .
TouchEvent.changedTouches - Web APIs
the changedtouches read-only property is a touchlist whose touch points (touch objects) varies depending on the event type, as follows: for the touchstart event, it is a list of the touch points that became active with the current event.
TouchEvent.ctrlKey - Web APIs
this property is read only .
TouchEvent.metaKey - Web APIs
this property is read only .
TouchEvent.shiftKey - Web APIs
this property is read only .
TouchEvent.targetTouches - Web APIs
the targettouches read-only property is a touchlist listing all the touch objects for touch points that are still in contact with the touch surface and whose touchstart event occurred inside the same target element as the current target element.
TouchEvent.touches - Web APIs
touches is a read-only touchlist listing all the touch objects for touch points that are currently in contact with the touch surface, regardless of whether or not they've changed or what their target element was at touchstart time.
TouchList.length - Web APIs
WebAPITouchListlength
the length read-only property indicates the number of items (touch points) in a given touchlist.
TouchList - Web APIs
WebAPITouchList
properties touchlist.length read only the number of touch objects in the touchlist.
TrackDefault.byteStreamTrackID - Web APIs
the bytestreamtrackid read-only property of the trackdefault interface returns the id of the specific track that the sourcebuffer should apply to.
TrackDefault.kinds - Web APIs
the kinds read-only property of the trackdefault interface returns default kinds for an associated sourcebuffer to use when an initialization segment does not contain label information for a new track.
TrackDefault.label - Web APIs
the label read-only property of the trackdefault interface returns the default label for an associated sourcebuffer to use when an initialization segment does not contain label information for a new track.
TrackDefault.language - Web APIs
the language read-only property of the trackdefault interface returns a default language for an associated sourcebuffer to use when an initialization segment does not contain language information for a new track.
TrackDefault.type - Web APIs
WebAPITrackDefaulttype
the type read-only property of the trackdefault interface returns the type of track that this sourcebuffer's media segment data relates to (i.e.
TrackDefaultList.length - Web APIs
the length read-only property of the trackdefaultlist interface returns the number of trackdefault objects in the list.
TrackDefaultList - Web APIs
trackdefaultlist.length read only returns the number of trackdefault objects in the list.
TrackEvent.track - Web APIs
WebAPITrackEventtrack
the read-only track property of the trackevent interface specifies the media track object to which the event applies.
TrackEvent - Web APIs
track read only the dom track object the event is in reference to.
Transferable - Web APIs
the transferable interface represents an object that can be transfered between different execution contexts, like the main thread and web workers.
TransitionEvent.transitionName - Web APIs
the transitionevent.transitionname read-only property is a domstring containing the name of the css property associated with the transition.
TransitionEvent.elapsedTime - Web APIs
the transitionevent.elapsedtime read-only property is a float giving the amount of time the animation has been running, in seconds, when this event fired.
TransitionEvent.pseudoElement - Web APIs
the transitionevent.pseudoelement read-only property is a domstring, starting with '::', containing the name of the pseudo-element the animation runs on.
TreeWalker.expandEntityReferences - Web APIs
the treewalker.expandentityreferences read-only property returns a boolean flag indicating whether or not the children of entity reference nodes are visible to the treewalker.
TreeWalker.filter - Web APIs
WebAPITreeWalkerfilter
the treewalker.filter read-only property returns a nodefilter that is the filtering object associated with the treewalker.
TreeWalker.root - Web APIs
WebAPITreeWalkerroot
the treewalker.root read-only property returns the node that is the root of what the treewalker traverses.
TreeWalker.whatToShow - Web APIs
the treewalker.whattoshow read-only property returns an unsigned long being a bitmask made of constants describing the types of node that must to be presented.
UIEvent.detail - Web APIs
WebAPIUIEventdetail
the uievent.detail read-only property, when non-zero, provides the current (or next, depending on the event) click count.
UIEvent.isChar - Web APIs
WebAPIUIEventisChar
the uievent.ischar read-only property returns a boolean indicating whether the event produced a key character or not.
UIEvent.layerX - Web APIs
WebAPIUIEventlayerX
the uievent.layerx read-only property returns the horizontal coordinate of the event relative to the current layer.
UIEvent.layerY - Web APIs
WebAPIUIEventlayerY
the uievent.layery read-only property returns the vertical coordinate of the event relative to the current layer.
UIEvent.pageX - Web APIs
WebAPIUIEventpageX
the non-standard, read-only uievent property pagex returns the horizontal coordinate of the event relative to the whole document.
UIEvent.pageY - Web APIs
WebAPIUIEventpageY
the uievent.pagey read-only property returns the vertical coordinate of the event relative to the whole document.
sourceCapabilities - Web APIs
the uievent.sourcecapabilities read-only property returns an instance of the inputdevicecapabilities interface which provides information about the physical device responsible for generating a touch event.
UIEvent.view - Web APIs
WebAPIUIEventview
the uievent.view read-only property returns the windowproxy object from which the event was generated.
URL.createObjectURL() - Web APIs
usage notes memory management each time you call createobjecturl(), a new object url is created, even if you've already created one for the same object.
URL.origin - Web APIs
WebAPIURLorigin
the origin read-only property of the url interface returns a usvstring containing the unicode serialization of the origin of the represented url.
URL.searchParams - Web APIs
WebAPIURLsearchParams
the searchparams readonly property of the url interface returns a urlsearchparams object allowing access to the get decoded query arguments contained in the url.
URL.toString() - Web APIs
WebAPIURLtoString
it is effectively a read-only version of url.href.
USBConfiguration.USBConfiguration() - Web APIs
configurationvalue specifies the configuration descriptor you want to read.
USBConfiguration.configurationName - Web APIs
the configurationname read-only property of the usbconfiguration interface returns the name provided by the device to describe this configuration.
USBConfiguration.configurationValue - Web APIs
the configurationvalue read-only property of the usbconfiguration interface null syntax var value = usbconfiguration.configurationvalue value the configuration descriptor of the usbdevice specified in the constructor of the current usbconfiguration instance.
USBConfiguration.interfaces - Web APIs
the interfaces read-only property of the usbconfiguration interface returns an array containing instances of the usbinterface describing each interface supported by this configuration.
USBDevice.deviceClass - Web APIs
the deviceclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.configuration - Web APIs
the configuration read only property of the usbdevice interface returns a usbconfiguration object for the currently selected interface for a paired usb device.
USBDevice.configurations - Web APIs
the configurations read only property of the usbdevice interface an array of device-specific interfaces for controlling a paired usb device.
USBDevice.controlTransferIn() - Web APIs
length the maximum number of bytes to read from the device.
USBDevice.deviceClass - Web APIs
the deviceclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceProtocol - Web APIs
the deviceprotocol read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceSubclass - Web APIs
the devicesubclass read only property of the usbdevice interface one of three properties that identify usb devices for the purpose of loading a usb driver that will work with that device.
USBDevice.deviceVersionMajor - Web APIs
the deviceversionmajor read only property of the usbdevice interface he major version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionMinor - Web APIs
the deviceversionminor read only property of the usbdevice interface the minor version number of the device in a semantic versioning scheme.
USBDevice.deviceVersionSubminor - Web APIs
the deviceversionsubminor read only property of the usbdevice interface the patch version number of the device in a semantic versioning scheme.
USBDevice.manufacturerName - Web APIs
the manufacturername read only property of the usbdevice interface the of the organization that manufactured the usb device.
USBDevice.opened - Web APIs
WebAPIUSBDeviceopened
the opened read only property of the usbdevice interface indicates whether a session has been started with a paired usb device.
USBDevice.productID - Web APIs
the productid read only property of the usbdevice interface the manufacturer-defined code that identifies a usb device.
USBDevice.productName - Web APIs
the productname read only property of the usbdevice interface the manufacturer-defined name that identifies a usb device.
USBDevice.serialNumber - Web APIs
the serialnumber read only property of the usbdevice interface is the manufacturer-defined serial number for the specific usb device.
USBDevice.transferIn() - Web APIs
length the maximum number of bytes that will be read back from the device.
USBDevice.usbVersionMajor - Web APIs
the usbversionmajor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionMinor - Web APIs
the usbversionminor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
USBDevice.usbVersionSubminor - Web APIs
the usbversionsubminor read only property of the usbdevice interface is one of three properties that declare the usb protocol version supported by the device.
USBDevice.vendorID - Web APIs
the vendorid read only property of the usbdevice interface is the official usg.org-assigned vendor id.
USBIsochronousOutTransferResult - Web APIs
properties usbisochronousouttransferresult.packetsread only returns an array of usbisochronousouttransferpacket objects containing the result of each request to send a packet to the device.
validityState.badInput - Web APIs
the read-only badinput property of a validitystate object indicates if the user has provided input that the browser is unable to convert.
ValidityState.patternMismatch - Web APIs
the read-only patternmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's pattern attribute.
ValidityState.rangeOverflow - Web APIs
the read-only rangeoverflow property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's max attribute.
ValidityState.rangeUnderflow - Web APIs
the read-only rangeunderflow property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's min attribute.
ValidityState.stepMismatch - Web APIs
the read-only stepmismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's step attribute.
validityState.tooLong - Web APIs
the read-only toolong property of a validitystate object indicates if the value of an <input> or <textarea>, after having been edited by the user, exceeds the maximum code-unit length established by the element's maxlength attribute.
validityState.tooShort - Web APIs
the read-only tooshort property of a validitystate object indicates if the value of an <input>, <button>, <select>, <output>, <fieldset> or <textarea>, after having been edited by the user, is less than the minimum code-unit length established by the element's minlength attribute.
ValidityState.typeMismatch - Web APIs
the read-only typemismatch property of a validitystate object indicates if the value of an <input>, after having been edited by the user, does not conform to the constraints set by the element's type attribute.
VideoPlaybackQuality.corruptedVideoFrames - Web APIs
the videoplaybackquality interface's read-only corruptedvideoframes property the number of corrupted video frames that have been received since the <video> element was last loaded or reloaded.
VideoPlaybackQuality.creationTime - Web APIs
the read-only creationtime property on the videoplaybackquality interface reports the number of milliseconds since the browsing context was created this quality sample was recorded.
VideoPlaybackQuality.droppedVideoFrames - Web APIs
the read-only droppedvideoframes property of the videoplaybackquality interface returns the number of video frames which have been dropped rather than being displayed since the last time the media was loaded into the htmlvideoelement.
VideoPlaybackQuality.totalFrameDelay - Web APIs
the videoplaybackquality.totalframedelay read-only property returns a double containing the sum of the frame delay since the creation of the associated htmlvideoelement.
VideoPlaybackQuality.totalVideoFrames - Web APIs
the videoplaybackquality interface's totalvideoframes read-only property returns the total number of video frames that have been displayed or dropped since the media was loaded.
Videotrack.language - Web APIs
the read-only videotrack property language returns a string identifying the language used in the video track.
VideoTrack.sourceBuffer - Web APIs
the read-only videotrack property sourcebuffer returns the sourcebuffer that created the track, or null if the track was not created by a sourcebuffer or the sourcebuffer has been removed from the mediasource.sourcebuffers attribute of its parent media source.
VideoTrackList.length - Web APIs
the read-only videotracklist property length returns the number of entries in the videotracklist, each of which is a videotrack representing one video track in the media element.
VideoTrackList.selectedIndex - Web APIs
the read-only videotracklist property selectedindex returns the index of the currently selected track, if any, or -1 otherwise.
VisualViewport.height - Web APIs
the height read-only property of the visualviewport interface returns the height of the visual viewport, in css pixels.
VisualViewport.offsetTop - Web APIs
the offsettop read-only property of the visualviewport interface returns the offset of the top edge of the visual viewport from the top edge of the layout viewport in css pixels.
VisualViewport.offsetleft - Web APIs
the offsetleft read-only property of the visualviewport interface returns the offset of the left edge of the visual viewport from the left edge of the layout viewport in css pixels.
VisualViewport.pageLeft - Web APIs
the pageleft read-only property of the visualviewport interface returns the x coordinate of the left edge of the visual viewport relative to the initial containing block origin, in css pixels.
VisualViewport.pageTop - Web APIs
the pagetop read-only property of the visualviewport interface returns the y coordinate of the top edge of the visual viewport relative to the initial containing block origin, in css pixels.
VisualViewport.scale - Web APIs
the scale read-only property of the visualviewport interface returns the pinch-zoom scaling factor applied to the visual viewport.
VisualViewport.width - Web APIs
the width read-only property of the visualviewport interface returns the width of the visual viewport, in css pixels.
Visual Viewport API - Web APIs
accessing the api window.visualviewport read only a read-only reference to the window's visualviewport object.
WakeLockSentinel - Web APIs
type read only returns a string representation of the currently acquired wakelocksentinel type.
WebGL2RenderingContext.bindBufferRange() - Web APIs
size a glsizeiptr specifying the amount of data that can be read from the buffer.
WebGL2RenderingContext.blitFramebuffer() - Web APIs
the webgl2renderingcontext.blitframebuffer() method of the webgl 2 api transfers a block of pixels from the read framebuffer to the draw framebuffer.
WebGL2RenderingContext.clientWaitSync() - Web APIs
gl.already_signaled: indicates that the sync object was signaled when this method was called.
WebGL2RenderingContext.framebufferTextureLayer() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
WebGL2RenderingContext.vertexAttribIPointer() - Web APIs
rray(2); //connect to attributes from the vertex shader gl.bindattriblocation(shaderprogram, 0, "position"); gl.bindattriblocation(shaderprogram, 1, "boneweights"); gl.bindattriblocation(shaderprogram, 2, "boneindices"); <script id="shader-vs" type="x-shader/x-vertex">#version 300 es uniform mat4 mvmatrix; uniform mat4 bones[120]; in vec3 position; in vec4 boneweights; in uvec4 boneindices;//read as 4-component unsigned integer void main() { vec4 skinnedposition = bones[boneindices.s] * vec4(position, 1.0) * boneweights.s + bones[boneindices.t] * vec4(position, 1.0) * boneweights.t + bones[boneindices.p] * vec4(position, 1.0) * boneweights.p + bones[boneindices.q] * vec4(position, 1.0) * boneweights.q; gl_position = mvmatrix * skinnedposition; } </...
WebGLActiveInfo.name - Web APIs
the read-only webglactiveinfo.name property represents the name of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.size - Web APIs
the read-only webglactiveinfo.size property is a number representing the size of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLActiveInfo.type - Web APIs
the read-only webglactiveinfo.type property represents the type of the requested data returned by calling the getactiveattrib() or getactiveuniform() methods.
WebGLContextEvent.statusMessage - Web APIs
the read-only webglcontextevent.statusmessage property contains additional event status information, or is an empty string if no additional information is available.
WebGLContextEvent - Web APIs
webglcontextevent.statusmessage a read-only property containing additional information about the event.
WebGLRenderingContext.blendEquation() - Web APIs
the blend equation determines how a new pixel is combined with a pixel already in the webglframebuffer.
WebGLRenderingContext.blendEquationSeparate() - Web APIs
the blend equation determines how a new pixel is combined with a pixel already in the webglframebuffer.
WebGLRenderingContext.canvas - Web APIs
the webglrenderingcontext.canvas property is a read-only reference to the htmlcanvaselement or offscreencanvas object that is associated with the context.
WebGLRenderingContext.deleteBuffer() - Web APIs
this method has no effect if the buffer has already been deleted.
WebGLRenderingContext.deleteFramebuffer() - Web APIs
this method has no effect if the frame buffer has already been deleted.
WebGLRenderingContext.deleteProgram() - Web APIs
this method has no effect if the program has already been deleted.
WebGLRenderingContext.deleteRenderbuffer() - Web APIs
this method has no effect if the render buffer has already been deleted.
WebGLRenderingContext.deleteShader() - Web APIs
this method has no effect if the shader has already been deleted, and the webglshader is automatically marked for deletion when it is destroyed by the garbage collector.
WebGLRenderingContext.deleteTexture() - Web APIs
this method has no effect if the texture has already been deleted.
WebGLRenderingContext.drawingBufferHeight - Web APIs
the read-only webglrenderingcontext.drawingbufferheight property represents the actual height of the current drawing buffer.
WebGLRenderingContext.drawingBufferWidth - Web APIs
the read-only webglrenderingcontext.drawingbufferwidth property represents the actual width of the current drawing buffer.
WebGLRenderingContext.enableVertexAttribArray() - 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().
WebGLRenderingContext.framebufferTexture2D() - Web APIs
gl.read_framebuffer: used as a source for reading operations.
WebGLRenderingContext.getError() - Web APIs
gl.invalid_framebuffer_operation the currently bound framebuffer is not framebuffer complete when trying to render to or to read from it.
WebGLShaderPrecisionFormat.precision - Web APIs
the read-only webglshaderprecisionformat.precision property returns the number of bits of precision that can be represented.
WebGLShaderPrecisionFormat.rangeMax - Web APIs
the read-only webglshaderprecisionformat.rangemax property returns the base 2 log of the absolute value of the maximum value that can be represented.
WebGLShaderPrecisionFormat.rangeMin - Web APIs
the read-only webglshaderprecisionformat.rangemin property returns the base 2 log of the absolute value of the minimum value that can be represented.
Hello GLSL - Web APIs
but remember to read through the explanations and code on this page, before moving on to the next.
Lighting in WebGL - Web APIs
view the complete code | open this demo on a new page exercises for the reader obviously, this is a simple example, implementing basic per-vertex lighting.
High-level guides - Web APIs
when you're ready to explore webrtc in more depth, be sure to take a look at our low-level guide to webrtc.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
this enormously simplifies and makes far more readable the code dealing with the promises returned by webrtc methods.
Lifetime of a WebRTC session - Web APIs
in particular, if a developer already has a method in place for connecting two devices, it doesn’t make sense for them to have to use another one, defined by the specification, just for webrtc.
Taking still photos with WebRTC - Web APIs
try this sample then read on to learn how it works.
Using DTMF with WebRTC - Web APIs
if you'd like to know more about how this works, read rfc 3550: rtp: a transport protocol for real-time applications and rfc 4733: rtp payload for dtmf digits, telephony tones, and telephony signals.
Using WebRTC data channels - Web APIs
this makes it easy to write efficient routines that make sure there's always data ready to send without over-using memory or swamping the channel completely.
WebRTC Statistics API - Web APIs
the webrtc api has a vast array of statistics available, covering the entire breadth of the webrtc connectivity system, from sender to receiver and peer to peer.
WebSocket.bufferedAmount - Web APIs
the websocket.bufferedamount read-only property returns the number of bytes of data that have been queued using calls to send() but not yet transmitted to the network.
WebSocket.extensions - Web APIs
the websocket.extensions read-only property returns the extensions selected by the server.
WebSocket.onclose - Web APIs
WebAPIWebSocketonclose
the websocket.onclose property is an eventhandler that is called when the websocket connection's readystate changes to closed.
WebSocket.onopen - Web APIs
WebAPIWebSocketonopen
the websocket.onopen property is an eventhandler that is called when the websocket connection's readystate changes to 1; this indicates that the connection is ready to send and receive data.
WebSocket.protocol - Web APIs
the websocket.protocol read-only property returns the name of the sub-protocol the server selected; this will be one of the strings specified in the protocols parameter when creating the websocket object, or the empty string if no connection is established.
WebSocket.url - Web APIs
WebAPIWebSocketurl
the websocket.url read-only property returns the absolute url of the websocket as resolved by the constructor.
Writing a WebSocket server in Java - Web APIs
inputstream methods: read(byte[] b, int off, int len) reads up to len bytes of data from the input stream into an array of bytes.
Web Video Text Tracks Format (WebVTT) - Web APIs
comments are intended for those reading the file and are not seen by users.
Fundamentals of WebXR - Web APIs
playcanvas next steps with these basic facts in hand, you're ready to take those next steps into the world of mixed reality.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
offsetting or moving reference spaces while you can't change a reference space since both xrreferencespace and xrboundedreferencespace are read-only, you can easily create new reference spaces by applying an offset transform to them.
Using the Web Audio API - Web APIs
we've already created an input node by passing our audio element into the api.
Attestation and Assertion - Web APIs
when registering an authenticator for a new account, typically a trust on first use (tofu) model applies; and when adding an authenticator to an existing account, a user has already been authenticated and has established a secure session.
Web Authentication API - Web APIs
many websites already have pages that allow users to register new accounts or sign in to an existing account, and the web authentication api acts as a replacement or supplement to those on those existing webpages.
Web Locks API - Web APIs
this can be used to implement the readers-writer pattern.
Using the Web Speech API - Web APIs
try ' + colorhtml + '.'; document.body.onclick = function() { recognition.start(); console.log('ready to receive a color command.'); } receiving and handling results once the speech recognition is started, there are many event handlers that can be used to retrieve results, and other pieces of surrounding information (see the speechrecognition event handlers list.) the most common one you'll probably use is speechrecognition.onresult, which is fired once a successful result is received: recogn...
The structured clone algorithm - Web APIs
for example, if an object is marked readonly with a property descriptor, it will be read/write in the duplicate, since that's the default.
WheelEvent.deltaMode - Web APIs
the wheelevent.deltamode read-only property returns an unsigned long representing the unit of the delta values scroll amount.
WheelEvent.deltaX - Web APIs
WebAPIWheelEventdeltaX
the wheelevent.deltax read-only property is a double representing the horizontal scroll amount in the wheelevent.deltamode unit.
WheelEvent.deltaY - Web APIs
WebAPIWheelEventdeltaY
the wheelevent.deltay read-only property is a double representing the vertical scroll amount in the wheelevent.deltamode unit.
WheelEvent.deltaZ - Web APIs
WebAPIWheelEventdeltaZ
the wheelevent.deltaz read-only property is a double representing the scroll amount along the z-axis, in the wheelevent.deltamode unit.
Window.closed - Web APIs
WebAPIWindowclosed
the window.closed read-only property indicates whether the referenced window is closed or not.
Window.customElements - Web APIs
the customelements read-only property of the window interface returns a reference to the customelementregistry object, which can be used to register new custom elements and get information about previously registered custom elements.
window.dump() - Web APIs
WebAPIWindowdump
if you don't have one already, closing the application and re-opening it with the command line parameter -console should create the console or use -attach-console to use the existing console.
Window: error event - Web APIs
examples live example html <div class="controls"> <button id="script-error" type="button">generate script 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;...
Window.event - Web APIs
WebAPIWindowevent
the read-only window property event returns the event which is currently being handled by the site's code.
Window.frames - Web APIs
WebAPIWindowframes
for more details about the returned value, refer to this thread on mozilla.dev.platform.
Window.fullScreen - Web APIs
WebAPIWindowfullScreen
syntax isinfullscreen = windowref.fullscreen; with chrome privileges, the property is read-write, otherwise it is read-only.
Window.history - Web APIs
WebAPIWindowhistory
the window.history read-only property returns a reference to the history object, which provides an interface for manipulating the browser session history (pages visited in the tab or frame that the current page is loaded in).
Window.isSecureContext - Web APIs
the window.issecurecontext read-only property indicates whether a context is capable of using features that require secure contexts.
Window.mozInnerScreenX - Web APIs
the window.mozinnerscreenx property is a floating point, read-only value; it has no default value.
Window.mozInnerScreenY - Web APIs
the window.mozinnerscreeny property is a floating point, read-only value; it has no default value.
Window.navigator - Web APIs
WebAPIWindownavigator
the window.navigator read-only property returns a reference to the navigator object, which has methods and properties about the application running the script.
Window.outerHeight - Web APIs
the window.outerheight read-only property returns the height in pixels of the whole browser window, including any sidebar, window chrome, and window-resizing borders/handles.
Window.outerWidth - Web APIs
WebAPIWindowouterWidth
window.outerwidth read-only property returns the width of the outside of the browser window.
Window.pageXOffset - Web APIs
the read-only window property pagexoffset is an alias for scrollx.
Window.pageYOffset - Web APIs
the read-only window property pageyoffset is an alias for scrolly; as such, it returns the number of pixels the document is currently scrolled along the vertical axis (that is, up or down) with a value of 0.0, indicating that the top edge of the document is currently aligned with the top edge of the window's content area.
Window.requestAnimationFrame() - Web APIs
you should call this method whenever you're ready to update your animation onscreen.
window.requestIdleCallback() - Web APIs
currently only one property is defined: timeout: if timeout is specified and has a positive value, and the callback has not already been called by the time timeout milliseconds have passed, the callback will be called during the next idle period, even if doing so risks causing a negative performance impact.
Window: resize event - Web APIs
see resize observer to read the draft document, and github issues to read the on-going discussions.
Window.screenLeft - Web APIs
WebAPIWindowscreenLeft
the window.screenleft read-only property returns the horizontal distance, in css pixels, from the left border of the user's browser viewport to the left side of the screen.
Window.screenTop - Web APIs
WebAPIWindowscreenTop
the window.screentop read-only property returns the vertical distance, in css pixels, from the top border of the user's browser viewport to the top side of the screen.
Window.screenX - Web APIs
WebAPIWindowscreenX
the window.screenx read-only property returns the horizontal distance, in css pixels, of the left border of the user's browser viewport to the left side of the screen.
Window.screenY - Web APIs
WebAPIWindowscreenY
the window.screeny read-only property returns the vertical distance, in css pixels, of the top border of the user's browser viewport to the top edge of the screen.
Window.scrollMaxX - Web APIs
WebAPIWindowscrollMaxX
the window.scrollmaxx read-only property returns the maximum number of pixels that the document can be scrolled horizontally.
Window.scrollMaxY - Web APIs
WebAPIWindowscrollMaxY
the window.scrollmaxy read-only property returns the maximum number of pixels that the document can be scrolled vertically.
Window.scrollX - Web APIs
WebAPIWindowscrollX
the read-only scrollx property of the window interface returns the number of pixels that the document is currently scrolled horizontally.
Window.self - Web APIs
WebAPIWindowself
the window.self read-only property returns the window itself, as a windowproxy.
Window.sessionStorage - Web APIs
the read-only sessionstorage property accesses a session storage object for the current origin.
Window.speechSynthesis - Web APIs
the speechsynthesis read-only property of the window object returns a speechsynthesis object, which is the entry point into using web speech api speech synthesis functionality.
Window.visualViewport - Web APIs
the visualviewport read-only property of the window interface returns a visualviewport object representing the visual viewport for a given window.
Window.window - Web APIs
WebAPIWindowwindow
in the non-namespaced version, "this.window" would refer back to "window", and also be able to readily get the document location.
WindowClient.focus() - Web APIs
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 already 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...
WindowClient.visibilityState - Web APIs
the visibilitystate read-only property of the windowclient interface indicates the visibility of the current client.
WindowOrWorkerGlobalScope.caches - Web APIs
the caches read-only property of the windoworworkerglobalscope interface returns the cachestorage object associated with the current context.
WindowOrWorkerGlobalScope.crossOriginIsolated - Web APIs
the crossoriginisolated read-only property of the windoworworkerglobalscope interface returns a boolean value that indicates whether a sharedarraybuffer can be sent via a window.postmessage() call.
WindowOrWorkerGlobalScope.fetch() - Web APIs
body any body that you want to add to your request: this can be a blob, buffersource, formdata, urlsearchparams, usvstring, or readablestream object.
WindowOrWorkerGlobalScope.indexedDB - Web APIs
the indexeddb read-only property of the windoworworkerglobalscope mixin provides a mechanism for applications to asynchronously access the capabilities of indexed databases.
WindowOrWorkerGlobalScope.isSecureContext - Web APIs
the issecurecontext read-only property of the windoworworkerglobalscope interface returns a boolean indicating whether the current context is secure (true) or not (false).
WindowOrWorkerGlobalScope.origin - Web APIs
the origin read-only property of the windoworworkerglobalscope interface returns the origin of the global scope, serialized as a string.
WorkerGlobalScope.close() - Web APIs
note: there is also a way to stop the worker from the main thread: the worker.terminate method.
WorkerGlobalScope.console - Web APIs
the console read-only property of the workerglobalscope interface returns a console object providing access to the browser console for the worker.
WorkerGlobalScope.location - Web APIs
the location read-only property of the workerglobalscope interface returns the workerlocation associated with the worker.
WorkerGlobalScope.navigator - Web APIs
the navigator read-only property of the workerglobalscope interface returns the workernavigator associated with the worker.
WorkerGlobalScope.self - Web APIs
the self read-only property of the workerglobalscope interface returns a reference to the workerglobalscope itself.
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.abort() - Web APIs
syntax var promise = writablestream.abort(reason); parameters reason a domstring providing a human-readable reason for the abort.
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.abort() - Web APIs
syntax var promise = writablestreamdefaultwriter.abort(reason); parameters reason optional a domstring representing a human-readable reason for the abort.
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.
WritableStreamDefaultWriter.desiredSize - Web APIs
the desiredsize read-only property of the writablestreamdefaultwriter interface returns the desired size required to fill the stream's internal queue.
HTML in XMLHttpRequest - Web APIs
this test file is small and is not well-formed xml: <title>&amp;&<</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.onreadystatechange = 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 already 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'...
XMLHttpRequest: progress event - Web APIs
event handler property onprogress 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.responseType - Web APIs
this restriction is designed in part to help ensure that synchronous operations aren't used for large transactions that block the browser's main thread, thereby bogging down the user experience.
XMLHttpRequest.responseURL - Web APIs
the read-only xmlhttprequest.responseurl property returns the serialized url of the response or the empty string if the url is null.
XMLHttpRequest.status - Web APIs
the read-only xmlhttprequest.status property returns the numerical http status code of the xmlhttprequest's response.
XMLHttpRequest.upload - Web APIs
prior to this event, one of load, error, abort, or timeout will already have been delivered to indicate why the upload ended.
XMLHttpRequestResponseType - Web APIs
you shouldn't use this non-standard (and, as of firefox 68, entirely removed) api; instead, consider using the fetch api with readable streams, which offers a standard alternative to accessing the response in a streaming fashion.
XPathException.code - Web APIs
the code read-only property of the xpathexception interface returns a short that contains one of the error code constants.
XPathException - Web APIs
properties xpathexception.code read only returns a short that contains one of the error code constants.
XPathResult.booleanValue - Web APIs
the read-only booleanvalue property of the xpathresult interface returns the boolean value of a result with xpathresult.resulttype being boolean_type.
XPathResult.invalidIteratorState - Web APIs
the read-only invaliditeratorstate property of the xpathresult interface signifies that the iterator has become invalid.
XPathResult.numberValue - Web APIs
the read-only numbervalue property of the xpathresult interface returns the numeric value of a result with xpathresult.resulttype being number_type.
XPathResult.resultType - Web APIs
the read-only resulttype property of the xpathresult interface represents the type of the result, as defined by the type constants.
XPathResult.singleNodeValue - Web APIs
the read-only singlenodevalue property of the xpathresult interface returns a node value or null in case no node was matched of a result with xpathresult.resulttype being any_unordered_node_type or first_ordered_node_type.
XPathResult.snapshotLength - Web APIs
the read-only snapshotlength property of the xpathresult interface represents the number of nodes in the result snapshot.
XPathResult.stringValue - Web APIs
the read-only stringvalue property of the xpathresult interface returns the string value of a result with xpathresult.resulttype being string_type.
XRBoundedReferenceSpace - Web APIs
properties in addition to the properties of xrreferencespace, xrboundedreferencespace includes the following: boundsgeometry read only an array of dompointreadonly objects, each of which defines a vertex in the polygon defining the boundaries within which the user will be required to remain.
XRFrame.session - Web APIs
WebAPIXRFramesession
an xrframe object's read-only session property returns the xrsession object that generated the frame.
XRFrame - Web APIs
WebAPIXRFrame
properties session read only the xrsession that for which this xrframe describes the tracking details for all objects.
XRInputSource.gripSpace - Web APIs
the read-only xrinputsource property gripspace returns an xrspace whose native origin tracks the pose used to render virtual objects so they appear to be held in (or part of) the user's hand.
XRInputSource.handedness - Web APIs
the read-only xrinputsource property handedness indicates which of the user's hands the webxr input source is associated with, or if it's not associated with a hand at all.
XRInputSource.profiles - Web APIs
the read-only xrinputsource property profiles returns an array of strings, each describing a configuration profile for the input source.
XRInputSource.targetRayMode - Web APIs
the read-only xrinputsource property targetraymode indicates the method by which the target ray for the input source should be generated and how it should be presented to the user.
XRInputSource.targetRaySpace - Web APIs
the read-only xrinputsource property targetrayspace returns an xrspace (typically an xrreferencespace) representing the position and orientation of the target ray in the virtual space.
XRInputSourceArray.length - Web APIs
the read-only length property returns an integer value indicating the number of items in the input source list represented by the xrinputsourcearray object.
XRInputSourceArray - Web APIs
length read only the number of xrinputsource objects in the list.
XRInputSourceEvent.frame - Web APIs
the read-only xrinputsourceevent property frame specifies an xrframe object representing the event frame during which a webxr user input occurred.
XRInputSourceEvent.inputSource - Web APIs
the xrinputsourceevent interface's read-only inputsource property specifies the xrinputsource which generated the input event.
XRInputSourcesChangeEvent.added - Web APIs
the read-only xrinputsourceschangeevent property added is a list of zero or more input sources, each identified using an xrinputsource object, which have been newly made available for use.
XRInputSourcesChangeEvent.removed - Web APIs
the read-only xrinputsourceschangeevent property removed is an array of zero or more xrinputsource objects representing the input sources which have been removed from the xrsession.
XRPose.emulatedPosition - Web APIs
the emulatedposition read-only attribute of the xrpose interface is a boolean value indicating whether or not both the the position component of the pose's transform is directly taken from the xr device, or it's simulated or computed based on other sources.
XRPose.transform - Web APIs
WebAPIXRPosetransform
the transform read-only attribute of the xrpose interface is a xrrigidtransform object providing the position and orientation of the pose relative to the base xrspace as specified when the pose was obtained by calling xrframe.getpose().
XRReferenceSpace.getOffsetReferenceSpace() - Web APIs
in order to use mouse, keyboard, or other input devices to move or otherwise transform objects in the 3d space—or to allow the user to move through the space—you'll need to write some code to read the inputs and move perform the movements.
XRReferenceSpaceEvent.referenceSpace - Web APIs
the read-only xrreferencespaceevent property referencespace specifies the reference space which is the originator of the event.
XRReferenceSpaceEvent.transform - Web APIs
the read-only xrreferencespaceevent property transform indicates the position and orientation of the affected referencespace's native origin after the changes the event represents are applied.
XRReferenceSpaceEventInit - Web APIs
since the properties are read-only, this is the only opportunity available to set their values.
XRRenderState.inlineVerticalFieldOfView - Web APIs
the inlineverticalfieldofview read-only property of the xrrenderstate interface defines the angle of the field of view in radians used when computing projection matrices for "inline" xrsession objects.
XRRenderState.depthFar - Web APIs
the depthfar read-only property of the xrrenderstate interface returns the distance in meters of the far clip plane from the viewer.
XRRenderState.depthNear - Web APIs
the depthnear read-only property of the xrrenderstate interface returns the distance in meters of the near clip plane from the viewer.
XRRenderState.inlineVerticalFieldOfView - Web APIs
the read-only inlineverticalfieldofview property of the xrrenderstate interface returns the default vertical field of view for "inline" sessions and null for all immersive sessions.
XRRigidTransform.inverse - Web APIs
the read-only inverse property of the xrrigidtransform interface returns another xrrigidtransform object which is the inverse of its owning transform.
XRSession.environmentBlendMode - Web APIs
the xrsession interface's read-only environmentblendmode property identifies if—and to what degree—the computer-generated imagery is overlaid atop the real world.
XRSession.inputSources - Web APIs
the read-only inputsources property of the xrsession interface returns an xrinputsourcearray object which lists all controllers and input devices which are expressly associated with the xr device and are currently available.
XRSession.onsqueezeend - Web APIs
that's because (in this example, at least) the handler for the squeeze event has already dropped the object into its new location and then cleared the value of heldobject to indicate that the user is no longer holding anything.
XRSession.requestAnimationFrame() - Web APIs
the xrsession method requestanimationframe(), much like the window method of the same name, schedules a callback to be executed the next time the browser is ready to paint the session's virtual environment to the xr display.
XRSession.updateRenderState() - Web APIs
invalidstateerror this may occur for one of the following reasons: the xrsession has already ended, so you cannot change its render state.
XRSession.visibilityState - Web APIs
the read-only visibilitystate property of the xrsession interface is a string indicating whether the webxr content is currently visible to the user, and if it is, whether it's the primary focus.
XRSession: visibilitychange event - Web APIs
bubbles yes cancelable no interface xrsessionevent event handler property onvisibilitychange when the xrsession receives this event, the visibility state has already been changed.
XRSessionEvent.session - Web APIs
the read-only xrsessionevent interface's session property indicates which xrsession the event is about.
XRSessionEvent - Web APIs
properties in addition to properties inherited from its parent interface, event, xrsessionevent provides the folllowing: session read only the xrsession to which the event refers.
XRSystem: requestSession() - Web APIs
exceptions this method doesn't throw true exceptions; instead, it rejects the returned promise, passing into it a domexception whose name is one of the following: invalidstateerror the requested session mode is immersive-vr but there is already an immersive vr session either currently active or in the process of being set up.
XRView.eye - Web APIs
WebAPIXRVieweye
the xrview interface's read-only eye property is a string taken from the xreye enumerated type, indicating which eye's viewpoint the xrview represents: left or right.
XRView.projectionMatrix - Web APIs
the xrview interface's read-only projectionmatrix property specifies the projection matrix to apply to the underlying view.
XRView.transform - Web APIs
WebAPIXRViewtransform
the read-only transform property of the xrview interface is an xrrigidtransform object which provides the position and orientation of the viewpoint relative to the xrreferencespace specified when the xrframe.getviewerpose() method was called to obtain the view object.
XRViewerPose.views - Web APIs
the read-only xrviewerpose property views returns an array which contains every xrview which must be rendered in order to fully represent the scene from the viewpoint defined by the viewer pose.
XRViewerPose - Web APIs
properties in addition to the properties inherited from xrpose, xrviewerpose includes the following: views read only an array of xrview objects, one for each viewpoint on the scene which is needed to represent the scene to the user.
XRViewport.height - Web APIs
WebAPIXRViewportheight
the read-only xrviewport property height specifies the height, in pixels, of the viewport onto the drawing surface within which the webxr view is to be rendered.
XRViewport.width - Web APIs
WebAPIXRViewportwidth
the read-only xrviewport property width specifies the width of the viewport, in pixels, onto the drawing surface the 3d scene is to be rendered into.
XRViewport.x - Web APIs
WebAPIXRViewportx
the read-only xrviewport interface's x property indicates the offset from the left edge of the destination surface (typically a xrwebgllayer to the left edge of the viewport within the surface into which webxr content is to be rendered.
XRViewport.y - Web APIs
WebAPIXRViewporty
the read-only xrviewport interface's y property indicates the offset from the bottom edge of the destination surface (typically a xrwebgllayer to the bottom edge of the viewport within the surface into which webxr content is to be rendered.
XRWebGLLayer() - Web APIs
exceptions invalidstateerror the new xrwebgllayer could not be created due to one of a number of possible state errors: the xrsession specified by session has already been stopped.
XRWebGLLayer.framebufferHeight - Web APIs
the read-only xrwebgllayer property framebufferheight indicates the height of the framebuffer, in pixels.
XRWebGLLayer.framebufferWidth - Web APIs
the read-only xrwebgllayer property framebufferwidth specifies the width of the framebuffer, in pixels.
XRWebGLLayerInit.antialias - Web APIs
usage notes the state of anti-aliasing for the context after being created can be read from the xrwebgllayer property antialias.
XSLT Basic Example - Web APIs
the example will take an xml document that contains information (title, list of authors and body text) about an article and present it in an human readable form.
msCaching - Web APIs
WebAPImsCaching
the mscaching read/write property specifies whether stream data downloaded using xmlhttprequestis cached to disk or not.
msCapsLockWarningOff - Web APIs
the mscapslockwarningoff read/write property turns automatic caps lock warning on or off for validated password input fields.
msRegionOverflow - Web APIs
the msregionoverflow read-only property determines if content fully fits into the region or not.
ARIA guides - Accessibility
non virtual mode in at products using drag & drop notifying users of non-aria screen readers fixing structure with presentation role hiding layout tables managing modal and non modal dialogs using aria with html5 how to test aria aria on mobile devices ...
Using the aria-required attribute - Accessibility
value true or false (default: false) possible effects on user agents and assistive technology screen readers should announce the field as required.
Using the aria-valuetext attribute - Accessibility
the aria-valuetext attribute is used to define the human readable text alternative of aria-valuenow for a range widget such as progressbar, spinbutton or slider.
Using the group role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen readers should announce the group when focus first lands on a control inside it, and if aria-describedby has been set, the description may be spoken.
Using the log role - Accessibility
assistive technology products should listen for such an event and notify the user accordingly: screen readers should announce changes inside a log when the user is idle, unless aria-live=”assertive” has been set and in which case the user may be interrupted.
How to file ARIA-related bugs - Accessibility
tbd: add proper accessibility markup to table genre software where to file notes screen readers freedom scientific jaws jaws technical support form gw micro window eyes window-eyes comments, questions, and feedback (email) non visual desktop access (nvda) file nvda bugs discuss nvda issues browsers apple safari file webkit.org bugs google chrome file chromium bugs microsoft internet exp...
ARIA: timer role - Accessibility
aria-roledescription used to give the timer a more descriptive role text for screen readers to speak.
ARIA: article role - Accessibility
inside an application or other widget that causes screen readers and other assistive technologies to be in pass-through mode, an article can be used to indicate that these should switch back to treating the enclosed content as regular web content.
ARIA: banner role - Accessibility
working draft screen reader support tbd ...
ARIA: cell role - Accessibility
keyboard interactions none required javascript features the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of repurposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: List role - Accessibility
recommendation screen reader support tbd ...
ARIA: Listitem role - Accessibility
recommendation screen reader support tbd ...
ARIA: rowgroup role - Accessibility
the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
ARIA: table role - Accessibility
the first rule of aria use is if you can use a native feature with the semantics and behavior you require already built in, instead of re-purposing an element and adding an aria role, state or property to make it accessible, then do so.
Multipart labels: Using ARIA for labels with embedded fields inside them - Accessibility
if you’re using a screen reader, have you noticed that, when you go to this setting in firefox, it tells you “delete history after 21 days”?, followed by the announcement that you’re in a textbox, and that it contains the number 21.
Accessibility and Spacial Patterns - Accessibility
the braille dots have to be spatially apart from one another so as to be readable in a "human" way.
Mobile accessibility checklist - Accessibility
all form controls must have labels (<label> elements) for the benefit of screen reader users.
Keyboard - Accessibility
this includes users of screen readers, but can also include users who have trouble operating a pointing device such as a mouse or trackball, or whose mouse is not working at the moment, or who simply prefer to use a keyboard for input whenever possible.
Understanding the Web Content Accessibility Guidelines - Accessibility
wcag 2.1 includes: all of wcag 2.0 (verbatim, word-for-word) 17 new success criteria at the a / aa / aaa levels primarily addressing user needs in these areas: mobile accessibility low vision cognitive read more about wcag 2.1: deque: wcag 2.1: what is next for accessibility guidelines tpg: web content accessibility guidelines (wcag) 2.1 legal standing this guide is intended to provide practical information to help you build better, more accessible websites.
::-webkit-meter-inner-element - CSS: Cascading Style Sheets
additional markup to render the meter element as read-only.
::selection - CSS: Cascading Style Sheets
if overridden, it is important to ensure that the contrast ratio between the text and background colors of the selection is high enough that people experiencing low vision conditions can read it.
:empty - CSS: Cascading Style Sheets
WebCSS:empty
--></p> </div> css body { display: flex; justify-content: space-around; } .box { background: pink; height: 80px; width: 80px; } .box:empty { background: lime; } result accessibility concerns assistive technology such as screen readers cannot parse interactive content that is empty.
:link - CSS: Cascading Style Sheets
WebCSS:link
html <a href="#ordinary-target">this is an ordinary link.</a><br> <a href="">you've already visited this link.</a><br> <a>placeholder link (won't get styled)</a> css a:link { background-color: gold; color: green; } result specifications specification status comment html living standardthe definition of ':link' in that specification.
:nth-child() - CSS: Cascading Style Sheets
it can be read as the an+bth element of a list.
:optional - CSS: Cascading Style Sheets
WebCSS:optional
this will ensure that people navigating with the aid of assistive technology such as a screen reader will be able to understand which inputs need valid content to ensure a successful form submission.
:required - CSS: Cascading Style Sheets
WebCSS:required
this will ensure that people navigating with the aid of assistive technology such as a screen reader will be able to understand which inputs need valid content to ensure a successful submission.
:scope - CSS: Cascading Style Sheets
WebCSS:scope
</p> <p id="output"></p> result direct children a situation where the :scope pseudo-class prove to be useful is when you need to get direct descendant of an already retrieved element.
:valid - CSS: Cascading Style Sheets
WebCSS:valid
note: we've used ::before to add these labels, as we were already using ::after for the "required" labels.
font-display - CSS: Cascading Style Sheets
the font-display descriptor determines how a font face is displayed based on whether and when it is downloaded and ready to use.
font-stretch - CSS: Cascading Style Sheets
accessibility concerns people with dyslexia and other cognitive conditions may have difficulty reading fonts that are too condensed, especially if the font has a low contrast color ratio.
font-weight - CSS: Cascading Style Sheets
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.
@font-face - CSS: Cascading Style Sheets
syntax @font-face { font-family: "open sans"; src: url("/fonts/opensans-regular-webfont.woff2") format("woff2"), url("/fonts/opensans-regular-webfont.woff") format("woff"); } descriptors font-display determines how a font face is displayed based on whether and when it is downloaded and ready to use.
update - CSS: Cascading Style Sheets
examples: e-book readers or severely underpowered devices.
orientation - CSS: Cascading Style Sheets
syntax values auto the user agent will set the document's orientation automatically, typically based on the device's orientation as determined by an accelerometer (if the device has such a hardware sensor), although there is often a user-controlled, os-level "lock orientation" setting that will trump the accelerometer reading.
user-zoom - CSS: Cascading Style Sheets
accessibility concerns disabling zooming capabilities prevents people experiencing low vision conditions from being able to read and understand page content.
CSS Animations - CSS: Cascading Style Sheets
currently offers a technique for replaying an animation which has already run through to completion, which the api doesn't support inherently.
Using URL values for the cursor property - CSS: Cascading Style Sheets
if none are specified, the coordinates of the hotspot are read from the file itself (for cur and xbm files) or are set to the top left corner of the image.
Box alignment for block, absolutely positioned and table layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to block layout and box alignment, it should be read in conjunction with the main box alignment page, which details the common features of box alignment across layout methods.
Box alignment in grid layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to css grid layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
Box alignment in Flexbox - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to flexbox and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
Box alignment in Multi-column Layout - CSS: Cascading Style Sheets
as this page aims to detail things which are specific to multi-column layout and box alignment, it should be read in conjunction with the main box alignment page which details the common features of box alignment across layout methods.
Using multi-column layouts - CSS: Cascading Style Sheets
people have trouble reading text if lines are too long; if it takes too long for the eyes to move from the end of the one line to the beginning of the next, they lose track of which line they were on.
Using feature queries - CSS: Cascading Style Sheets
once a floated item becomes a grid item, the float is removed — something you can read more about in supporting older browsers.
Aligning Items in a Flex Container - CSS: Cascading Style Sheets
we have already seen one place where this has happened, with the introduction of the space-evenly value for align-content and justify-content properties.
Introduction to formatting contexts - CSS: Cascading Style Sheets
in addition, it is potentially not very readable for a future developer, as it may not be obvious why you used overflow for this purpose.
Auto-placement in CSS Grid Layout - CSS: Cascading Style Sheets
a related issue may have already come to mind if you followed the last guide about named lines on the grid.
Basic concepts of Logical Properties and Values - CSS: Cascading Style Sheets
if you would like to read the suggestions or comment on them the relevant github issue is #1282.
Browser compatibility and Scroll Snap - CSS: Cascading Style Sheets
if you have already used the old implementation as a fallback, or feel you want to support users of old firefox (or -webkit prefixed safari), then you can continue to use the old specification as outlined in the example below.
Basic Shapes - CSS: Cascading Style Sheets
you have already met the reference box in the guide on creating shapes from box values, which directly uses the reference box to create the shape.
Overview of CSS Shapes - CSS: Cascading Style Sheets
we have already seen how circle() creates a circular shape.
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
user stylesheets the user (or reader) of the web site can choose to override styles in many browsers using a custom user stylesheet designed to tailor the experience to the user's wishes.
Inline formatting context - CSS: Cascading Style Sheets
read more about these properties in logical properties and values.
CSS Layout cookbook - CSS: Cascading Style Sheets
flexbox, margin breadcrumb navigation creating a list of links to allow the visitor to navigate back up through the page hierarchy.
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
WebCSSReference
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...
Scaling of SVG backgrounds - CSS: Cascading Style Sheets
knowing one dimension and a ratio is, as has been mentioned already, the same as specifying both dimensions explicitly.
Shorthand properties - CSS: Cascading Style Sheets
using a shorthand property, you can write more concise (and often more readable) style sheets, saving time and energy.
Syntax - CSS: Cascading Style Sheets
WebCSSSyntax
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.
background-image - CSS: Cascading Style Sheets
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
background - CSS: Cascading Style Sheets
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
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
WebCSScolor
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.
column-fill - CSS: Cascading Style Sheets
the css `column-fill` property is used to spread the contents evenly across all the columns.
content - CSS: Cascading Style Sheets
WebCSScontent
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 already 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.
counter-set - CSS: Cascading Style Sheets
it manipulates the value of existing counters, and will only create new counters if there isn't already a counter of the given name on the element.
cross-fade() - CSS: Cascading Style Sheets
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
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 spread parameters are not allowed.
filter - CSS: Cascading Style Sheets
WebCSSfilter
if both values are 0, the shadow is placed behind the element (and may generate a blur effect if <blur-radius> and/or <spread-radius> is set).
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-size - CSS: Cascading Style Sheets
WebCSSfont-size
the em is a very useful unit in css, since it automatically adapts its length relative to the font that the reader chooses to use.
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-alternates - CSS: Cascading Style Sheets
this property allows those human-readable names (defined in @font-feature-values) in the stylesheet.
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-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <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-breadth> | minmax( <inflexible-breadth> , <track-breadth> ) | fit-content( [ <length> | <percentage> ] )where <track-breadth> = <length-percentage> | <flex> | min-content | max-content | auto<inflexible-breadth> = <length> | <percentage> | min-content | max-content | autowhere <length-percentage> = <length> | <percentage> examples setting grid row size html <div id="grid"> <div id="item1"></div> ...
image-set() - CSS: Cascading Style Sheets
WebCSSimage-set
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
<image> - CSS: Cascading Style Sheets
WebCSSimage
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
image() - CSS: Cascading Style Sheets
this is important primarily for screen readers, as a screen reader will not announce its presence and therefore convey nothing to its users.
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
WebCSSmin
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
WebCSSopacity
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.
radial-gradient() - CSS: Cascading Style Sheets
use the standard keywords only, as some implementations have already dropped those older variants.
repeating-radial-gradient() - CSS: Cascading Style Sheets
use the standard keywords only, as some implementations have already dropped those older variants.
text-decoration-color - CSS: Cascading Style Sheets
accessibility concerns it is important to ensure that the contrast ratio between the color of the text, the background the text is placed over, and the text decoration line is high enough that people experiencing low vision conditions will be able to read the content of the page.
text-size-adjust - CSS: Cascading Style Sheets
since text that has been scaled down to fit a mobile screen may be very small, many mobile browsers apply a text inflation algorithm to enlarge the text to make it more readable.
text-transform - CSS: Cascading Style Sheets
accessibility concerns large sections of text set with a text-transform value of uppercase may be difficult for people with cognitive concerns such as dyslexia to read.
touch-action - CSS: Cascading Style Sheets
this will prevent people experiencing low vision conditions from being able to read and understand page content.
transition-delay - CSS: Cascading Style Sheets
in other words, the effect will be animated as if it had already been running for the given length of time.
unicode-bidi - CSS: Cascading Style Sheets
this value allows the display of data that is already formatted using a tool following the unicode bidirectional algorithm.
vertical-align - CSS: Cascading Style Sheets
op">top</td> <td style="vertical-align: middle">middle</td> <td style="vertical-align: bottom">bottom</td> <td> <p>there is a theory which states that if ever anyone discovers exactly what the universe is for and why it is here, it will instantly disappear and be replaced by something even more bizarre and inexplicable.</p> <p>there is another theory which states that this has already happened.</p> </td> </tr> </table> table { margin-left: auto; margin-right: auto; width: 80%; } table, th, td { border: 1px solid black; } td { padding: 0.5em; font-family: monospace; } note that vertical-align only applies to inline, inline-block and table-cell elements: you can't use it to vertically align block-level elements.
visibility - CSS: Cascading Style Sheets
this will cause the element and all its descendant elements to no longer be announced by screen reading technology.
will-change - CSS: Cascading Style Sheets
the browser already tries as hard as it can to optimize everything.
word-spacing - CSS: Cascading Style Sheets
examples html <div id="mozdiv1">here are many words...</div> <div id="mozdiv2">...and many more!</div> css #mozdiv1 { word-spacing: 15px; } #mozdiv2 { word-spacing: 5em; } accessibility concerns a large positive or negative word-spacing value will make the sentences the styling is applied to unreadable.
Ajax - Developer guides
WebGuideAJAX
filereader api the filereader api 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.
Video player styling basics - Developer guides
this has now been changed to use a data-state attribute, which this code already uses to handle its fullscreen implementation.
Block formatting context - Developer guides
in addition, it is potentially not readable for a future developer, as it might not be obvious why you used overflow for this purpose.
Challenge solutions - Developer guides
readable css commenting out a rule challenge comment out part of your stylesheet, without changing anything else, to make the very first letter of your document red.
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 ereaders.
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...
SVG-in-OpenType - Developer guides
once we're ready for wider adoption the information from wiki.mozilla.org will be moved here, updated and expanded.
The Unicode Bidirectional Text Algorithm - Developer guides
understanding this algorithm in at least basic terms is helpful when you're striving to produce localization-ready web content or apps.
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.
HTML attribute: multiple - HTML: Hypertext Markup Language
in firefox, the file input reads "no files selected" when the attribute is present and "no file selected" when not, when no files are selected.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
modulepreload links can ensure network fetching is done with the module ready (but not evaluated) in the module map before it is necessarily needed.
Allowing cross-origin use of images and canvas - HTML: Hypertext Markup Language
if the foreign content comes from an image obtained from either as htmlcanvaselement or imagebitmap, and the image source doesn't meet the same origin rules, attempts to read the canvas's contents are blocked.
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
a given document can have multiple articles in it; for example, on a blog that shows the text of each article one after another as the reader scrolls, each post would be contained in an <article> element, possibly with one or more <section>s within.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
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.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
but if you don't know the directionality - for example, because embedded-text is being read from a database or entered by the user - you should use <bdi> to prevent the directionality of embedded-text from affecting its surroundings.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
accessible names provide information for assistive technology, such as screen readers, to access when they parse the document and generate an accessibility tree.
<canvas>: The Graphics Canvas element - HTML: Hypertext Markup Language
WebHTMLElementcanvas
a fallback text is provided if a browser is unable to render the canvas, or if can't read a canvas.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
such links should be uses of the term, with the intent being that the reader can quickly navigate to the term's definition if they're not already aware of it, by clicking on the term's link.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
examples <embed type="video/quicktime" src="movie.mov" width="640" height="480" title="title of my video"> accessibility concerns use the title attribute on an embed element to label its content so that people navigating with assistive technology such as a screen reader can understand what it contains.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
</footer> accessibility concerns the voiceover screen reader has an issue where the footer landmark role is not announced in the landmark rotor.
<frame> - HTML: Hypertext Markup Language
WebHTMLElementframe
using the <frame> element is not encouraged because of certain disadvantages such as performance problems and lack of accessibility for users with screen readers.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
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.
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
usage notes use the <i> element for text that is set off from the normal prose for readability reasons.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
using checkbox inputs we already covered the most basic use of checkboxes above.
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
using radio inputs we already covered the fundamentals of radio buttons above.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
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.
<meta>: The Document-level Metadata element - HTML: Hypertext Markup Language
WebHTMLElementmeta
people navigating with the aid of assistive technology such as a screen reader may be unable to read through and understand the page's content before being automatically redirected.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
user agents, such as screen readers targeting disabled users, can use this element to determine whether to omit the initial rendering of navigation-only content.
<nextid>: The NeXT ID element (Obsolete) - HTML: Hypertext Markup Language
WebHTMLElementnextid
when opening the document, the next editor finds and reads this <nextid n="z8"> tag, and now knows to give the first of these new sections the name of z8 in the table of contents, and z14 to the content body.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
people experiencing low vision conditions and browsing with the aid of assistive technology such as a screen reader may not understand what the preformatted text characters are representing when they are read out in sequence.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
even though <rb> is not an empty element, it is common to just include the opening tag of each element in the source code, so that the ruby markup is less complex and easier to read.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
warning: because the <summary> element has a default role of button (which strips all roles from child elements), this example will not work for users of assistive technologies such as screen readers.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
some user-agents, such as speech readers, may present this description before the content itself.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
however, the htmltemplateelement has a content property, which is a read-only documentfragment containing the dom subtree which the template represents.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
some user-agents, such as speech readers, may present this description before the content itself.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
label a user-readable title of the text track which is used by the browser when listing available text tracks.
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
html <p>the class read <cite>moby dick</cite> in the first term.</p> result with default style note that the default styling for the <cite> element renders the text in italics.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
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.
hidden - HTML: Hypertext Markup Language
if something is marked hidden, it is hidden from all presentations, including, for instance, screen readers.
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.
x-ms-acceleratorkey - HTML: Hypertext Markup Language
x-ms-acceleratorkey exposes a notification in the accessibility tree, for screen readers and other assistive technologies, that an accelerator key exists for that element.
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
WebHTML
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.
Data URLs - HTTP
also, for csv data (mime type "text/csv"), percent-encoding is needed to preserve the line endings that delimit rows of the spreadsheet.
MIME types (IANA media types) - HTTP
text list at iana text-only data including any human-readable content, source code, or textual data such as comma-separated value (csv) formatted data.
Browser detection using the user agent - HTTP
like in all cases, these strings may change in the future, one should use them only in conjunction with the detection of already released browsers.
Reason: CORS header 'Access-Control-Allow-Origin' missing - HTTP
to allow any site to make cors requests without using the * wildcard (for example, to enable credentials), your server must read the value of the request's origin header and use that value to set access-control-allow-origin, and must also set a vary: origin header to indicate that some headers are being set dynamically depending on the origin.
Reason: CORS preflight channel did not succeed - HTTP
there are a couple of reasons why preflighting might fail: a cross-site request has previously been performed that already did a preflight, and doing the preflight again is not permitted.
Cache-Control - HTTP
max-age=0 is already implied.
Content-Encoding - HTTP
the recommendation is to compress data as much as possible and therefore to use this field, but some types of resources, such as jpeg images, are already compressed.
CSP: trusted-types - HTTP
'allow-duplicates' allows for creating policies with a name that was already used examples todo polyfill a polyfill for trusted types is available on github.
Cross-Origin-Resource-Policy - HTTP
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.
DNT - HTTP
WebHTTPHeadersDNT
examples reading do not track status from javascript the user's dnt preference can also be read from javascript using the navigator.donottrack property: navigator.donottrack; // "0" or "1" specifications specification status comment tracking preference expression (dnt)the definition of 'dnt header field for http requests' in that specification.
Expires - HTTP
WebHTTPHeadersExpires
invalid dates, like the value 0, represent a date in the past and mean that the resource is already expired.
Feature-Policy - HTTP
publickey-credentials-get controls whether the current document is allowed to use the web authentication api to retreive already stored public-key credentials, i.e.
If-None-Match - HTTP
they are only useful when uploading a resource, usually with put, to check if another resource with the identity has already been uploaded before.
Index - HTTP
WebHTTPHeadersIndex
database read/write, cpu time, file system access, etc.) in the developer tools in the user's browser or in the performanceservertiming interface.
Upgrade - HTTP
WebHTTPHeadersUpgrade
the http 1.1 (only) upgrade header can be used to upgrade an already established client/server connection to a different protocol (over the same transport protocol).
User-Agent - HTTP
please read browser detection using the user agent for why serving different web pages or services to different browsers is usually a bad idea.
Vary - HTTP
WebHTTPHeadersVary
a better way to indicate this is to use cache-control: no-store, which is clearer to read and also signals that the object shouldn't be stored ever.
HTTP Messages - HTTP
WebHTTPMessages
in http/2, the once human-readable message is now divided up into http frames, providing optimization and performance improvements.
HEAD - HTTP
WebHTTPMethodsHEAD
for example, if a url might produce a large download, a head request could read its content-length header to check the filesize without actually downloading the file.
OPTIONS - HTTP
WebHTTPMethodsOPTIONS
(this header is similar to the allow response header, but used only for cors.) access-control-allow-headers any script inspecting the response is permitted to read the values of the x-pingother and content-type headers.
Protocol upgrade mechanism - HTTP
the http/1.1 protocol provides a special mechanism that can be used to upgrade an already established connection to a different protocol, using the upgrade header field.
Proxy Auto-Configuration (PAC) file - HTTP
dnsdomainis() localhostordomainis() isresolvable() isinnet() related utility functions dnsresolve() convert_addr() myipaddress() dnsdomainlevels() url/hostname based conditions shexpmatch() time based conditions weekdayrange() daterange() timerange() logging utility alert() there was one associative array (object) already defined, because at the time javascript code was unable to define it by itself: proxyconfig.bindings note: pactester (part of the pacparser package) was used to test the following syntax examples.
100 Continue - HTTP
WebHTTPStatus100
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 already finished.
409 Conflict - HTTP
WebHTTPStatus409
for example, you may get a 409 response when uploading a file which is older than the one already on the server resulting in a version control conflict.
503 Service Unavailable - HTTP
WebHTTPStatus503
the hypertext transfer protocol (http) 503 service unavailable server error response code indicates that the server is not ready to handle the request.
HTTP
WebHTTP
a must-read for any web developer.
CSS Houdini
start by reading houdini, an introduction — this provides a brief history of houdini and an overview of its many features.
Closures - JavaScript
because the loop has already run its course by that time, the item variable object (shared by all three closures) has been left pointing to the last entry in the helptext list.
Control flow and error handling - JavaScript
for example, do not write code like this: // prone to being misread as "x == y" if (x = y) { /* statements here */ } if you need to use an assignment in a conditional expression, a common practice is to put additional parentheses around the assignment, like this: if ((x = y)) { /* statements here */ } falsy values the following values evaluate to false (also known as falsy values): false undefined null 0 nan the empty string ("") all other val...
Expressions and operators - JavaScript
attempts to convert the operand to a number, if it is not already.
Functions - JavaScript
read more about objects and methods in working with objects.
Introduction - JavaScript
what you should already 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 spread 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.
Inheritance and the prototype chain - JavaScript
you probably already noticed that our function a has a special property called prototype.
JavaScript technologies overview - JavaScript
read the dom documentation.
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 already 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 '...
SyntaxError: missing : after property id - JavaScript
var obj = { propertykey = 'value' }; // syntaxerror: missing : after property id correct would be to use a colon, or to use square brackets to assign a new property after the object has been created already.
SyntaxError: missing ; before statement - JavaScript
examples unescaped strings this error can occur easily when not escaping strings properly and the javascript engine is expecting the end of your string already.
TypeError: variable "x" redeclares argument - JavaScript
'use strict'; function f(arg) { var arg = 'foo'; } valid cases to fix this warning, the var statement can just be omitted, because the variable exists already.
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 spread 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 threads, retrieves remote file, etc).
AggregateError() constructor - JavaScript
messageoptional an optional human-readable description of the aggregate error.
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 spread 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.forEach() - JavaScript
if elements that are already visited are removed (e.g.
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 + ' already 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 already exists in the veggies collection.
ArrayBuffer.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
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.
DataView.prototype.buffer - JavaScript
description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
DataView.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
DataView.prototype.byteOffset - JavaScript
description the byteoffset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
Date.prototype.toGMTString() - JavaScript
the exact format of the value returned by togmtstring() varies according to the platform and browser, in general it should represent a human readable date string.
Date.prototype.toLocaleDateString() - JavaScript
to check whether an implementation supports them already, 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 already, 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() constructor - JavaScript
syntax new error([message[, filename[, linenumber]]]) parameters messageoptional a human-readable description of the error.
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 widespread support.
Error.prototype.message - JavaScript
the message property is a human-readable description of the error.
EvalError() constructor - JavaScript
human-readable description of the error filename optional.
Function.prototype.apply() - JavaScript
note: when the first argument is undefined or null a similar outcome can be achieved using the array spread syntax.
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 already 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).
InternalError() constructor - JavaScript
human-readable description of the error filename optional.
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 thread 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 spread 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 spread (...) 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() constructor - JavaScript
if the value is an object already, it will return the value.
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 already 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 already: 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...
Object - JavaScript
if the value is an object already, it will return the value.
Promise() constructor - JavaScript
the promise constructor is primarily used to wrap functions that do not already support promises.
Promise.allSettled() - JavaScript
however, if and only if an empty iterable is passed as an argument, promise.allsettled() returns a promise object that has already 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 already 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...
RangeError() constructor - JavaScript
syntax new rangeerror([message[, filename[, linenumber]]]) parameters message optional human-readable description of the error.
ReferenceError() constructor - JavaScript
human-readable description of the error.
Reflect.construct() - JavaScript
(this would also be possible by using the spread 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() constructor - JavaScript
for an introduction to regular expressions, read the regular expressions chapter in the javascript guide.
RegExp.prototype.dotAll - JavaScript
dotall is a read-only property of an individual regular expression instance.
RegExp.prototype.global - JavaScript
global is a read-only property of an individual regular expression instance.
RegExp.prototype.ignoreCase - JavaScript
ignorecase is a read-only property of an individual regular expression instance.
RegExpInstance.lastIndex - JavaScript
the lastindex is a read/write integer property of regular expression instances that specifies the index at which to start the next match.
RegExp.prototype.multiline - JavaScript
multiline is a read-only property of an individual regular expression instance.
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 spread operator to transform a set into an array.
SharedArrayBuffer.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
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 already 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 already 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 length - JavaScript
length is a read-only data property of string instances.
String.prototype.matchAll() - JavaScript
instead, by using matchall, you get an iterator to use with the more convenient for...of, array spread, 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'...
TypeError() constructor - JavaScript
human-readable description of the error filename optional optional.
TypedArray.prototype.buffer - JavaScript
description the buffer property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
TypedArray.prototype.byteLength - JavaScript
description the bytelength property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
TypedArray.prototype.byteOffset - JavaScript
description the byteoffset property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
TypedArray.prototype.length - JavaScript
description the length property is an accessor property whose set accessor function is undefined, meaning that you can only read this property.
TypedArray.prototype.set() - JavaScript
the set() method stores multiple values in the typed array, reading input values from a specified array.
URIError() constructor - JavaScript
human-readable description of the error.
WeakSet - JavaScript
use case: detecting circular references functions that call themselves recursively need a way of guarding against circular data structures by tracking which objects have already been processed.
WebAssembly.CompileError() constructor - JavaScript
syntax new webassembly.compileerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly.Instance.prototype.exports - JavaScript
the exports readonly property of the webassembly.instance object prototype returns an object containing as its members all the functions exported from the webassembly module instance, to allow them to be accessed and used by javascript.
WebAssembly.Instance - JavaScript
read-only.
WebAssembly.LinkError() constructor - JavaScript
syntax new webassembly.linkerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly.Module() constructor - JavaScript
a webassembly.module() constructor creates a new module object containing stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
WebAssembly.Module.customSections() - JavaScript
(read high level structure for information on section structures, and how normal sections ("known sections") and custom sections are distinguished.) this provides developers with a way to include custom data inside wasm modules for other purposes, for example the name custom section, which allows developers to provide names for all the functions and locals in the module (like "symbols" in a native bui...
WebAssembly.RuntimeError() constructor - JavaScript
syntax new webassembly.runtimeerror(message, filename, linenumber) parameters message optional human-readable description of the error.
WebAssembly - JavaScript
webassembly.module() contains stateless webassembly code that has already been compiled by the browser and can be efficiently shared with workers, and instantiated multiple times.
undefined - JavaScript
javascript is a statically scoped language, so knowing if a variable is declared can be read by seeing whether it is declared in an enclosing context.
Logical AND (&&) - JavaScript
this happens because the value of the operator is already determined after the evaluation of the first operand.
Logical OR (||) - JavaScript
this happens because the value of the operator is already determined after the evaluation of the first operand.
Logical OR assignment (||=) - JavaScript
syntax expr1 ||= expr2 description short-circuit evaluation the logical or operator works like this: x || y; // returns x when x is truthy // returns y when x is not truthy the logical or operator short-circuits: the second operand is only evaluated if the first operand doesn’t already determine the result.
Optional chaining (?.) - JavaScript
the optional chaining operator (?.) permits reading the value of a property located deep within a chain of connected objects without having to expressly validate that each reference in the chain is valid.
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 already.
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 spread 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 already 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.getreader(); 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 already 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 already 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.
Statements and declarations - JavaScript
const declares a read-only named constant.
Transitioning to strict mode - JavaScript
this made optimizations complicated for javascript engine and made code harder to read/understand.
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 already uses a trailing comma.
JavaScript reference - JavaScript
read more about this reference.
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
WebMathMLElementmstyle
in addition, the scriptlevel attribute can never reduce the font size below scriptminsize in order to avoid unreadable 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.
Codecs used by WebRTC - Web media technologies
whichever you choose, be sure to read the information provided in this article about any particular configuration issues you may need to contend with for that codec.
Mapping the width and height attributes of media container elements to their aspect-ratio - Web media technologies
read on to find out more.
Web media technologies
this ranges from simply using the alt attribute on <img> elements to captions to tagging media for screen readers.
Performance budgets - Web Performance
how fast can users start reading), which will inform file specific budgets (e.g.
Understanding latency - Web Performance
subsequent requests will have less latency because the connection to the server is already set.
Using dns-prefetch - Web Performance
this is because the ip behind your site’s domain will have already been resolved by the time the browser sees the hint.
Graphic design for responsive sites - Progressive web apps (PWAs)
for an overview of what's available, read choosing a responsive image solution.
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 already 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.
points - SVG: Scalable Vector Graphics
WebSVGAttributepoints
it makes things more readable for human beings.
target - SVG: Scalable Vector Graphics
WebSVGAttributetarget
if a context with this name already exists, and can be securely accessed from this document, it is re-used, replacing the existing content.
xlink:title - SVG: Scalable Vector Graphics
the xlink:title attribute is used to describe the meaning of a link or resource in a human-readable fashion.
SVG Attribute reference - SVG: Scalable Vector Graphics
WebSVGAttribute
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 spreadmethod 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 codedread.com for basic checks against the w3c test suite wikipedia for basic hints, not normative ...
<a> - SVG: Scalable Vector Graphics
WebSVGElementa
, 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...
<animateColor> - SVG: Scalable Vector Graphics
it provides no features not already available by using the <animate> element.
<circle> - SVG: Scalable Vector Graphics
WebSVGElementcircle
, 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
WebSVGElementellipse
, 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
WebSVGElementg
, 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
WebSVGElementline
, 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 spreadmethod 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
WebSVGElementmarker
, 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
WebSVGElementpath
, 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
WebSVGElementpolygon
, 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
WebSVGElementpolyline
, 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 spreadmethod 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
WebSVGElementrect
, 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
WebSVGElementsvg
, 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
WebSVGElementsymbol
, 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
WebSVGElementtext
, 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
WebSVGElementtextPath
, 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
WebSVGElementtspan
, 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
WebSVGLinking
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.codedread.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.
Introduction - SVG: Scalable Vector Graphics
it can be used to create an image either by specifying all the lines and shapes necessary, by modifying already existing raster images, or by a combination of both.
SVG and CSS - SVG: Scalable Vector Graphics
in this demonstration, your svg-enabled browser already knows how to display svg elements.
SVG fonts - SVG: Scalable Vector Graphics
« previousnext » when svg was specified, support for web fonts was not widespread in browsers.
SVG: Scalable Vector Graphics
WebSVG
other resources: xml, css, dom, canvas examples google maps (route overlay) & docs (spreadsheet 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 already 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 already 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
WebXPathAxes
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
WebXPathIndex
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.
Introduction to using XPath in JavaScript - XPath
read more on how to create a user-defined namespace resolver, if you wish to take the latter approach.
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.
Index - XSLT: Extensible Stylesheet Language Transformations
WebXSLTIndex
15 for further reading needscontent, needshelp, transforming_xml_with_xslt, xml, xslt http://www.amazon.com/xslt-programme.../dp/0764543814 16 resources extensions, needscontent, needsexample, needslivesample, xml, xsl no summary!
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.
Converting WebAssembly text format to wasm - WebAssembly
we need to assemble this textual representation into the assembly language the browser actually reads before we can use it.