api docs

Jump to: navigation, search

API documentation proposal

Summary

Some of the most immediately useful technical content that WPD can provide is for the new JavaScript APIs recently developed (or currently being developed) for web applications. These APIs provide new functionality that make web applications as robust and high-performing as desktop or native apps. By focusing on this area of technical content, we can establish WPD as the leading provider of reference information for modern web development.

The goal for this project is to bring the API documentation up to date and to make WPD the most current source for this documentation.

This proposal outlines a strategy for building out the API documentation, considering the following:

  • The current state of the "apis" namespace and extant content
  • External content that could be imported to WPD
  • New content that will help developers use the latest features of modern browsers
  • Creating, updating, and importing content
  • Template and forms changes that need to be implemented
  • Priorities and project management
  • Additional documents

Current state of the WPD API documentation

With the launch of WPD in October 2012, we received a generous donation of API documentation from Microsoft; it included some 12 APIs: appcache, audio-video (media), canvas, file, geolocation, indexeddb, timing, web-messaging, web-storage, websocket, workers, and xhr. A review of this content revealled that it needed to be reorganized and ammended extensively. While this work began, some new API documentation was developed (mostly to prove the process for creating API documentation). The findings of these efforts are summarized in WPD:Creating_API_pages.

The following table summarizes the current state of the extant API documentation on WPD. Note that all of the extant documentation will require changes associated with new templates and forms as discussed in Templates and forms, below. Another (messy) representation of this content may be found on the apis page.

Where the current state is described as "Content complete" the API has been described with all of the pertinent aspects of the current standard specification for that API. It is organized as the API's component model, with objects, properties (attributes), methods, and events delineated accordingly. Additionally, the following checks apply:

  • The API_Listing page has instructions for (or a link to the page with the key method or other instructions on) how to use the API.
  • The usage of the "key" method is documented and includes example code.
  • All objects, properties, methods, and events have pages in the appropriate hierarchy.
  • All pages have a summary description.
  • All relevant information from the spec is included in the documentation.
  • A link to the specification is included.
  • All pages are marked "Needs review".
  • All pages contain compatibility information if available, or are marked "Compatibility incomplete" if not.
  • All pages have topic flags of "API" and API type, e.g., "Web Audio".

The API document may or may not include code examples, and it may or may not have been reviewed; see On-going work.

Priority API Name Handler Current State
1 appcache Dave Gash Content complete
2 audio-video Dave Gash Content complete
3 canvas Dave Gash Content complete
4 css-regions Mike Sierra Content complete
5 file Dave Gash Content complete
6 filesystem Dave Gash Content complete
7 geolocation Dave Gash Content complete
8 indexeddb Lance Leonard In progress
9 navigation timing Dave Gash Content complete
10 user timing Dave Gash Content complete
11 resource timing Dave Gash Content complete
12 webaudio Dave Gash Content complete
13 web-messaging Dave Gash Content complete
14 webrtc Scott Rowe Content complete
15 websocket Dave Gash Content complete
16 web-storage Dave Gash Content complete
17 workers Dave Gash Content complete
18 xhr Dave Gash Mostly complete, needs to include CORS
19 quota management Dave Gash Content complete
20 gamepad Dave Gash Content complete
21 canvas WebGL Scott Rowe Not started (spec)

On-going work

Although the initial layout and development of these documents is complete, a great deal of work remains in developing code examples and reviewing the content. The following tables list the pages that need these pieces in order for the documentation to attain stardom. The lists are the results of queries for content with flags that identify needed improvements; specifically, "Examples Needed" and "Needs Review."


Examples development

(282 results)

These pages need examples to thoroughly explain the documented API artifacts and their usage. When you've completed a page's example, please remove the "Needs Examples" flag.

The following criteria are applied:

  • Topics: API
  • Content quality flags: Examples Needed
Page Summary
apis/appcache/ApplicationCache/oncached The resources listed in the manifest have been downloaded, and the application is now cached.
apis/appcache/ApplicationCache/onerror Indicates an error has occurred.
apis/audio-video/track
apis/battery status/BatteryManager/charging Represents if the system's battery is charging.
apis/battery status/BatteryManager/onlevelchange Handles the levelchange event.
apis/file/FileError Represents an error that occurs while using the FileReader interface. Obsolete per latest specification. Use DOMError instead.
apis/file/MSStreamError The MSStreamError object reports file-related errors asynchronously. Obsolete per latest specification. Use DOMError instead.
apis/file/MSStreamReader Creates random access data (Blob) from an MSStream object.
apis/file/MSStreamReader/onabort Indicates that the read has been aborted (for example, by calling abort()).
apis/file/URL/revokeObjectURL Revokes a URL from a document and frees the object associated with that URL.
apis/filesystem/DirectoryEntry/createReader Creates a new DirectoryReader to read Entries from this Directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryEntry/getDirectory Creates or looks up a directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryEntry/getFile Creates or looks up a file. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryEntry/removeRecursively Deletes a directory and all of its contents, if any. In the event of an error [e.g. trying to delete a directory that contains a file that cannot be removed], some of the contents of the directory may be deleted. It is an error to attempt to delete the root directory of a filesystem. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryEntrySync/getDirectory Creates or looks up a directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryEntrySync/getFile Creates or looks up a file. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/DirectoryReaderSync/readEntries Read the next block of entries from this directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntriesCallback/handleEvent Used to supply an array of Entries as a response to a user query. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/copyTo Copy an Entry to a different location on the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/filesystem The file system on which the Entry resides. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/fullPath The full absolute path from the root to the Entry. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/getMetadata Look up metadata about this Entry. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/getParent Look up the parent DirectoryEntry containing this Entry. If this Entry is the root of its filesystem, its parent is itself. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/isDirectory True if the Entry is a directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/isFile True if the Entry is a file. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/moveTo Move an Entry to a different location on the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/name The name of the Entry, excluding the path leading to it. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/remove Deletes a file or directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/Entry/toURL Returns a URL that can be used to identify this Entry. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntryCallback/handleEvent Used to supply an Entry as a response to a user query. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/copyTo Copy an EntrySync to a different location on the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/filesystem The file system on which the EntrySync resides. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/getMetadata Look up metadata about this EntrySync. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/getParent Look up the parent DirectoryEntrySync containing this EntrySync. If this EntrySync is the root of its filesystem, its parent is itself. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/isDirectory True if the EntrySync is a directory. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/isFile True if the EntrySync is a file. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/moveTo Move an EntrySync to a different location on the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/name The name of the EntrySync, excluding the path leading to it. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/EntrySync/toURL Returns a URL that can be used to identify this EntrySync. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/ErrorCallback/handleEvent There was an error with the request. Details are provided by the err parameter. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileCallback/handleEvent Used to supply a File as a response to a user query. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileEntry/file Returns a File that represents the current state of the file that this FileEntry represents. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileEntrySync/createWriter Creates a new FileWriterSync associated with the file that this FileEntrySync represents. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileEntrySync/file Returns a File that represents the current state of the file that this FileEntrySync represents. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileSystem/name The name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileSystem/root The root directory of the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileSystemCallback/handleEvent The file system was successfully obtained. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileSystemSync/name The name of the file system. The specifics of naming filesystems is unspecified, but a name must be unique across the list of exposed file systems. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileSystemSync/root The root directory of the file system. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/FileWriterCallback/handleEvent Used to supply a FileWriter as a response to a user query. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/LocalFileSystem/requestFileSystem Requests a file system where data should be stored. You access a sandboxed file system by requesting a LocalFileSystem object using this global method, window.requestFileSystem(). Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/LocalFileSystemSync/resolveLocalFileSystemSyncURL Allows the user to look up the Entry for a file or directory referred to by a local URL. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/MetadataCallback/handleEvent Used to supply file or directory metadata as a response to a user query. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/filesystem/VoidCallback/handleEvent Indicates success of an asynchronous method. Out of date; feature discontinued. See http://www.w3.org/TR/file-system-api.
apis/image capture/ImageCapture/getFrame Gathers data from the VideoStreamTrack into a ImageData object.
apis/image capture/ImageCapture/onerror Register/unregister for Image Capture error events of type ImageCaptureErrorEvent.
apis/image capture/ImageCapture/onframegrab Register/unregister for frame capture events of type FrameGrabEvent.
apis/image capture/ImageCapture/onphoto Register/unregister for photo events of type BlobEvent.
apis/image capture/ImageCapture/onphotosettingschange Register/unregister for photo settings change events of type SettingsChangeEvent.
apis/image capture/ImageCapture/photoSettingsOptions Describes current photo settings.
apis/image capture/ImageCapture/setOptions Applies the settings specified by the PhotoSettings object passed by parameter.
apis/image capture/ImageCapture/takePhoto Gathers data from the VideoStreamTrack into a Blob containing a single still image.
apis/image capture/ImageCapture/videoStreamTrack The MediaStream passed into the constructor.
apis/indexeddb/IDBCursor/delete Returns an IDBRequest object and, in a separate thread, deletes the record at the cursor's position, without changing the cursor's position. Once the record is deleted, the cursor's value is set to null.
apis/indexeddb/IDBCursor/direction Indicates the direction of travel within a cursor.
apis/indexeddb/IDBCursor/key The key value for the record currently displayed by the cursor.
apis/indexeddb/IDBCursor/primaryKey Returns the cursor's current effective key.
apis/indexeddb/IDBCursor/source On getting, returns the IDBObjectStore or IDBIndex that the cursor is iterating. This function never returns null or throws an exception, even if the cursor is currently being iterated, has iterated past its end, or its transaction is not active.
apis/indexeddb/IDBCursor/update Creates a structured clone of the value parameter.
apis/indexeddb/IDBCursorWithValue/value
apis/indexeddb/IDBDatabase/deleteObjectStore Destroys an object store with the given name as well as all indexes that are referencing that object store.
apis/indexeddb/IDBDatabase/name Name of the connected database.
apis/indexeddb/IDBDatabase/objectStoreNames Returns a list of names of the object stores currently in the connected database.
apis/indexeddb/IDBDatabase/transaction Execute the steps for creating a transaction in a sychronous fashion.
apis/indexeddb/IDBDatabase/version Returns the version of the database when this IDBDatabaseSync instance was created.
apis/indexeddb/IDBDatabaseException Not supported.
apis/indexeddb/IDBDatabaseException/code Not supported.
apis/indexeddb/IDBDatabaseException/message Not supported.
apis/indexeddb/IDBIndex/count Runs the steps for asynchronously executing a request and returns the IDBRequest created by these steps.
apis/indexeddb/IDBIndex/get Runs the steps for asynchronously executing a request and returns the IDBRequest created by these steps.
apis/indexeddb/IDBIndex/keyPath The key path of this index. If null, this index is not auto-populated.
apis/indexeddb/IDBIndex/name The name of this index.
apis/indexeddb/IDBIndex/objectStore Returns a reference to the IDBObjectStore instance for the referenced object store in this IDBIndex's transaction.
apis/indexeddb/IDBIndex/openCursor Creates a cursor.
apis/indexeddb/IDBIndex/openKeyCursor Creates a cursor.
apis/indexeddb/IDBIndex/unique Provides the unique flag of this index.
apis/indexeddb/IDBKeyRange/lower This value is the lower-bound of the key range.
apis/indexeddb/IDBKeyRange/lowerBound Creates and returns a new key range with lower set to lower, lowerOpen set to open, upper set to undefined and and upperOpen set to true.
apis/indexeddb/IDBKeyRange/lowerOpen Returns false if the lower-bound value is included in the key range. Returns true if the lower-bound value is excluded from the key range.
apis/indexeddb/IDBKeyRange/only Creates and returns a new key range with both lower and upper set to value and both lowerOpen and upperOpen set to false.
apis/indexeddb/IDBKeyRange/upperOpen Returns false if the upper-bound value is included in the key range. Returns true if the upper-bound value is excluded from the key range.
apis/indexeddb/IDBObjectStore/autoIncrement Provides the auto increment flag for this object store.
apis/indexeddb/IDBObjectStore/count The count method returns the number of records in an object store.
apis/indexeddb/IDBObjectStore/get Runs the steps for asynchronously executing a request and returns the IDBRequest created by these steps.
apis/indexeddb/IDBObjectStore/index Returns an IDBIndex representing an index that is part of the object store.
apis/indexeddb/IDBObjectStore/indexNames Provides a list of the names of indexes on objects in this object store.
apis/indexeddb/IDBObjectStore/keyPath Provides the key path of this object store.
apis/indexeddb/IDBObjectStore/name Provides the name of this object store.
apis/indexeddb/IDBObjectStore/openCursor Creates a cursor.
apis/indexeddb/IDBObjectStore/put Creates a structured clone of the value parameter.
apis/indexeddb/IDBObjectStore/transaction Returns the transaction this object store belongs to.
apis/indexeddb/IDBOpenDBRequest/onUpgradeNeeded The event handler for the upgrade needed event.
apis/indexeddb/IDBOpenDBRequest/onblocked The event handler for the blocked event. This event is triggered when the upgradeneeded should be triggered because of a version change but the database is still in use (ie not closed) somewhere, even after the versionchange event was sent.
apis/indexeddb/IDBRequest/error The error codes returned under certain conditions.
apis/indexeddb/IDBRequest/onerror The event handler for the error event.
apis/indexeddb/IDBRequest/onsuccess The event handler for the success event.
apis/indexeddb/IDBRequest/result Returns the result of the request. If the the request failed and the result is not available, the DOMException InvalidStateError exception is thrown.
apis/indexeddb/IDBRequest/source The source of the request, such as an Index or a ObjectStore. If no source exists (such as when calling indexedDB.open()), it returns null.
apis/indexeddb/IDBTransaction/db The database connection of which this transaction is a part.
apis/indexeddb/IDBTransaction/error Null if the transaction is not finished, is finished and successfully committed, or was aborted with the abort() function. Returns the same DOMError as the request object which caused the transaction to be aborted due to a failed request, or a DOMError for the transaction failure not due to a failed request (such as QuotaExceededError or UnknownError).
apis/indexeddb/IDBTransaction/mode The mode for isolating access to data in the object stores that are in the scope of the transaction. For possible values, see Return Value, below. The default value is readonly.
apis/indexeddb/IDBTransaction/objectStore Returns an object store that has already been added to the scope of this transaction.
apis/indexeddb/IDBTransaction/onabort The event handler for the onabort event.
apis/indexeddb/IDBTransaction/oncomplete The event handler for the oncomplete event.
apis/indexeddb/IDBVersionChangeEvent/newVersion Returns the new version of the database, which is the version specified by the open request.
apis/indexeddb/IDBVersionChangeEvent/oldVersion Returns the old version of the database.
apis/indexeddb/IDBVersionChangeRequest/onblocked The event handler for the blocked event.
apis/indexeddb/indexedDB/open Opens a database. See apis/indexeddb/IDBFactory/open
apis/media capture and streams/MediaStream/addtrack This event is fired when a track is added to the MediaStream.
apis/media capture and streams/MediaStream/ended Is true if the MediaStream has finished, false otherwise.
apis/media capture and streams/MediaStream/id A globally unique identifier string, initialized when the MediaStream object is created.
apis/media capture and streams/MediaStream/onaddtrack Handles the addtrack event when fired on the MediaStream object.
apis/media capture and streams/MediaStream/onended Handles the ended event when fired on the MediaStream object.
apis/media capture and streams/MediaStreamTrack/capabilities Returns a dictionary with all of the capabilities for the track type.
apis/media capture and streams/MediaStreamTrack/constraints Returns the complete constraints object associated with the track. If no mandatory constraints have been defined, the mandatory field will not be present (it will be undefined). If no optional constraints have been defined, the optional field will not be present (it will be undefined). If neither optional, nor mandatory constraints have been created, the value null is returned.
apis/media capture and streams/MediaStreamTrack/enabled Enables the track if the new value is true, and disable it otherwise.
apis/media capture and streams/MediaStreamTrack/id A globally unique identifier string, initialized when the MediaStreamTrack object is created.
apis/media capture and streams/MediaStreamTrack/kind Returns the string "audio" if the object represents an audio track or "video" if object represents a video track.
apis/media capture and streams/MediaStreamTrack/label Returns the label of the object’s corresponding track, if any. If the corresponding track has or had no label, it returns the empty string.
apis/media capture and streams/MediaStreamTrack/mute This event fires when the MediaStreamTrack object's source is temporarily unable to provide data.
apis/media capture and streams/MediaStreamTrack/muted Returns true if the track is muted, and false otherwise.
apis/media capture and streams/MediaStreamTrack/onmute Handles the mute event when fired on the MediaStreamTrack object.
apis/media capture and streams/MediaStreamTrack/onoverconstrained Handles the overcontrained event when fired on the MediaStreamTrack object.
apis/media capture and streams/MediaStreamTrack/onstarted Handles the started event when fired on the MediaStreamTrack object.
apis/media capture and streams/MediaStreamTrack/onunmute Handles the unmute event when fired on the MediaStreamTrack object.
apis/media capture and streams/MediaStreamTrack/overconstrained This event fires asynchronously for each affected track (when multiple tracks share the same source) after the user agent has evaluated the current constraints against a given sourceId and is not able to configure the source within the limitations established by the union of imposed constraints.
apis/media capture and streams/MediaStreamTrack/readonly Returns true If the track (audio or video) is backed by a read-only source such as a file, or the track source is a local microphone or camera, but is shared so that this track cannot modify any of the source's settings. Returns false otherwise.
apis/media capture and streams/MediaStreamTrack/readyState Returns the state of the track.
apis/media capture and streams/MediaStreamTrack/remote Returns true if the track is sourced by an RTCPeerConnection. Returns false otherwise.
apis/media capture and streams/MediaStreamTrack/started This event fires when the MediaStreamTrack object has just transitioned from the "new" readyState to another state.
apis/media capture and streams/MediaStreamTrack/states Returns an object containing all the state variables associated with the allowed constraints.
apis/media capture and streams/MediaStreamTrack/stop Permanently stop the generation of data for track's source.
apis/media capture and streams/MediaStreamTrack/unmute This event fires when the MediaStreamTrack object's source is live again after having been temporarily unable to provide data.
apis/media capture and streams/ended This event is fired when a MediaStream is stopped.
apis/network information/Connection/change Fires when the Connection changes.
apis/network information/Connection/metered A connection is metered when the user's connection is subject to a limitation from his Internet Service Provider strong enough to request web applications to be careful with the bandwidth usage.
apis/network information/Connection/onchange Handles the change event, fired when the Connection changes.
apis/network information/NetworkInformation/connection The object from which connection information is accessed.
apis/quota management/StorageQuota Provides a means to query and request storage usage and quota information.
apis/quota management/queryUsageAndQuota Queries the current usage (how much data is stored) and quota available for the requesting application.
apis/quota management/requestQuota Requests a new quota for the requesting application.
apis/web animations/AnimationPlayer/currentTime The current time of this player unless this player has a pending pause task, in which case this attribute returns null.
apis/web animations/AnimationPlayer/reverse Inverts the playback rate of this player and seeks to the start of the source content if if has finished playing in the reversed direction using the reverse a player procedure for this object.
apis/webaudio/AudioContext/activeSourceCount The number of AudioBufferSourceNodes that are currently playing. Out of date; removed from spec. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioContext/createWaveTable Creates a WaveTable representing a waveform containing arbitrary harmonic content. The real and imag parameters must be of type Float32Array of equal lengths greater than zero and less than or equal to 4096 or an exception will be thrown. These parameters specify the Fourier coefficients of a Fourier series representing the partials of a periodic waveform. The created WaveTable will be used with an OscillatorNode and will represent a normalized time-domain waveform having maximum absolute peak value of 1. Another way of saying this is that the generated waveform of an OscillatorNode will have maximum peak value at 0dBFS. Conveniently, this corresponds to the full-range of the signal values used by the Web Audio API. Because the WaveTable will be normalized on creation, the real and imag parameters represent relative values. Out of date; removed from spec. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioDestinationNode/numberOfChannels The number of channels of the destination's input. This value will default to 2, and may be set to any non-zero value less than or equal to maxChannelCount. An exception will be thrown if this value is not within the valid range. Not in spec; deletion candidate. Possibly confused with AudioBuffer/numberOfChannels. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioParam/computedValue The final value controlling the audio DSP, calculated at each time, which is either the value set directly to the value attribute or, if there are any scheduled parameter changes (automation events), the value as calculated from these events. Not in spec; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioParam/maxValue Nominal maximum value. The value attribute may be set higher than this value. Not in spec; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioParam/minValue Nominal minimum value. The value attribute may be set lower than this value. Not in spec; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioProcessingEvent/inputBuffer An AudioBuffer containing the input audio data. It will have a number of channels equal to the numberOfInputChannels parameter of the createScriptProcessor() method. This AudioBuffer is only valid while in the scope of the onaudioprocess function. Its values will be meaningless outside of this scope. Deprecated; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioProcessingEvent/node The ScriptProcessorNode associated with this processing event. Deprecated; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioProcessingEvent/outputBuffer An AudioBuffer where the output audio data should be written. It will have a number of channels equal to the numberOfOutputChannels parameter of the createScriptProcessor() method. Script code within the scope of the onaudioprocess function is expected to modify the Float32Array arrays representing channel data in this AudioBuffer. Any script modifications to this AudioBuffer outside of this scope will not produce any audible effects. Deprecated; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/AudioProcessingEvent/playbackTime The time when the audio will be played, in the same time coordinate system as AudioContext.currentTime. playbackTime allows for very tight synchronization between processing directly in JavaScript with the other events in the context's rendering graph. Deprecated; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webaudio/ScriptProcessorNode/bufferSize The size of the buffer (in sample-frames) which needs to be processed each time onaudioprocess is called. Legal values are 256, 512, 1024, 2048, 4096, 8192, and 16384. Deprecated; deletion candidate. See http://webaudio.github.io/web-audio-api/.
apis/webrtc/LocalMediaStream/stop Permanently halts the generation of data for the tracks' sources and removes the references to the sources.
apis/webrtc/MediaStream/audioTracks The MediaStreamTrackList object representing the audio tracks.
apis/webrtc/MediaStream/label A globally unique identifier (GUID) of 36 characters that describes the media stream.
apis/webrtc/MediaStream/videoTracks The MediaStreamTrackList object representing the video tracks.
apis/webrtc/MediaStreamTrack/enabled True if the track is still associated with its source.
apis/webrtc/MediaStreamTrack/ended The MediaStreamTrack object's source will not provide data; this may be caused by the following:
  • the user has revoked permissions on the application
  • the source device has been disconnected
  • the remote peer has stopped sending data
  • the stop() method was invoked
apis/webrtc/MediaStreamTrack/kind The value, either audio or video for the source of the track.
apis/webrtc/MediaStreamTrack/label A user agent-assigned string that identifies the track source, as in "internal microphone."
apis/webrtc/MediaStreamTrack/muted The MediaStreamTrack object's source is temporarily unable to provide data.
apis/webrtc/MediaStreamTrack/onended Handles the ended event when fired on the MediaStream object.
apis/webrtc/MediaStreamTrack/onmute Handles the muted event when fired on the MediaStream object.
apis/webrtc/MediaStreamTrack/unmuted The MediaStreamTrack object's source has resumed providing data.
apis/webrtc/MediaStreamTrackList A MediaStream has two MediaStreamTrackList objects, one for the video tracks and one for the audio tracks.
apis/webrtc/MediaStreamTrackList/add Adds a MediaStreamTrack to this track list.
apis/webrtc/MediaStreamTrackList/addtrack A MediaStreamTrack has been added to the list.
apis/webrtc/MediaStreamTrackList/remove Removes a MediaStreamTrack from this track list.
apis/webrtc/RTCDataChannel/binaryType Returns the value to which it was last set; on creation, must be initialized to the string "blob".
apis/webrtc/RTCDataChannel/bufferedAmount Returns the number of bytes of application data that have been queued using send() but that (as of the last time the event loop started executing a task) have not yet been transmitted to the network.
apis/webrtc/RTCDataChannel/close Closes the RTCDataChannel.
apis/webrtc/RTCDataChannel/label A unique identifier that can be used to distinguish this RTCDataChannel object from other RTCDataChannel objects.
apis/webrtc/RTCDataChannel/onclose An event listener to be called when an RTCDataChannel is closed.
apis/webrtc/RTCDataChannel/onerror An event listener to be called when an error occurs.
apis/webrtc/RTCDataChannel/onopen An event listener to be called when an RTCDataChannel is opened.
apis/webrtc/RTCDataChannel/readyState Represents the state of the RTCDataChannel object.
apis/webrtc/RTCDataChannel/reliable Returns true if the RTCDataChannel is reliable, and false otherwise.
apis/webrtc/RTCDataChannel/send Sends a message (data) on the RTCDataChannel’s underlying data transport.
apis/webrtc/RTCPeerConnection/close Closes a peer connection, stops all active ICE processing and any active streaming, and releases any relevant resources such as TURN permissions.
apis/webrtc/RTCPeerConnection/getIdentityAssertion Provides an identity assertion.
apis/webrtc/RTCPeerConnection/iceGatheringState Returns the gathering state of the ICE agent.
apis/webrtc/RTCPeerConnection/iceState Returns the ICE state of the ICE agent.
apis/webrtc/RTCPeerConnection/icecandidate
apis/webrtc/RTCPeerConnection/localDescription Returns the RTCSessionDescription most recently passed to the setLocalDescription() method along with any local candidate descriptions generated since the method was called.
apis/webrtc/RTCPeerConnection/localStreams Returns an array of MediaStream objects added to the connection with addStream().
apis/webrtc/RTCPeerConnection/onaddstream Handles the addstream event fired when setRemoteDescription() is called.
apis/webrtc/RTCPeerConnection/ondatachannel Handles the datachannel event.
apis/webrtc/RTCPeerConnection/ongatheringchange Handles the gatheringchange event for a change to the iceGatheringState property.
apis/webrtc/RTCPeerConnection/onicecandidate Handles the icechange event for a change to the apis/webrtc/RTCPeerConnection/iceState property. It is called any time there is a new ICE candidate added to a previous offer or answer.
apis/webrtc/RTCPeerConnection/onicechange Handles the icechange event. It is called any time the iceState changes.
apis/webrtc/RTCPeerConnection/onidentityresult Handles the identityresult event for the success or failure of an identity verification.
apis/webrtc/RTCPeerConnection/onnegotiationneeded Handles the negotiationneeded event.
apis/webrtc/RTCPeerConnection/onremovestream Handles the removeStream event for when setRemoteDescription() is called to remove a MediaStream object on the remote peer.
apis/webrtc/RTCPeerConnection/onstatechange Handles the statechange event for when the readyState property is changed, i.e. with a call to setLocalDescription() or setRemoteDescription(). The event does not fire when a new RTCPeerConnection object is created.
apis/webrtc/RTCPeerConnection/remoteDescription Returns the RTCSessionDescription most recently passed to the setRemoteDescription() method along with any remote candidate descriptions supplied with addIceCandidate(). Returns null if the remote description has not been set.
apis/webrtc/RTCPeerConnection/remoteStreams Returns an array of MediaStream objects added to the connection by the remote peer. This array is updated when the addstream and removestream events are fired.
apis/webrtc/RTCPeerConnection/setIdentityProvider Sets the identity provider. Not required if the browser is already configured for an identity provider.
apis/webrtc/RTCPeerConnection/statechange
apis/webrtc/RTCPeerConnection/updateIce Updates the ICE agent process that gathers local candidates and remote candidates.
apis/webrtc/RTCSessionDescription/sdp The string representation of the SDP object.
apis/webrtc/RTCSessionDescription/type The type of SDP object this RTCSessionDescription represents.
apis/websocket/CloseEvent/code The WebSocket connection close code provided by the server.
apis/websocket/WebSocket/extensions The extensions selected by the server.
apis/websocket/WebSocket/protocol Indicates the name of the sub-protocol the server selected.
apis/workers/Worker/onmessage An event listener to be called when a message is received from the worker.
apis/workers/Worker/postMessage Posts a message to the worker with which the object is associated.
apis/workers/Worker/terminate Immediately terminates the worker with which the object is associated.
apis/workers/WorkerGlobalScope/importScripts Fetches one or more script resources, identified by absolute URLs.
apis/workers/WorkerGlobalScope/location Returns the WorkerLocation object created for the WorkerGlobalScope object when the worker was created.
apis/workers/WorkerGlobalScope/onerror An event listener to be called when an error occurs.
apis/workers/WorkerGlobalScope/onoffline An event listener to be called when the worker goes offline.
apis/workers/WorkerGlobalScope/ononline An event listener to be called when the worker goes online.
apis/workers/WorkerGlobalScope/self Returns the WorkerGlobalScope object.
apis/workers/WorkerLocation/href Returns the absolute URL that the object represents.
apis/xhr/XMLHttpRequest/abort-event When the request has been aborted. For instance, by invoking the abort() method.
apis/xhr/XMLHttpRequest/progress While sending and loading data.
apis/xhr/XMLHttpRequest/timeout-event When the author specified timeout has passed before the request could complete.
dom/Element/change
dom/Element/emptied
dom/Element/ended
dom/Element/loadeddata
dom/Element/loadedmetadata
dom/Element/media
dom/Element/pause
dom/Element/play
dom/Element/seeked
dom/Element/seeking
dom/Element/stalled
dom/Element/suspend
dom/Element/waiting
dom/HTMLMediaElement/autoplay
dom/HTMLMediaElement/buffered
dom/HTMLMediaElement/canPlayType
dom/HTMLMediaElement/canplaythrough Fires when enough data is available to determine whether a media is playable at a normal rate without interruptions.
dom/HTMLMediaElement/controls Controls attribute used within a Audio element or Video element displays the default media controls defined by the web browser being used to open HTML document or view of a Web Application.
dom/HTMLMediaElement/defaultPlaybackRate
dom/HTMLMediaElement/duration
dom/HTMLMediaElement/ended
dom/HTMLMediaElement/error
dom/HTMLMediaElement/load
dom/HTMLMediaElement/loop
dom/HTMLMediaElement/muted
dom/HTMLMediaElement/networkState
dom/HTMLMediaElement/pause
dom/HTMLMediaElement/paused
dom/HTMLMediaElement/playbackRate
dom/HTMLMediaElement/played
dom/HTMLMediaElement/progress Fires to indicate progress while downloading media data.
dom/HTMLMediaElement/seekable
dom/HTMLMediaElement/seeking
dom/HTMLMediaElement/textTracks
dom/HTMLMediaError/code Returns the current HTMLMediaError code or null if no error has occurred.
dom/HTMLTrackElement/default
dom/HTMLTrackElement/kind
dom/HTMLTrackElement/label
dom/HTMLTrackElement/srclang
dom/HTMLTrackElement/track
dom/HTMLVideoElement/height
dom/HTMLVideoElement/initialTime Earliest point in seconds where the playback can (should) start playing
dom/HTMLVideoElement/poster Valid URL to an image ressource that will be displayed until the first frame of the video is available or will be displayed if no valid video ressource is available at all.
dom/HTMLVideoElement/videoHeight
dom/HTMLVideoElement/videoWidth
dom/HTMLVideoElement/width
dom/shadowdom/ShadowRoot/activeElement Represents the currently focused element in the shadow tree.
dom/shadowdom/ShadowRoot/applyAuthorStyles Indicates whether the rules in author styles associated with the element's document apply to the shadow tree. If false (default value), the author styles are not applied to the shadow tree. If true, the author styles are applied.
dom/shadowdom/ShadowRoot/getSelection Returns the current selection in this ShadowRoot's shadow tree.
dom/shadowdom/ShadowRoot/innerHTML Represents the markup of the ShadowRoot's contents.
dom/shadowdom/ShadowRoot/removeStyleSheet Removes a style sheet from the ShadowRoot.
dom/shadowdom/ShadowRoot/resetStyleInheritance Indicates whether or not the inheritable CSS properties are set to the initial value at the shadow boundary. If false (default value), the properties continue to inherit. If true, the properties are set to initial value.
dom/shadowdom/ShadowRoot/styleSheets Represents the shadow root style sheets.


Review content

(0 results)

These pages need to be reviewed by a community member familiar with the API and its usage in JavaScript. Where you find errors, please correct them; when you're finished, please remove the "Needs Review" flag.

The following criteria are applied:

  • Topics: API
  • High-level issues: Needs Review

Nothing found!


DOM content

Content identified here was originally considered part of the API project, but these APIs are actually DOM APIs, and should be considered in the scope of the DOM project (yet to be started).

Priority API Name Source Description
DOM Pointer Lock API MDN Provides input methods based on the movement of the mouse over time.
DOM Battery MDN Battery status.
DOM MutationObserver MDN Observes changes to the DOM.
DOM Page Visibility MDN Tells the application if a page is in focus.
DOM Fullscreen MDN Gives elements access to fullscreen presentation.
DOM Device Orientation MDN Events that signal the device's orientation.
DOM Shadow DOM Dimitri's Blog Tip of the Web Components iceberg; Scott is on the hook for this one.

Creating, updating, and importing content

Along with importing content from other sources, it is crucial that when you are working with existing content you check that content against the source specification. The document, WPD:Creating_API_pages has more information about editing API pages.

Templates and forms

Several issues with the current design and implementation of the templates and forms for use with the API documentation are noted in the "TODO" sections of the page, WPD:Creating_API_pages. The issues are summarized as follows:

  • The text fields in the page creation forms on the WPD:New_Page page need to be wider to accomodate longer namespace names. Bug 20625
  • We need a better way to specify non-primitive (or uncommon) return types. [Bug 20626]
  • Exceptions need to have forms and templates designed for them so that they may be reused between object methods. Bug 20627
  • Constants (or enumerations) used as property and method values need to have forms and templates designed for them so that they may be reused between object properties and methods. Bug 20628
  • For the Syntax section in properties and methods, it is not clear that the way the form enforces the syntax works in all cases. It may be overly specific. We need a tiger team to look at this more carefully to determine if there is an issue.
  • In the Event template it is not clear how the Overview Table gets populated. Looks like the Event template has not been completed. Bug 20629

Additional documents

The methodology for creating API pages is described in WPD:Creating_API_pages.