Search completed in 1.48 seconds.
2500 results for "store":
Your results are loading. Please wait...
Working with Svelte stores - Learn web development
in this article we will show another way to handle state management in svelte — stores.
... stores are global global data repositories that hold values.
... components can subscribe to stores and receive notifications when their values change.
...And 88 more matches
IDBObjectStore - Web APIs
the idbobjectstore interface of the indexeddb api represents an object store in a database.
... records within an object store are sorted according to their keys.
... properties idbobjectstore.indexnames read only a list of the names of indexes on objects in this object store.
...And 33 more matches
Session store API - Archive of obsolete content
session store makes it possible for extensions to easily save and restore data across firefox sessions.
... there is a simple api that lets extensions access the session store feature.
...in order to properly restore your extension's state when a tab is restored, it needs to use the session store api's settabvalue() method to save any data it will need in order to restore its state, and then call gettabvalue() to retrieve the previous setting when the tab is restored.
...And 30 more matches
nsISessionStore
browser/components/sessionstore/nsisessionstore.idlscriptable provides a means for extensions and other code to store data in association with browser sessions, tabs, and windows.
... 1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) in versions of firefox prior to 3.5, the user preference browser.sessionstore.enabled must be true for these calls to be successful.
... astring getclosedwindowdata(); astring gettabstate(in nsidomnode atab); astring gettabvalue(in nsidomnode atab, in astring akey); astring getwindowstate(in nsidomwindow awindow); astring getwindowvalue(in nsidomwindow awindow, in astring akey); void init(in nsidomwindow awindow); void persisttabattribute(in astring aname); void restorelastsession(); void setbrowserstate(in astring astate); void settabstate(in nsidomnode atab, in astring astate); void settabvalue(in nsidomnode atab, in astring akey, in astring astringvalue); void setwindowstate(in nsidomwindow awindow, in astring astate, in boolean aoverwrite); void setwindowvalue(in nsidomwindow awindow, in astring akey, in astring...
...And 23 more matches
IDBObjectStoreSync - Web APIs
the idbobjectstoresync interface of the indexeddb api provides synchronous access to an object store of a database.
... method overview any add (in any value, in optional any key) raises (idbdatabaseexception); idbindexsync createindex (in domstring name, in domstring storename, in domstring keypath, in optional boolean unique); any get (in any key) raises (idbdatabaseexception); idbcursorsync opencursor (in optional idbkeyrange range, in optional unsigned short direction) raises (idbdatabaseexception); 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.
...And 22 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 15 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.
... this is for adding new records to an object store.
... to determine if the add operation has completed successfully, listen for the transaction’s complete event in addition to the idbobjectstore.add request’s success event, because the transaction may still fail after the success event fires.
...And 12 more matches
IDBDatabase.createObjectStore() - Web APIs
the createobjectstore() method of the idbdatabase interface creates and returns a new object store or index.
... the method takes the name of the store as well as a parameter object that lets you define important optional properties.
... you can use the property to uniquely identify individual objects in the store.
...And 11 more matches
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.
... every call to this method on the same transaction object, with the same name, returns the same idbobjectstore instance.
... if this method is called on a different transaction object, a different idbobjectstore instance is returned.
...And 9 more matches
Stored value
in the jsapi, the stored value of an object property is its last known value.
...the javascript engine sets aside a field of type jsval for the stored value of most object properties, even properties that have getters.
... the stored value is updated each time the program gets or sets the property.
...And 7 more matches
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.
... this is for deleting all the current data out of an object store.
... clearing an object store consists of removing all records from the object store and removing all records in indexes that reference the object store.
...And 7 more matches
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.
... either a key or an idbkeyrange can be passed, allowing one or multiple records to be deleted from a store.
... to delete all records in a store, use idbobjectstore.clear.
...And 7 more matches
IDBIndex.objectStore - Web APIs
the objectstore property of the idbindex interface returns the name of the object store referenced by the current index.
... syntax var myidbobjectstore = myindex.objectstore; value an idbobjectstore.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
...And 6 more matches
IDBObjectStore.createIndex() - Web APIs
the createindex() method of the idbobjectstore interface creates and returns a new idbindex object in the connected database.
... bear in mind that indexeddb indexes can contain any javascript data type; indexeddb uses the structured clone algorithm to serialize stored objects, which allows for storage of simple and complex objects.
... syntax var myidbindex = objectstore.createindex(indexname, keypath); var myidbindex = objectstore.createindex(indexname, keypath, objectparameters); parameters indexname the name of the index to create.
...And 6 more matches
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.
... this is for retrieving specific records from an object store.
... syntax var request = objectstore.get(key); parameters key the key or key range that identifies the record to be retrieved.
...And 6 more matches
IDBObjectStore.name - Web APIs
the name property of the idbobjectstore interface indicates the name of this object store.
... syntax idbobjectstore.name = mynewname; var myobjectstorename = idbobjectstore.name; value a domstring containing the object store's name.
... exceptions there are a several exceptions which can occur when you attempt to change an object store's name.
...And 6 more matches
IDBDatabase.deleteObjectStore() - Web APIs
the deleteobjectstore() method of the idbdatabase interface destroys the object store with the given name in the connected database, along with any indexes that reference it.
... as with idbdatabase.createobjectstore, this method can be called only within a versionchange transaction.
... syntax dbinstance.deleteobjectstore(name); parameters name the name of the object store you want to delete.
...And 5 more matches
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.
... note that every object store has its own separate auto increment counter.
... syntax var myautoincrement = objectstore.autoincrement; value a boolean: value meaning true the object store auto increments.
...And 5 more matches
IDBObjectStore.deleteIndex() - Web APIs
the deleteindex() method of the idbobjectstore interface destroys the index with the specified name in the connected database, used during a version upgrade.
...note that this method synchronously modifies the idbobjectstore.indexnames property.
... syntax objectstore.deleteindex(indexname); parameters indexname the name of the existing index to remove.
...And 5 more matches
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.
... if no arguments are provided, it returns the total number of records in the store.
... syntax var request = objectstore.count(); var request = objectstore.count(query); parameters query optional a key or idbkeyrange object that specifies a range of records you want to count.
...And 4 more matches
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.
... used for iterating through an object store with a cursor.
... syntax var request = objectstore.opencursor(); var request = objectstore.opencursor(query); var request = objectstore.opencursor(query, direction); parameters query optional a key or idbkeyrange to be queried.
...And 4 more matches
IDBObjectStore.openKeyCursor() - Web APIs
the openkeycursor() method of the idbobjectstore interface returns an idbrequest object whose result will be set to an idbcursor that can be used to iterate through matching results.
... used for iterating through the keys of an object store with a cursor.
... syntax var request = objectstore.openkeycursor(); var request = objectstore.openkeycursor(query); var request = objectstore.openkeycursor(query, direction); parameters query optional the key range to be queried.
...And 4 more matches
WebGLRenderingContext.pixelStorei() - Web APIs
the webglrenderingcontext.pixelstorei() method of the webgl api specifies the pixel storage modes.
... syntax void gl.pixelstorei(pname, param); parameters pname a glenum specifying which parameter to set.
... var tex = gl.createtexture(); gl.bindtexture(gl.texture_2d, tex); gl.pixelstorei(gl.pack_alignment, 4); to check the values for packing and unpacking of pixel data, you can query the same pixel storage parameters with webglrenderingcontext.getparameter().
...And 4 more matches
Atomics.store() - JavaScript
the static atomics.store() method stores a given value at the given position in the array and returns that value.
... the source for this interactive example is stored in a github repository.
... syntax atomics.store(typedarray, index, value) parameters typedarray an integer typed array.
...And 4 more matches
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.
... syntax var list[] = idbdatabase.objectstorenames; value a domstringlist containing a list of the names of the object stores currently in the connected database.
... example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...And 3 more matches
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.
... this is for retrieving specific records from an object store.
... syntax var request = objectstore.getkey(key); parameters key the key or key range that identifies the record to be retrieved.
...And 3 more matches
IDBObjectStore.index() - Web APIs
the index() method of the idbobjectstore interface opens a named index in the current object store, after which it can be used to, for example, return a series of records sorted by that index using a cursor.
... syntax var index = objectstore.index(name); parameters name the name of the index to open.
... exceptions this method may raise a domexception of one of the following types: exception description invalidstateerror the source object store has been deleted, or the transaction for the object store has finished.
...And 3 more matches
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.
... syntax var myindexnames = objectstore.indexnames; value a domstringlist.
... 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().
...And 3 more matches
IDBObjectStore.keyPath - Web APIs
the keypath read-only property of the idbobjectstore interface returns the key path of this object store.
... syntax var mykeypath = objectstore.keypath; value any value type.
... 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().
...And 3 more matches
IDBObjectStore.transaction - Web APIs
the transaction read-only property of the idbobjectstore interface returns the transaction object to which this object store belongs.
... syntax var mytransaction = objectstore.transaction; value an idbtransaction object.
... 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().
...And 3 more matches
JS_RestoreExceptionState
restores the exception state from a jsexceptionstate object previously created using js_saveexceptionstate.
... syntax void js_restoreexceptionstate(jscontext *cx, jsexceptionstate *state); name type description cx jscontext * pointer to a js context from which to derive runtime information.
... state jsexceptionstate * pointer to the jsexceptionstate object to restore exception state from.
...And 2 more matches
IDBObjectStore.getAll() - Web APIs
the getall() method of the idbobjectstore interface returns an idbrequest object containing all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... syntax var request = objectstore.getall(); var request = objectstore.getall(query); var request = objectstore.getall(query, count); parameters query optional a key or idbkeyrange to be queried.
... if nothing is passed, this will default to a key range that selects all the records in this object store.
...And 2 more matches
IDBTransaction.objectStoreNames - Web APIs
the objectstorenames read-only property of the idbtransaction interface returns a domstringlist of names of idbobjectstore objects.
... syntax var mydatabase = transactionobj.objectstorenames; returns a domstringlist of names of idbobjectstore objects.
... specification specification status comment indexed database api 2.0the definition of 'objectstorenames' in that specification.
...And 2 more matches
HTMLCanvasElement: webglcontextrestored event - Web APIs
the webglcontextrestored event of the webgl api is fired if the user agent restores the drawing buffer for a webglrenderingcontext object.
... once the context is restored, webgl resources such as textures and buffers that were created before the context was lost are no longer valid.
... bubbles yes cancelable yes interface webglcontextevent event handler property none example with the help of the webgl_lose_context extension, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); // "webglcontextrestored" event is logged.
... specifications specification status comment webgl 1.0the definition of 'webglcontextrestored' in that specification.
IDBObjectStore.getAllKeys() - Web APIs
the getallkeys() method of the idbobjectstore interface returns an idbrequest object retrieves record keys for all objects in the object store matching the specified parameter or all objects in the store if no parameters are given.
... syntax var request = objectstore.getallkeys(); var request = objectstore.getallkeys(query); var request = objectstore.getallkeys(query, count); parameters query optional a value that is or resolves to an idbkeyrange.
... exceptions this method may raise a domexception of one of the following types: exception description transactioninactiveerror this idbobjectstore's transaction is inactive.
... invalidstateerror the idbobjectstore has been deleted or removed.
CanvasRenderingContext2D.restore() - Web APIs
the canvasrenderingcontext2d.restore() method of the canvas 2d api restores the most recently saved canvas state by popping the top entry in the drawing state stack.
... syntax void ctx.restore(); examples restoring a saved state this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.restore' in that specification.
WEBGL_lose_context.restoreContext() - Web APIs
the webgl_lose_context.restorecontext() method is part of the webgl api and allows you to simulate restoring the context of a webglrenderingcontext object.
... syntax gl.getextension('webgl_lose_context').restorecontext(); errors thrown invalid_operation if the context was not lost.
... examples with this method, you can simulate the webglcontextrestored event: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextrestored', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').restorecontext(); specifications specification status comment webgl_lose_contextthe definition of 'webgl_lose_context.losecontext' in that specification.
CredentialsContainer.store() - Web APIs
the store() method of the credentialscontainer stores a set of credentials for the user inside a credential instance, returning this in a promise.
... syntax credentialscontainer.store(credential).then(function(credential) { ...
norestorefocus - Archive of obsolete content
« xul reference home norestorefocus type: boolean if false, the default value, then when the panel is hidden, the keyboard focus will be restored to whatever had the focus before the panel was opened.
Window.restore() - Web APIs
WebAPIWindowrestore
desktopmobilechromeedgefirefoxinternet exploreroperasafariandroid webviewchrome for androidfirefox for androidopera for androidsafari on iossamsung internetrestorechrome no support noedge no support nofirefox no support noie ?
Using IndexedDB - Web APIs
indexeddb is a way for you to persistently store data inside a user's browser.
... create an object store in the database.
... creating and structuring the store using an experimental version of indexeddb in case you want to test your code in browsers that still use a prefix, you can use the following code: // in the following line, you should include the prefixes of implementations you want to test.
...And 107 more matches
Index - Web APIs
WebAPIIndex
109 audiobuffer.length api, audiobuffer, property, reference, web audio api, length the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
... 112 audiobuffersourcenode api, audio, audiobuffersourcenode, interface, media, reference, web audio api the audiobuffersourcenode interface is an audioscheduledsourcenode which represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
...all pannernodes spatialize in relation to the audiolistener stored in the baseaudiocontext.listener attribute.
...And 94 more matches
Client-side storage - Learn web development
previous overview: client-side web apis modern web browsers support a number of ways for web sites to store data on the user's computer — with the user's permission — then retrieve it when necessary.
... prerequisites: javascript basics (see first steps, building blocks, javascript objects), the basics of client-side apis objective: to learn how to use client-side storage apis to store application data.
...most major modern web sites are dynamic — they store data on the server using some kind of database (server-side storage), then run server-side code to retrieve needed data, insert it into static page templates, and serve the resulting html to the client to be displayed by the user's browser.
...And 65 more matches
Basic concepts - Web APIs
indexeddb is a way for you to persistently store data inside a user's browser.
...indexeddb is useful for applications that store a large amount of data (for example, a catalog of dvds in a lending library) and applications that don't need persistent internet connectivity to work (for example, mail clients, to-do lists, and notepads).
... overview of indexeddb indexeddb lets you store and retrieve objects that are indexed with a "key." all changes that you make to the database happen within transactions.
...And 41 more matches
Chapter 5: Let's build a Firefox extension - Archive of obsolete content
here, helloworld is a package name, and content/ is a relative path to the folder where the source file is stored.
... developing practical extensions: a session-management extension in this section, we will create an extension that uses a new feature: the session store api.
... this will allow the user to save and restore session snapshots (browser window states) at any time.
...And 40 more matches
Index
24 js::autosaveexceptionstate jsapi reference, reference, référence(2), spidermonkey js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
...js::protokeytoid stores a jsid to *idp.
... 89 jscheckaccessop jsapi reference, obsolete, reference, référence(2), spidermonkey check whether obj[id] may be accessed per mode, returning js_false on error/exception, js_true on success with obj[id]'s stored value in *vp.
...And 28 more matches
JavaScript Client API - Archive of obsolete content
further, you agree (a) to maintain and link to (including on websites from which your third party client may be downloaded) a separate, conspicuous, and reasonably detailed privacy policy detailing how data collected or transmitted by your third party client is managed and protected; (b) that your third party client will only store data in encrypted form on the firefox sync servers operated by mozilla; (c) that you and your third party client will use the firefox sync apis solely for their intended purpose; (d) that your third party client will not hide or mask its identity as it uses the services and/or firefox sync apis, including by failing to follow required identification conventions; and (e) that you and your third pa...
...when something of interest occurs, it interacts with the engine to let it know something has happened and it might want to take action store entity that serves as a data store/proxy for information in an engine.
... the name store is somewhat of a misnomer, as stores don't actually persistently store anything, but rather serve as short-lived data stores during the course of a single sync and act as proxies to other data stores within the application (like the places database) outside of sync.
...And 27 more matches
Index
MozillaTechXPCOMIndex
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.
... 113 detailed xpcom hashtable guide guide, xpcom a hashtable is a data construct that stores a set of items.
... 122 xpcom hashtable guide a hashtable is a data construct that stores a set of items.
...And 23 more matches
TypeScript support in Svelte - Learn web development
previous overview: client-side javascript frameworks next in the last article we learned about svelte stores and even implemented our own custom store to persist the app's information to web storage.
... update your <script> section to look like this: <script lang='ts'> import filterbutton from './filterbutton.svelte' import todo from './todo.svelte' import moreactions from './moreactions.svelte' import newtodo from './newtodo.svelte' import todosstatus from './todosstatus.svelte' import { alert } from '../stores' import { filter } from '../types/filter.enum' import type { todotype } from '../types/todo.type' export let todos: todotype[] = [] let todosstatus: todosstatus // reference to todosstatus instance $: newtodoid = todos.length > 0 ?
...in each case it should end up like this: import { selectonfocus } from '../actions' migrating the stores to typescript now we have to migrate the stores.js and localstore.js files to typescript.
...And 22 more matches
IME handling guide
when this receives an ecompositionchange, ecompositioncommit or ecompositioncommitasis event, it dispatches the event to the stored node which was the event target of ecompositionstart event.
... when this receives ecompositionchange or ecompositioncommit, this checks if new composition string (or committing string) is different from the last data stored by the textcomposition.
... one of the other important jobs of this is, when a focused editor handles a dispatched ecompositionchange event, this modifies the stored composition string and its clause information.
...And 21 more matches
Index
this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
... only nss is allowed to access and manipulate these database files directly; a programmer using nss must go through the apis offered by nss to manipulate the data stored in these files.
... most of the time certificates and keys are supposed to be stored in the nss database.
...And 21 more matches
Observer Notifications
sessionstore-windows-restored sent by the session restore process to indicate that all initial browser windows have opened.
... note that while the window are open and the chrome loaded the tabs in the windows may still be being restored after this notification.
... session store these topics are used when actions related to session store occur.
...And 21 more matches
Index - Archive of obsolete content
27 modules add-ons, extensions a module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface.
... 52 passwords add-on sdk interact with firefox's password manager to add, retrieve and remove stored credentials.
... 58 simple-prefs add-on sdk store preferences across application restarts.
...And 19 more matches
IDBDatabaseSync - Web APIs
method overview idbobjectstoresync createobjectstore (in domstring name, in domstring keypath, in optional boolean autoincrement) raises (idbdatabaseexception); idbobjectstoresync openobjectstore (in domstring name, in optional unsigned short mode) raises (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.
... objectstores readonly domstringlist the names of the object stores that exist in the connected database.
...And 19 more matches
Game distribution - Game development
this includes hosting it yourself online, submitting it to open marketplaces, and submitting it to closed ones like google play or the ios app store.
... direct link distribution and instant play you don't have to tell people to search for your game in an app store with html5 games.
... publishing the game there are three main options when it comes to publishing a game: self-hosting publishers stores remember that the name of your game should be unique enough to be quickly promoted later on, but also catchy enough, so people don't forget it.
...And 18 more matches
passwords - Archive of obsolete content
interact with firefox's password manager to add, retrieve and remove stored credentials.
... using this module you can: search for credentials which have been stored in the password manager.
... store credentials in the password manager.
...And 12 more matches
Index - MDN Web Docs Glossary: Definitions of Web-related terms
arrays are used to store multiple values in a single variable.
... this is compared to a variable that can store only one value.
...these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
...And 12 more matches
Bytecode Descriptions
resumekind is the generatorresumekind stored as an int32 value.
...it's treated as jump target op so that the baseline interpreter can efficiently restore the frame's interpretericentry when resuming a generator.
...resumekind must be a generatorresumekind stored as an int32 value.
...And 12 more matches
nsILoginManagerStorage
note: extensions that simply want to access/store logins should use the login manager service and nsiloginmanager interface instead.
... methods addlogin() called by the login manager to store a new login.
...findlogins() implement this method to search the login store for logins matching the specified criteria.
...And 12 more matches
simple-prefs - Archive of obsolete content
experimental store preferences across application restarts.
... you can store booleans, integers, and string values, and users can configure these preferences in the add-ons manager.
... type description example specification bool displayed as a checkbox and stores a boolean.
...And 11 more matches
Mozilla internal string guide
all strings are stored as a single contiguous buffer of characters.
...nsliteral[c]string is trivially constructible and destructible, and therefore does not emit construction/destruction code when stored in statics, as opposed to the other string classes.
...for example: // when passing a string to a method, use const nsastring& nsfoo::printstring(const nsastring &str); // when getting a string from a method, use nsastring& nsfoo::getstring(nsastring &result); the abstract classes are also sometimes used to store temporary references to objects.
...And 11 more matches
IDBDatabase - Web APIs
all objects in indexeddb — including object stores, indexes, and cursors — are tied to a particular transaction.
... idbdatabase.objectstorenames read only a domstringlist that contains a list of the names of the object stores currently in the connected database.
... idbdatabase.createmutablefile() creates a file handle, allowing files to be stored inside an indexeddb database.
...And 11 more matches
IDBIndex - Web APIs
WebAPIIDBIndex
an index is a kind of object store for looking up records in another object store, called the referenced object store.
... you can retrieve records in an object store through the primary key or by using an index.
... an index lets you look up records in an object store using properties of the values in the object stores records other than the primary key the index is a persistent key-value storage where the value part of its records is the key part of a record in the referenced object store.
...And 11 more matches
Checking when a deadline is due - Web APIs
in this article we look at a complex example involving checking the current time and date against a deadline stored via indexeddb.
... the main complication here is checking the stored deadline info (month, hour, day, etc.) against the current time and date taken from a date object.
... the main example application we will be referring to in this article is to-do list notifications, a simple to-do list application that stores task titles and deadline times and dates via indexeddb, and then provides users with notifications when deadline dates are reached, via the notification, and vibration apis.
...And 10 more matches
Key Values - Web APIs
vk_exit qt::key_exit (0x0102000a) "favoriteclear0" clears the program or content stored in the first favorites list slot.
... vk_clear_favorite_0 "favoriteclear1" clears the program or content stored in the second favorites list slot.
... vk_clear_favorite_1 "favoriteclear2" clears the program or content stored in the third favorites list slot.
...And 10 more matches
Cache-Control - HTTP
cache-control: max-age=<seconds> cache-control: max-stale[=<seconds>] cache-control: min-fresh=<seconds> cache-control: no-cache cache-control: no-store cache-control: no-transform cache-control: only-if-cached cache response directives standard cache-control directives that can be used by the server in an http response.
... cache-control: must-revalidate cache-control: no-cache cache-control: no-store cache-control: no-transform cache-control: public cache-control: private cache-control: proxy-revalidate cache-control: max-age=<seconds> cache-control: s-maxage=<seconds> extension cache-control directives extension cache-control directives are not part of the core http caching standards document.
... cache-control: immutable cache-control: stale-while-revalidate=<seconds> cache-control: stale-if-error=<seconds> directives cacheability a response is normally cached by the browser if: it has a status code of 301, 302, 307, 308, or 410 and cache-control does not have no-store, or if proxy, does not have private and authorization is unset either has a status code of 301, 302, 307, 308, or 410 or has public, max-age or s-maxage in cache-control or has expires set public the response may be stored by any cache, even if the response is normally non-cacheable.
...And 10 more matches
Transformations - Web APIs
restore() restores the most recently saved canvas state.
... canvas states are stored on a stack.
...each time the restore() method is called, the last saved state is popped off the stack and all saved settings are restored.
...And 9 more matches
IDBTransaction - Web APIs
is it readonly or readwrite), and you access an idbobjectstore to make a request.
...ce" 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.
... idbtransaction.mode read only the mode for isolating access to data in the object stores that are in the scope of the transaction.
...And 9 more matches
Caching compiled WebAssembly modules - WebAssembly
caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.
... caching via indexeddb indexeddb is a transactional database system that allows you to store and retrieve structured data on the client-side.
...additionally, it handles creating a database to cache the compiled wasm modules in, attempts to store new modules in the database, and retrieves previously cached modules from the database, saving you from having to download them again.
...And 9 more matches
JavaScript basics - Learn web development
you did this by using a function called queryselector() to grab a reference to your heading, and then store it in a variable called myheading.
... variables variables are containers that store values.
... let myvariable = true; array this is a structure that allows you to store multiple values in a single reference.
...And 8 more matches
Introduction to the server side - Learn web development
most large-scale websites use server-side code to dynamically display different data when needed, generally pulled out of a database stored on a server and sent to the client to be displayed via some code (e.g.
...it can also make sites easier to use by storing personal preferences and information — for example reusing stored credit card details to streamline subsequent payments.
... a dynamic site can return different data for a url based on information provided by the user or stored preferences and can perform other operations as part of returning a response (e.g.
...And 8 more matches
nsIFaviconService
toolkit/components/places/public/nsifaviconservice.idlscriptable stores favicons for pages in bookmarks and history.
...for a normal page with a favicon we've stored, this will be an annotation uri which will then cause the corresponding favicon data to be loaded from this service.
...for a normal page with a favicon we've stored, this will be an annotation uri which will then cause the corresponding favicon data to be loaded from this service.
...And 8 more matches
WebIDL bindings
acallback.setsomenumber(2*number, rv, erethrowexceptions); if (rv.failed()) { // the exception is now stored on rv.
...this guarantees that a void* can be stored in the jsobject which can then be reinterpret_cast to any of the classes that correspond to interfaces the object implements.
... typed arrays store a jsobject* and hence need to be rooted properly.
...And 8 more matches
IDBDatabase.transaction() - Web APIs
the transaction method of the idbdatabase interface immediately returns a transaction object (idbtransaction) containing the idbtransaction.objectstore method, which you can use to access your object store.
... syntax idbdatabase.transaction(storenames); idbdatabase.transaction(storenames, mode); parameters "durability" -- the durability constrints for the transction.
... storenames the names of object stores that are in the scope of the new transaction, declared as an array of strings.
...And 8 more matches
IDBIndexSync - Web APIs
storename readonly domstring this index's referenced object store.
... methods add() stores the given value into this index, optionally with the specified key.
... any add( in any value, in optional any key ) raises (idbdatabaseexception); parameters returns exceptions this method can raise a idbdatabaseexception with the following code: value the value to store into the index.
...And 8 more matches
Understanding WebAssembly text format - WebAssembly
webassembly contains instructions like i32.load and i32.store for reading and writing from linear memory.
... webassembly could add an anyfunc type ("any" because the type could hold functions of any signature), but unfortunately this anyfunc type couldn’t be stored in linear memory for security reasons.
... linear memory exposes the raw contents of stored values as bytes and this would allow wasm content to arbitrarily observe and corrupt raw function addresses, which is something that cannot be allowed on the web.
...And 8 more matches
JSAPI User Guide
all of these functions, classes, and variables are stored as properties of the global object.
...the native function uses js_convertarguments to convert the arguments to c++ types and store them in local variables.
... the native function uses js_set_rval(cx, vp, val) to store its javascript return value.
...And 7 more matches
Browser storage limits and eviction criteria - Web APIs
there are a number of web technologies that store data of one kind or another on the client-side (i.e., on your local disk).
...opera mini (still presto-based, server-side rendering) doesn't store any data on the client.
... in firefox, the following technologies make use of browser data storage to store data when required.
...And 7 more matches
IndexedDB API - Web APIs
if you'd prefer a simple api, try libraries such as localforage, dexie.js, zangodb, pouchdb, idb, idb-keyval, jsstore and lovefield that make indexeddb more programmer-friendly.
...indexeddb lets you store and retrieve objects that are indexed with a key; any objects supported by the structured clone algorithm can be stored.
...so while you can access stored data within a domain, you cannot access data across different domains.
...And 7 more matches
HTTP caching - HTTP
WebHTTPCaching
different kinds of caches caching is a technique that stores a copy of a given resource and serves it back when requested.
... when a web cache has a requested resource in its store, it intercepts the request and returns its copy instead of re-downloading from the originating server.
...a shared cache is a cache that stores responses for reuse by more than one user.
...And 7 more matches
DataView - JavaScript
dataview.prototype.setint8() stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the view.
... dataview.prototype.setuint8() stores an unsigned 8-bit integer (unsigned byte) value at the specified byte offset from the start of the view.
... dataview.prototype.setint16() stores a signed 16-bit integer (short) value at the specified byte offset from the start of the view.
...And 7 more matches
Storing annotations - Archive of obsolete content
now we are able to create annotations, let's store them using the simple-storage module.
... first, import the simple-storage module with a declaration like: var simplestorage = require('sdk/simple-storage'); in the module scope, initialize an array which will contain the stored annotations: if (!simplestorage.storage.annotations) simplestorage.storage.annotations = []; now we'll add a function to the module scope which deals with a new annotation.
... } this function calls a constructor for an annotation object, which we also need to supply: function annotation(annotationtext, anchor) { this.annotationtext = annotationtext; this.url = anchor[0]; this.ancestorid = anchor[1]; this.anchortext = anchor[2]; } now we need to link this code to the annotation editor, so that when the user presses the return key in the editor, we create and store the new annotation: var annotationeditor = panels.panel({ width: 220, height: 220, contenturl: data.url('editor/annotation-editor.html'), contentscriptfile: data.url('editor/annotation-editor.js'), onmessage: function(annotationtext) { if (annotationtext) handlenewannotation(annotationtext, this.annotationanchor); annotationeditor.hide(); }, onshow: function() { t...
...And 6 more matches
Introduction to Public-Key Cryptography - Archive of obsolete content
proper implementation does not store passwords in plaintext.
... instead it concatenates the password with a random per-user value (so called "salt") and stores the hash value of the result along with the salt.
...(for a detailed discussion of the way this works, see "introduction to ssl.") at this point the server may optionally perform other authentication tasks, such as checking that the certificate presented by the client is stored in the user's entry in an ldap directory.
...And 6 more matches
Fetching data from the server - Learn web development
to speed things up even further, some sites also store assets and data on the user's computer when they are first requested, meaning that on subsequent visits they use the local versions instead of downloading fresh copies when the page is first loaded.
...this stores a reference to the <select> and <pre> elements in constants and defines an onchange event handler function so that when the select's value is changed, its value is passed to an invoked function updatedisplay() as a parameter.
...note that you could also choose to store your promise in a variable and chain .then() onto that instead.
...And 6 more matches
A first splash into JavaScript - Learn web development
the place where we'll be adding all our code is inside the <script> element at the bottom of the html: <script> // your javascript goes here </script> adding variables to store our data let's get started.
...) + 1; const guesses = document.queryselector('.guesses'); const lastresult = document.queryselector('.lastresult'); const loworhi = document.queryselector('.loworhi'); const guesssubmit = document.queryselector('.guesssubmit'); const guessfield = document.queryselector('.guessfield'); let guesscount = 1; let resetbutton; this section of the code sets up the variables and constants we need to store the data our program will use.
...constants are used to store values that are immutable or can't be changed and are created with the keyword const.
...And 6 more matches
Arrays - Learn web development
here we look at why this is useful, then explore how to create an array, retrieve, add, and remove items stored in an array, and more besides.
... arrays are generally described as "list-like objects"; they are basically single objects that contain multiple values stored in a list.
... array objects can be stored in variables and dealt with in much the same way as any other type of value, the difference being that we can access each value inside the list individually, and do super useful and efficient things with the list, like loop through it and do the same thing to every value.
...And 6 more matches
NSS Sample Code Sample1
this program shows the following: rsa key pair generation naming rsa key pairs looking up a previously generated key pair by name creating aes and mac keys (or encryption and mac keys in general) wrapping symmetric keys using your own rsa key pair so that they can be stored on disk or in a database.
... as an alternative to token symmetric keys as a way to store large numbers of symmetric keys wrapping symmetric keys using an rsa key from another server unwrapping keys using your own rsa key pair the main part of the program shows a typical sequence of events for two servers that are trying to extablish a shared key pair.
...(currently nss doesn't store persistant keys.
...And 6 more matches
Detailed XPCOM hashtable guide
a hashtable is a data construct that stores a set of items.
...you can store entries with keys 1, 5, and 3000).
... lookup time: o(1): lookup time is a simple constant o(1): lookup time is mostly-constant, but the constant time can be larger than an array lookup sorting: sorted: stored sorted; iterated over in a sorted fashion.
...And 6 more matches
nsIDocShell
method overview void addsessionstorage(in nsiprincipal principal, in nsidomstorage storage); void addstate(in nsivariant adata, in domstring atitle, in domstring aurl, in boolean areplace); void beginrestore(in nsicontentviewer viewer, in boolean top); void createaboutblankcontentviewer(in nsiprincipal aprincipal); void createloadinfo(out nsidocshellloadinfo loadinfo); void detacheditorfromwindow(); violates the xpcom interface guidelines void finishrestore(); void firepagehidenotification(in boolean isunload); native code only!
... beginrestore() begin firing webprogresslistener notifications for restoring a page presentation.
...void beginrestore( in nsicontentviewer viewer, in boolean top ); parameters viewer the content viewer whose document we are starting to load.
...And 6 more matches
WebGLRenderingContext.getParameter() - Web APIs
l.max_uniform_block_size glint64 gl.max_uniform_buffer_bindings glint gl.max_varying_components glint gl.max_vertex_output_components glint gl.max_vertex_uniform_blocks glint gl.max_vertex_uniform_components glint gl.min_program_texel_offset glint gl.pack_row_length glint see pixelstorei.
... gl.pack_skip_pixels glint see pixelstorei.
... gl.pack_skip_rows glint see pixelstorei.
...And 6 more matches
Using HTTP cookies - HTTP
WebHTTPCookies
the browser may store it and send it back with later requests to the same server.
...while this was legitimate when they were the only way to store data on the client, it is now recommended to use modern storage apis.
... to see stored cookies (and other storage that a web page can use), you can enable the storage inspector in developer tools and select cookies from the storage tree.
...And 6 more matches
Keyed collections - JavaScript
objects allow you to set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
... use maps if there is a need to store primitive values as keys because object treats each key as a string whether it's a number value, boolean value or any other primitive value.
... one use case of weakmap objects is to store private data for an object, or to hide implementation details.
...And 6 more matches
Image file type and format guide - Web media technologies
theoretically, several compression algorithms are supported, and the image data can also be stored in jpeg or png format within the bmp file.
... another popular feature of gif is support for interlacing, where rows of pixels are stored out of order so that partially-received files can be displayed in lower quality.
... tiff (tagged image file format) tiff is a raster graphics file format which was created to store scanned photos, although it can be any kind of image.
...And 6 more matches
simple-storage - Archive of obsolete content
lets an add-on store data so that it's retained across firefox restarts.
... to store a value, just assign it to a property on storage: var ss = require("sdk/simple-storage"); ss.storage.myarray = [1, 1, 2, 3, 5, 8, 13]; ss.storage.myboolean = true; ss.storage.mynull = null; ss.storage.mynumber = 3.1337; ss.storage.myobject = { a: "foo", b: { c: true }, d: null }; ss.storage.mystring = "o frabjous day!"; you can store array, boolean, number, object, null, and string values.
... if you'd like to store other types of values, you'll first have to convert them to strings or another one of these types.
...And 5 more matches
XUL Structure - Archive of obsolete content
by default, mozilla applications parse xul files and scripts, and store a pre-compiled version in memory for the remainder of the application session.
...each part is stored in a different directory.
...these are stored in xul files, which have a .xul extension.
...And 5 more matches
Manipulating documents - Learn web development
imagine if a web site could get access to your stored passwords or other sensitive information, and log into websites as if it were you?
...using methods available on this object you can do things like return the window's size (see window.innerwidth and window.innerheight), manipulate the document loaded into that window, store data specific to that document on the client-side (for example using a local database or other storage mechanism), attach an event handler to the current window, and more.
... to manipulate an element inside the dom, you first need to select it and store a reference to it inside a variable.
...And 5 more matches
PKCS11 FAQ
MozillaProjectsNSSPKCS11FAQ
if no new sessions are available, the one read-only session is used, and the state is saved and restored after each multipart operation.
...nss itself uses two tokens internally--one that provides generic cryptographic services without authentication, and one that provides operations based on the keys stored in the user's database and do need authentication.
...much of nss's token selection is based on where the key involved is currently stored.
...And 5 more matches
NSS tools : certutil
some smart cards (for example, the litronic card) can store only one key pair.
... creating new security databases certificates, keys, and security modules related to managing certificates are stored in three related databases: * cert8.db or cert9.db * key3.db or key4.db * secmod.db or pkcs11.txt these databases must be created before certificates or keys can be generated.
...this can be done by specifying a ca certificate (-c) that is stored in the certificate database.
...And 5 more matches
certutil
some smart cards (for example, the litronic card) can store only one key pair.
... creating new security databases certificates, keys, and security modules related to managing certificates are stored in three related databases: o cert8.db or cert9.db o key3.db or key4.db o secmod.db or pkcs11.txt these databases must be created before certificates or keys can be generated.
...this can be done by specifying a ca certificate (-c) that is stored in the certificate database.
...And 5 more matches
Using the Places history service
differences from previous implementations the previous nsglobalhistory service stored one entry for each page in history.
...the main url table stores the information about the page: url, host name, title, visit count, hidden, and typed.
... stored separately is the information specific to each visit.
...And 5 more matches
nsICache
store_anywhere 0 the storage policy of a cache entry determines the device(s) to which it belongs.
...allows the cache entry to be stored in any device.
... the cache service decides which cache device to use based on "some resource management calculation." store_in_memory 1 the storage policy of a cache entry determines the device(s) to which it belongs.
...And 5 more matches
nsISessionStartup
browser/components/sessionstore/nsisessionstartup.idlscriptable handles the session restore process.
...to use this service, use: var sessionstartup = components.classes["@mozilla.org/browser/sessionstartup;1"] .getservice(components.interfaces.nsisessionstartup); method overview boolean dorestore(); attributes attribute type description sessiontype unsigned long the type of session being restored; this will be one of the session type constants.
...it will either be restored or about:sessionrestore will be displayed.
...And 5 more matches
Mail composition back end
a "sent" folder) as well as the ability to store messages for features like "drafts" and "templates".
... 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.
...the determiniation of which folder is the "sent" folder for the user is done by a call to getfolderswithflag() and the message store will control this user defined preference.
...And 5 more matches
Working with windows in chrome code
of course, this doesn't matter if you just store data in the component.
... you can store arbitrary javascript objects in the component.
...of course, this doesn't matter if you just store data in the component.
...And 5 more matches
FileHandle API - Web APIs
because the files manipulated through that api can be physically stored on the device, the editing part uses a turn-based locking mechanism in order to avoid race issues.
...if you want a file to survive a page refresh/app relaunch, you need to store the handle in a more permanent location, like the database itself.
...if you want a file to survive a page refresh/app relaunch, you need to store the handle in a database (not necessarily the one used to create the filehandle object).
...And 5 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 5 more matches
Using the Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can securely store key/value pairs.
... basic concepts storage objects are simple key-value stores, similar to objects, but they stay intact through page loads.
...these three lines all set the (same) colorsetting entry: localstorage.colorsetting = '#a4509b'; localstorage['colorsetting'] = '#a4509b'; localstorage.setitem('colorsetting', '#a4509b'); note: it's recommended to use the web storage api (setitem, getitem, removeitem, key, length) to prevent the pitfalls associated with using plain objects as key-value stores.
...And 5 more matches
Using the WebAssembly JavaScript API - WebAssembly
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.
... in this memory model, any load or store can access any byte in the entire linear memory, which is necessary to faithfully represent c/c++ concepts like pointers.
... 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.
...And 5 more matches
jspage - Archive of obsolete content
"unload",n);l();};}else{h[this.uid]=this;}if(this.addeventlistener){this.addeventlistener(o,n,false);}else{this.attachevent("on"+o,n); }return this;},removelistener:function(m,l){if(this.removeeventlistener){this.removeeventlistener(m,l,false);}else{this.detachevent("on"+m,l);}return this; },retrieve:function(m,l){var o=c(this.uid),n=o[m];if(l!=undefined&&n==undefined){n=o[m]=l;}return $pick(n);},store:function(m,l){var n=c(this.uid);n[m]=l; return this;},eliminate:function(l){var m=c(this.uid);delete m[l];return this;}});window.addlistener("unload",d);})();element.properties=new hash;element.properties.style={set:function(a){this.style.csstext=a; },get:function(){return this.style.csstext;},erase:function(){this.style.csstext="";}};element.properties.tag={get:function(){return this.tagname.tol...
...es(a);}};element.properties.opacity={set:function(a,b){if(!b){if(a==0){if(this.style.visibility!="hidden"){this.style.visibility="hidden"; }}else{if(this.style.visibility!="visible"){this.style.visibility="visible";}}}if(!this.currentstyle||!this.currentstyle.haslayout){this.style.zoom=1;}if(browser.engine.trident){this.style.filter=(a==1)?"":"alpha(opacity="+a*100+")"; }this.style.opacity=a;this.store("opacity",a);},get:function(){return this.retrieve("opacity",1);}};element.implement({setopacity:function(a){return this.set("opacity",a,true); },getopacity:function(){return this.get("opacity");},setstyle:function(b,a){switch(b){case"opacity":return this.set("opacity",parsefloat(a));case"float":b=(browser.engine.trident)?"stylefloat":"cssfloat"; }b=b.camelcase();if($type(a)!="string"){var c=(ele...
...render(this.element,b,a,this.options.unit);return this;},start:function(c,e,d){if(!this.check(c,e,d)){return this; }var b=array.flatten(arguments);this.property=this.options.property||b.shift();var a=this.prepare(this.element,this.property,b);return this.parent(a.from,a.to); }});element.properties.tween={set:function(a){var b=this.retrieve("tween");if(b){b.cancel();}return this.eliminate("tween").store("tween:options",$extend({link:"cancel"},a)); },get:function(a){if(a||!this.retrieve("tween")){if(a||!this.retrieve("tween:options")){this.set("tween",a);}this.store("tween",new fx.tween(this,this.retrieve("tween:options"))); }return this.retrieve("tween");}};element.implement({tween:function(a,c,b){this.get("tween").start(arguments);return this;},fade:function(c){var e=this.get("tween"),d="opacit...
...And 4 more matches
Silly story generator - Learn web development
this gives you three variables that store references to the "enter custom name" text field (customname), the "generate random story" button (randomize), and the <p> element at the bottom of the html body that the story will be copied into (story), respectively.
... in addition you've got a function called randomvaluefromarray() that takes an array, and returns one of the items stored inside the array at random.
...we'd like you to contain these inside variables inside main.js: store the first, big long, string of text inside a variable called storytext.
...And 4 more matches
Storing the information you need — Variables - Learn web development
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.
...this is obviously really inefficient (the code is a lot bigger, even for only five choices), and it just wouldn't work — you couldn't possibly store all possible choices.
...you can think of them being like little cardboard boxes that you can store things in.
...And 4 more matches
Working with JSON - Learn web development
objective: to understand how to work with data stored in json, and create your own json objects.
... a json object can be stored in its own file, which is basically just a text file with an extension of .json, and a mime type of application/json.
...at the moment it only contains two lines, which grab references to the <header> and <section> elements and store them in variables: const header = document.queryselector('header'); const section = document.queryselector('section'); we have made our json data available on our github, at https://mdn.github.io/learning-area/javascript/oojs/json/superheroes.json.
...And 4 more matches
Server-side web frameworks - Learn web development
abstract and simplify database access websites use databases to store information both to be shared with users, and about users.
...this makes it easier and safer to check that data is stored in the correct type of database field, has the correct format (e.g.
...the model specifies the field types to be stored, which may provide field-level validation on what information can be stored (e.g.
...And 4 more matches
Componentizing our Svelte app - Learn web development
handling the events we'll need one variable to track whether we are in editing mode and another to store the name of the task being updated.
... add the following set of functions below your previous function to handle these actions: function oncancel() { name = todo.name // restores name to its initial value and editing = false // and exit editing mode } function onsave() { update({ name: name }) // updates todo name editing = false // and exit editing mode } function onremove() { dispatch('remove', todo) // emit remove event } function onedit() { editing = true // en...
... the <input>'s value property will be bound to the name variable, and the buttons to cancel and save the changes call oncancel() and onsave() respectively (we added those functions earlier): when oncancel() is invoked, name is restored to its original value (when passed in as a prop) and we exit editing mode (by setting editing to false).
...And 4 more matches
CustomizableUI.jsm
note that customizableui won't restore state in the area, allow the user to customize it in customize mode, or otherwise deal with it, until the area has been registered.
... furthermore, by default the placements of the area will be kept in the saved state (!) and restored if you re-register the area at a later point.
... if the area to which you try to add has not yet been restored from its legacy state (currentset attribute), this will postpone the addition.
...And 4 more matches
Web Replay
the rewind infrastructure allows a replaying process to restore a previous state, while still maintaining communication with the chrome process.
... snapshot data may be stored in memory or on disk.
... the dirty memory information computed since the last snapshot was taken is used to restore the heap to the state at that last snapshot, and then the memory diffs can be used to restore an earlier snapshot if necessary.
...And 4 more matches
Places utilities for JavaScript
description_anno - this annotation stores description information about a bookmark.
... post_data_anno - i need to clarify here, but i think this is the name of the annotation that stores information for keyword searches from a bookmark.
... tagsfolderid the folder that tags are stored in.
...And 4 more matches
imgIContainer
as a service: var imgicontainer = components.classes["@mozilla.org/????????????????????????????"] .createinstance(components.interfaces.imgicontainer); method overview void addrestoredata([array, size_is(acount), const] in char data, in unsigned long acount); native code only!
...in print32 aheight, in imgicontainerobserver aobserver); obsolete since gecko 2.0 void lockimage(); void removeframe(in gfxiimageframe item); obsolete since gecko 1.9.2 void requestdecode(); void requestdiscard(); void requestrefresh([const] in timestamp atime); violates the xpcom interface guidelines void resetanimation(); void restoredatadone(); native code only!
... obsolete since gecko 2.0 kdisposerestoreprevious 3 restore the previous(composited) frame.
...And 4 more matches
nsIAnnotationService
toolkit/components/places/public/nsiannotationservice.idlscriptable stores arbitrary data about a web page.
...favicons are stored in the favicon service, but are special cased in the protocol handler so they look like annotations.
...favicons are stored in the favicon service, but are special cased in the protocol handler so they look like annotations.
...And 4 more matches
nsILoginManager
id modifylogin(in nsilogininfo oldlogin, in nsisupports newlogindata); void removealllogins(); void removelogin(in nsilogininfo alogin); void searchlogins(out unsigned long count, in nsipropertybag matchdata, [retval, array, size_is(count)] out nsilogininfo logins); void setloginsavingenabled(in astring ahost, in boolean isenabled); methods addlogin() stores a new login in the login manager.
... void addlogin( in nsilogininfo alogin ); parameters alogin the login to store.
... exceptions thrown an exception is thrown if the login information is already stored in the login manager.
...And 4 more matches
nsIMsgFolder
ubfolder(in astring foldername); void createstorageifmissing(in nsiurllistener urllistener); void compact(in nsiurllistener alistener, in nsimsgwindow amsgwindow); void compactall(in nsiurllistener alistener, innsimsgwindow amsgwindow,in nsisupportsarray afolderarray, in boolean acompactofflinealso,in nsisupportsarray aofflinefolderarray); void compactallofflinestores(in nsimsgwindow amsgwindow,in nsisupportsarray aofflinefolderarray); void emptytrash(in nsimsgwindow 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); ...
...simsgthread thread); void setlabelformessages(in nsisupportsarray messages, in nsmsglabelvalue label); nsimsgdatabase getmsgdatabase(in nsimsgwindow msgwindow); void setmsgdatabase(in nsimsgdatabase msgdatabase); nsimsgdatabase getdbfolderinfoanddb(out nsidbfolderinfo folderinfo); nsimsgdbhdr getmessageheader(in nsmsgkey msgkey); boolean shouldstoremsgoffline(in nsmsgkey msgkey); boolean hasmsgoffline(in nsmsgkey msgkey); nsiinputstream getofflinefilestream(in nsmsgkey msgkey, out pruint32 offset, out pruint32 size); void downloadmessagesforoffline(in nsisupportsarray messages, in nsimsgwindow window); nsimsgfolder getchildwithuri(in acstring uri, in boolean deep, in boolean caseinsensitive); void...
... nsmsgkey 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 nsimsgdownloadsettin...
...And 4 more matches
nsITextInputProcessor
when this dispatches a normal modifier key event, the textinputprocessor instance activates the modifier state and stores its code attribute value.
... activating normal modifier state when keydown() is called with normal modifier key (i.e., not lockable like capslock) event, the instance stores the modifier key and code values.
... stored modifier key information means that the modifier is active.
...And 4 more matches
IndexedDB - Firefox Developer Tools
object stores — the number of object stores in the database.
... when an indexeddb database is selected in the storage tree, details about all the object stores are listed in the table.
... any object store has the following details: object store name — the name of the object store.
...And 4 more matches
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.
... syntax var anidbrequest = myidbcursor.update(value); parameters value the new value to be stored at the current position.
... dataerror the underlying object store uses in-line keys and the property in the value at the object store's key path does not match the key in this cursor's position.
...And 4 more matches
IDBRequest.transaction - Web APIs
if a version upgrade is needed when opening a database then during the upgradeneeded event handler the transaction property will be an idbtransaction with mode equal to "versionchange", and can be used to access existing object stores and indexes, or abort the the upgrade.
... example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store in another 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 request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data);...
...And 4 more matches
Storage API - Web APIs
the storage standard defines a common, shared storage system to be used by all apis and technologies that store content-accessible data for individual web sites.
... site storage—the data stored for a web site which is managed by the storage standard—includes: indexeddb databases cache api data service worker registrations web storage api data managed using window.localstorage history state information saved using history.pushstate() application caches notification data other kinds of site-accessible, site-specific data that may be maintained site storage units the site storage system described by the storage standard and interacted wi...
...the diagram below shows a site storage pool with three storage units within, showing how storage units can have different data types stored within and may have different quotas (maximum storage limits).
...And 4 more matches
WebGLRenderingContext.vertexAttribPointer() - Web APIs
first, we need to bind the webglbuffer we want to use to gl.array_buffer, then, with this method, gl.vertexattribpointer(), we specify in what order the attributes are stored, and what data type they are in.
...this is independent from the location inside the array buffer, so your attributes can be sent in a different order than how they are stored in the array buffer.
...keep in mind that these webgl functions have a slow performance and it is better to store the state inside your javascript application.
...And 4 more matches
WebGL constants - Web APIs
less 0x0201 passed to depthfunction or stencilfunction to specify depth or stencil tests will pass if the new depth value is less than the stored value.
... equal 0x0202 passed to depthfunction or stencilfunction to specify depth or stencil tests will pass if the new depth value is equals to the stored value.
... lequal 0x0203 passed to depthfunction or stencilfunction to specify depth or stencil tests will pass if the new depth value is less than or equal to the stored value.
...And 4 more matches
Enhanced Extension Installation - Archive of obsolete content
c:\program files\mozilla firefox\extensions extension metadata the extension system stores metadata in both of the two locations, in the following files: <location>/extensions/extensions.rdf - an xml/rdf datasource listing all the extensions installed at that location.
... in the profile directory, the file compatibility.ini stores information about the version of the application (build info) that last started this profile - during startup this file is checked and if the version info held by the running app disagrees with the info held by this file, a compatibility check is run on all installed items.
...this boolean relationship itself is not stored directly in the datasource.
...And 3 more matches
Inline options - Archive of obsolete content
here is an example of an options.xul file: <?xml version="1.0"?> <!doctype mydialog system "chrome://myaddon/locale/mydialog.dtd"> <vbox xmlns="http://www.mozilla.org/keymaster/gatekeeper/there.is.only.xul"> <setting type="bool" pref="extensions.myaddon.bool" title="boolean" desc="stored as a boolean preference" /> </vbox> note that it's limited to <setting> tags.
... setting types there are several types of <setting>s, each with a different type attribute: type attribute displayed as preference stored as bool checkbox boolean boolint checkbox integer (use the attributes on and off to specify what values to store) integer textbox integer string textbox string color colorpicker string (in the #123456 format) file browse button and label string directory browse button and label string menulist menulist dependent on the menu item values radio radio buttons dependent...
... on the radio values control button no pref stored the pref attribute should have the full name of the preference to be stored.
...And 3 more matches
Handling Preferences - Archive of obsolete content
preferences are used to store settings and information to change their default behavior.
...the following files are used: default preferences: these are stored in the directory defaults/pref in the firefox installation directory.
... current preferences: these are stored in the profile directory with the name prefs.js.
...And 3 more matches
Drag and Drop JavaScript Wrapper - Archive of obsolete content
this drag and drop interface is stored in the global package, in the file chrome://global/content/nsdraganddrop.js.
...<script src="chrome://global/content/nsdraganddrop.js" /> <script src="chrome://global/content/nstransferable.js" /> this drag and drop library creates an object stored in the variable nsdraganddrop.
...in the above examples, this observer is stored in the buttonobserver and textobserver variables.
...And 3 more matches
Table Cellmap - Border Collapse - Archive of obsolete content
introduction this document describes the additional information that is stored for border collapse tables in the cellmap.
... information storage each cellmap entry stores for tables in the border collapse mode additional information about its top and left edge and its top left corner.
... only the right most edge and the bottom most edge of a table need to be stored in a different place.
...And 3 more matches
Adding Properties to XBL-defined Elements - Archive of obsolete content
the example below creates a button which generates and stores a random number.
...box" class="randomizer"/> <button label="generate" oncommand="document.getelementbyid('random-box').number=math.random();"/> <button label="show" oncommand="alert(document.getelementbyid('random-box').number)"/> xbl: <binding id="randomizer"> <implementation> <field name="number"/> </implementation> </binding> a number field has been defined in the binding, which stores the random number.
...this script should store the value somewhere, or validate the value.
...And 3 more matches
Profile Manager
firefox and other xulrunner applications store user settings and data in special folders, called profiles.
... this is the easiest way to backup and restore profiles.
... the profile will be backed up, and the backup will appear under the backups column in the main display: to restore a profile: select the backup in the main display, open the context menu, and choose "restore".
...And 3 more matches
GC Rooting Guide
gc things on the stack js::rooted<t> all gc thing pointers stored on the stack (i.e., local variables and parameters to functions) must use the js::rooted<t> class.
... these do not need to be wrapped in any of rooting classes, but they should be immediately used to initialize a js::rooted<t> if there is any code that could gc before the end of the containing function; a raw pointer must never be stored on the stack during a gc.
...what will happen is that the return statement will pull the bare jsobject* out of the rooted obj variable and either put it in the stack or store it in the return value register.
...And 3 more matches
Exact Stack Rooting
the method you should use to keep the gc up-to-date with this information will vary depending on where the gcpointer is being stored.
... gcpointers can be stored as a property of a gcthing, on the cheap, or in the cstack.
...if you see a gcpointer stored as a private, please file a bug.
...And 3 more matches
XPCOM Stream Guide
MozillaTechXPCOMGuideStreams
on the other hand, we use streams to access files within a zip archive, to store and provide data coming from websites, even to talk to other programs on the same computer through "pipes" (more on that later).
... nsmimeinputstream @mozilla.org/network/mime-input-stream;1 nsimimeinputstream .setdata(stream) similarly, there are complex output streams which build from primitive output streams: complex output stream types type purpose native class contract id interface how to bind to a primitive output stream buffered store data in a buffer until the buffer is full or the stream closes.
.../scriptableinputstream;1", "nsiscriptableinputstream", "init"); function buildstream(data) { return new stringstream(data, data.length); } components.utils.import("resource://gre/modules/netutil.jsm"); function run_test() { var check = "we will rock you!"; var baseinputstream = buildstream(check); var store = components.classes["@mozilla.org/storagestream;1"] .createinstance(components.interfaces.nsistoragestream); /* in practice, your storage streams shouldn't be this small.
...And 3 more matches
nsIDOMStorage
items stored in session storage may be accessed by any interested party in the same browsing context.
...a storage object stores an arbitrary set of key-value pairs, which may be retrieved, modified and removed as needed.
...keys are stored in a particular order with the condition that this order not change by merely changing the value associated with a key, but the order may change when a key is added or removed.
...And 3 more matches
nsIMsgIncomingServer
calpath); void setfilevalue(in string relpref, in string abspref, in nsilocalfile avalue); void setfilterlist(in nsimsgfilterlist afilterlist); void setintattribute(in string 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.
... limitofflinemessagesize boolean localpath nsilocalfile localstoretype acstring the schema for the local mail store, such as "mailbox", "imap", or "news" used to construct uris.
... loginatstartup boolean logonfallback boolean maxmessagesize long offlinesupportlevel long password acstring passwordpromptrequired boolean if the password for the server is available either via authentication in the current session or from password manager stored entries, return false.
...And 3 more matches
nsIPasswordManager
ng 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.
... methods adduser() stores a password.
... astring adduser(in autf8string ahost, in astring auser, in astring apassword); parameters ahost the hostname of the password to store.
...And 3 more matches
nsIPlacesImportExportService
"bookmarks-restore-begin" is fired just before the import is started.
... "bookmarks-restore-success" is fired right after the bookmarks are successfully imported.
... "bookmarks-restore-failed" is fired right after a failure occurs when importing the bookmarks.
...And 3 more matches
Drawing and Event Handling - Plugins
note: when a plug-in is drawn to a window, the plug-in is responsible for preserving state information and ensuring that the original state is restored.
... however, for the plug-in to draw at any other time, for example, to highlight on a mouse-down event or draw animation at idle time, it must save the current setting of the port, set up its drawing environment as appropriate, draw, and then restore the port to the previous settings.
... in this case, the plug-in makes it unnecessary for the browser to save and restore its port settings before and after every call into the plug-in.
...And 3 more matches
IDBCursor - Web APIs
WebAPIIDBCursor
the cursor has a source that indicates which index or object store it is iterating over.
...operations are performed on the underlying index or object store.
... idbcursor.source read only returns the idbobjectstore or idbindex that the cursor is iterating.
...And 3 more matches
IDBTransactionSync - Web APIs
method overview void abort() raises (idbdatabaseexception); void commit() raises (idbdatabaseexception); idbobjectstoresync objectstore(in domstring name) raises (idbdatabaseexception); attributes attribute type description db idbdatabasesync the database connection that this transaction is associated with.
...when this method is called, the browser durably stores all the changes performed to the objects of the database since this transaction was created.
... objectstore() returns an object store that has already been added to the scope of this transaction.
...And 3 more matches
WebGLRenderingContext.bufferData() - Web APIs
the webglrenderingcontext.bufferdata() method of the webgl api initializes and creates the buffer object's data store.
... size a glsizeiptr setting the size in bytes of the buffer object's data store.
... srcdata optional an arraybuffer, sharedarraybuffer or one of the arraybufferview typed array types that will be copied into the data store.
...And 3 more matches
Web Storage API - Web APIs
the web storage api provides mechanisms by which browsers can store key/value pairs, in a much more intuitive fashion than using cookies.
... web storage concepts and usage the two mechanisms within web storage are as follows: sessionstorage maintains a separate storage area for each given origin that's available for the duration of the page session (as long as the browser is open, including page reloads and restores) stores data only for a session, meaning that the data is stored until the browser (or tab) is closed.
... stores data with no expiration date, and gets cleared only through javascript, or clearing the browser cache / locally stored data.
...And 3 more matches
HTTP Index - HTTP
WebHTTPIndex
the browser may store it and send it back with the next request to the same server.
...it allows web developers to have more control over the data stored locally by a browser for their origins.
... 94 csp: report-to csp, content security policy, content-security-policy, http, reporting, security, report-to the content-security-policy report-to http response header field instructs the user agent to store reporting endpoints for an origin.
...And 3 more matches
Atomics - JavaScript
atomics.compareexchange() stores a value at the specified index of the array, if it equals a value.
... atomics.exchange() stores a value at the specified index of the array.
... atomics.store() stores a value at the specified index of the array.
...And 3 more matches
WebAssembly.Table - JavaScript
the webassembly.table() object is a javascript wrapper object — an array-like structure representing a webassembly table, which stores function references.
... note: tables can currently only store function references, but this will likely be expanded in the future.
... instance methods table.prototype.get() accessor function — gets the element stored at a given index.
...And 3 more matches
Web audio codec guide - Web media technologies
s audio codec mp4, ogg, flac g.711 pulse code modulation (pcm) of voice frequencies rtp / webrtc g.722 7 khz audio coding within 64 kbps (for telephony/voip) rtp / webrtc mp3 mpeg-1 audio layer iii mp4, adts, mpeg1, 3gp opus opus webm, mp4, ogg vorbis vorbis webm, ogg [1] when mpeg-1 audio layer iii codec data is stored in an mpeg file, and there is no video track on the file, the file is typically referred to as an mp3 file, even though it's still an mpeg format file.
... lfe channels are specifically designed to store low-frequency audio data, and are commonly used to provide audio data for subwoofers, for example.
... amr audio which is stored in files may simply be typed .amr, but may also be encapsulated in .3gp files.
...And 3 more matches
Chapter 3: Introduction to XUL—How to build a more intuitive UI - Archive of obsolete content
persist the persist attribute is an easy way to record and store a xul element’s state after it has been changed by a user operation.
... enter the names of the other attributes whose values you want to store as a space-delimited ascii string into the value for persist; the next time that xul document is opened, the saved values will automatically be restored4.
... note: these values are stored in localstore.rdf, inside the user profile.
...And 2 more matches
Promises - Archive of obsolete content
the jsonstore object must be instantiated with the base name of the storage file and, optionally, a json-compatible object to be used if the file does not yet exist.
... the contents of the file will be initially loaded into the json store’s data property.
... * @optional * * @return {promise<jsonstore>} */ function jsonstore(name, default_={}) { return task.spawn(function* () { // determine the correct path for the file.
...And 2 more matches
MMgc - Archive of obsolete content
in order to be correct we must account for a new or unmarked object being stored into an object we've already marked.
... in implementation terms this means a new or unmarked object is stored in an object that has already been processed by the marking algorithm and is no longer in the queue.
...rked before we sweep white written to gray - the white object will be marked as reachable when the gray object is marked white written to white - the referant will either eventually become gray if its reachable or not in which case both objects will get marked black written to black/gray/white - its black, its already been marked so a write barrier needs to be inserted anywhere we could possibly store a pointer to a white object into a black object.
...And 2 more matches
Using content preferences - Archive of obsolete content
site-specific content preferences are stored in the profile folder, in the database file "content-prefs.sqlite".
... browser.upload.lastdir path of a filesystem directory this preference is stored and retrieved automatically by file upload controls.
... spellcheck.lang language code (e.g., "en-us") private browsing requires gecko 9.0(firefox 9.0 / thunderbird 9.0 / seamonkey 2.6) prior to gecko 9.0 (firefox 9.0 / thunderbird 9.0 / seamonkey 2.6), the content preference service always stores preferences on disk.
...And 2 more matches
The Implementation of the Application Object Model - Archive of obsolete content
the only way that one content node would know how to instantiate a content node of a completely different type is if it had additional information stored for every child content node that it contained.
...a single content node could be initialized with its uri by its parent node, it could store its uri in a member variable, and it could use that as a basis for resolving the pluggable data source from which it would obtain its information.
...but suppose that instead we could store additional information about the tree's columns, namely in which order they occur, then the act of persistently saving a column reordering would take far less time (o(1) to swap two columns, as opposed to a worst case o(n) where n is the number of cells in the tree).
...And 2 more matches
preference - Archive of obsolete content
each preference element corresponds to a preference which is stored in the user's preferences file.
...the file path will be stored in the preferences.
...in pref dialogs with instantapply == true (default on mac os x) this value is kept in sync with the actual value stored in the preferences (see valuefrompreferences).
...And 2 more matches
Index - Learn web development
here we look at why this is useful, then explore how to create an array, retrieve, add, and remove items stored in an array, and more besides.
... 92 functions — reusable blocks of code api, article, beginner, browser, codingscripting, custom, functions, guide, javascript, learn, method, anonymous, invoke, l10n:priority, parameters another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
...data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.setuserdata().
...And 2 more matches
Test your skills: Math - Learn web development
add the first two variables together and store the result in another variable.
... subtract the fourth variable from the third and store the result in another variable.
...store the result in a variable called evenoddresult.
...And 2 more matches
Useful string methods - Learn web development
a good way to do this is to: convert the whole of the string contained in the input variable to lower case and store it in a new variable.
... grab the first letter of the string in this new variable and store it in another variable.
...store the result of this replace procedure in another new variable.
...And 2 more matches
Website security - Learn web development
a persistent xss vulnerability occurs when the malicious script is stored on the website and then later redisplayed unmodified for other users to execute unwittingly.
... for example, a discussion board that accepts comments that contain unmodified html could store a malicious script from an attacker.
...the browser of the user stores this information and automatically includes it in all requests to the associated server.
...And 2 more matches
Performance
key points to keep in mind scripts registered during addon startup get executed during session restore.
... frame scripts also get executed on non-restored tabs.
... store heavyweight state once per process bad: // addon.js var main = new myaddonservice(); main.onchange(statechange); function statechange() { services.mm.broadcastasyncmessage("my-addon:update-configuration", {newconfig: main.serialize()}) } // framescript.js var maincopy; function onupdate(message) { maincopy = myaddonservice.deserialize(message.data.newconfig); } addmessagelistener("my...
...And 2 more matches
HTTP Cache
when there is no profile the new http cache works, but everything is stored only in memory not obeying any particular limits.
... currently we have 3 types of storages, all the access methods return an nsicachestorage object: memory-only (memorycachestorage): stores data only in a memory cache, data in this storage are never put to disk disk (diskcachestorage): stores data on disk, but for existing entries also looks into the memory-only storage; when instructed via a special argument also primarily looks into application caches application cache (appcachestorage): when a consumer has a specific nsiapplicationcache (i.e.
... lifetime of a new entry such entry is initially empty (no data or meta data is stored in it).
...And 2 more matches
JNI.jsm
return value this function has no return value, if you try to store the return value in a variable, it will be undefined.
... return value this function has no return value, if you try to store the return value in a variable, it will be undefined.
... return value this function has no return value, if you try to store the return value in a variable, it will be undefined.
...And 2 more matches
An overview of NSS Internals
this strategy allows nss to work with many hardware devices (e.g., to speed up the calculations required for cryptographic operations, or to access smartcards that securely protect a secret key) and software modules (e.g., to allow to load such modules as a plugin that provides additional algorithms or stores key or trust information) that implement the pkcs#11 interface.
... only nss is allowed to access and manipulate these database files directly; a programmer using nss must go through the apis offered by nss to manipulate the data stored in these files.
... most of the time certificates and keys are supposed to be stored in the nss database.
...And 2 more matches
FIPS Mode - an explanation
whether it is hardware or software, that device will have all the cryptographic engines in it, and also will stores keys and perhaps certificates inside.
... it must generate or derive cryptographic keys and store them internally.
... the user is only required to enter his master password to use his own private keys (if he has any) or to access his stored web-site passwords.
...And 2 more matches
nss tech note1
this is where the decoder stores its output.
...this information is stored in the next lowest tag bit (number 5).
...it is stored in the lower 5 tag bits (number 0 through 4).
...And 2 more matches
GCIntegration - SpiderMonkey Redirect 1
if there is a choice between storing a gc thing inside a c++ object or its js corresponding representation, prefer to store it in the js representation.
... never store gc things in a jsobject's private pointer (i.e., via js_setprivate()).
... it's better to store them in reserved slots, since those will automatically be traced if the object is native.
...And 2 more matches
Garbage collection
instead, it must store a wrapper for the other object.
... objects from different zones cannot be stored in the same arena.
...if the mutator stores b into a, so that a contains a pointer to b, and deletes all existing pointers to b, then: b is live, because a is black and contains a pointer to b.
...And 2 more matches
Tracing JIT
the monitor then calls into the native code stored in the fragment.
...a fragmento is a resource-management object that allocates and stores a set of fragments and pages, and manages their lifecycle.
...a fragment's code is stored in a set of associated pages and guardrecords allocated from the fragment's owning fragmento.
...And 2 more matches
JIT Optimization Strategies
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.
... consider the following constructor: function point(x, y) { this.x = x; this.y = y; } if only integers are ever stored in the x and y properties, then the instances of point will be represented in an "unboxed" mode - with the property values stored as raw 4-byte values within the object.
...unboxed property writes 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.
...And 2 more matches
JSPropertyOp
on entry, *vp contains the property's stored value or undefined if the property doesn't have a stored value.
...if the property has a stored value, it is then updated to the value left in *vp after the callback.
...on success, the post-callback value of *vp becomes the initial stored value of the new property.
...And 2 more matches
Shell global objects
when enabled, at every instruction a backtrace will be recorded and stored in an array.
... disablespsprofiling() disables sps instrumentation islatin1(s) return true iff the string's characters are stored as latin1.
... withsourcehook(hook, fun) set this js runtime's lazy source retrieval hook (that is, the hook used to find sources compiled with compileoptions::lazy_source) to hook; call fun with no arguments; and then restore the runtime's original hook.
...And 2 more matches
Starting WebLock
the next set of functionality manages the white list where acceptable domains are stored: void addsite(in string url); void removesite(in string url); attribute nsisimpleenumerator sites; operations in this set - add, remove, and enumerate - will be called from a user interface that manages the white list and adds the current website to the white list.
...this service, available as nsidirectoryservice, stores the location of various common system locations, such as the the directory containing the running process, the user's home directory, and others.
... it can be expanded so that applications and components can define and store their own special locations - an application plugin directory, for example, preference files and/or directories, or other application specific paths.
...And 2 more matches
XPCOM hashtable guide
a hashtable is a data construct that stores a set of items.
...you can store entries with keys 1, 5, and 3000).
... lookup time: o(1): lookup time is a simple constant o(1): lookup time is mostly-constant, but the constant time can be larger than an array lookup sorting: sorted: stored sorted; iterated over in a sorted fashion.
...And 2 more matches
Components.utils.unwaiveXrays
it can then use unwaivexrays to restore its xray vision for the object.
...the unwaivexrays operation undoes the operation, so xray vision is restored transitively as well.
... syntax xray = components.utils.unwaivexrays(obj); parameters obj the object for which we wish to restore xrays.
...And 2 more matches
nsIMutableArray
weak whether or not to store the element using a weak reference.
... clear() clear the entire array, releasing all stored objects.
... weak whether or not to store the element using a weak reference.
...And 2 more matches
XPCOM reference
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.nsicookie2 mozilla 1 8 branchnsimsgsearchvaluedefined in comm-central/ mailnews/ base/ search/ public/ nsimsgsearchvalue.idl nsmsgmessageflagsthe nsmsgmessageflags interface describes possible flags for messages.
...it is only used to store constants.
...it is only used to store constants.
...And 2 more matches
PKCS #11 Netscape Trust Objects - Network Security Services
pkcs #11 is a standard that defines ways to store certificates, keys and perform crypto operations.
... it does not specify a way to store trust objects.
...this document outlines the way in which nss stores trust objects via pkcs#11.
...And 2 more matches
AudioBuffer - Web APIs
if the audiobuffer has multiple channels, they are stored in separate buffer.
... 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.
...And 2 more matches
CanvasRenderingContext2D - Web APIs
the following methods help you to work with that state: canvasrenderingcontext2d.save() saves the current drawing style state using a stack so you can revert any change you make to it using restore().
... canvasrenderingcontext2d.restore() restores the drawing style state to the last element on the 'state stack' saved by save().
... webkit only canvasrenderingcontext2d.webkitbackingstorepixelratio the backing store size in relation to the canvas element.
...And 2 more matches
Basic animations - Web APIs
restore the canvas state if you've saved the state, restore it before drawing a new frame.
...otate(((2 * math.pi) / 60) * time.getseconds() + ((2 * math.pi) / 60000) * time.getmilliseconds()); ctx.translate(105, 0); ctx.fillrect(0, -12, 40, 24); // shadow ctx.drawimage(earth, -12, -12); // moon ctx.save(); ctx.rotate(((2 * math.pi) / 6) * time.getseconds() + ((2 * math.pi) / 6000) * time.getmilliseconds()); ctx.translate(0, 28.5); ctx.drawimage(moon, -3.5, -3.5); ctx.restore(); ctx.restore(); ctx.beginpath(); ctx.arc(150, 150, 105, 0, math.pi * 2, false); // earth orbit ctx.stroke(); ctx.drawimage(sun, 0, 0, 300, 300); window.requestanimationframe(draw); } init(); <canvas id="canvas" width="300" height="300"></canvas> screenshotlive sample an animated clock this example draws an animated clock, showing your current time.
...tx.clearrect(0, 0, 150, 150); ctx.translate(75, 75); ctx.scale(0.4, 0.4); ctx.rotate(-math.pi / 2); ctx.strokestyle = 'black'; ctx.fillstyle = 'white'; ctx.linewidth = 8; ctx.linecap = 'round'; // hour marks ctx.save(); for (var i = 0; i < 12; i++) { ctx.beginpath(); ctx.rotate(math.pi / 6); ctx.moveto(100, 0); ctx.lineto(120, 0); ctx.stroke(); } ctx.restore(); // minute marks ctx.save(); ctx.linewidth = 5; for (i = 0; i < 60; i++) { if (i % 5!= 0) { ctx.beginpath(); ctx.moveto(117, 0); ctx.lineto(120, 0); ctx.stroke(); } ctx.rotate(math.pi / 30); } ctx.restore(); var sec = now.getseconds(); var min = now.getminutes(); var hr = now.gethours(); hr = hr >= 12 ?
...And 2 more matches
Credential Management API - Web APIs
the credential management api lets a website store and retrieve user, federated, and public key credentials.
...to address these problems, the credential management api provides ways for a website to store and retrieve different types of credentials.
...calls to get() and store() within an <iframe> element will resolve without effect.
...And 2 more matches
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.
... syntax var source = cursor.source; value the idbobjectstore or idbindex that the cursor is iterating over.
... 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.
...And 2 more matches
IDBCursorSync - Web APIs
operations are performed on the underlying index or object store.
...setting this attribute can raise an idbdatabaseexception with the following codes: data_err if the underlying object store uses in-line keys and the property at the key path does not match the key in this cursor's position.
... not_allowed_err if the underlying index or object store does not support updating the record because it is open in the read_only or snapshot_read mode, or if an index record cannot be changed because the underlying index is auto-populated.
...And 2 more matches
Movement, orientation, and motion: A WebXR example - Web APIs
setup and utility functions next, we declare the variables and constants used throughout the application, starting with those used to store webgl and webxr specific information: let polyfill = null; let xrsession = null; let xrinputsources = null; let xrreferencespace = null; let xrbutton = null; let gl = null; let animationframerequestid = 0; let shaderprogram = null; let programinfo = null; let buffers = null; let texture = null; let mouseyaw = 0; let mousepitch = 0; this is followed by a set of constants, mostly to contain vari...
...cubeorientation will store the current orientation of the cube, while cubematrix and mousematrix are storage for matrices used during the rendering of the scene.
... next, we compile the shader programs; get references to its variables; initialize the buffers that store the array of each position; the indexes into the position table for each vertex; the vertex normals; and the texture coordinates for each vertex.
...And 2 more matches
Web Authentication API - Web APIs
authenticator - the credentials are created and stored in a device called an authenticator.
... this is a new concept in authentication: when authenticating using passwords, the password is stored in a user's brain and no other device is needed; when authenticating using web authentication, the password is replaced with a key pair that is stored in an authenticator.
...after the user verification, the authenticator will create a new asymmetric key pair and safely store the private key for future reference.
...And 2 more matches
Window.sessionStorage - Web APIs
a page session lasts as long as the browser is open, and survives over page reloads and restores.
... data stored in sessionstorage is specific to the protocol of the page.
... in particular, data stored by a script on a site accessed with http (e.g., http://example.com) is put in a different sessionstorage object from the same site accessed with https (e.g., https://example.com).
...And 2 more matches
<input type="datetime-local"> - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
... </select> in either case, the date/time and time zone values would be submitted to the server as separate data points, and then you'd need to store them appropriately in the database on the server-side.
... the y2k38 problem (often server-side) javascript uses double precision floating points to store dates, as with all numbers, meaning that javascript code will not suffer from the y2k38 problem unless integer coercion/bit-hacks are used because all javascript bit operators use 32-bit signed 2s-complement integers.
...And 2 more matches
DataView.prototype.setBigInt64() - JavaScript
the setbigint64() method stores a signed 64-bit integer (long long) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setbigint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
...And 2 more matches
DataView.prototype.setBigUint64() - JavaScript
the setbiguint64() method stores an unsigned 64-bit integer (unsigned long long) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setbiguint64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in bytes, from the start of the view to store the data from.
...And 2 more matches
DataView.prototype.setFloat32() - JavaScript
the setfloat32() method stores a signed 32-bit float (float) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setfloat32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
DataView.prototype.setFloat64() - JavaScript
the setfloat64() method stores a signed 64-bit float (double) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setfloat64(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
DataView.prototype.setInt16() - JavaScript
the setint16() method stores a signed 16-bit integer (short) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
DataView.prototype.setInt32() - JavaScript
the setint32() method stores a signed 32-bit integer (long) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
DataView.prototype.setUint16() - JavaScript
the setuint16() method stores an unsigned 16-bit integer (unsigned short) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setuint16(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
DataView.prototype.setUint32() - JavaScript
the setuint32() method stores an unsigned 32-bit integer (unsigned long) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setuint32(byteoffset, value [, littleendian]) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
...And 2 more matches
Digital audio concepts - Web media technologies
hich audio clips or samples may be remixed and then compressed; using lossless audio for the mastering process avoids compressing previously compressed data, resulting in additional quality loss factors that may recommend the use of lossy compression include: very large source audio constrained storage (either because the storage space is small, or because there's a large amount of sound to store into it) a need to constrain the network bandwidth required to broadcast the audio; this is especially important for live streams and teleconferencing psychoacoustics 101 diving into the details of psychoacoustics and how audio compression works is far beyond the scope of this article, but it is useful to have a general idea of how audio gets compressed by common algorithms can help understan...
...thus, rather than storing every bit of each channel's sample, a base amplitude and a per-channel amplitude deviation value are stored, wherein the deviation value may use fewer bits than a complete sample.
...then you store the side channel value; this value is a number which can be added to the mid channel value to determine left channel's original amplitude, and subtracted from the mid channel value to compute the right channel's original value.
...And 2 more matches
Creating a Help Content Pack - Archive of obsolete content
this attribute marks the start point in the rdf graph described by the file, and the help viewer searches for this element in order to query for further information (stored in child elements) about the content pack being parsed.
... the location of each of the glossary, index, and table of contents data sources is stored in one rdf:description element contained within one rdf:li element, like so: <rdf:seq> <rdf:li> <rdf:description nc:panelid="glossary" nc:datasources="chrome://foo/locale/help/glossary.rdf"/> </rdf:li> <rdf:li> <rdf:description nc:panelid="toc" ...
... nc:platform (added in mozilla 1.8b2/firefox 1.1) when present specifies the platforms to which the information stored in the referenced data sources applies.
...one possible source might be an online, dynamically-generated list of added content stored on your web site.
Space Manager High Level Design - Archive of obsolete content
during reflow, the space manager stores the space taken up by floats (updatespacemanager in nsblockframe) and provides information about the space available for other elements (getavailablespace in nsblockreflowstate).
... 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.
...when done with the child, restore the space managers coordinates by translating by the negative of the child block's origin.
... the blockreflowstate then stores this available space rect for use in the rest of the reflow chain.
Template and Tree Listeners - Archive of obsolete content
the primary use of this listener is to store some state before the template is rebuilt and restore it afterwards.
...item: null, willrebuild : function(builder) { this.item = builder.getresourceatindex(builder.root.currentindex); }, didrebuild : function(builder) { if (this.item) { var idx = builder.getindexofresource(this.item) if (idx != -1) builder.root.view.selection.select(idx); } } }; tree.builder.addlistener(somelistener); this example is very simple and just saves and restores the selected index after a rebuild.
... since the content goes away during a rebuild, the selection is lost, so it is restored here during the didrebuild method.
...naturally, we can't store the index as the item may have moved its position.
XUL element attributes - Archive of obsolete content
when the window is re-opened, the values of persistent attributes are restored.
... in mozilla, persistent attributes are stored in the per-profile file xulstore.json.
... persistence can also be stored using the document.persist function.
... natural the data is sorted in natural order, which means the order that it is stored in.
tab - Archive of obsolete content
ArchiveMozillaXULtab
pending type: boolean this attribute is set to true if the tab is currently in the process of being restored by the session store service.
... once the tab is restored, this attribute is removed.
... you can determine if a tab is being restored by checking to see if hasattribute("pending") is true.
...this would be useful if the images are stored remotely or you plan on swapping the image frequently.
Debug - Archive of obsolete content
the debug object only works in internet explorer and windows 8 and windows phone 8.1 store apps.
... there are different ways to debug internet explorer and windows 8.x store apps.
... in windows 8.x store apps, the write and writeln functions of the debug object display strings in the visual studio output window at run time.
...also supported in store apps (windows 8 and windows phone 8.1).
Desktop gamepad controls - Game development
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.
... object, which contains useful variables and functions: var gamepadapi = { active: false, controller: {}, connect: function(event) {}, disconnect: function(event) {}, update: function() {}, buttons: { layout: [], cache: [], status: [], pressed: function(button, state) {} } axes: { status: [] } }; the controller variable stores the information about the connected gamepad, and there's an active boolean variable we can use to know if the controller is connected or not.
... the pressed() function gets the input data and sets the information about it in our object, and the axes property stores the array containing the values signifying the amount an axis is pressed in the x and y directions, represented by a float in the (-1, 1) range.
... after the gamepad is connected, the information about the controller is stored in the object: connect: function(event) { gamepadapi.controller = event.gamepad; gamepadapi.active = true; }, the disconnect function removes the information from the object: disconnect: function(event) { delete gamepadapi.controller; gamepadapi.active = false; }, the update() function is executed in the update loop of the game on every frame, so it contains the latest information on the pressed buttons: update: function() { gamepadapi.buttons.cache = []; for(var k=0; k<gamepadapi.buttons.status.length; k++) { gamepadapi.buttons.cache[k] = gamepadapi.buttons.status[k]; } gamepadapi.buttons.status = []; var c = gamepadapi.controller || {}; var pressed = []; if(c.buttons) { ...
What is a web server? - Learn web development
on the hardware side, a web server is a computer that stores web server software and a website's component files.
...an http server can be accessed through the domain names of the websites it stores, and it delivers the content of these hosted websites to the end user's device.
... hosting files first, a web server has to store the website's files, namely all html documents and their related assets, including images, css stylesheets, javascript files, fonts, and video.
... technically, you could host all those files on your own computer, but it's far more convenient to store files all on a dedicated web server because: a dedicated web server is typically more available.
Using data attributes - Learn web development
data-* attributes allow us to store extra information on standard, semantic html elements without other hacks such as non-standard attributes, extra properties on dom, or node.setuserdata().
...say you have an article and you want to store some extra information that doesn’t have any visual representation.
... data attributes can also be stored to contain information that is constantly changing, like scores in a game.
... issues do not store content that should be visible and accessible in data attributes, because assistive technology may not access them.
Video and audio content - Learn web development
they define a structure in which the audio and/or video tracks that make up the media are stored, along with metadata describing the media, what codecs are used to encode its channels, and so forth.
...for example, for some types of audio, a codec's data is often stored without a container, or with a simplified container.
... one such instance is the flac codec, which is stored most commonly in flac files, which are just raw flac tracks.
...an "mp3 file" is actually an mpeg-1 audio layer iii (mp3) audio track stored within an mpeg or mpeg-2 container.
Graceful asynchronous programming with Promises - Learn web development
next, we call our function three times to begin the process of fetching and decoding the images and text and store each of the returned promises in a variable.
... add the following below your previous code: let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); next, we will define a promise.all() block to run some code only when all three of the promises stored above have successfully fulfilled.
...here we use some fairly simple sync code to store the results in separate variables (creating object urls from the blobs), then display the images and text on the page.
... console.log(values); // store each value returned from the promises in separate variables; create object urls from the blobs let objecturl1 = url.createobjecturl(values[0]); let objecturl2 = url.createobjecturl(values[1]); let desctext = values[2]; // display the images in <img> elements let image1 = document.createelement('img'); let image2 = document.createelement('img'); image1.src = objecturl1; image2.src = objecturl2; document.body.appendchild(image1); document.body.appendchild(image2); // display the text in a paragraph let para = document.createelement('p'); para.textcontent = desctext; document.body.appendchild(para); save and refresh and you should see your ui components all loaded, albeit in a not particularly attractive way!
Test your skills: Conditionals - Learn web development
response — begins uninitialized, but is later used to store a reponse that will be printed to the output panel.
... response — begins uninitialized, but is later used to store a reponse that will be printed to the output panel.
... machineresult — begins uninitialized, but is later used to store a reponse that will be printed to the output panel, letting the user know whether the machine is switched on.
... pwdresult — begins uninitialized, but is later used to store a reponse that will be printed to the output panel, letting the user know whether their login attempt was succcessful.
Test your skills: Strings - Learn web development
we would like you to: retrieve the length of the quote, and store it in a variable called quotelength.
... find the index position where substring appears in quote, and store that value in a variable called index.
... use a combination of the variables you have and available string properties/methods to trim down the original quote to "i do not like green eggs and ham.", and store it in a variable called revisedquote.
...store the new quote in a variable called fixedquote.
Object-oriented JavaScript for beginners - Learn web development
object data (and often, functions too) can be stored neatly (the official word is encapsulated) inside an object package (which can be given a specific name to refer to, which is sometimes called a namespace), making it easy to structure and access; objects are also commonly used as data stores that can be easily sent across the network.
...you can now see that we have two new objects on the page, each of which is stored under a different namespace — when you access their properties and methods, you have to start calls with person1 or person2; the functionality contained within is neatly packaged away so it won't clash with other functionality.
... let's look at the constructor calls again: let person1 = new person('bob'); let person2 = new person('sarah'); in each case, the new keyword is used to tell the browser we want to create a new object instance, followed by the function name with its required parameters contained in parentheses, and the result is stored in a variable — very similar to how a standard function is called.
... try entering this into your browser's javascript console: let person1 = new object(); this stores an empty object in the person1 variable.
Client-Server Overview - Learn web development
the server for a static site will only ever need to process get requests, because the server doesn't store any modifiable data.
...using the example of a product site, the server would store product "data" in a database rather than individual html files.
...this has major advantages over a static site: using a database allows the product information to be stored efficiently in an easily extensible, modifiable, and searchable way.
...the structure of our data is defined in models, which are python classes that define the fields to be stored in the underlying database.
Package management basics - Learn web development
the package manager will provide a method to install new dependencies (also referred to as "packages"), manage where packages are stored on your file system, and offer capabilities for you to publish your own packages.
... in theory you may not need a package manager and you could manually download and store your project dependencies, but a package manager will seamlessly handle installing and uninstalling packages.
... setting up the app as an npm package first of all, create a new directory to store our experimental app in, somewhere sensible that you’ll find again.
... in addition, the npm (and yarn) commands are clever in that they will search for command line tools that are locally installed to the project before trying to find them through conventional methods (where your computer will normally store and allow software to be found).
Creating Sandboxed HTTP Connections
setting up an http connection the first step in setting up an http connection from an url (stored in a string) is to create an nsiuri out of it.
... since nsistreamlistener does not cover cookies, the current channel being used will need to be stored as a global, since another listener will be used for cookie notifications (covered in the next section).
...; }, 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 redirecting, store the new channel gchannel = anewchannel; }, // nsiinterfacerequestor getinterface: function (aiid) { try { return this.queryinterface(aiid); } catch (e) { throw components.results.ns_nointerface; } }, // nsiprogresseventsink (not implementing will cause annoying exceptions) onprogress : function (arequest, acontext, aprogress, aprogressmax) { }, onstatus...
...since the channel that causes the notification is passed in as the first argument, comparing it to the globally stored channel (gchannel) in the previous section (which also gets updated each time a redirect happens).
Webapps.jsm
s: 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: function() loadandupdateapps: function() updatedatastore: function(aid, aorigin, amanifesturl, amanifest) _registersystemmessagesforentrypoint: function(amanifest, aapp, aentrypoint) _registerinterappconnectionsforentrypoint: function(amanifest, aapp,) _registersystemmessages: function(amanifest, aapp) _registerinterappconnections: function(amanifest, aapp) _createactivitiestoregister: function(amanifest, aapp, aentrypoint, arunupdate) _registera...
...ctivitiesforapps: function(aappstoregister, arunupdate) _registeractivities: function(amanifest, aapp, arunupdate) _createactivitiestounregister: function(amanifest, aapp, aentrypoint) _unregisteractivitiesforapps: function(aappstounregister) _unregisteractivities: function(amanifest, aapp) _processmanifestforids: function(aids, arunupdate) observe: function(asubject, atopic, adata) addmessagelistener: function(amsgnames, aapp, amm) removemessagelistener: function(amsgnames, amm) formatmessage: function(adata) receivemessage: function(amessage) getappinfo: function getappinfo(aappid) broadcastmessage: function broadcastmessage(amsgname, acontent) registerupdatehandler: function(ahandler) unregisterupdatehandler: function(ahandler) notifyupdatehandlers: function(aapp, amanifest, a...
..., 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) confirmuninstall: function(adata) denyuninstall: function(adata, areason = "error_unknown_failure") getself: function(adata, amm) checkinstalled: function(adata, amm) getinstalled: fun...
...t: function(adata, amm) removereceipt: function(adata, amm) replacereceipt: function(adata, amm) setenabled: function(adata) getmanifestfor: function(amanifesturl, aentrypoint) getappbymanifesturl: function(amanifesturl) getfullappbymanifesturl: function(amanifesturl, aentrypoint, alang) getmanifestcspbylocalid: function(alocalid) getdefaultcspbylocalid: function(alocalid) getapplocalidbystoreid: function(astoreid) getappbylocalid: function(alocalid) getmanifesturlbylocalid: function(alocalid) getapplocalidbymanifesturl: function(amanifesturl) getcoreappsbasepath: function() getwebappsbasepath: function() _islaunchable: function(aapp) _notifycategoryandobservers: function(subject, topic, data, msg) registerbrowserelementparentforapp: function(amsg, amn) receiveappmessage: fun...
PR_dtoa
decpt a pointer to a memory location where the runtime will store the offset, relative to the beginning of the output string, of the conversion's decimal point.
... sign a location where the runtime can store an indication that the conversion was of a negative value.
... buf the address of the buffer in which to store the result.
... results the principle output is the null-terminated string stored in buf.
NSS_3.12_release_notes.html
bug 395093: pkix_pl_httpcertstore_processcertresponse is unable to process certs in der format bug 395224: don't reject certs with critical netscapecerttype extensions in libpkix bug 395427: pkix_pl_initialize must not call nss_init bug 395850: build of libpkix tests creates links to nonexistant shared libraries and breaks windows build bug 398401: memory leak in pkix init.
...bug 217538: softoken databases cannot be shared between multiple processes bug 294531: design new interfaces for certificate path building and verification for libpkix bug 326482: nss ecc performance problems (intel) bug 391296: need an update helper for shared databases bug 395090: remove duplication of pkcs7 code from pkix_pl_httpcertstore.c bug 401026: need to provide a way to modify and create new pkcs #11 objects.
... self issued, trusted cert bug 390728: pkix_pl_ocsprequest_create throws an error if it was not able to get aia location bug 397825: libpkix: ifdef code that uses user object types bug 397832: libpkix leaks memory if a macro calls a function that returns an error bug 402727: functions responsible for creating an object leak if subsequent function code produces an error bug 402731: pkix_pl_pk11certstore_crlquery will crash if fails to acquire dp cache.
... bug 406647: libpkix does not use user defined revocation checkers bug 407064: pkix_pl_ldapcertstore_buildcrllist should not fail if a crl fails to be decoded bug 421216: libpkix test nss_thread leaks a test certificate bug 301259: signtool usage message is unhelpful bug 389781: nss should be built size-optimized in browser builds on linux, windows, and mac bug 90426: use of obsolete typedefs in public nss headers bug 113323: the first argument to pk11_findcertfromnickname should be const.
Enc Dec MAC Using Key Wrap CertReq PKCS10 CSR
"-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progn...
... * reads cert request file and stores certificate in db.
... * input, store and trust ca certificate.
...input and store a cert in cert db and also used to input, store and trust ca cert.
sample2
"-b <headerfilename> -i <ipfilename> -e <encryptfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -i <ipfilename> | ", "-b <headerfilename> -e <encryptfilename> -o <opfilename> \n"); fprintf(stderr, "commands:\n\n"); fprintf(stderr, "%s %s\n --for generating cert request (for ca also)\n\n", progname, "-g -s <subject> -r <csr>"); fprintf(stderr, "%s %s\n --to input and store cert (for ca also)\n\n", progname, "-a -n <nickname> -t <trust> -c <cert> [ -r <csr> -u <issuernickname> [-x <\"\">] -m <serialnumber> ]"); fprintf(stderr, "%s %s\n --to put cert in header\n\n", progname, "-h -n <nickname> -b <headerfilename> [-v <\"\">]"); fprintf(stderr, "%s %s\n --to find public key from cert in header and encrypt\n\n", progname, "-e -b <headerfilename> -i <ipfilename> -e <enc...
...* reads cert request file and stores certificate in db.
... * input, store and trust ca certificate.
...input and store a cert in cert db and also used to input, store and trust ca cert.
nss tech note5
to move keys to the desired slot, see section moving a key from one slot to another <big>secstatus s = pk11_wrapsymkey(wrapmech, secparam, wrappingsymkey, tobewrappedsymkey, &wrappedkey);</big> <big><big>transport/store or do whatever with the wrapped key (wrappedkey.data, wrappedkey.len)</big></big> <big><big>unwrapping.
...to move keys to the desired slot, see section moving a key from one slot to another <big>secstatus s = pk11_wrapprivkey(slot, wrappingsymkey, tobewrappedpvtkey, wrapmech, secparam, &wrappedkey, null);</big> <big><big>transport/store or do whatever with the wrapped key (wrappedkey.data, wrappedkey.len)</big></big> <big><big>unwrapping.</big></big> prepare the args for the unwrap function.
...to move keys to the desired slot, see section moving a key from one slot to another <big>secstatus s = pk11_pubwrapsymkey(wrapmech, wrappingpubkey, tobewrappedsymkey, &wrappedkey);</big> <big><big>transport/store or do whatever with the wrapped key (wrappedkey.data, wrappedkey.len)</big></big> <big><big>unwrapping.
... generate a symmetric key subsequent to the operation, the symmetric key may need to be transported/stored in wrapped or raw form.
FC_SetOperationState
name fc_setoperationstate - restore the cryptographic operation state of a session.
...hencryptionkey [in] handle of the encryption or decryption key to be used in in a stored session or zero if no key is needed.
... hauthenticationkey [in] handle of the authentication key to be used in the stored session or zero if none is needed.
... description fc_setoperationstate restores the cryptographic operations state of a session from an array of bytes obtained with fc_getoperationstate.
NSS tools : modutil
this directory should be one below which it is appropriate to store dynamic library files, such as a server's root directory.
... o with the -changepw command, the password on the nss internal module cannot be set or changed, since this password is stored in the key database.
... "./pk11inst.dir/setup.sh" executed successfully installed module "example pkcs #11 module" into module database installation completed successfully adding module spec each module has information stored in the security database about its configuration and parameters.
... nss database types nss originally used berkeleydb databases to store security information.
NSS tools : modutil
MozillaProjectsNSStoolsmodutil
this directory should be one below which it is appropriate to store dynamic library files, such as a server's root directory.
... o with the -changepw command, the password on the nss internal module cannot be set or changed, since this password is stored in the key database.
... "./pk11inst.dir/setup.sh" executed successfully installed module "example pkcs #11 module" into module database installation completed successfully adding module spec each module has information stored in the security database about its configuration and parameters.
... nss database types nss originally used berkeleydb databases to store security information.
JIT Optimization Outcomes
notfixedslot the property being accessed is not stored at a known location in the object.
... this can occur if one of the expected types of objects to be used in this operation has unknown properties, or if different instances of the object store the property at different locations (for example, some instances have the property assigned in a different order than others).
... inconsistentfixedslot the property being accessed is not stored at a known location in the object.
... notobject optimization failed because the stored in the property could potentially be a non-object value.
JS_ExecuteRegExp
test bool pass true to avoid creating match result array and store boolean value to rval.
... if test is false, js_executeregexp and js_newregexpobjectnostatics store the match result array to *rval if matches, otherwise stores null to *rval.
... if test is true, js_executeregexp and js_newregexpobjectnostatics store the boolean value true to *rval if matches, otherwise stores null to *rval.
... if successful, js_executeregexp and js_newregexpobjectnostatics returns true and stores the result to *rval, otherwise returns false and the value of *rval is undefined see also mxr id search for js_executeregexp mxr id search for js_executeregexpnostatics regexp bug 571355 - added js_executeregexpnostatics function ...
JS_GetReservedSlot
v js::value (in js_setreservedslot) the value to store.
... description if a jsclass has jsclass_has_reserved_slots(n) in its flags, with n > 0, or has a non-null jsclass.reserveslots callback, then objects of that class have n reserved slots in which the application may store data.
... reserved slots may also contain private values to store pointer values (whose lowest bit is 0) or uint32_t, when non-javascript values must be stored; the garbage collector ignores such values when it sees them.
...it's only legal to store and retrieve data from private values.
JS_SaveFrameChain
saves and restores frame chains.
... syntax bool js_saveframechain(jscontext *cx); void js_restoreframechain(jscontext *cx); name type description cx jscontext * the context to query.
...before calling js_restoreframechain, cx's call stack must be balanced and all nested calls to js_saveframechain must have had matching js_restoreframechain calls.
...see also mxr id search for js_saveframechain mxr id search for js_restoreframechain ...
JSAPI reference
25 js::currentglobalornull added in spidermonkey 31 js_getglobalforscopechain obsolete since jsapi 25 js_getglobalobject obsolete since jsapi 24 js_setglobalobject obsolete since jsapi 25 js_initclass js_initstandardclasses js_resolvestandardclass js_enumeratestandardclasses js_enumerateresolvedstandardclasses obsolete since jsapi 24 js_isrunning js_saveframechain js_restoreframechain js_isassigning obsolete since javascript 1.8.5 js_isconstructing obsolete since jsapi 26 js_isconstructing_possiblywithgiventhisobject obsolete since jsapi 17 js_getscopechain obsolete since javascript 1.8.7 compartments: class jsautocompartment added in spidermonkey 24 js_newglobalobject added in spidermonkey 17 js_entercompartment added in spidermonkey 24 js_leavecomp...
...trict_mode_error the following functions allow c/c++ functions to throw and catch javascript exceptions: js::createerror added in spidermonkey 38 js_isexceptionpending js_getpendingexception js_setpendingexception js_clearpendingexception js_throwstopiteration added in spidermonkey 1.8 js_isstopiteration added in spidermonkey 31 typedef jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate these functions translate errors into exceptions and vice versa: js_reportpendingexception js_errorfromexception js_throwreportederror obsolete since jsapi 29 values and types typedef jsval js::value js::value constructors: js::nullvalue added in spidermonkey 24 js::undefinedvalue added in spidermonkey 24 js::booleanvalue added in spid...
...they have been removed in js 1.8.5, though js_enterlocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscope obsolete since javascript 1.8.5 js_leavelocalrootscopewithresult obsolete since javascript 1.8.5 js_forgetlocalroot obsolete since javascript 1.8.5 added in spidermonkey 1.8 if an object contains references to other gc things that are not stored in spidermonkey data structures ("slots"), it must implement the jstraceop hook to enable the garbage collector to traverse those references.
...ng js_internucstringn js_internjsstring added in spidermonkey 1.8.5 js_stringhasbeeninterned added in spidermonkey 17 js_getlatin1internedstringchars added in spidermonkey 38 js_gettwobyteinternedstringchars added in spidermonkey 38 js_getinternedstringchars obsolete since jsapi 33 js_getinternedstringcharsandlength obsolete since jsapi 33 the character data for external strings is stored in memory provided by the application.
SpiderMonkey 1.8.5
since jsdoubles are now stored in the jsval, instead of on the heap, we no longer need to define roots for them.
...jsapi no longer represents floating-point numbers (and integers more than 31 bits long) as pointers to jsdouble; instead, the jsdouble value is directly stored in the jsval.
... numbers spidermonkey 1.8.5 now stores integers up to 32-bits in the jsval.
...the jsval now also stores jsdoubles directly, rather than storing them on the heap.
SpiderMonkey 1.8.7
since jsdoubles are now stored in the jsval, instead of on the heap, we no longer need to define roots for them.
...jsapi no longer represents floating-point numbers (and integers more than 31 bits long) as pointers to jsdouble; instead, the jsdouble value is directly stored in the jsval.
... numbers spidermonkey 1.8.5 now stores integers up to 32-bits in the jsval.
... the jsval now also stores jsdoubles directly, rather than storing them on the heap.
Redis Tips
for example, if you have a job queueing system, you might want redis to manage the queues themselves, and store pointers for the job data which might be retrieved by workers from some different, disk-resident db.
...as a conservative calculation, i multiply all the bytes i think i might store and multiply by 10, which antirez once recommended as a worst-case factor for data structure overhead.
... if i ever have more values to store per email than just the password, i could use a hash, with a key like ptu:identity:<email>.
... in the case where you want to do something akin to a join, like, say, associate an email and a remote url to store a browserid assertion, just make a new key.
Mork
MozillaTechMork
a minus before the table id indicates that all the rows currently stored in the table should be removed before adding more rows.
...where integer data is used, the convention is to use and store the hexadecimal value for the output.
... aliases are how dictionary values are stored.
...all data stored internally will be destroyed when the morkreader goes out of scope.
Places Developer Guide
the bookmarks datastore is hierarchical, modeling folders and their contents.
... backup/restore the new bookmarks system uses the json format for storing backups of users' bookmarks.
.../ import placesutils cu.import("resource://gre/modules/placesutils.jsm"); cu.import("resource://gre/modules/services.jsm"); // create the backup file var jsonfile = services.dirsvc.get("profd", ci.nsilocalfile); jsonfile.append("bookmarks.json"); jsonfile.create(ci.nsilocalfile.normal_file_type, 0600); // export bookmarks in json format to file placesutils.backupbookmarkstofile(jsonfile); // restore bookmarks from the json file // note: this *overwrites* all pre-existing bookmarks placesutils.restorebookmarksfromjsonfile(jsonfile); history the toolkit history service is nsinavhistoryservice: var history = cc["@mozilla.org/browser/nav-history-service;1"] .getservice(ci.nsinavhistoryservice); the history service provides methods for adding, editing, deleting browser history.
... annotations annotations provide a way to store small bits of arbitrary data for a uri or a bookmark: // get the annotation service var annotations = cc["@mozilla.org/browser/annotation-service;1"] .getservice(ci.nsiannotationservice); // create a uri to annotate var ioservice = cc["@mozilla.org/network/io-service;1"] .getservice(ci.nsiioservice); var myuri = ioservice.newuri("http://www.mozilla.com", null, n...
XPCOM array guide
MozillaTechXPCOMGuideArrays
will your array store non-refcounted objects and need automatic resizing?
... will your array store non-refcounted objects and be a fixed size?
... usage it is most often used as a member of a c++ class to store a list of well-typed xpcom objects.
... usage it is most often used as a member of a c++ class to store a list of well-typed objects.
Creating the Component Code
component registration all xpcom components - whether they're stored in shared libraries (dlls, dsos, dylibs), javascript files, or otherwise - need to be registered before they can be used.
...this parameter is useful when the component needs to know where it has been installed or registered - as, for example, when other files must be stored or accessed relative to the component.
...a single zip archive may store several xpcom components, where every component in the archive has the same nsifile parameter but the aloaderstr parameter can be used to refer to the location within the zip archive.
...-------- extern "c" ns_export nsresult nsgetmodule(nsicomponentmanager *servmgr, nsifile* location, nsimodule** return_cobj) { nsresult rv = ns_ok; // create and initialize the module instance samplemodule *m = new samplemodule(); if (!m) { return ns_error_out_of_memory; } // increase refcnt and store away nsimodule interface to m in return_cobj rv = m->queryinterface(kimoduleiid, (void**)return_cobj); if (ns_failed(rv)) { delete m; } return rv; } note: non-null-out the createinstance method guarantees that if the out variable is non-null, it is valid.
nsIMicrosummaryService
in the old rdf-based bookmarks datastore, bookmark ids are nsirdfresource objects.
... in the new places-based datastore, they are nsiuri objects.
...if the caller passes a bookmark id, and one of the microsummaries is the current one for the bookmark, this method will retrieve content from the datastore for that microsummary, which is useful when callers want to display a list of microsummaries for a page that isn't loaded, and they want to display the actual content of the selected microsummary immediately (rather than after the content is asynchronously loaded).
...refreshmicrosummary() refreshes a microsummary, updating its value in the datastore and ui.
nsIMsgDBHdr
messageoffset unsigned long indicates the position of the offline copy of an imap or news messages within the offline store.
... folder nsimsgfolder readonly: indicates the folder in which this message is stored.
...usually you would use this to store your own properties.
...thunderbird stored uint32 properties (not a complete list): indexed used for spotlight integration on osx.
nsINavHistoryService
many types of uris, such as "chrome:" uris, are not stored when adduri is called.
...this will probably not be commonly used other than for backup/restore type operations.
... getcharsetforuri() gets the stored character-set for an uri.
... void getcharsetforuri( in nsiuri auri ); parameters auri uri to retrieve character-set for returns returns the character-set, empty string if not found setcharsetforuri() gets the stored character-set for an uri.
nsIPermissionManager
the nsipermissionmanager interface is used to persistently store permissions for different object types (cookies, images, and so on) on a site-by-site basis.
...ri uri, in string type); pruint32 testexactpermissionfromprincipal(in nsiprincipal principal, in string type); pruint32 testpermission(in nsiuri uri, in string type); pruint32 testpermissionfromprincipal(in nsiprincipal principal, in string type); attributes attribute type description enumerator nsisimpleenumerator enumerates all stored permissions.
... removepermission() remove a given permission from the stored permissions.
...permission information stored after this timestamp will be removed.
Component; nsIPrefBranch
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.
... if you find yourself wondering what is the maximum amount of data you can store in a string preference, consider storing data separately, for example in a flat file or an sqlite database.
... 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.
... if you find yourself wondering what is the maximum amount of data you can store in a string preference, consider storing data separately, for example in a flat file or an sqlite database.
Using nsIPasswordManager
working with password manager extensions often need to securely store passwords to external sites, web applications, and so on.
...getting nsipasswordmanager to get a component implementing nsipasswordmanager, use the following: var passwordmanager = components.classes["@mozilla.org/passwordmanager;1"] .getservice(components.interfaces.nsipasswordmanager); storing a password to store a password in the password manager, you need three things: a hostname/url (you'll need this to retrieve the password again later), a username, and a password.
... of this information, the password is the only data that will be stored securely.
... adding a password to the password manager is easy: passwordmanager.adduser('host', 'username', 'password'); since there's no provision to include names of html input fields, no password stored by this interface will be used to fill in passwords on web pages.
Address Book examples
the code stores uris in various places (e.g.
... let card = collection.getcardfromproperty("jobtitle", "software engineer", false); if you are searching for a card with a particular email address, you can use the cardforemailaddress function that will match against multiple email addresses stored in one card.
... adding a mailing list first create a mailing list object and initialize it: var maillist = components.classes["@mozilla.org/addressbook/directoryproperty;1"] .createinstance(components.interfaces.nsiabdirectory); maillist.ismaillist = true; now fill in the details you want to store: maillist.dirname = "my mailing list"; maillist.listnickname = "nickname for list"; maillist.description = "list description"; add the cards you want to include in the list: for (let i = 0; i < numcards; i++) maillist.addresslists.appendelement(card[i], false); now save the list: var parentdirectory = ...; // an nsiabdirectory for the parent of the mailing list.
...a mork based local store or a os x address book ldap - use for searching in ldap address books.
Using the Multiple Accounts API
incoming servers (nsimsgincomingserver): an incoming server represents a remote message store such as a pop, imap, or nntp server.
... in the above example, the list of identities would be as follows: alec flett <alecf@mywork.com>) alec flett <alecf@myisp.com>) alec flett <alecfnospam@myisp.com>) relevant api calls: nsimsgaccount.identities nsimsgaccountmanager.allservers: a list of all servers across all accounts storage the accounts are stored in the preferences.
... smtp servers are stored in your preferences in a manner resembling the accounts: user_pref("mail.smtpservers", "server1,server2"); user_pref("mail.smtpserver.server1.hostname", "smtp.myisp.com"); user_pref("mail.smtpserver.server2.hostname", "smtp.mywork.com"); you can add new smtp servers using the smtp service.
...- boolean, should we download new messags on biff (true) or just alert user that there is new mail (false) preference: mail.server.server.directory - local platform-specific path to store messages and folder indexes preference: mail.server.server.name - user-visible name of server the following are specific to imap: preference: mail.server.server.admin_url - administration url for server preference: mail.server.server.using_subscription - boolean, should we use subscriptions?
Mozilla
creating a login manager storage module the login manager manages and stores user passwords.
... firefox operational information database: sqlite a large amount of operational information about websites visited and browser configuration is stored in relational databases in sqlite used by firefox.
... preferences the preference system makes it possible to store data for mozilla applications using a key/value pairing system.
... profile manager firefox and other xulrunner applications store user settings and data in special folders, called profiles.
Streams - Plugins
if the stream is not seekable, these requests are fulfilled only when all the data has been read and stored in the cache.
...the plug-in can store private data associated with the stream in stream->pdata.
... the browser stores private data in stream->ndata; this value should not be changed by the plug-in.
...if the stream is not seekable, these requests are fulfilled only when all the data has been read and stored in the cache.
Debugger.Memory - Firefox Developer Tools
this accessor can be both fetched and stored to.
... debugger.memory handler functions similar to debugger’s handler functions, debugger.memory inherits accessor properties that store handler functions for spidermonkey to call when given events occur in debuggee code.
...known values include the following: “api” “eager_alloc_trigger” “destroy_runtime” “last_ditch” “too_much_malloc” “alloc_trigger” “debug_gc” “compartment_revived” “reset” “out_of_nursery” “evict_nursery” “full_store_buffer” “shared_memory_limit” “periodic_full_gc” “incremental_too_slow” “dom_window_utils” “component_utils” “mem_pressure” “cc_waiting” “cc_forced” “load_end” “page_hide” “nsjscontext_destroy” “set_new_document” “set_doc_shell” “dom_utils” “dom_ipc” “dom_worker” “inter_slice_gc�...
...to take advantage of this regularity, spidermonkey objects with identical sets of properties may share their property metadata; only property values are stored directly in the object.
EventTarget.addEventListener() - Web APIs
(hence they too can have properties, and will be retained in memory even after they finish executing if assigned to a variable that persists in memory.) because object properties can be used to store data in memory as long as a variable referencing the object exists in memory, you can actually use them to get data into an event listener, and any changes to the data back out after an event handler executes.
... note: objects are stored in variables by reference, meaning only the memory location of the actual data is stored in the variable.
... among other things, this means variables that "store" objects can actually affect other variables that get assigned ("store") the same object reference.
... note: because objects are stored in variables by reference, you can return an object from a function to keep it alive (preserve it in memory so you don't lose the data) after that function stops executing.
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).
... 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.
...we specify the direction of travel using the 2nd argument of idbobjectstore.opencursor.
...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); console.log(cursor.direction...
IDBCursorWithValue - Web APIs
the cursor has a source that indicates which index or object store it is iterating over.
...operations are performed on the underlying index or object store.
... example in this example we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
...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.log('entries all displaye...
IDBDatabase: error event - Web APIs
or 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', { uni...
...que: 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); dbopenrequest.onupgraden...
...eeded = (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 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 ite...
...m: ${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); }; ...
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.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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'); tablerow.innerhtml = '<...
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.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
... 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>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.compan...
IDBIndex.locale - Web APIs
WebAPIIDBIndexlocale
syntax var myindex = objectstore.index('index'); console.log(myindex.locale); value a domstring.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
... 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>' + '<td>' + cursor.value.lname + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + cursor.value.jtitle + '</td>' + '<td>' + cursor.value.company + '</td>' ...
IDBIndex.multiEntry - Web APIs
this is decided when the index is created, using the idbobjectstore.createindex method.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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>' + '<td>' + cursor.value.l...
IDBIndex.name - Web APIs
WebAPIIDBIndexname
invalidstateerror the index, or its object store, has been deleted; or the current transaction is not an upgrade transaction.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor() — this works the same as opening a cursor directly on an idbobjectstore using opencursor() except that the returned records are sorted based on the index, not the primary key.
... 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>' + cursor.value.lname + '</t...
IDBIndex.openCursor() - Web APIs
if nothing is passed, this will default to a key range that selects all the records in this object store.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using opencursor() — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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 + '</td>' + '<td>' + cursor.value.fname + '</td>' + '<td>' + ...
IDBIndex.openKeyCursor() - Web APIs
if nothing is passed, this will default to a key range that selects all the records in this object store.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a key cursor on the index using openkeycursor() — this works the same as opening a cursor directly on an objectstore using idbobjectstore.openkeycursor except that the returned records are sorted based on the index, not the primary key.
... 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>'; tableentry.appendchild(tablerow); cursor.continue(); } else { console.log('all last names displayed...
IDBIndex.unique - Web APIs
WebAPIIDBIndexunique
this is decided when the index is created, using the idbobjectstore.createindex method.
... example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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>' + '<td>' + cursor.value.lname...
IDBOpenDBRequest.onupgradeneeded - Web APIs
the onupgradeneeded property of the idbopendbrequest interface is the event handler for the upgradeneeded event, triggered when a database of a bigger version number than the existing stored database is loaded.
... var store = db.createobjectstore("books", {keypath: "isbn"}); var titleindex = store.createindex("by_title", "title", {unique: true}); var authorindex = store.createindex("by_author", "author"); } if (event.oldversion < 2) { // version 2 introduces a new index of books by year.
... var bookstore = request.transaction.objectstore("books"); var yearindex = bookstore.createindex("by_year", "year"); } if (event.oldversion < 3) { // version 3 introduces a new object store for magazines with two indexes.
... var magazines = db.createobjectstore("magazines"); var publisherindex = magazines.createindex("by_publisher", "publisher"); var frequencyindex = magazines.createindex("by_frequency", "frequency"); } }; request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; db = request.result; populateanddisplaydata(); }; specifications specification status comment indexed database api 2.0the definition of 'onupgradeneeded' in that specification.
IDBRequest.error - Web APIs
WebAPIIDBRequesterror
it's an exception type for creating stores and indexes.
... example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the 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 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 the item // back into the database var updatetitlerequest = objectstore.put(data); // when this ne...
...w request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); }; specifications specification status comment indexed database api 2.0the definition of 'error' in that specification.
IDBRequest: error event - Web APIs
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 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', { uniqu...
...e: 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', () => { console.log(`error adding new item: ${newitem.tasktitle}`); }); }); the same example, using the onerror property instead of addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist',...
... 4); dbopenrequest.onupgradeneeded = 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 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 con...
...st 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 adding new item: ${newitem.tasktitle}`); }; }; ...
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.
... syntax var idbindex = request.source; var idbcursor = request.source; var idbobjectstore = request.source; value an object representing the source of the request, such as an idbindex, idbobjectstore or idbcursor.
... example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store in another 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 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 request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request con...
IDBTransaction: complete event - Web APIs
o cancelable no interface event event handler property oncomplete examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = 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 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', { uniqu...
...e: 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: 'january', year: 2019 }; const objectstorerequest = objectstore.add(newitem); }; using the oncomplete property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = 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 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'); // 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: 2019 }; const objectstorerequest = objectstore.add(newitem); }; ...
IDBTransaction: error event - Web APIs
or 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', { uni...
...que: 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 = objectstore.add(newitem); }; the same example, using the onerror property instead of addeventlistener(): // 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.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 objectstorerequest = objectstore.add(newitem); }; ...
MediaStream - Web APIs
mediastream.addtrack() stores a copy of the mediastreamtrack given as argument.
... mediastream.getaudiotracks() returns a list of the mediastreamtrack objects stored in the mediastream object that have their kind attribute set to audio.
... mediastream.gettracks() returns a list of all mediastreamtrack objects stored in the mediastream object, regardless of the value of the kind attribute.
... mediastream.getvideotracks() returns a list of the mediastreamtrack objects stored in the mediastream object that have their kind attribute set to "video".
RTCRemoteOutboundRtpStreamStats.localId - Web APIs
networkteststart() this function simply calls the rtcpeerconnection method getstats() to request an rtcstatsreport and store it in the variable startreport.
... let startreport; async function networkteststart(pc) { if (pc) { startreport = await pc.getstats(); } } given an rtcpeerconnection, pc, this calls its getstats() method to obtain a statistics report object, which it stores in startreport for use once the end-of-test data has been collected by networkteststop().
...this statistics record is stored in endremoteoutbound.
...with that in hand, we can look up the remote-outbound-rtp record in the starting statistics record (startreport), which we store into startremoteoutbound.
SubtleCrypto.verify() - Web APIs
*/ function getmessageencoding() { const messagebox = document.queryselector(".rsassa-pkcs1 #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature.
...*/ function getmessageencoding() { const messagebox = document.queryselector(".rsa-pss #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature.
...*/ function getmessageencoding() { const messagebox = document.queryselector(".ecdsa #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature.
...*/ function getmessageencoding() { const messagebox = document.queryselector(".hmac #message"); let message = messagebox.value; let enc = new textencoder(); return enc.encode(message); } /* fetch the encoded message-to-sign and verify it against the stored signature.
WebGLRenderingContext.makeXRCompatible() - Web APIs
this is why the webglcontextlost and webglcontextrestored events are used: the first gives you the opportunity to discard anything you won't need anymore, while the second gives you the opportunity to load resources and prepare to render the scene in its new context.
...se; let currentscene = "scene1"; let glstartbutton; let xrstartbutton; window.addeventlistener("load", (event) => { loadsceneresources(currentscene); glstartbutton.addeventlistener("click", handlestartbuttonclick); xrstartbutton.addeventlistener("click", handlestartbuttonclick); }); outputcanvas.addeventlistener("webglcontextlost", (event) => { /* the context has been lost but can be restored */ event.canceled = true; }); /* when the gl context is reconnected, reload the resources for the current scene.
... */ outputcanvas.addeventlistener("webglcontextrestored", (event) => { loadsceneresources(currentscene); }); async function onstartedxrsession(xrsession) { try { await gl.makexrcompatible(); } catch(err) { switch(err) { case aborterror: showsimplemessagebox("unable to transfer the game to your xr headset.", "cancel"); break; case invalidstateerror: showsimplemessagebox("you don't appear to have a compatible xr headset available.", "cancel"); break; default: handlefatalerror(err); break; } xrsession.end(); } } async function handlestartbuttonclick(event) { if (event.target.classlist.contains("use-webxr") && navigator.xr) { try { xrsession = await navigator.xr.requestsession("immersive-vr"); ...
... handlers are provided for both webglcontextlost and webglcontextrestored; in the first case, we make sure we're aware that the state can be recovered, while in the latter we actually reload the scene to ensure we have the correct resources for the current screen or headset configuration.
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 is similar to sessionstorage, except that while data stored in localstorage has no expiration time, data stored in sessionstorage gets cleared when the page session ends — that is, when the page is closed.
... (data in a localstorage object created in a "private browsing" or "incognito" session is cleared when the last "private" tab is closed.) data stored in either localstorage is specific to the protocol of the page.
... in particular, data stored by a script on a site accessed with http (e.g., http://example.com) is put in a different localstorage object from the same site accessed with https (e.g., https://example.com).
font-kerning - CSS: Cascading Style Sheets
the font-kerning css property sets the use of the kerning information stored in a font.
... the source for this interactive example is stored in a github repository.
... normal font kerning information stored in the font must be applied.
... none font kerning information stored in the font is disabled.
Event reference
sswindowclosing addons specific the session store will stop tracking this window.
... sstabclosing addons specific the session store will stop tracking this tab.
... sstabrestoring addons specific a tab is about to be restored.
... sstabrestored addons specific a tab has been restored.
Index - HTTP
WebHTTPHeadersIndex
it allows web developers to have more control over the data stored locally by a browser for their origins.
... 51 report-to csp, http, report-to the report-to http response header field instructs the user agent to store reporting endpoints for an origin.
... 54 cookie cookies, http, reference, header, request the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
...it is used as a validator to determine if a resource received or stored is the same.
HTTP headers - HTTP
WebHTTPHeaders
intermediate proxies must retransmit these headers unmodified and caches must store them.
... if-match makes the request conditional, and applies the method only if the stored resource matches one of the given etags.
... if-none-match makes the request conditional, and applies the method only if the stored resource doesn't match any of the given etags.
... max-forwards cookies cookie contains stored http cookies previously sent by the server with the set-cookie header.
A re-introduction to JavaScript (JS tutorial) - JavaScript
javascript also supports functional programming — because they are objects, functions may be stored in variables and passed around like any other object.
... also, watch out for stuff like: 0.1 + 0.2 == 0.30000000000000004; in practice, integer values are treated as 32-bit ints, and some implementations even store it that way until they are asked to perform an instruction that's valid on a number but not on a 32-bit integer.
... it is important to note that wherever the rest parameter operator is placed in a function declaration it will store all arguments after its declaration, but not before.
...function avg(firstvalue, ...args) will store the first value passed into the function in the firstvalue variable and the remaining arguments in args.
Indexed collections - JavaScript
let arr = [] arr[3.4] = 'oranges' console.log(arr.length) // 0 console.log(arr.hasownproperty(3.4)) // true you can also populate an array when you create it: let myarray = new array('hello', myvar, 3.14159) // or let myarray = ['mango', 'apple', 'orange'] understanding length at the implementation level, javascript's arrays actually store their elements as standard object properties, using the array index as the property name.
...this means that the length property will be one more than the highest index stored in the array: let cats = [] cats[30] = ['dusty'] console.log(cats.length) // 31 you can also assign to the length property.
... writing a value that is shorter than the number of stored items truncates the array.
... let a = new array(4) for (let i = 0; i < 4; i++) { a[i] = new array(4) for (let j = 0; j < 4; j++) { a[i][j] = '[' + i + ', ' + j + ']' } } this example creates an array with the following rows: row 0: [0, 0] [0, 1] [0, 2] [0, 3] row 1: [1, 0] [1, 1] [1, 2] [1, 3] row 2: [2, 0] [2, 1] [2, 2] [2, 3] row 3: [3, 0] [3, 1] [3, 2] [3, 3] using arrays to store other properties arrays can also be used like objects, to store related information.
DataView.prototype.setInt8() - JavaScript
the setint8() method stores a signed 8-bit integer (byte) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
DataView.prototype.setUint8() - JavaScript
the setuint8() method stores an unsigned 8-bit integer (byte) value at the specified byte offset from the start of the dataview.
... the source for this interactive example is stored in a github repository.
... syntax dataview.setuint8(byteoffset, value) parameters byteoffset the offset, in byte, from the start of the view where to store the data.
... errors thrown rangeerror thrown if the byteoffset is set such as it would store beyond the end of the view.
WeakSet - JavaScript
the weakset object lets you store weakly held objects in a collection.
...if no other references to an object stored in the weakset exist, those objects can be garbage collected.
... note: this also means that there is no list of current objects stored in the collection.
... weaksets are ideal for this purpose: // execute a callback on everything stored inside an object function execrecursively(fn, subject, _refs = null){ if(!_refs) _refs = new weakset(); // avoid infinite recursion if(_refs.has(subject)) return; fn(subject); if("object" === typeof subject){ _refs.add(subject); for(let key in subject) execrecursively(fn, subject[key], _refs); } } const foo = { foo: "foo", bar: { bar: "bar" } }; foo.bar.baz = foo; // circular reference!
Web video codec guide - Web media technologies
due to the sheer size of uncompressed video data, it's necessary to compress it significantly in order to store it, let alone transmit it over a network.
... imagine the amount of data needed to store uncompressed video: a single frame of high definition (1920x1080) video in full color (4 bytes per pixel) is 8,294,400 bytes.
...then that shift is stored, along with a description of the pixels that have moved that can't be described just by that shift.
...then, to finish the job, the remaining differences are found, then the set of object shifts and the set of pixel differences are stored in the data representing the new frame.
Add to Home screen - Progressive web apps (PWAs)
to make your app work offline, you have to use the service worker api to handle storing the assets offline, and if required, web storage or indexeddb to store its data.
... in our example app, we've just used a service worker to store all necessary files.
... store the event object in the deferredprompt variable so it can be used later on to perform the actual installation.
... use the prompt() method available on the beforeinstallprompt event object (stored in deferredprompt) to trigger showing the install prompt.
Filter effects - SVG: Scalable Vector Graphics
,-40 h80 c30,0 30,40 0,40z" /> <g fill="#ffffff" stroke="black" font-size="45" font-family="verdana" > <text x="52" y="52">svg</text> </g> </g> </svg> step 1 <fegaussianblur in="sourcealpha" stddeviation="4" result="blur"/> <fegaussianblur> takes in "sourcealpha", which is the alpha channel of the source graphic, applies a blur of 4, and stores the result in a temporary buffer named "blur".
... step 2 <feoffset in="blur" dx="4" dy="4" result="offsetblur"/> <feoffset> takes in "blur", which we previously created, shifts the result 4 to the right and 4 to the bottom, and stores the result in the buffer "offsetblur".
... step 3 <fespecularlighting in="offsetblur" surfacescale="5" specularconstant=".75" specularexponent="20" lighting-color="#bbbbbb" result="specout"> <fepointlight x="-5000" y="-10000" z="20000"/> </fespecularlighting> <fespecularlighting> takes in "offsetblur", generates a lighting effect, and stores the result in the buffer "specout".
... step 5 <fecomposite in="sourcegraphic" in2="specout" operator="arithmetic" k1="0" k2="1" k3="1" k4="0" result="litpaint"/> the second <fecomposite> takes in "sourcegraphic" and "specout", adds the result of "specout" on top of "sourcegraphic", and stores the result in "litpaint".
indexed-db - Archive of obsolete content
so you can use the indexed-db module to access the same api: var { indexeddb } = require('sdk/indexed-db'); var request = indexeddb.open('mydatabase'); request.onerror = function(event) { console.log("failure"); }; request.onsuccess = function(event) { console.log("success"); }; most of the objects that implement the indexeddb api, such as idbtransaction, idbopendbrequest, and idbobjectstore, are accessible through the indexeddb object itself.
... var { indexeddb, idbkeyrange } = require('sdk/indexed-db'); var database = {}; database.onerror = function(e) { console.error(e.value) } function open(version) { var request = indexeddb.open("stuff", version); request.onupgradeneeded = function(e) { var db = e.target.result; e.target.transaction.onerror = 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.objectsto...
...re("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(); trans.oncomplete = function() { cb(items); } var keyrange = idbkeyrange.lowerbound(0); var cursorrequest = store.opencursor(keyrange); cursorrequest.onsuccess = function(e) { var result = e.target.result; if(!!result == false) return; items.push(result.value.name); result.continue(); }; cursorrequest.onerror = database.onerror; }; function listitems(itemlist) { console.log(itemlist); } open("1")...
private-browsing - Archive of obsolete content
it returns true only if the object is: a private window, or a tab belonging to a private window, or a worker that's associated with a document hosted in a private window any window, tab, or worker if the browser has been configured to never remember history (options->privacy->history) add-ons can use this api to decide whether or not to store user data.
... 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.
...r) { if (privatebrowsing.isprivate(worker)) { console.log("private window, doing nothing"); } else { worker.port.emit("log-content"); } } pagemod.pagemod({ include: "*", contentscript: loggingscript, onattach: logpublicpagecontent }); tracking private-browsing exit sometimes it can be useful to cache some data from private windows while they are open, as long as you don't store it after the private browsing windows have been closed.
High-Level APIs - Archive of obsolete content
passwords interact with firefox's password manager to add, retrieve and remove stored credentials.
... simple-prefs store preferences across application restarts.
... simple-storage lets an add-on store data so that it's retained across firefox restarts.
Overview - Archive of obsolete content
the widget is used to switch the annotator on and off, and to display a list of all the stored annotations.
... the annotation-list panel shows a list of all stored annotations.
... working with data we'll use the simple-storage module to store annotations.
File I/O - Archive of obsolete content
profld f local settings on windows; where the network cache and fastload files are stored.
... storing nsifile in preferences the following two snippets show the right way to store a file path in user preferences (more about preferences in mozilla): absolute path (nsifile) to store an arbitrary path in user preferences, use this code: // |file| is nsilocalfile.
...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.
Preferences - Archive of obsolete content
nsilocalfile and nsirelativefilepref store paths in preferences.
... nsilocalfile is used to store absolute paths, while nsirelativefilepref is used to store paths relative to a "special" directory, such as the profile folder.
...so you could use, for instance: alert(prefs.getcharpref("mypref", "no value stored")); be careful with this technique because prior to firefox 54, the additional (default) value will be ignored and an exception would still be thrown in this case.
Chapter 4: Using XPCOM—Implementing advanced processes - Archive of obsolete content
reading preferences listing 19 shows how to get a text string stored in the preferences.
... type about:config into the location bar to confirm that the value has been stored correctly.
...again, you can use about:config to check that the value has been stored correctly.
Search Extension Tutorial (Draft) - Archive of obsolete content
due to the large volume of user complaints regarding hidden settings being changed against their will, and not being restored after the add-ons responsible are disabled, mozilla will take any steps necessary to mitigate the impact of offending add-ons.
...the most technically sound method of achieving this, and the only acceptable way of changing preferences such that they are automatically restored on add-on uninstall, is to make such changes in the default preference branch, as explained below.
...while changes to default preference values will not persist across sessions, restartless extensions must nevertheless restore them for the balance of the session after they have been disabled.
Source code directories overview - Archive of obsolete content
these programs are used for code level things instead of build level things (which are a stored in the build directory).
...it is used to store mail box data, news data and global history data.
...it is used for the auto-completion feature on the url edit box (stored in netscape.hst in mozilla classic) and for the cached pages index (stored in fat.db in mozilla classic).
Code snippets - Archive of obsolete content
components.utils.import("resource://services-sync/engines.js"); components.utils.import("resource://services-sync/engines/bookmarks.js"); let bme = weave.service.enginemanager.get("bookmarks"); let ids = object.keys(bme._store.getallids()); for each (let id in ids) { let record = bme._store.createrecord(id, "bookmarks"); let len = record.tostring().length; if (len > 1000) { console.log("id: " + id + ", len = " + len + ", " + record.title); } } print an alphabetically sorted list of members of a collection components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://servi...
... bump meta/global's modified time components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); function getpath(path) { let r = new resource(weave.service.storageurl + path); let g = r.get(); return [g, r]; }; let [g, r] = getpath("meta/global"); r.put(g); delete and restore a record components.utils.import("resource://services-sync/main.js"); components.utils.import("resource://services-sync/resource.js"); components.utils.import("resource://services-sync/record.js"); // for example: let id = "iasokuozpixz" let collection = "bookmarks"; let resource = new resource(weave.service.storageurl + collection + "/" + id); let del = new cryptowrapper(collection, id); del.
...resource.put(del); // restore the old value.
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.
...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.
...this allows us to store watch/ignore information on a thread object, and avoids having to generate threading information whenever a folder is open.
RDF Datasource How-To - Archive of obsolete content
you may want to choose this implementation if your primary goal is to "wrap" a legacy data store.
... this implementation may cause problems if your data store can be modified "on the fly" by other agents.
...if you choose this route, you'll need to implement each of the nsirdfdatastore methods "by hand".
XPJS Components Proposal - Archive of obsolete content
a 'load' or 'import' function will also be provided to let the js code import other .js files where libraries of code might be stored.
...the xpjsmanager will receive this call from the js code, store the mapping of clsid to .js filespec in the registry for its own use later, and then call the real component manager to do the registration.
...that native nsgetfactory function will check the information it stored in the registry to see that the js factory for the given clsid is in a given .js file.
pending - Archive of obsolete content
« xul reference home pending type: boolean this attribute is set to true if the tab is currently in the process of being restored by the session store service.
... once the tab is restored, this attribute is removed.
... you can determine if a tab is being restored by checking to see if hasattribute("pending") is true.
persist - Archive of obsolete content
when the window is re-opened, the values of persistent attributes are restored.
... in mozilla, persistent attributes are stored in the per-profile file xulstore.json.
... persistence can also be stored using the document.persist function.
Reading from Files - Archive of obsolete content
if you know that a file is stored using a different encoding, you can specify a third argument to nsiscriptableio.newinputstream() which specifies the encoding.
...var stream = io.newinputstream(file, "text", "utf-16"); this third argument is not needed if the file is stored in utf-8.
...var length = stream.read32(); var data = stream.readstring(length); all values are read in big endian form, which means that integers are stored in the file with their higher bits first.
Index - Archive of obsolete content
ArchiveMozillaXULIndex
212 norestorefocus no summary!
... 337 sizemode xul attributes, xul reference this attribute is used to save and restore the state of a window (together with the persist attribute) and for css styles (e.g.
...each preference element corresponds to a preference which is stored in the user's preferences file.
Introduction - Archive of obsolete content
<vbox datasources="rdf:bookmarks http://www.xulplanet.com/ds/sample.rdf"> in addition, when using the rdf type for chrome xul (such as in extensions), the datasource rdf:local-store is always included in the composite.
... the local store is a datasource which is usually used to hold state information such as window sizes, which columns in a tree are showing, and which tree items are open.
... you can query for any data in the local store in a template though this is rarely done.
Adding Style Sheets - Archive of obsolete content
if your xul file is stored remotely and accessed via an http url, you can store the style sheet remotely as well.
...first, you could store the style sheet in the same directory as the xul file.
... let's assume that we are building the find files dialog for themeability, because the find files dialog can be referred to with the url chrome://findfile/content/findfile.xul so the style sheet file will be stored in chrome://findfile/skin/findfile.css.
Install Scripts - Archive of obsolete content
the registry also stores the set of files and version information about the installed components.
...what you do need to know for an installation is that the registry stores a set of information about your application, such as the file list and versions.
... all of this information is stored in a key (and within subkeys) that you provide in the installation script (in step 1 mentioned above).
Introduction to RDF - Archive of obsolete content
rdf (resource description framework) is a format that can be used to store resources such as bookmarks or mail.
...you can use any of the provided rdf datasources to populate trees with data or you can point to an rdf file stored in xml which contains the data.
...think of the bookmarks as a database, which is stored as a large table with numerous fields.
Extentsions FAQ - Archive of obsolete content
you shouldn't store data there, so there's nothing to backup.
... do not store files within the extension directory.
...however not all servers support user flags, in which case you get reduced functionality as follows: all flags are stored in your local cache and are lost if your cache gets invalidated, and only "known" properties are copied when messages are copied.
ActiveXObject - Archive of obsolete content
warning: this object is a microsoft extension and is supported in internet explorer only, not in windows 8.x store apps.
...not supported in windows 8.x store apps.
... note: creating an activexobject on a remote server is not supported in internet explorer 9 standards mode, internet explorer 10 standards mode, internet explorer 11 standards mode, and windows store apps or later.
Building up a basic demo with the PlayCanvas engine - Game development
creating a directory to store your experiments in.
...there is one helper variable already included, which will store a reference to the <canvas> element.
...for time based animations we'll use a timer variable that will store the time that has passed since the start of the app by adding the deltatime to it on every update.
2D maze game with device orientation - Game development
to hold the block information we'll use a level data array: for each block we'll store the top and left absolute positions in pixels (x and y) and the type of the block — horizontal or vertical (t with the 'w' value meaning width and 'h' meaning height).
... the objects are stored in the this.levels array, which is by default invisible.
... adding the elapsed time to improve replayability and give players the option to compete with each other we will store the elapsed time — players can then try to improve on their best game completion time.
Endianness - MDN Web Docs Glossary: Definitions of Web-related terms
every byte can store an 8-bit number (i.e.
... between 0x00 and 0xff), so you must reserve more than one byte to store a larger number.
...big-endian is also often called "network byte order", because internet standards usually require data to be stored big-endian, starting at the standard unix socket level and going all the way up to standardized web binary data structures.
Organizing your CSS - Learn web development
/* || store pages */ .product-listing { ...
... for example, we might have an online store as part of the site, with a lot of css used only for styling the product listings and forms needed for the store.
... it would make sense to have those things in a different stylesheet, only linked to on store pages.
Web fonts - Learn web development
fonts are created by font foundries and are stored in different file formats.
... an online font service: this is a site that stores and serves the fonts for you, making the whole process easier.
... using an online font service online font services generally store and serve fonts for you, so you don't have to worry about writing the @font-face code, and generally just need to insert a simple line or two of code into your site to make everything work.
Cooperative asynchronous JavaScript: Timeouts and intervals - Learn web development
here, you're storing a reference to the <div> inside a constant, setting a rotatecount variable to 0, setting an uninitialized variable that will later be used to contain a reference to the requestanimationframe() call, and setting a starttime variable to null, which will later be used to store the start time of the requestanimationframe().
...(note that the function name starts with "cancel", not "clear" as with the "set..." methods.) just pass it the value returned by the requestanimationframe() call to cancel, which you stored in the variable raf: cancelanimationframe(raf); active learning: starting and stopping our spinner in this exercise, we'd like you to test out the cancelanimationframe() method by taking our previous example and updating it, adding an event listener to start and stop the spinner when the mouse is clicked anywhere on the page.
... an uninitialized variable to later store the requestanimationframe() call that animates the spinner.
Build your own function - Learn web development
the first line uses a dom api function called document.queryselector() to select the <html> element and store a reference to it in a constant called html, so we can do things to it later on: const html = document.queryselector('html'); the next section uses another dom api function called document.createelement() to create a <div> element and store a reference to it in a constant called panel.
... finally, we call a dom function called node.appendchild() on the html constant we stored earlier, which nests one element inside the other as a child of it.
... next, we'll select the button and store a reference to it in a constant.
Looping code - Learn web development
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.
... inside the loop, we first split the current contact (contacts[i]) at the colon character, and store the resulting two values in an array called splitcontact.
...ction(){ // we only want to save the state when the user code is being shown, // not the solution, so that solution is not saved over the user code if(solution.value === 'show solution') { userentry = textarea.value; } else { solutionentry = textarea.value; } updatecode(); }; active learning: filling in a guest list in this exercise, we want you to take a list of names stored in an array and put them into a guest list.
Function return values - Learn web development
after the function calculates the value, it can return the result so it can be stored in a variable; and you can use this variable in the next stage of the calculation.
...there's also a <script> element, in which we have stored a reference to both html elements in two variables.
...when this anonymous function runs, the value in the input is stored in the num constant.
Drawing graphics - Learn web development
now add the following lines of javascript inside the <script> element: const canvas = document.queryselector('.mycanvas'); const width = canvas.width = window.innerwidth; const height = canvas.height = window.innerheight; here we have stored a reference to the canvas in the canvas constant.
... restore the settings you saved in step 2, using restore() call requestanimationframe() to schedule drawing of the next frame of the animation.
... note: we won't cover save() and restore() here, but they are explained nicely in our transformations tutorial (and the ones that follow it).
Test your skills: Arrays - Learn web development
in this task we'd like you to create an array of three items, stored inside a variable called myarray.
... store the length of the array in a variable called arraylength.
... store the last item in the array in a variable called lastitem.
Ember interactivity: Events, classes and state - Learn web development
with the interactivity of the header input out of the way, we need a place to store todos so that other components can access them.
... run this terminal command to generate a service for us to store our todo-list data in: ember generate service todo-data this should give you a terminal output like so: installing service create app/services/todo-data.js installing service-test create tests/unit/services/todo-data-test.js this creates a todo-data.js file inside the todomvc/app/services directory to contain our service, which initially contains an import statement and an empty class: i...
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
React interactivity: Events and state - Learn web development
function handlechange(e) { console.log(e.target.value); } updating state logging isn’t enough — we want to actually store the updated state of the name as the input value changes!
... tasks as state import usestate into app.js, so that we can store our tasks in state — update your react import line to the following: import react, { usestate } from "react"; we want to pass props.tasks into the usestate() hook – this will preserve its initial state.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Advanced Svelte: Reactivity, lifecycle, accessibility - Learn web development
the code so far git to see the state of the code as it should be at the end of this article, access your copy of our repo like this: 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.
... in the next article we will see how to use stores to communicate between components, and add animations to our components.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Understanding client-side JavaScript frameworks - Learn web development
working with svelte stores in this article we will show another way to handle state management in svelte — stores.
... stores are global global data repositories that hold values.
... components can subscribe to stores and receive notifications when their values change.
Gecko info for Windows accessibility vendors
data is therefore stored and retrieved dynamically much faster.
...when an event is received, the negative childid should match one of these cached uniqueid's, if the entire document has been stored and kept current.
...here is an algorithm for iterating through the nodes, looking for an item of a particular type: store a pointer to the start_item if the current item has a flows_to relation, follow that relation otherwise, go to the next item in depth first search order if the current item matches your criteria, then return current_item if the current_item == start_item, return null (no item found) if the end has been reached, go back to the start if wrapping is desired, otherwise r...
Adding a new event
add event messages you need to add event messages which are stored by widgetevent::message.
...this method is basically used for duplicating an internal event class instance of a dom event when the dom event is stored by content.
...if all information of the event is stored by its internal event, c++ event handlers can access them with following code: ns_imethodimp aneventlistener::handleevent(nsidomevent* aevent) { internalfooevent* internalevent = aevent->getinternalnsevent()->asfooevent(); if (ns_warn_if(!internalevent)) { return ns_error_unexpected; } dosomethingwith(internalevent->mbar); aevent->preventdefault(); return ns_ok; } implemen...
Runtime Directories
ectories firefox os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla firefox\ c:\users\<username>\appdata\roaming\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\users\<username>\appdata\local\mozilla\firefox\ (or %localappdata%\mozilla\firefox) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla firefox\ windows 2000/xp c:\program files\mozilla firefox\ c:\documents and settings\<username>\application data\mozilla\firefox\ (or %appdata%\mozilla\firefox\) c:\documents and settings\<username>\local settings\application data\mozilla\firefox\ os x /applications/firefox.app ~/library/application support/firefox/profiles/xxxxxxxx.defau...
...t/ n/d thunderbird os application directory user profile directory temporary directory windows vista/7 c:\program files\mozilla thunderbird\ c:\users\<username>\appdata\roaming\thunderbird\ (or %appdata%\thunderbird\) c:\users\<username>\appdata\local\thunderbird\ (or %localappdata%\thunderbird\) and c:\users\<username>\appdata\local\virtualstore\program files\mozilla thunderbird\ windows 2000/xp c:\program files\mozilla thunderbird\ c:\documents and settings\<username>\application data\thunderbird\ (or %appdata%\thunderbird\) c:\documents and settings\<username>\local settings\application data\thunderbird\ os x /applications/thunderbird.app ~/library/thunderbird/profiles/xxxxxxxx.default/ ~/library...
... ~/.thunderbird/xxxxxxxx.default/ (or ~/.mozilla-thunderbird/xxxxxxxx.default/ on debian/ubuntu) n/d see also https://support.mozilla.org/kb/profiles-where-firefox-stores-user-data#w_how-do-i-find-my-profile https://support.mozilla.org/kb/profiles-tb#w_where-is-my-profile-stored http://kb.mozillazine.org/profile_folder ...
SVG Guidelines
on the other hand the size of a raster file of the same image will likely vary tremendously depending on the dimensions of the image since the larger the dimensions the more pixel data the file needs to store.
... at very small dimensions (the extreme case being 1px x 1px) the raster file will likely be much smaller than the svg file since it only needs to store one pixel of data.
...if saved as a raster image then the work to rasterize the gradients and filters takes place on the authors computer before the result is stored in the raster file.
Multiple Firefox profiles
you can also choose where to store the profile on your computer.
... optionally, to change where the profile will be stored on your computer, click choose folder...
... windows in windows, the developer and nightly builds get their own directory in the "programs" folder, so you don't have to worry about where to store the downloaded files.
HTML parser threading
it contains all the information that is necessary to load back into the tree builder to restore it into a behaviorally equivalent state.
...if the speculation failed, the first buffer corresponding to the starting point of the speculation gets its start index restored to the index stored on the speculation object.
...the tokenizer gets its line number restored from the speculation object.
OS.File for the main thread
example: path manipulation the following snippet obtains the path to file "sessionstore.js", contained in the user's profile directory.
... let sessionstore = os.path.join(os.constants.path.profiledir, "sessionstore.js"); // under linux, this is generally "$home/.firefox/profiles/$profilename/sessionstore.js" // under macos, this is generally "$home/library/application support/firefox/$profilename/sessionstore.js" // under windows, this is generally "%appdata%\local\temp\%profilename%"\sessionstore.js // etc.
... promise<number> write( in arraybufferview source [optional] in object options ) arguments source the array in which the the bytes are stored.
Application Translation with Mercurial
for a windows user, it looks like c:\users\myname , depending on your windows version: cd /c/users/myname now list all the files here: ls -a if there is no file called .hgrc , create it with > .hgrc this file stores your general mercurial settings (mercurial is the tool which manages the source code and its history of changes).
...&newprivatewindow.label; has to be left unchanged so it can be replaced with the text of the string id &newprivatewindow.label; whis is stored elsewhere.
... tell mercurial to store the changes in the mercurial queue with the qref command.
Initial setup
these accounts will store your code, contributions, and help you produce an official localization.
...these tools will help you to store your contributions, build mozilla applications and language packs, and test your work.
...not only will you need a localization repository to store your localizations, but you need to have it installed and configured on your personal computer as well.
Mozilla Style System Documentation
in mozilla, nscssdeclaration objects correspond to css declaration-blocks.) due to the high similarity of these lists between elements in the content tree, mozilla stores the output of the selector matching process in a lexicographic tree, the rule tree.
...therefore, inherited structs are cached on the style context (but only the top style contexts pointing to them actually "owns" them), but structs that are shared between rule nodes are stored only on the highest rule node to which they apply and then retrieved from that most upper rule node every time they are needed.
...then the style struct is computed from the declaration and stored at the appropriate location in the rule tree or on the style context.
browser.download.lastDir.savePerSite
if set to true, the data is stored as content preference.
...if no download directory for the current website has been stored, browser.download.lastdir will be used.
... false the last used directory for any download (stored in browser.download.lastdir) will be the preselected directory in the file picker.
Preference reference
if set to true, the data is stored as content preference.browser.pagethumbnails.capturing_disabledthe preference browser.pagethumbnails.capturing_disabled controls whether the application creates screenshots of visited pages which will be shown if the web page is shown in the grid of the "new tab page" (about:newtab) which offers the most often visited pages for fast navigation.browser.search.context.loadinbackgroundbrowser.searc...
...the old behavior can be restored by setting the preference mail.tabs.drawintitlebar to false.nglayout.debug.disable xul fastloadthe preference nglayout.debug.disable_xul_fastload controls whether or not xul fastload is used.nglayout.debug.disable_xul_cacheto improve performance, mozilla caches chrome xul documents the first time they load for faster loading later.
...sed 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 user interface or the content will be styled.ui.tooltipdelayui.tooltipdelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip.view_source.syntax_highlightthe preference view_source.syntax_highlight controls whether markup in the view source view is syntax highlighted.
PKCS #11 Module Specs
this data is currently stored in secmod.db or pkcs11.txt.
... rootflags - comma separated of flags describing any root certs that may be stored (case-insensitive).
... valid values are: configdir configuration directory where nss can store persistant state information (typically databases).
JSAPI Cookbook
to avoid this, your jsapi code implementing the finally block must: save the old exception, if any clear the pending exception so that your cleanup code can run do your cleanup restore the old exception, if any return false if an exception occurred, so that the exception is propagated up.
... * it will be automatically restored when we return, unless we call savedstate.drop().
...since javascript values are usually stored in js::value variables, a cast or conversion is usually needed.
JS::AutoSaveExceptionState
this article covers features introduced in spidermonkey 31 save and later restore the current exception state of a given jscontext.
... description js::autosaveexceptionstate saves and later restores the current exception state of a given jscontext.
...return ok; see also mxr id search for js::autosaveexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate bug 972319 ...
JS::Value
uble) string val.isstring() js::stringvalue(jsstring*) val.tostring() val.setstring(jsstring *) object val.isobject() js::objectvalue(jsobject&amp;), js::objectornullvalue(jsobject*) val.toobject() val.setobject(jsobject &) symbol val.issymbol() js::symbolvalue(js::symbol*) val.tosymbol() val.setsymbol(js::symbol &) numbers are stored in a js::value either as a double or as an int32_t.
...any double value may be stored in a js::value, in one of these two representations.
...(note that both -0 and +0 are allowed, and the latter may sometimes be stored using the int32_t representation.) js::value further provides these methods combining various aspects of the above methods: js::objectornullvalue(jsobject*) returns an object value corresponding to the given non-null pointer, or a null value if the pointer is null.
JSExceptionState
this is used to save and restore exception states.
... syntax struct jsexceptionstate; description a jsexceptionstate object is returned by the js_saveexceptionstate function, and is passed to functions js_restoreexceptionstate and js_dropexceptionstate.
... see also mxr id search for jsexceptionstate js_saveexceptionstate js_restoreexceptionstate js_dropexceptionstate ...
JS_GetProperty
in the simplest case, js_getproperty stores the value of the property in *vp and returns true.
...otherwise *vp is set to the property's stored value, or undefined if the property does not have a stored value, and then the property's getter is called with the arguments (cx, obj, id, vp).
... for many properties, the getter does nothing and returns true, so the property get succeeds and the property's stored value is left in *vp.
JS_SetProperty
the initial stored value of the new property is undefined.
...if the hook succeeds and the property has a stored value, then the value left in v by the addproperty hook becomes the stored value of the property.
...if the setter succeeds and the property has a stored value, then the value left in v becomes the stored value of the property.
JS_StringHasLatin1Chars
this article covers features introduced in spidermonkey 38 determine if a string's characters are stored as latin1.
... description js_stringhaslatin1chars returns true iff the string's characters are stored as latin1.
... string characters are stored as either latin1char (8-bit) or char16_t (16-bit).
Animated PNG graphics
MozillaTechAPNG
information for each frame about placement and rendering is stored in 'fctl' chunks.
...apng-aware png editors should restore them to correct order using the sequence numbers.
... changed format: instead of sequences of ihdr..idat..iend, frames other than frame 0 are stored in 'afra' chunks.
Using the Places annotation service
the annotation service, provided by the nsiannotationservice interface, is designed to store arbitrary data about a web page or about an item in the places database in firefox 3.
...the service stores these names in a separate table, and the fewer names there are, the more efficient retrieving names will be.
...this allows you to link directly to data stored in the annotation service.
mozIAsyncFavicons
favicon data for favicon uris that are not associated with a page uri via setandfetchfaviconforpage will be stored in memory, but may be expired at any time, so you should make an effort to associate favicon uris with page uris as soon as possible.
... adatalen length of binary data amimetype mime type of the data to store.
...favicon data for favicon uris that are not associated with a page uri via setandfetchfaviconforpage will be stored in memory, but may be expired at any time, so you should make an effort to associate favicon uris with page uris as soon as possible.
nsIBrowserSearchService
gines); void getvisibleengines([optional] out unsigned long enginecount, [retval, array, size_is(enginecount)] out nsisearchengine engines); void init([optional] in nsibrowsersearchinitobserver observer); void moveengine(in nsisearchengine engine, in long newindex); void removeengine(in nsisearchengine engine); void restoredefaultengines(); attributes attribute type description currentengine nsisearchengine the currently active search engine.
... restoredefaultengines() un-hides all engines installed in the directory corresponding to the directory service's ns_app_search_dir key.
... (that is the set of engines returned by getdefaultengines()) void restoredefaultengines(); parameters none.
nsICacheDeviceInfo
entrycount unsigned long get the number of stored cache entries.
... maximumsize unsigned long get the upper limit of the size of the data the cache can store.
... totalsize unsigned long get the total size of the stored cache entries.
nsIContentPrefService2
(see nsicontentpref below.) for example, if you want to remember the user's preference for a certain zoom level on www.mozilla.org pages, you might store a preference whose domain is "www.mozilla.org", whose name is "zoomlevel", and whose value is the numeric zoom level.
... callback optional handlecompletion is called when the preference has been stored.
... callback optional handlecompletion is called when the preference has been stored.
nsIDOMChromeWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview void beginwindowmove(in nsidomevent mousedownevent); void getattention(); void getattentionwithcyclecount(in long acyclecount); void maximize(); void minimize(); void notifydefaultbuttonloaded(in nsidomelement defaultbutton); void restore(); void setcursor(in domstring cursor); attributes attribute type description browserdomwindow nsibrowserdomwindow the related nsibrowserdomwindow instance which provides access to yet another layer of utility functions by chrome script.
... restore() restores the size and position of the window.
... void restore(); parameters none.
nsIDOMStorage2
items stored in local storage may only be accessed by the same origin that created the items in the first place.
... last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) inherits from: nsisupports method overview void clear(); domstring getitem(in domstring key); domstring key(in unsigned long index); void removeitem(in domstring key); void setitem(in domstring key, in domstring data); attributes attribute type description length unsigned long the number of keys stored in local storage.
...key() returns the key for the item stored at the specified index in the data store.
nsIDOMStorageItem
attributes attribute type description secure boolean if true, the item was stored for an https page.
... note: all items, regardless of whether they were stored for an http page or an https page, are visible from https pages.
... however, http pages can only see items stored from http pages, and will not see items stored from https pages.
nsIDownloadManager
atarget the uri indicating where the transferred file should be stored.
... atempfile the location of a temporary file (a file in which the received data will be stored but is not equal to the target file).
...this can be one that is in progress, or one that has completed in the past and is stored in the database.
nsIHttpChannel
tservice(components.interfaces.nsiioservice); var ch = ios.newchannel("https://www.example.com/", null, null); method overview void getoriginalresponseheader(in acstring aheader, in nsihttpheadervisitor avisitor); acstring getrequestheader(in acstring aheader); acstring getresponseheader(in acstring header); boolean isnocacheresponse(); boolean isnostoreresponse(); void redirectto(in nsiuri anewuri); void setemptyrequestheader(in acstring aheader); void setreferrerwithpolicy(in nsiuri referrer, in unsigned long referrerpolicy); void setrequestheader(in acstring aheader, in acstring avalue, in boolean amerge); void setresponseheader(in acstring header, in acstring value, in boolean merge); v...
... isnostoreresponse() boolean isnostoreresponse(); parameters none.
... return value true if the server sent a "cache-control: no-store" response header.
nsILoginInfo
nsilogininfo is an object containing information for a login stored by the login manager.
...forms with no action attribute default to submitting to their origin url, so that is stored here.
... a blank value indicates the login was stored before bug 360493 was fixed.
nsIPrefLocalizedString
inherits from: nsisupports last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) method overview void setdatawithlength(in unsigned long length, [size_is(length)] in wstring data); wstring tostring(); attributes attribute type description data wstring provides access to string data stored in this property.
... data the string data to be stored.
...return value returns wstring - the string containing the data stored within this object.
nsISHEntry
the child shells are restored as children of the parent docshell, in this order, when the parent docshell restores a saved presentation.
...nsicontentviewer getanycontentviewer( out nsishentry ownerentry ); parameters ownerentry return value getscrollposition() void getscrollposition( out long x, out long y ); parameters x y native code only!getviewerbounds saved position and dimensions of the content viewer; we must adjust the root view's widget accordingly if this has changed when the presentation is restored.
...example see nssessionstore.js for a real example.
nsITreeColumns
inherits from: nsisupports method overview nsitreecolumn getcolumnat(in long index); nsitreecolumn getcolumnfor(in nsidomelement element); nsitreecolumn getfirstcolumn(); nsitreecolumn getkeycolumn(); nsitreecolumn getlastcolumn(); nsitreecolumn getnamedcolumn(in astring id); nsitreecolumn getprimarycolumn(); nsitreecolumn getsortedcolumn(); void invalidatecolumns(); void restorenaturalorder(); attributes attribute type description count long the number of columns.
...restorenaturalorder() restore the original order of the columns before the user moved them.
... void restorenaturalorder(); parameters none.
nsIWindowsShellService
inherits from: nsishellservice last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) method overview string getregistryentry(in long ahkeyconstant, in string asubkeyname, in string avaluename); obsolete since gecko 1.8 void restorefilesettings(in boolean aforallusers); obsolete since gecko 1.9 void shortcutmaintenance(); attributes attribute type description desktopbackgroundcolor unsigned long the desktop background color, visible when no background image is used, or if the background image is centered and does not fill the entire screen.
... restorefilesettings() obsolete since gecko 1.9 (firefox 3) restores system settings to what they were before firefox modified them.
... void restorefilesettings( in boolean aforallusers ); parameters aforallusers whether or not firefox should restore settings for all users on a multi-user system.
nsIXPConnect
void reparentscopeawarewrappers(in jscontextptr ajscontext, in jsobjectptr aoldscope, in jsobjectptr anewscope); obsolete since gecko 1.9.1 nsixpconnectjsobjectholder reparentwrappednativeiffound(in jscontextptr ajscontext, in jsobjectptr ascope, in jsobjectptr anewparent, in nsisupports acomobj); void restorewrappednativeprototype(in jscontextptr ajscontext, in jsobjectptr ascope, in nsiclassinfo aclassinfo, in nsixpconnectjsobjectholder aprototype); void setdebugmodewhenpossible(in prbool mode); native code only!
...ctjsobjectholder reparentwrappednativeiffound( in jscontextptr ajscontext, in jsobjectptr ascope, in jsobjectptr anewparent, in nsisupports acomobj ); parameters ajscontext missing description ascope missing description anewparent missing description acomobj missing description return value missing description exceptions thrown missing exception missing description restorewrappednativeprototype() restore an old prototype for wrapped natives of type aclassinfo.
... void restorewrappednativeprototype( in jscontextptr ajscontext, in jsobjectptr ascope, in nsiclassinfo aclassinfo, in nsixpconnectjsobjectholder aprototype ); parameters ajscontext missing description ascope missing description aclassinfo missing description aprototype missing description exceptions thrown missing exception missing description native code only!setdebugmodewhenpossible when we place the browser in js debug mode, there can't be any js on the stack.
Storage
note: storage is not the same as the dom:storage feature which can be used by web pages to store persistent data or the session store api (an xpcom storage utility for use by extensions).
...this extension is treated specially by windows as a known extension for an 'application compatibility database' and changes are backed up by the system automatically as part of system restore functionality.
... nscomptr<mozistoragestatement> statement; // mdbconn is a database connection that is stored a member variable of the class.
Using the clipboard
const nssupportsstring = components.constructor("@mozilla.org/supports-string;1", "nsisupportsstring"); function supportsstring(str) { // create an instance of the supports-string class var res = nssupportsstring(); // store the javascript string that we want to wrap in the new nsisupportsstring object res.data = str; return res; } // create a constructor for the built-in transferable class const nstransferable = components.constructor("@mozilla.org/widget/transferable;1", "nsitransferable"); // create a wrapper to construct an nsitransferable instance and set its source to the given window, when necessary ...
...now that we have the object to copy, a transferring object needs to be created: var str = "text to copy"; var trans = transferable(sourcewindow); trans.adddataflavor("text/unicode"); // we multiply the length of the string by 2, since it's stored in 2-byte utf-16 // format internally.
... services.clipboard.setdata(trans, null, services.clipboard.kglobalclipboard); we get the system clipboard object and store it in the clip variable.
Index
the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk.
...thunderbird's front-end code is stored in mozilla/mail.
... training data is global across all mail accounts within a profile training data is stored in a binary format, in a file named "training.dat".
Using COM from js-ctypes
; 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.release(spvoiceptr); } couninitialize(); } } main(); lib.close(); other examples shgetpropertystoreforwindow - this examples shows that coinit is not needed, some winapi functions return the interface.
... this example uses ipropertystore::setvalue to change the system.usermodelapp.id of an open firefox window.
... example a - based on bugzilla :: bug 738501 - attachement 608538 exmaple b - based on example a ishelllink & ipersistfile & ipropertystore - uses ipropertystore to set and get the system.usermodelapp.id on shortcut files.
Debugging service workers - Firefox Developer Tools
testing a service worker cache if you are using your service worker to store your site assets in cache storage (using the cache api), which is essential for creating offline apps, it can be annoying to test the cache.
... the firefox devtools’ storage tab has a cache storage section that lists all the different caches you have stored under each different origin.
... you can also click on one of the individual items stored in the cache, then right/ctrl click on it to get options for deleting just that item, or every item in the cache.
Extension Storage - Firefox Developer Tools
this table contains the following columns: key — the name of the stored item.
... value — the value of the stored item.
... storage area — the name of the area where the item is stored.
Cache.put() - Web APIs
WebAPICacheput
fetch(url).then(function(response) { if (!response.ok) { throw new typeerror('bad response status'); } return cache.put(url, response); }) note: put() will overwrite any key/value pair previously stored in the cache that matches the request.
... note: cache.add/cache.addall do not cache responses with response.status values that are not in the 200 range, whereas cache.put lets you store any request/response pair.
... as a result, cache.add/cache.addall can't be used to store opaque responses, whereas cache.put can.
Compositing example - Web APIs
0, 0, width/2, height/2); ctx.globalcompositeoperation = pop; ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.globalcompositeoperation = "source-over"; ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext(pop, 5, height/2 - 5); ctx.restore(); var ctx = canvastodrawon.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas1, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext('existing content', 5, height/2 - 5); ...
... ctx.restore(); var ctx = canvastodrawfrom.getcontext('2d'); ctx.clearrect(0, 0, width, height) ctx.save(); ctx.drawimage(canvas2, 0, 0, width/2, height/2); ctx.fillstyle = "rgba(0,0,0,0.8)"; ctx.fillrect(0, height/2 - 20, width/2, 20); ctx.fillstyle = "#fff"; ctx.font = "14px arial"; ctx.filltext('new content', 5, height/2 - 5); ctx.restore(); dd.appendchild(canvastodrawon); dd.appendchild(canvastodrawfrom); dd.appendchild(canvastodrawresult); dl.appendchild(dd); } }; utility functions the program relies on a number of utility functions.
...ion = "lighter"; ctx.beginpath(); ctx.fillstyle = "rgba(255,0,0,1)"; ctx.arc(100, 200, 100, math.pi*2, 0, false); ctx.fill() ctx.beginpath(); ctx.fillstyle = "rgba(0,0,255,1)"; ctx.arc(220, 200, 100, math.pi*2, 0, false); ctx.fill() ctx.beginpath(); ctx.fillstyle = "rgba(0,255,0,1)"; ctx.arc(160, 100, 100, math.pi*2, 0, false); ctx.fill(); ctx.restore(); ctx.beginpath(); ctx.fillstyle = "#f00"; ctx.fillrect(0,0,30,30) ctx.fill(); }; var colorsphere = function(element) { var ctx = canvas1.getcontext("2d"); var width = 360; var halfwidth = width / 2; var rotate = (1 / 360) * math.pi * 2; // per degree var offset = 0; // scrollbar offset var oleft = -20; var otop = -20; for (var n = 0; n <= 359; n...
Element: mousedown event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...first we store the x and y coordinates of the mouse pointer in the variables x and y, and then set isdrawing to true.
...if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Element: mousemove event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...first we store the x and y coordinates of the mouse pointer in the variables x and y, and then set isdrawing to true.
...if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Element: mouseup event - Web APIs
when the page loads, constants mypics and context are created to store a reference to the canvas and the 2d context we will use to draw.
...first we store the x and y coordinates of the mouse pointer in the variables x and y, and then set isdrawing to true.
...if isdrawing is true, the event handler calls the drawline function to draw a line from the stored x and y values to the current location.
Introduction to the File and Directory Entries API - Web APIs
if you are targeting chrome for your app and you want to store blobs, the file and directory entries api and app cache are your only choices.
... offline web mail client the client downloads attachments and stores them locally.
...a blob is a set of binary data that is stored as a single object.
History.scrollRestoration - Web APIs
syntax const scrollrestore = history.scrollrestoration values auto the location on the page to which the user has scrolled will be restored.
... manual the location on the page is not restored.
... const scrollrestoration = history.scrollrestoration if (scrollrestoration === 'manual') { console.log('the location on the page is not restored, user will need to scroll manually.'); } prevent automatic page location restoration if (history.scrollrestoration) { history.scrollrestoration = 'manual'; } specifications specification status comment html living standardthe definition of 'scroll restoration mode' in that specification.
IDBDatabase: abort event - Web APIs
// 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', { uni...
...que: 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.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; 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(); }; ...
IDBDatabase: close event - Web APIs
bubbles no cancelable no interface event event handler property onerror examples this example opens a database and listens for the close event: // 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', { uni...
...que: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { const db = dbopenrequest.result; db.addeventlistener('close', () => { console.log('database connection closed'); }); }; the same example, using the onclose property instead of addeventlistener(): // 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; db.onclose = () => { console.log('database connection closed'); }; }; ...
IDBDatabase.onabort - Web APIs
}; example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
... dbopenrequest.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function() { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function() { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var 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 }); objectstore.createindex("not...
...ified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onabort' in that specification.
IDBDatabase.onerror - Web APIs
} example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases.
... dbopenrequest.onupgradeneeded = function(event) { var db = this.result; db.onerror = function(event) { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function(event) { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var 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 }); objectstore.createindex("n...
...otified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; }; specifications specification status comment indexed database api 2.0the definition of 'onerror' in that specification.
IDBDatabase.onversionchange - Web APIs
} example this example shows an idbopendbrequest.onupgradeneeded block that creates a new object store; it also includes onerror and onabort functions to handle non-success cases, and an onversionchange function to notify when a database structure change has occurred.
... request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error opening database.</li>'; }; db.onabort = function(event) { note.innerhtml += '<li>database opening aborted!</li>'; }; // create an objectstore for this database var 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 }); objectstore.createindex(...
..."notified", "notified", { unique: false }); note.innerhtml += '<li>object store created.</li>'; db.onversionchange = function(event) { note.innerhtml += '<li>a database change has occurred; you should refresh this browser window, or close it down and use the other open version of this application, wherever it exists.</li>'; }; }; specifications specification status comment indexed database api 2.0the definition of 'onversionchange' in that specification.
IDBDatabase: versionchange event - Web APIs
ubbles no cancelable no interface event event handler property onversionchange examples this example opens a database and, on success, adds a listener to versionchange: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 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', { uni...
...que: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.addeventlistener('success', event => { const db = event.target.result; db.addeventlistener('versionchange', event => { console.log('the version of this database has changed'); }); }); the same example, using the onversionchange event handler property: // open the database const dbopenrequest = window.indexeddb.open('nonexistent', 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 = event.target.result; db.onversionchange = event => { console.log('the version of this database has changed'); }; }; ...
IDBIndex.count() - Web APIs
WebAPIIDBIndexcount
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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'); tablerow.innerhtml = '<...
IDBIndex.getKey() - Web APIs
WebAPIIDBIndexgetKey
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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('tr'); tablerow.inne...
IDBIndex.keyPath - Web APIs
WebAPIIDBIndexkeyPath
example in the following example we open a transaction and an object store, then get the index lname from a simple contacts database.
... we then open a basic cursor on the index using idbindex.opencursor — this works the same as opening a cursor directly on an objectstore using idbobjectstore.opencursor except that the returned records are sorted based on the index, not the primary key.
...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>' + '<td>' + cursor.value.lnam...
IDBKeyRange - Web APIs
records can be retrieved from idbobjectstore and idbindex objects using keys or a range of keys.
...we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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("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.continue(); } else { conso...
IDBOpenDBRequest: blocked event - Web APIs
able no interface idbversionchangeevent event handler property onblocked examples using addeventlistener(): // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (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 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', { uniqu...
...e: false }); objectstore.createindex('year', 'year', { unique: false }); }; dbopenrequest.onsuccess = (event) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.addeventlistener('blocked', () => { console.log('request was blocked'); }); }; using the onblocked property: // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = (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 ite...
...ms 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) => { // let's try to open the same database with a higher revision version const req2 = indexeddb.open('todolist', 5); // in this case the onblocked handler will be executed req2.onblocked = () => { console.log('request was blocked'); }; }; ...
IDBOpenDBRequest: upgradeneeded event - Web APIs
bubbles no cancelable no interface event event handler onupgradeneeded examples this example opens a database and handles the upgradeneeded event by making any necessary updates to the object store.
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.addeventlistener('upgradeneeded', event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var 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 }); }); this is the same example, but uses the onupgradeneeded event handler...
... // open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = event => { const db = event.target.result; console.log(`upgrading to version ${db.version}`); // create an objectstore for this database var 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 }); }; ...
IDBOpenDBRequest - Web APIs
dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
...he 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(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var 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 }); objectstore.createindex("notified", "notified", { unique: false }); }; specifications specification status comment indexed database api 2.0the definition of 'idbopendbrequest' in that specification.
IDBRequest.onerror - Web APIs
}; example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the 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 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 request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); ...
... // when this new request succeeds, run the displaydata() // function again to update the display updatetitlerequest.onsuccess = function() { displaydata(); }; }; objectstoretitlerequest.onerror = function() { // if an error occurs with the request, log what it is console.log("there has been an error with retrieving your data: " + objectstoretitlerequest.error); // todo what about event parameter into onerror()?
IDBRequest: success event - Web APIs
t handler property onsuccess examples this example tries to open a database and listens for the success event using addeventlistener(): // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (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 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', { uniqu...
...e: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.addeventlistener('success', (event) => { console.log('database opened successfully!'); }); the same example, but using the onsuccess event handler property: // open the database const openrequest = window.indexeddb.open('todolist', 4); openrequest.onupgradeneeded = (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 items the objectstore will contain objectstore.createindex('hours', 'hours', { unique: false }); objectstore.createindex('minutes', 'minutes', { unique: false }); obj...
...ectstore.createindex('day', 'day', { unique: false }); objectstore.createindex('month', 'month', { unique: false }); objectstore.createindex('year', 'year', { unique: false }); }; openrequest.onsuccess = (event) => { console.log('database opened successfully!'); }; ...
IDBTransaction.abort() - 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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) not...
IDBTransaction: abort event - Web APIs
// open the database const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = 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 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', { uniqu...
...e: 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 const dbopenrequest = window.indexeddb.open('todolist', 4); dbopenrequest.onupgradeneeded = 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 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'); // add a listener for `abort` transaction.onabort = (event) => { console.log('transaction was aborted'); }; //...
IDBTransaction.db - Web APIs
WebAPIIDBTransactiondb
example in the following code snippet, we open a read/write transaction on our database and add some data to an object store.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) not...
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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...nsaction(["todolist"], "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: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) not...
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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ansaction(["todolist"], "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: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) not...
IDBTransaction.oncomplete - 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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...ansaction(["todolist"], "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: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.oncomplete) no...
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.
...for a full working example, see our to-do notifications app (view example live.) // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...nsaction(["todolist"], "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: ' + transaction.error + '</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("todolist"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) not...
IDBVersionChangeRequest.setVersion() - Web APIs
for older webkit browsers, call this method before creating or deleting an object store.
...the new way is to define the version in the idbdatabase.open() method and create and delete object stores in the onupgradeneeded event handler associated with the returned request.
... syntax idbversionchangerequest setversion ([treatnullas=emptystring] in domstring version); example tbd parameters version the version to store in the database.
Timing element visibility with the Intersection Observer API - Web APIs
previouslyvisibleads used to temporarily store the list of visible ads while the document is not visible (for example, if the user has tabbed to another page).
... refreshintervalid used to store the interval id returned by setinterval().
...to do so, we begin by saving the set of visible ads into a variable known as previouslyvisibleads to be sure we can restore them when the user tabs back into the document, and we then empty the visibleads set so they won't be treated as visible.
KeyboardEvent.charCode - Web APIs
og a <code>charcode</code>.</p> <input type="text" /> <p id="log"></p> javascript let input = document.queryselector('input'); let log = document.queryselector('#log'); input.addeventlistener('keypress', function(e) { log.innertext = `key pressed: ${string.fromcharcode(e.charcode)}\ncharcode: ${e.charcode}`; }); result notes in a keypress event, the unicode value of the key pressed is stored in either the keycode or charcode property, but never both.
...otherwise, the code of the pressed key is stored in keycode.
... to get the code of the key regardless of whether it was stored in keycode or charcode, query the which property.
NavigatorStorage - Web APIs
the navigatorstorage mixin adds to the navigator and workernavigator interfaces the navigator.storage property, which provides access to the storagemanager singleton used for controlling the persistence of data stores as well as obtaining information note: this feature is available in web workers.
... there are many apis which provide ways for web content to store data on a user's computer, including cookies, the web storage api (window.localstorage and window.sessionstorage), and indexeddb.
...through the returned object, you can control persistence of data stores as well as get estimates of how much space is left for your site or appliation to store data.
Using the Notifications API - Web APIs
it stores data locally using indexeddb and notifies users when tasks are due using system notifications.
... <button id="enable">enable notifications</button> clicking this calls the asknotificationpermission() function: function asknotificationpermission() { // function to actually ask the permissions function handlepermission(permission) { // whatever the user answers, we make sure chrome stores the information if(!('permission' in notification)) { notification.permission = permission; } // set the button to shown or hidden, depending on what the user answers if(notification.permission === 'denied' || notification.permission === 'default') { notificationbtn.style.display = 'block'; } else { notificationbtn.style.display = 'none'; } } // le...
... to avoid duplicating code, we have stored a few bits of housekeeping code inside the handlepermission() function, which is the first main block inside this snippet.
WebGL2RenderingContext - Web APIs
buffers webgl2renderingcontext.bufferdata() initializes and creates the buffer object's data store.
... webgl2renderingcontext.buffersubdata() updates a subset of a buffer object's data store.
... webgl2renderingcontext.renderbufferstoragemultisample() creates and initializes a renderbuffer object's data store and allows specifying the number of samples to be used.
Data in WebGL - Web APIs
WebAPIWebGL APIData
each kind of variable is accessible by one or both types of shader program (depending on the data store type) and possibly by the site's javascript code, depending on the specific type of variable.
...attributes are typically used to store color information, texture coordinates, and any other data calculated or retrieved that needs to be shared between the javascript code and the vertex shader.
... vec4( 1.0, 0.0, 0.0, 1.0 ), // red vec4( 1.0, 1.0, 0.0, 1.0 ), // yellow vec4( 0.0, 1.0, 0.0, 1.0 ), // green vec4( 0.0, 0.0, 0.0, 1.0 ), // black vec4( 1.0, 0.0, 0.0, 1.0 ), // red vec4( 1.0, 1.0, 0.0, 1.0 ), // yellow vec4( 0.0, 1.0, 0.0, 1.0 ), // green ]; var cbuffer = gl.createbuffer(); //continued //create buffer to store colors and reference it to "vcolor" which is in glsl gl.bindbuffer( gl.array_buffer, cbuffer ); gl.bufferdata( gl.array_buffer, flatten(vertexcolors), gl.static_draw ); var vcolor = gl.getattriblocation( program, "vcolor" ); gl.vertexattribpointer( vcolor, 4, gl.float, false, 0, 0 ); gl.enablevertexattribarray( vcolor ); //glsl attribute vec4 vcolor; void main() { fcol...
Adding 2D content to a WebGL context - Web APIs
this information can then be stored in varyings or attributes as appropriate to be shared with the fragment shader.
...since the attribute and uniform locations are specific to a single shader program we'll store them together to make them easy to pass around const programinfo = { program: shaderprogram, attriblocations: { vertexposition: gl.getattriblocation(shaderprogram, 'avertexposition'), }, uniformlocations: { projectionmatrix: gl.getuniformlocation(shaderprogram, 'uprojectionmatrix'), modelviewmatrix: gl.getuniformlocation(shaderprogram, 'umodelviewmatrix'), ...
...it starts by calling the gl object's createbuffer() method to obtain a buffer into which we'll store the vertex positions.
Using DTMF with WebRTC - Web APIs
dialbutton and logelement these variables will be used to store references to the dial button and the <div> into which logging information will be written.
... then a second rtcpeerconnection, this one representing the receiving end of the call, is created and stored in receiverpc; its onicecandidate event handler is set up too.
...if so, we log the fact that we're about to send the dtmf, then we call dtmf.insertdtmf() to send the dtmf on the same track as the audio data method on the rtcdtmfsender object we previously stored in dtmfsender.
Privileged features - Web APIs
dialog the dialog feature removes all icons (restore, minimize, maximize) from the window's titlebar, leaving only the close button.
...dialog windows are windows which have no minimize system command icon and no maximize/restore down system command icon on the titlebar nor in correspondent menu item in the command system menu.
...in ns 6.x, the alwayslowered window has no minimize system command icon and no restore/maximize system command.
Window: popstate event - Web APIs
it happens after the new location has loaded (if needed), displayed, made visible, and so on, after the pageshow event is sent, but before the persisted user state information is restored and the hashchange event is sent.
... if the browser has state information it wishes to store with the current-entry before navigating away from it, it then does so.
... any persisted user state is restored, if the browser chooses to do so.
Window - Web APIs
WebAPIWindow
domparser domparser can parse xml or html source stored in a string into a dom document.
... window.localstorage read only returns a reference to the local storage object used to store data that may only be accessed by the origin that created it.
... window.sessionstorage returns a reference to the session storage object used to store data that may only be accessed by the origin that created it.
WindowOrWorkerGlobalScope.setTimeout() - Web APIs
pressing the first button will set a timeout which calls an alert dialog after two seconds and stores the timeout id for use by cleartimeout().
... note: the minimum delay, dom_min_timeout_value, is 4 ms (stored in a preference in firefox: dom.min_timeout_value), with a dom_clamp_timeout_nesting_level of 5.
... maximum delay value browsers including internet explorer, chrome, safari, and firefox store the delay as a 32-bit signed integer internally.
Implementing a Microsoft Active Accessibility (MSAA) Server - Accessibility
solution: in gecko/mozilla, we did not want to store an extra 32 bit unique id value on every object.
... if you're not using a hash table to keep track of unique id's, store the child id's and objects for the last 50 or so events in a circular array.
... in mozilla, the client has another choice for tree navigation -- it can utilize data stored in the dom via mozilla's custom isimpledomnode com interface.
HTTP conditional requests - HTTP
for unsafe methods, like put, which usually uploads a document, the conditional request can be used to upload the document, only if the original it is based on is the same as that stored on the server.
... validators all conditional headers try to check if the resource stored on the server matches a specific version.
...this is very common in any file system or source control applications, but any application that allows to store remote resources needs such a mechanism.
Set-Cookie - HTTP
warning: many web browsers have a session restore feature that will save all tabs and restore them next time the browser is used.
... session cookies will also be restored, as if the browser was never closed.
...(however, confidential information should never be stored in http cookies, as the entire mechanism is inherently insecure and doesn't encrypt any information.) note: insecure sites (http:) can't set cookies with the secure attribute (since chrome 52 and firefox 52).
Array.prototype.push() - JavaScript
the source for this interactive example is stored in a github repository.
... note that we don't create an array to store a collection of objects.
... instead, we store the collection on the object itself and use call on array.prototype.push to trick the method into thinking we are dealing with an array—and it just works, thanks to the way javascript allows us to establish the execution context in any way we want.
JSON.stringify() - JavaScript
the source for this interactive example is stored in a github repository.
... "bar", baz: "quux" }) //'{"foo":"bar","baz":"quux"}' var b = json.stringify({ baz: "quux", foo: "bar" }) //'{"baz":"quux","foo":"bar"}' console.log(a !== b) // true // some memoization functions use json.stringify to serialize arguments, // which may cause a cache miss when encountering the same object like above example of using json.stringify() with localstorage in a case where you want to store an object created by your user and allowing it to be restored even after the browser has been closed, the following example is a model for the applicability of json.stringify(): // creating an example of json var session = { 'screens': [], 'state': true }; session.screens.push({ 'name': 'screena', 'width': 450, 'height': 250 }); session.screens.push({ 'name': 'screenb', 'width': 650, 'height...
... 390, 'height': 120 }); session.screens.push({ 'name': 'screenf', 'width': 1240, 'height': 650 }); // converting the json string with json.stringify() // then saving with localstorage in the name of session localstorage.setitem('session', json.stringify(session)); // example of how to transform the string generated through // json.stringify() and saved in localstorage in json object again var restoredsession = json.parse(localstorage.getitem('session')); // now restoredsession variable contains the object that was saved // in localstorage console.log(restoredsession); well-formed json.stringify() engines implementing the well-formed json.stringify specification will stringify lone surrogates, any code point from u+d800 to u+dfff, using unicode escape sequences rather than literally.
Object.defineProperty() - JavaScript
the source for this interactive example is stored in a github repository.
...if these methods use a variable to store the value, this value will be shared by all objects.
... function myclass() { } object.defineproperty(myclass.prototype, "x", { get() { return this.stored_x; }, set(x) { this.stored_x = x; } }); var a = new myclass(); var b = new myclass(); a.x = 1; console.log(b.x); // undefined unlike accessor properties, value properties are always set on the object itself, not on a prototype.
Proxy - JavaScript
let validator = { set: function(obj, prop, value) { if (prop === 'age') { if (!number.isinteger(value)) { throw new typeerror('the age is not an integer'); } if (value > 200) { throw new rangeerror('the age seems invalid'); } } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }; const person = new proxy({}, validator); person.age = 100; console.log(person.age); // 100 person.age = 'young'; // throws an exception person.age = 300; // throws an exception extending constructor a function proxy could easily extend a constructor with a new constructor.
... let view = new proxy({ selected: null }, { set: function(obj, prop, newval) { let oldval = obj[prop]; if (prop === 'selected') { if (oldval) { oldval.setattribute('aria-selected', 'false'); } if (newval) { newval.setattribute('aria-selected', 'true'); } } // the default behavior to store the value obj[prop] = newval; // indicate success return true; } }); let i1 = view.selected = document.getelementbyid('item-1'); //giving error here, i1 is null console.log(i1.getattribute('aria-selected')); // 'true' let i2 = view.selected = document.getelementbyid('item-2'); console.log(i1.getattribute('aria-selected')); // 'false' console.log(i2.getattribute('aria-selected...
...sers.length - 1]; } // the default behavior to return the value return obj[prop]; }, set: function(obj, prop, value) { // an extra property if (prop === 'latestbrowser') { obj.browsers.push(value); return true; } // convert the value if it is not an array if (typeof value === 'string') { value = [value]; } // the default behavior to store the value obj[prop] = value; // indicate success return true; } }); console.log(products.browsers); // ['internet explorer', 'netscape'] products.browsers = 'firefox'; // pass a string (by mistake) console.log(products.browsers); // ['firefox'] <- no problem, the value is an array products.latestbrowser = 'chrome'; console.log(products.browsers); // ['firefox', 'chrome'] ...
TypedArray.prototype.set() - JavaScript
the set() method stores multiple values in the typed array, reading input values from a specified array.
... the source for this interactive example is stored in a github repository.
... exceptions a rangeerror, if the offset is set such as it would store beyond the end of the typed array.
WebAssembly.Table() constructor - JavaScript
syntax new webassembly.table(tabledescriptor); parameters tabledescriptor an object that can contain the following members: element a string representing the type of value to be stored in the table.
... the table2.wasm module contains two functions (one that returns 42 and another that returns 83) and stores both into elements 0 and 1 of the imported table (see text representation).
... webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
WebAssembly.Table.prototype.get() - JavaScript
the get() prototype method of the webassembly.table() object retrieves a function reference stored at a given index.
...it then retrieves the references stored in the exported table.
... webassembly.instantiatestreaming(fetch('table.wasm')) .then(function(obj) { var tbl = obj.instance.exports.tbl; console.log(tbl.get(0)()); // 13 console.log(tbl.get(1)()); // 42 }); note how you've got to include a second function invocation operator at the end of the accessor to actually retrieve the value stored inside the reference (e.g.
WebAssembly.Table.prototype.set() - JavaScript
the set() prototype method of the webassembly.table object mutates a reference stored at a given index to a different value.
..., element:"anyfunc"}); console.log(tbl.length); console.log(tbl.get(0)); console.log(tbl.get(1)); we then create an import object that contains a reference to the table: var importobj = { js: { tbl:tbl } }; finally, we load and instantiate a wasm module (table2.wasm) using the webassembly.instantiatestreaming(), log the table length, and invoke the two referenced functions that are now stored in the table (the table2.wasm module (see text representation) adds two function references to the table, both of which print out a simple value): webassembly.instantiatestreaming(fetch('table2.wasm'), importobject) .then(function(obj) { console.log(tbl.length); console.log(tbl.get(0)()); console.log(tbl.get(1)()); }); note how you've got to include a second function invocation operator ...
...at the end of the accessor to actually invoke the referenced function and log the value stored inside it (e.g.
categories - Web app manifests
note: categories are used only as hints for catalogs or stores listing web applications.
... like search engines and meta keywords, catalogs and stores are free to ignore them.
... note: categories values are lower-cased by the stores and catalogs before processing, so "news" and "news" are treated as the same value.
Media container formats (file types) - Web media technologies
in other cases, a particular codec, stored in a certain container type, is so ubiquitous that the pairing is treated in a unique fashion.
... apple lossless (alac) no he-aac no mpeg-1 audio layer iii (mp3) no microsoft adpcm no µ-law 2:1 (u-law) no wave (wav) the waveform audio file format (wave), usually referred to simply as wav due to its filename extension being .wav, is a format developed by microsoft and ibm to store audio bitstream data.
... the source for this interactive example is stored in a github repository.
Introduction to progressive web apps - Progressive web apps (PWAs)
linkability one of the most powerful features of the web is the ability to link to an app at a specific url without the need for an app store or complex installation process.
... this is achieved using a combination of technologies: service workers to control page requests (for example storing them offline), the cache api for storing responses to network requests offline (very useful for storing site assets), and client-side data storage technologies such as web storage and indexeddb to store application data offline.
...this is very different from apps in app stores, which may have a number of similarly-named apps, some of which may even be based on your own site, which only adds to the confusion.
Same-origin policy - Web security
(a "tuple" is a set of items that together comprise a whole — a generic form for double/triple/quadruple/quintuple/etc.) the following table gives examples of origin comparisons with the url http://store.company.com/dir/page.html: url outcome reason http://store.company.com/dir2/other.html same origin only the path differs http://store.company.com/dir/inner/another.html same origin only the path differs https://store.company.com/page.html failure different protocol http://store.company.com:81/dir/page.html failure differe...
... for example, assume a script from the document at http://store.company.com/dir/other.html executes the following: document.domain = "company.com"; afterward, the page can pass the same-origin check with http://company.com/dir/page.html (assuming http://company.com/dir/page.html sets its document.domain to "company.com" to indicate that it wishes to allow that - see document.domain for more).
... cross-origin data storage access access to data stored in the browser such as web storage and indexeddb are separated by origin.
How to turn off form autocompletion - Web security
when the user visits the site again, the browser autofills the login fields with the stored values.
... additionally, the browser enables the user to choose a master password that the browser will use to encrypt stored login details.
...since users do not have to remember passwords that the browser stores for them, they are able to choose stronger passwords than they would otherwise.
Types of attacks - Web security
xss attacks can be put into three categories: stored (also called persistent), reflected (also called non-persistent), or dom-based.
... stored xss attacks the injected script is stored permanently on the target servers.
...this token should be unique per user and stored (for example, in a cookie) such that the server can look up the expected value when the request is sent.
Content Scripts - Archive of obsolete content
sdk high-level and low-level apis, but can't access web content directly content scripts can't use the sdk's apis (no access to globals exports, require) but can access web content sdk apis that use content scripts, like page-mod and tabs, provide functions that enable the add-on's main code to load content scripts into web pages content scripts can be loaded in as strings, but are more often stored as separate files under the add-on's "data" directory.
...pt option treats the string itself as a script: // main.js var pagemod = require("sdk/page-mod"); var contentscriptvalue = 'document.body.innerhtml = ' + ' "<h1>page matches ruleset</h1>";'; pagemod.pagemod({ include: "*.mozilla.org", contentscript: contentscriptvalue }); the contentscriptfile option treats the string as a resource:// url pointing to a script file stored in your add-on's data directory.
Private Properties - Archive of obsolete content
a better approach would be to store thumbnails in their own, separate hash map: let thumbnails = {}; function getthumbnail(image) { let thumbnail = thumbnails[image]; if (!thumbnail) { thumbnail = createthumbnail(image); thumbnails[image] = thumbnail; } return thumbnail; } there are two problems with the above approach.
...a better solution would be to store all private properties on a single object, called a namespace, and then store the namespace as a private property on the original object.
Module structure of the SDK - Archive of obsolete content
each module is a separate file stored under your add-on's "lib" directory, and exports the objects you want to make available to other modules in your add-on.
... for example, the following add-on contains an additional module directly under "lib", and other modules under subdirectories of "lib": my-addon lib main.js password-dialog.js secrets hash.js storage password-store.js to import modules into main: // main.js code var dialog = require("./password-dialog"); var hash = require("./secrets/hash"); to import modules into password-store: // password-store.js code var dialog = require("../password-dialog"); var hash = require("../secrets/hash"); external modules as well as using the sdk's modules and writing your own, you can use ...
Two Types of Scripts - Archive of obsolete content
each module is supplied as a script stored under the lib directory under your add-on's root directory.
...if they are stored in separate files you should store them under the data directory under your add-on's root.
jpm - Archive of obsolete content
here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi a .jpmignore file with the above contents would ignore all zip files and .ds_store files from the xpi generated by jpm xpi.
... this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api.
jpmignore - Archive of obsolete content
here is an example: # ignore .ds_store files created by mac .ds_store # ignore any zip or xpi files *.zip *.xpi # ignore specific directory # you can start patterns with a forward slash (/) to avoid recursivity.
.../sample/ a .jpmignore file with the above contents would ignore all zip files and .ds_store files and sample directory from the xpi generated by jpm xpi.
Canvas code snippets - Archive of obsolete content
t(canvas); } this.context = this.ctx = canvas.getcontext('2d'); if (!canvas2dcontext.prototype.arc) { canvas2dcontext.setup.call(this, this.ctx); } } canvas2dcontext.setup = function() { var methods = ['arc', 'arcto', 'beginpath', 'beziercurveto', 'clearrect', 'clip', 'closepath', 'drawimage', 'fill', 'fillrect', 'filltext', 'lineto', 'moveto', 'quadraticcurveto', 'rect', 'restore', 'rotate', 'save', 'scale', 'settransform', 'stroke', 'strokerect', 'stroketext', 'transform', 'translate']; var gettermethods = ['createpattern', 'drawfocusring', 'ispointinpath', 'measuretext', // drawfocusring not currently supported // the following might instead be wrapped to be able to chain their child objects 'createimagedata', 'createlineargradient', 'createradialgrad...
... ctx.clearrect(0, 0, remotecanvas.canvas_width, remotecanvas.canvas_height); ctx.save(); ctx.scale(remotecanvas.canvas_width / windowwidth, remotecanvas.canvas_height / windowheight); ctx.drawwindow(remotewindow, 0, 0, windowwidth, windowheight, 'rgb(255, 255, 255)'); ctx.restore(); }; usage: var remotecanvas = new remotecanvas(); remotecanvas.load(); convert image files to base64 strings the following code gets a remote image and converts its content to data uri scheme.
Miscellaneous - Archive of obsolete content
see also http://mxr.mozilla.org/seamonkey/source/browser/base/content/browser.js#4674 discovering which element in the loaded document has focus // focusedcontrol stores the focused field, or null if there is none.
... //put the cursor after the inserted text element.setselectionrange(selectionend, selectionend); } inserttext(document.getelementbyid("example"), "the text to be inserted"); disabling javascript programmatically // disable js in the currently active tab from the context of browser.xul gbrowser.docshell.allowjavascript = false; if this isn't your browser, you should save the value and restore it when finished.
Delayed Execution - Archive of obsolete content
delete delay.timers[idx]; func(); }, timeout, ci.nsitimer.type_one_shot); // store a reference to the timer so that it's not reaped before it fires.
... let idx = delay.timers.push(timer) - 1; return idx; } delay.timers = []; function repeat(timeout, func) { let timer = new timer(function () { func(); }, timeout, ci.nsitimer.type_repeating_slack); // store a reference to the timer so that it's not reaped before it fires.
How to convert an overlay extension to restartless - Archive of obsolete content
how to get and load the data of of your add-on's files using the add-on manager api: // this is the old way of getting one of your files const myaddonid = ...; // just store a constant with your id components.utils.import("resource://gre/modules/addonmanager.jsm"); addonmanager.getaddonbyid(myaddonid,function(addon) { var file = services.io.newuri("resource://myaddon/filename.ext",null,null) .queryinterface(components.interfaces.nsifileurl) .file; var stream = components.classes["@mozilla.org/network/file-in...
...the lazy getter magic will cause the file to be automatically loaded the first time it is needed, after which point a reference to the loaded string bundle will be stored in "strings" for future accesses.
Security best practices in extensions - Archive of obsolete content
this is the same store that holds the logins from web pages, and passwords can only be retrieved using a site/username pairing known to the author.
...the usefulness of it and power of how it works is best illustrated by the popular greasemonkey extension, which works on the premise of scripts being downloaded and stored locally, to be injected into the web content context via the sandbox.
Signing an extension - Archive of obsolete content
mkdir keystore cd keystore nss-certutil -n -d .
...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.
Tabbed browser - Archive of obsolete content
xul: <menuitem oncommand="myextension.foo(event)" onclick="checkformiddleclick(this, event)" label="click me"/> js: var myextension = { foo: function(event) { openuilink("http://www.example.com", event, false, true); } } opening a url in an on demand tab cu.import("resource://gre/modules/xpcomutils.jsm"); xpcomutils.definelazyservicegetter(this, "gsessionstore", "@mozilla.org/browser/sessionstore;1", "nsisessionstore"); // create new tab, but don't load the content.
... var url = "https://developer.mozilla.org"; var tab = gbrowser.addtab(null, {relatedtocurrent: 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.
JXON - Archive of obsolete content
the text content of each element is stored into the keyvalue property, while nodeattributes, if they exist, are listed under the child object keyattributes.
...as above, the text content is stored into the keyvalue property.
Environment variables affecting crash reporting - Archive of obsolete content
moz_crashreporter_fulldump store full application memory in the minidump, so you can open it in a microsoft debugger.
...minidumps will be stored in the user's profile directory, in a subdirectory named "minidumps".
Notes on HTML Reflow - Archive of obsolete content
the reflow tree work, which will remove several commands from the queue at once.) a path is built from the target frame to the root frame and stored in the reflow command.
... a reflow state object is created with a reflow reason of incremental, the reflow command is stored in the state, and the reflow method of the root frame is invoked.
How Mozilla finds its configuration files - Archive of obsolete content
how mozilla finds its configuration files mozilla looks into the binary %userprofile%\application data\mozilla\registry.dat file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (located at common/profiles/profilename/directory.
...the configuration itself is stored in the specified directory, in a file named prefs.js.
How Thunderbird and Firefox find their configuration files - Archive of obsolete content
how thunderbird and firefox find their configuration files thunderbird looks into the binary %appdata%\thunderbird\profiles.ini file for its "registry", which contains, amongst other information, a pointer to the directory where the profile is stored (usually located in %appdata%\thunderbird\profiles\profilename).
...the configuration itself is stored in the specified directory, in a file named prefs.js.
Making a Mozilla installation modifiable - Archive of obsolete content
although mozilla stores the ui files in jar archives, it can also access them in their original, unarchived form, which is useful for the extensions developer because it makes it unnecessary to extract the files from the archive before changing the code and then re-add them to the archive afterwards.
...the archives are stored within the chrome subdirectory of the mozilla installation directory.
Drag and Drop Example - Archive of obsolete content
the ondrop handler first uses the createelement function to create a new element of the type stored in the drag session.
...the values of the pagex and pagey properties store the mouse pointer coordinates on the window where the drop occured.
Block and Line Layout Cheat Sheet - Archive of obsolete content
these are stored as a doubly-linked list in the mlines member of nsblockframe.
... ll_understandsnwhitespace ll_textstartswithnbsp ll_firstletterstyleok ll_istopofpage ll_updatedband ll_impactedbyfloaters ll_lastfloaterwasletterframe ll_canplacefloater ll_knowstrictmode ll_instrictmode ll_lineendsinbr perframedata (why isn't this just stored in the frame?) mflags pfd_relativepos pfd_istextframe pfd_isnonemptytextframe pfd_isnonwhitespacetextframe pfd_isletterframe pfd_issticky pfd_isbullet perspandata in nslinelayout, a "span" is a container inline frame, and a "frame" is one of its children.
Style System Overview - Archive of obsolete content
the declarations (properties & values) are stored in data structs (nscss*).
... to match rules, we do lookups in the rulehash's tables, remerge the lists of rules using stored indices, and then call selectormatchestree to find which selectors really match.
GRE Registration - Archive of obsolete content
successfully embedding the gre requires that information about installed gres be stored on the system.
... this information is stored differently on each operating system.
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.
... if the string is null and no certificate with the same dn exists in the user's certificate store, personal security manager uses the following pattern to derive the nickname: <tt><common name>'s <issuer name> id</tt>.
Settings - Archive of obsolete content
the settings persist across browser sessions and are stored using the jetpack [simple storage api][].
...with the above manifest the following stored properties are available in the jetpack's code: * jetpack.storage.settings.twitter.username * jetpack.storage.settings.twitter.password * jetpack.storage.settings.facebook.username * jetpack.storage.settings.facebook.password * jetpack.storage.settings.music * jetpack.storage.settings.volume see also simple storage jep 24 ...
Settings - Archive of obsolete content
the settings persist across browser sessions and are stored using the jetpack simple storage api.
...with the above manifest the following stored properties are available in the jetpack's code: jetpack.storage.settings.twitter.username jetpack.storage.settings.twitter.password jetpack.storage.settings.facebook.username jetpack.storage.settings.facebook.password jetpack.storage.settings.music jetpack.storage.settings.volume ...
Simple Storage - Archive of obsolete content
it's a simple key-based persistent object data store.
...examples this code persistently stores some data: jetpack.future.import("storage.simple");var mystorage = jetpack.storage.simple;mystorage.fribblefrops = [1, 3, 3, 7];mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt));var bar = mystorage.heimelfarbs.bar;jetpack.notifications.show(bar.baz);...
Simple Storage - Archive of obsolete content
it's a simple key-based persistent object data store.
...examples this code persistently stores some data: jetpack.future.import("storage.simple"); var mystorage = jetpack.storage.simple; mystorage.fribblefrops = [1, 3, 3, 7]; mystorage.heimelfarbs = { bar: "baz" }; and this code -- pretend it's in the same jetpack as the code above -- simply uses that data: mystorage.fribblefrops.foreach(function (elt) console.log(elt)); var bar = mystorage.heimelfarbs.bar; jetpack.notifications.show(bar...
Measuring add-on startup performance - Archive of obsolete content
the about:startup page shows 3 different time measurements: main, sessionrestored and firstpaint.
...sessionrestored is fired later in the process, when firefox has loaded all tabs from the saved session.
Monitoring downloads - Archive of obsolete content
in particular, it needs to get an instance of the download manager's nsidownloadmanager interface and create the database into which its data will be stored.
...that's to adjust the value from the granularity stored in the database to that expected by javascript.
LIR - Archive of obsolete content
load short and sign-extend to an int 19 lduc2ui integer load unsigned char and zero-extend to an unsigned int 20 ldus2ui integer load unsigned short and zero-extend to an unsigned int 21 ldi integer load int 22 ldq quad 64 bit load quad 23 ldd double load double 24 ldf2d double load float and extend to a double store 25 sti2c void store int truncated to char 26 sti2s void store int truncated to short 27 sti void store int 28 stq void 64 bit store quad 29 std void store double 30 std2f void store double as a float (losing precision) 31 not in use call 32 not in use 33 callv void c...
...s emitted for this) 42 not in use guards 43 x void exit always 44 xt void exit if true 45 xf void exit if false 46 xtbl void exit via indirect jump 47 xbarrier void a lir_xbarrier cause no code to be generated, but it acts like a never-taken guard in that it inhibits certain optimisations, such as dead stack store elimination.
Supporting per-window private browsing - Archive of obsolete content
firefox 20 introduced per-window private browsing mode, in which private user data is stored and accessed concurrently with public user data from another window.
...clearing any temporarily-stored private data it is permissable to store private data in non-persistent ways for the duration of a private browsing session.
URIs and URLs - Archive of obsolete content
together these segments form the url spec with the following syntax: scheme://username:password@host:port/directory/filebasename.fileextension;param?query#ref for performance reasons the complete spec is stored in escaped form in the nsstandardurl object with pointers (position and length) to each basic segment and for the more global segments like path and prehost for example.
...the information how to escape each segment is stored in a matrix.
Anonymous Content - Archive of obsolete content
when specified on the left-hand side of the pair it indicates that the attribute on the right-hand side should be stored as text nodes underneath the anonymous element.
... when used on the right-hand side, it indicates that any raw text nodes that are explicit children of the bound element should be coalesced and the resulting value should be stored as the attribute on the left-hand side.
Using XPInstall to Install Plugins - Archive of obsolete content
write keys in the windows registry which store information about this secondary location, in particular the plugin path and the xpt path (if applicable) so that netscape gecko browsers can pick up the plugin from the secondary location if they are installed after the plugin is (and thus, if a particular netscape gecko browser follows or replaces the current browser).
...this value is actually entered in the client version registry upon installation, a mozilla-browser file that stores metadata about the software that has just been installed.
patch - Archive of obsolete content
if the existing version of the file does not match the checksum stored in the gdiff file, patch returns an error without applying the patch.
... after patch applies a patch, it compares a checksum.of the resulting file against a checksum stored in the gdiff file.
sizemode - Archive of obsolete content
this attribute is used to save and restore the state of a window (together with the persist attribute) and for css styles (e.g.
...use window.maximize(), window.restore(), or window.minimize() to change the window state.
statedatasource - Archive of obsolete content
« xul reference home statedatasource type: uri chrome xul may specify an rdf datasource to use to store tree state information.
...if you do not specify this attribute, state information will be stored in the local store (rdf:local-store).
Accessing Files - Archive of obsolete content
profile the profile directory where preferences are stored.
...you would store any temporary or cache files here.
Writing to Files - Archive of obsolete content
as utf-8 can store all characters, you will usually always use this default.
...stream.write16(1000); stream.write32(1000); all values are read in big endian form, which means that integers are stored in the file with their higher bits first.
Building Trees - Archive of obsolete content
rather than generate content for every row in the tree, the results are stored in a list inside the builder.
...for cells in normal columns, you can use the value attribute to store some other value and you can use the view’s getcellvalue() method to retrieve it.
Tree Widget Changes - Archive of obsolete content
one feature that has been added is restorenaturalorder which may be used to restore the original order of the columns before the user moved them around.
... tree.columns.restorenaturalorder() there is also a command on the end of the tree's column picker which the user may use to restore the original column order.
Adding Methods to XBL-defined Elements - Archive of obsolete content
each element of the array stores each direct child element of the xbl-defined element.
...in the returned array, the first button is stored in the first array element (getanonymousnodes(element)[0]), the second button is stored in the second array element and the third button is stored in the third array element.
Box Objects - Archive of obsolete content
the content tree stores the nodes as they are found in the source code.
...first, you can retrieve the position and size of the xul element as displayed, and second, you can determine the order of the elements in the box as displayed, instead of their order as they are stored in the dom.
Manifest Files - Archive of obsolete content
a package can be stored either as a directory or as a jar archive.
...in this case, there is, since the files for the branding package are stored in a different path in the same archive.
Open and Save Dialogs - Archive of obsolete content
var nsifilepicker = components.interfaces.nsifilepicker; var fp = components.classes["@mozilla.org/filepicker;1"].createinstance(nsifilepicker); fp.init(window, "select a file", nsifilepicker.modeopen); first, a new file picker object is created and stored in the variable 'fp'.
...the file the user selected will be stored in the file picker's file property.
Persistent Data - Archive of obsolete content
the information is collected and stored in a rdf file (localstore.rdf) in the same directory as other user preferences.
...you can add the persist attribute to any element and store any attribute.
Trees - Archive of obsolete content
ArchiveMozillaXULTutorialTrees
an advantage of using a tree view is that it allows the view to store the data in a manner which is more suitable for the data, or to load the data on demand as rows are displayed.
...if you do, you might store the data in an array or javascript data structure, or load the data from an xml file.
XPCOM Interfaces - Archive of obsolete content
mozilla stores a list of all the components that are available in its own registry.
...you can get a component using javascript code like that below: var afile = components.classes["@mozilla.org/file/local;1"].createinstance(); the file component is retrieved and stored in the afile variable.
Using Remote XUL - Archive of obsolete content
its value attribute, while defined in the xul specification, has no specific function in xul; it can store any data associated with the item.
... in our case we use it to store the url of the page to load when the user selects the item from the menu.
panel - Archive of obsolete content
ArchiveMozillaXULpanel
attributes backdrag, close, consumeoutsideclicks, fade, flip, ignorekeys, label, left, level, noautofocus, noautohide, norestorefocus, onpopuphidden, onpopuphiding, onpopupshowing, onpopupshown, position, titlebar, top, type properties accessibletype, label, popupboxobject, popup, state methods hidepopup, moveto, openpopup, openpopupatscreen, sizeto examples the following example shows how a panel may be attached to a label.
... norestorefocus type: boolean if false, the default value, then when the panel is hidden, the keyboard focus will be restored to whatever had the focus before the panel was opened.
tree - Archive of obsolete content
ArchiveMozillaXULtree
statedatasource type: uri chrome xul may specify an rdf datasource to use to store tree state information.
...if you do not specify this attribute, state information will be stored in the local store (rdf:local-store).
window - Archive of obsolete content
this attribute is used to save and restore the state of a window (together with the persist attribute) and for css styles (e.g.
...use window.maximize(), window.restore(), or window.minimize() to change the window state.
NPP - Archive of obsolete content
syntax typedef struct _npp { void* pdata; /* plug-in private data */ void* ndata; /* mozilla private data */ } npp_t; typedef npp_t* npp; fields the data structure has the following fields: pdata a value, whose definition is up to the plug-in, that the plug-in can use to store a pointer to an internal data structure associated with the instance; this field isn't modified by the browser.
... ndata a private value, owned by the browser, which is used to store data associated with the instance; this value should not be modified by the plug-in.
NPP_Destroy - Archive of obsolete content
you should delete any private instance-specific information stored in the plug-in's instance->pdata at this time.
... mac os if you want to restore state information if this plug-in is later recreated, use np_memalloc to create an npsaveddata structure.
NPP_NewStream - Archive of obsolete content
the plug-in can store plug-in-private data associated with the stream in stream->pdata.
...npn_requestread requests are only fulfilled when all data has been read and stored in the cache.
NPStream - Archive of obsolete content
syntax typedef struct _npstream { void* pdata; /* plug-in private data */ void* ndata; /* netscape private data */ const char* url; uint32 end; uint32 lastmodified; void* notifydata; const char *headers; } npstream; fields the data structure has the following fields: plug-in-private value that the plug-in can use to store a pointer to private data associated with the instance; not modified by the browser.
... ndata browser-private value that can store data associated with the instance; should not be modified by the plug-in.
NPAPI plugin reference - Archive of obsolete content
npn_setvalueforurl allows a plugin to change the stored information associated with a url, in particular its cookies.
... npsaveddata block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
Threats - Archive of obsolete content
for example, suppose the site www.example.net pretends to be a furniture store when it is really just a site that takes credit-card payments but never sends any goods.
...business needs have changed the way websites store sensistive data, with more usage of cloud services.
Debug.msTraceAsyncCallbackStarting - Archive of obsolete content
example the following code provides an example of tracing an asynchronous call for a windows 8.x store app.
...also supported in store apps (windows 8.1 and windows phone 8.1).
Debug.msTraceAsyncCallbackCompleted - Archive of obsolete content
example the following code provides an example of tracing an asynchronous call for a windows 8.x store app.
...also supported in store apps (windows 8.1 and windows phone 8.1).
Enumerator - Archive of obsolete content
it is supported in internet explorer only, not in windows 8.x store apps.
...not supported in windows 8.x store apps.
GetObject - Archive of obsolete content
remarks the getobject function is not supported in internet explorer 9 standards mode, internet explorer 10 standards mode, internet explorer 11 standards mode, and windows store apps or later.
... for example, in a drawing application you might have multiple layers to a drawing stored in a file.
@cc_on - Archive of obsolete content
warning: conditional compilation is not supported in internet explorer 11 standards mode and windows 8.x store apps.
...version + "."); document.write("<br />"); @if (@_win32) document.write("running on the 32-bit version of windows."); @elif (@_win16) document.write("running on the 16-bit version of windows."); @else document.write("running on a different operating system."); @end @*/ requirements supported in all versions of internet explorer, but not in windows 8.x store apps.
@if - Archive of obsolete content
warning: conditional compilation is not supported in internet explorer 11 standards mode and windows 8.x store apps.
...ript_version + "."); document.write("<br />"); @if (@_win32) document.write("running on a 32-bit version of windows."); @elif (@_win16) document.write("running on a 16-bit version of windows."); @else document.write("running on a different operating system."); @end @*/ requirements supported in all versions of internet explorer, but not in windows 8.x store apps.
@set - Archive of obsolete content
warning: conditional compilation is not supported in internet explorer 11 standards mode and windows 8.x store apps.
... requirements supported in all versions of internet explorer, but not in windows 8.x store apps.
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.
... the reimplementation also restores the ability to use try-catch exceptions within javascript, and is free of the increasing number of other bugs introduced by the decline of the original liveconnect (e.g., java.lang.string and arrays not working properly).
Back to the Server: Server-Side JavaScript On The Rise - Archive of obsolete content
it’s clear to see that with just a few lines of code, we can easily take advantage of sql data stores in javascript.
...after the asset is retrieved and stored in a string, the proper namespaces are defined for this particular resource.
RDF in Mozilla FAQ - Archive of obsolete content
first, it is a simple, cross-platform database for small data stores.
... in order to take advantage of this functionality, you must of course be able to express your information in terms of the rdf datasource api, either by using the built-in memory datasource, using rdf/xml to store your information, or writing your own implementation (possibly in javascript) of nsirdfdatasource.
Anatomy of a video game - Game development
building a better main loop in javascript there are two obvious issues with our previous main loop: main() pollutes the window object (where all global variables are stored) and the example code did not leave us with a way to stop the loop unless the whole tab is closed or refreshed.
...to acquire one of these timestamps, you can call window.performance.now() and store the result as a variable.
Introduction to game development for the Web - Game development
you're not limited to promoting your app on someone else's app store.
...no more having customer feedback filtered through an app store's limited mechanisms.
Publishing games - Game development
html5 games have a huge advantage over native in terms of publishing and distribution — you have the freedom of distribution, promotion and monetization of your game on the web, rather than each version being locked into a single store controlled by one company.
...game distribution provides all you need to know about the ways you can distribute your newly created game into the wild — including hosting it yourself online, submitting it to open marketplaces, and submitting it to closed ones like google play or the ios app store.
Building up a basic demo with Babylon.js - Game development
creating a directory to store your experiments in.
...there is one helper variable already included, which will store a reference to the <canvas> element.
Building up a basic demo with Three.js - Game development
create a directory to store your experiments in.
...there are two helper variables already included, which store the window's width and height.
GLSL Shaders - Game development
gl_position is used to store the position of the current vertex.
... create a directory to store your experiments in.
Square tilemaps implementation: Scrolling maps - Game development
in the demo code, the starting point is stored at startcol and startrow.
...in our demo the shifting amount is stored in the offsetx and offsety variables.
Create the Canvas and draw on it - Game development
then we're creating the ctx variable to store the 2d rendering context — the actual tool we can use to paint on the canvas.
...the fillstyle property stores a color that will be used by the fill() method to paint the square, in our case, red.
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.
... crud typically refers to operations performed in a database or datastore, but it can also apply to higher level functions of an application such as soft deletes where data is not actually deleted but marked as deleted via a status.
Global object - MDN Web Docs Glossary: Definitions of Web-related terms
explanation: the global variable foo was stored in the window object, like this: foo: "foobar" access global functions function greeting() { console.log("hi!"); } window.greeting(); // it is the same as the normal invoking: greeting(); the example above explains how global functions are stored as properties in the window object.
... explanation: the global function greeting was stored in the window object, like this: greeting: function greeting() { console.log("hi!"); } ...
Unicode - MDN Web Docs Glossary: Definitions of Web-related terms
by assigning each character a number, programmers can create character encodings, to let computers store, process, and transmit any combination of languages in the same file or program.
...for example, one character set would store japanese characters, and another would store the arabic alphabet.
Array - MDN Web Docs Glossary: Definitions of Web-related terms
arrays are used to store multiple values in a single variable.
... this is compared to a variable that can store only one value.
CSS FAQ - Learn web development
LearnCSSHowtoCSS FAQ
how do i restore the default value of a property?
... initially css didn't provide a "default" keyword and the only way to restore the default value of a property is to explicitly re-declare that property.
How much does it cost to do something on the Web? - Learn web development
however, people often choose dedicated (s)ftp clients to display local or remote directories side-by-side and store server passwords.
...this is why people usually store their videos on dedicated services such as youtube, dailymotion, and vimeo.
What is a Domain Name? - Learn web development
dns refreshing dns databases are stored on every dns server worldwide, and all these servers refer to a few special servers called “authoritative name servers” or “top-level dns servers.” — these are like the boss servers that manage the system.
...each dns server that knows about a given domain stores the information for some time before it is automatically invalidated and then refreshed (the dns server queries an authoritative server and fetches the updated information from it).
Client-side form validation - Learn web development
our applications won't work properly if our users' data is stored in the wrong format, is incorrect, or is omitted altogether.
...:</label> <input type="email" id="mail" name="mail"> <button>submit</button> </form> and add the following javascript to the page: const email = document.getelementbyid("mail"); email.addeventlistener("input", function (event) { if (email.validity.typemismatch) { email.setcustomvalidity("i am expecting an e-mail address!"); } else { email.setcustomvalidity(""); } }); here we store a reference to the email input, then add an event listener to it that runs the contained code each time the value inside the input is changed.
HTML forms in legacy browsers - Learn web development
buttons there are two ways to define buttons within html forms: the <input> element with its attribute type set to the values button, submit, reset or image the <button> element <input> the <input> element can make things a little difficult if you want to apply some css by using the element selector: <input type="button" value="click me"> if we remove the border on all inputs, can we restore the default appearance on input buttons only?
... input { /* this rule turns off the default rendering for the input types that have a border, including buttons defined with an input element */ border: 1px solid #ccc; } input[type="button"] { /* this does not restore the default rendering */ border: none; } input[type="button"] { /* these don't either!
Sending form data - Learn web development
you might display it, store it into a database, send it by email, or process it in some other way.
...store them on a different server and allow access to the file only through a different subdomain or even better through a completely different domain.
Sending forms through JavaScript - Learn web development
window.addeventlistener( 'load', function () { // these variables are used to store the form data const text = document.getelementbyid( "thetext" ); const file = { dom : document.getelementbyid( "thefile" ), binary : null }; // use the filereader api to access file content const reader = new filereader(); // because filereader is asynchronous, store its // result when it finishes to read the file reader.addeventlistener( "load", function ...
... // if there is not, delay the execution of the function if( !file.binary && file.dom.files.length > 0 ) { settimeout( senddata, 10 ); return; } // to construct our multipart form data request, // we need an xmlhttprequest instance const xhr = new xmlhttprequest(); // we need a separator to define each part of the request const boundary = "blob"; // store our body request in a string.
Dealing with files - Learn web development
choose a place to store your website projects.
... inside this first folder, create another folder to store your first website in.
The web and web standards - Learn web development
http hypertext transfer protocol, or http, is a messaging protocol that allows web browsers to communicate with web servers (where web sites are stored).
...the following simple javascript will store a reference to our paragraph in memory and change the text inside it: let pelem = document.queryselector('p'); pelem.textcontent = 'we changed the text!'; in the house analogy, javascript is like the cooker, tv, microwave, or hairdryer — the things that give your house useful functionality tooling once you've learned the "raw" technologies that can be used to build web pages (such as ...
Tips for authoring fast-loading HTML pages - Learn web development
cdns store cached versions of your website and serve them to visitors via the network node closest to the user, thereby reducing latency.
....html, .css), based on the last-modified date stored in the file system.
Image gallery - Learn web development
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.
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.
... we start by creating an audiocontext instance inside which to manipulate our track: const audiocontext = window.audiocontext || window.webkitaudiocontext; const audioctx = new audiocontext(); next, we create constants that store references to our <audio>, <button>, and <input> elements, and use the audiocontext.createmediaelementsource() method to create a mediaelementaudiosourcenode representing the source of our audio — the <audio> element will be played from: const audioelement = document.queryselector('audio'); const playbtn = document.queryselector('button'); const volumeslider = document.queryselector('.volume')...
What is JavaScript? - Learn web development
the core client-side javascript language consists of some common programming features that allow you to do things like: store useful values inside variables.
... in the above example for instance, we ask for a new name to be entered then store that name in a variable called name.
Getting started with Ember - Learn web development
ember-service-worker: configuring a pwa so that the app can be installed on mobile devices, just like apps from the device's respective app-store.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Framework main features - Learn web development
the virtual dom is an approach whereby information about your browser's dom is stored in javascript memory.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Accessibility in React - Learn web development
using useeffect() to control our heading focus now that we've stored how many tasks we previously had, we can set up a useeffect() hook to run when our number of tasks changes, which will focus the heading if the number of tasks we have now is less than with it previously was — i.e.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Beginning our React todo list - Learn web development
this role will restore the "list" meaning to the <ul> element.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Starting our Svelte Todo list app - Learn web development
this role will restore the "list" meaning to the <ul> element.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Deployment and next steps - Learn web development
then we saw how to use stores to work with a central data repository, and we created our own custom store to persist our application's data to web storage.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Getting started with Svelte - Learn web development
it also compiles the markup and <script> section of every component and stores the result in public/build/bundle.js.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Dynamic behavior in Svelte: working with variables and props - Learn web development
we'll take the tasks information from the markup and store it in a todos array.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Creating our first Vue component - Learn web development
at this point we have a nicely-working todoitem component that can be passed a label to display, will store its checked state, and will be rendered with a unique id each time it is called.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Getting started with Vue - Learn web development
with a basic introduction out of the way, we'll now go further and build up our sample app, a basic todo list application that allows us to store a list of items, check them off when done, and filter the list by all, complete, and incomplete todos.
...s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Handling common JavaScript problems - Learn web development
at the top, we have showheroes() the function we are currently in, and second we have onload, which stores the event handler function containing the call to showheroes().
...talk to other developers to find out what they recommend, see how much activity and how many contributors the library has on github (or wherever else it is stored), etc.
Command line crash course - Learn web development
package registries are like app stores, but (mostly) for command line based tools and software.
... this can be installed directly from the windows store for free.
Accessible Toolkit Checklist
alt+f4 closes windows, similar to escape but even works on dialogs without cancel button alt+space opens window menu with restore, move, size, minimize, maximize, close the move and size options must be usable with the arrow keys on the keyboard in windows, initial focus goes to first focusable widget that is not a clickable tabbed property sheet label making tab order definable.
...rt for moving slider: arrow keys, home, end, pgup, pgdn msaa support including role_slider, accessible value, value change events progress bars msaa support including accessible name, value, name and value change events grouped navigation widgets menus arrow keys, enter, escape alt alone enters main menu after leaving menus, focus is restored to where it was modified and unmodified mnemonics msaa support (including focus events, menu start and end events, radio and checkbox menu items) static text and group boxes msaa support radio groups only the selected radio button is in the tab order the other radio buttons can be selected and focused with up/down arrow.
Adding a new CSS property
the data structures in gecko that store the computed value must correspond to this concept, or inheritance won't work as described by the specification.
... in any case where the computation you do might vary between elements that match the same list of style rules, you need to set the canstoreinruletree variable to false.
Eclipse CDT Manual Setup
for now it's stored here until that integration happens in order that the eclipse cdt page isn't hugely cluttered with mostly redundant information, make setting up eclipse look much more complicated than it is nowadays.
...below.) initial workspace preferences when you open eclipse, it will ask you to "select a workspace" (a directory where eclipse will store files that it generates during indexing, and so on.) it's recommended that you have a separate workspace containing only a single project for each mozilla source tree [rational], and that you choose a directory outside the mozilla source.
Storage access policy: Block cookies from trackers
this prevents those resources from retrieving tracking identifiers stored in cookies or site storage and using them to identify users across visits to multiple first parties.
...this means that providers using cookies which are scoped to their third-party domain, or local storage and other site data stored under their origin, will no longer have access to those identifiers across other websites.
Firefox UI considerations for web developers
the data store provided by tippy top includes an optimized icon for each of the sites in the list; if the site is on this list, that icon is used.
... if tippy top doesn't include the site, firefox looks in its places data store for icons specified in the page's <head> element; if an svg icon is available, that icon is selected.
Firefox Operational Information Database: SQLite
a large amount of operational information about websites visited and browser configuration is stored in relational databases in sqlite used by firefox.
...t one of the tables listed in the left column and see the current contents of the database in the 'browse & search' tab.) some databases are used by the browser itself, others are used by applications that you have installed or used; for example: content-prefs.sqlite cookies.sqlite download.sqlite formhistory.sqlite persmissions.sqlite places.sqlite search.sqlite signons.sqlite webappstore.sqlite ...
Getting from Content to Layout
elements that need to be restyled are marked with flags (e.g element_has_pending_restyle) and are stored in the mpendingrestyles hashtable.
... a list of restyle roots (places in the content tree where all descendants need to be restyled but nothing on the parent chain does) are also stored.
Implementing Download Resuming
the expected way to use it is this: for all downloads that happen, get the entityid from the channel, and store it for later use.
...otherwise, call resumeat with the desired start position, and the previously stored entity id.
DownloadLastDir.jsm
e getfileasync: downloadlastdir.getfileasync(uri, function (file) { // file is an nsifile console.log(file); }); deprecated since gecko 26.0 to retrieve the path in firefox 25 or earlier, use getfile: // file is an nsifile var file = gdownloadlastdir.getfile(uri); console.log(file); private browsing mode when browsing normally, the browser uses the browser.download.lastdir preference to store the last download directory path.
... when history is cleared when the user's browsing history is cleared, the value of the last download directory path is restored to the platform's default download directory path.
SVN for Localizers
it's a handy tool that allows us to grab, change, and store versions of source files in one location.
...note that path/to/output is meant to indicate the directory on your computer where you wish to store the diff file.
Phishing: a short definition
for example, a usb token, bluetooth device, mobile phone, or simply a key stored on a separate device.
...this qr code is nothing more than a random, secret key, that is stored on the user’s phone.
ui.tooltipDelay
ui.tooltipdelay stores the delay in milliseconds between the mouse stopping over an element and the appearing of its tooltip.
... type:integer default value:500 exists by default: no application support: gecko 11.0 (firefox 11.0 / thunderbird 11.0 / seamonkey 2.8) status: active; last updated 2012-02-21 introduction: pushed to nightly on 2011-12-15 bugs: bug 204786 values integer (milliseconds, default: 500) the time for delay between the mouse stopping over the element and the tooltip appearing is stored in milliseconds and the default value is 500ms.
Preferences
the preference system makes it possible to store data for mozilla applications using a key/value pairing system.
... a brief guide to mozilla preferences an introductory guide to where preferences are stored and other useful information about the core preference system.
Leak And Bloat Tests
code locations the files specific to leak and bloat testing are be stored in: http://mxr.mozilla.org/comm-central/source/mailnews/test/performance these files consist of: overlays (used to provide the hooks for the javascript): bloat/bloataddroverlay.xul bloat/bloatcomposeoverlay.xul bloat/bloatmainoverlay.xul javascript files (used to drive the tests): bloat/bloataddroverlay.js bloat/bloatcomposeoverlay.js bloat/bloatmainoverlay.js preference settings (used t...
...pref("mail.root.none", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail"); user_pref("mail.root.pop3", "/home/moztest/.thunderbird/t7i1txfw.minimum/mail"); user_pref("mail.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 prefer...
NSPR Poll Method
return value if the poll method stores a nonzero value in *out_flags, the return value will be the value of in_flags.
...therefore, nspr clients should only use the return value as described in how to use the poll method section below.) if the poll method stores zero in *out_flags, the return value will be the bottom layer's desires with respect to the in_flags.
PLHashEntry
if the key of an entry is an integral value that can fit into a void * pointer, you can just cast the key itself to void * and store it in the key field.
... similarly, if the value of an entry is an integral value that can fit into a void * pointer, you can cast the value itself to void * and store it in the value field.
PR_FindSymbolAndLibrary
lib a reference to a location at which the runtime will store the library in which the symbol was discovered.
... returns if successful, returns a non-null pointer to the found symbol, and stores a pointer to the library in which it was found at the location pointed to by lib.
JSS FAQ
MozillaProjectsNSSJSSJSS FAQ
illa/jss/tests/pk10gen.java org/mozilla/jss/tests/sdr.java org/mozilla/jss/tests/selftest.java org/mozilla/jss/tests/setupdbs.java org/mozilla/jss/tests/sigtest.java org/mozilla/jss/tests/symkeygen.java org/mozilla/jss/tests/testkeygen.java org/mozilla/jss/tests/sslclientauth.java org/mozilla/jss/tests/listcacerts.java org/mozilla/jss/tests/keystoretest.java org/mozilla/jss/tests/verifycert.java ssl examples: org/mozilla/jss/tests/sslclientauth.java org/mozilla/jss/ssl/sslclient.java org/mozilla/jss/ssl/sslserver.java org/mozilla/jss/ssl/ssltest.java other test code that may prove useful: org/mozilla/jss/asn1/integer.java org/mozilla/jss/asn1/sequence.java org/mozilla/jss/asn1/set.java ...
...what i am trying to do is write a java applet that will access the netscape certificate store, retrieve a x509 certificate and then sign some data.
JSS Provider Notes
dsakpg.initialize(1024); keypair dsapair = dsakpg.generatekeypair(); supported classes cipher dsaprivatekey dsapublickey keyfactory keygenerator keypairgenerator mac messagedigest rsaprivatekey rsapublickey secretkeyfactory secretkey securerandom signature what's not supported the following classes don't work very well: keystore: there are many serious problems mapping the jca keystore interface onto nss's model of pkcs #11 modules.
...meanwhile, the org.mozilla.jss.crypto.cryptostore class can be used for some of this functionality.
Mozilla-JSS JCA Provider notes
what's not supported the following classes don't work very well: keystore: there are many serious problems mapping the jca keystore interface onto nss's model of pkcs #11 modules.
...meanwhile, the org.mozilla.jss.crypto.cryptostore class can be used for some of this functionality.
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.
...nss 3.35 fixes this regression and restores the ability to read affected data.
PKCS11 Implement
if it runs out of sessions, it uses the initial session for saves and restores.
...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 need to support c_decrypt and c_sign.
Python binding for NSS
hostentry objects now store their aliases and networkaddress's in internal tuples.
...-07-08 scm tag source download change log general modifications: fix red hat bug #510343 client_auth_data_callback seg faults if false is returned from callback release 0.5.0 release date 2009-07-01 scm tag source download change log general modifications: restore ssl.nss_init and ssl.nss_shutdown but make them deprecated add __version__ string to nss module release 0.4.0 release date 2009-06-30 scm tag source download change log general modifications: add binding for nss_nodb_init(), red hat bug #509002 move nss_init and nss_shutdown from ssl module to nss modul...
FC_Decrypt
pdata [out] pointer to location where recovered data is to be stored.
... pusdatalen [in,out] pointer to location where the length of recovered data is to be stored.
FC_DecryptFinal
plastpart [out] pointer to the location where the last block of recovered data, if any, is to be stored.
... puslastpartlen [in,out] pointer to location where the number of bytes of recovered data is to be stored.
FC_DecryptUpdate
ppart [out] pointer to location where recovered block is to be stored.
... puspartlen [in,out] pointer the location where the number of bytes of recovered data is to be stored.
FC_EncryptUpdate
pencryptedpart [out] pointer to location where encrypted block is to be stored.
... pusencryptedpartalen [out] pointer the location where the number of bytes of encrypted data is to be stored.
gtstd.html
each slot for a pkcs #11 module can in turn contain a token, which is the hardware or software device that actually provides cryptographic services and optionally stores certificates and keys.
... the communicator certificate db token handles all communication with the certificate and key database files (called certx.db and keyx.db, respectively, where x is a version number) that store certificates and keys.
NSS Tools modutil
this directory should be one below which it is appropriate to store dynamic library files (for example, a server's root directory or the netscape communicator root directory).
... with the -changepw command, the password on the netscape internal module cannot be set or changed, since this password is stored in key3.db.
NSS tools : signtool
-z tells signtool not to store the signing time in the digital signature.
...you can use a zip utility instead of the -z option to package a signed archive into a jar file after you have signed it: cd signdir zip -r ../myjar.jar * adding: meta-inf/ (stored 0%) adding: meta-inf/manifest.mf (deflated 15%) adding: meta-inf/signtool.sf (deflated 28%) adding: meta-inf/signtool.rsa (stored 0%) adding: text.txt (stored 0%) generating the keys and certificate the signtool option -g generates a new public-private key pair and certificate.
Rhino scopes and contexts
contexts the rhino context object is used to store thread-specific information about the execution environment.
...so we can store information that varies across scopes in the instance scope yet still share functions that manipulate that information reside in the shared scope.
Hacking Tips
for (; iter != current->end(); iter++) { ionspew(ionspew_codegen, "instruction %s", iter->opname()); […] masm.store16(imm32(iter->id()), address(stackpointer, -8)); // added if (!iter->accept(this)) return false; […] } this modification will add an instruction which abuse the stack pointer to store an immediate value (the lir id) to a location which would never be generated by any sane compiler.
...after all the compartments come arenas, which is where the gc things are actually stored.
64-bit Compatibility
luckily there is an alias that will choose the right opcode for you - lir_ldp: struct object { void *data; }; lir->insload(lir_ldp, objins, ins->insimm(offsetof(object, data))); when you use lirwriter::insstore, the correct size is chosen for you automatically, based on the size of the input operands.
... stobj_get_fslot - returns jsval-width lins stobj_get_dslot - returns jsval-width lins stobj_set_dslot - stores jsval-width lins stobj_set_fslot - stores jsval-width lins box_jsval - returns jsval-width lins unbox_jsval - expects jsval-width lins ...
INT_TO_JSVAL
before spidermonkey 1.8.5, not all integers can be stored in a jsval; use int_fits_in_jsval to test.
... starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.") }} if i does not fit into a jsval (see int_fits_in_jsval), the behavior is undefined.
JS::CompileOptions
compileoptions compileoptions is the compilation options stored on the stack.
...if you create an instance of this type, it's up to you to guarantee that everything you store in it will outlive it.
JS::Evaluate
if it is non-null, then on success, the result value is stored in *rval.
... if a script compiles and executes successfully, js::evaluate stores the result in *rval, if non-null, and returns true.
JSCheckAccessOp
on success, the callback must set *vp to the stored value of the property.
... description check whether obj[id] may be accessed per mode, returning js_false on error/exception, js_true on success with obj[id]'s stored value in *vp.
JSClass
private data custom classes very often need to store private c/c++ data that should not be visible to scripts.
...implement a jsnative constructor function that allocates this private data and stores it in the new object using js_setprivate.
JSNewEnumerateOp
(spidermonkey, noting the jsclass_new_enumerate flag, will cast that function pointer back to type jsnewenumerateop before calling it.) the behavior depends on the value of enum_op: jsenumerate_init a new, opaque iterator state should be allocated and stored in *statep.
... (you can use private_to_jsval to tag the pointer to be stored).
JSObjectOps.dropProperty
that is, the value that the jsobjectops.lookupproperty hook stored in the *objp out parameter.
...that is, the value that jsobjectops.lookupproperty hook stored in the *propp out parameter.
JSObjectOps.lookupProperty
if the property is found, the callback stores the object on which the property was found in *objp.
...on success, the callback stores in *propp a pointer to the property, if it exists, or null if it doesn't.
JS_CompileScript
on success, js_compilescript and js_compileucscript stores the newly compiled script to *script and returns true.
... otherwise, they report an error, stores null to *script, and return false.
JS_ConvertValue
on success, the converted value is stored in *vp.
... on success, js_convertvalue stores the converted value in *vp and returns true.
JS_DefineProperty
value js::handlevalue or js::handleobject or js::handlestring or int32_t or uint32_t or double initial stored value for the new property.
... the parameters specify the new property's name, initial stored value, getter, setter, and property attributes (attrs).
JS_DeleteElement2
if deletion is successful, js_deleteelement2 stores true to *succeeded and returns true.
...in both these cases, *succeeded will receive the stored value of the property that was not deleted.
JS_EvaluateScript
if it is non-null, then on success, the result value is stored in *rval.
... if a script compiles and executes successfully, js_evaluatescript or js_evaluateucscript stores the result in *rval, if non-null, and returns js_true.
JS_LookupElement
on success, *vp receives the stored value of obj[index], or undefined if the element does not exist.
... if the property obj[index] exists, js_lookupelement sets *vp to the property's stored value and returns true.
JS_LookupProperty
on success, *vp receives the stored value of the property, if any.
... if the property is found, *vp receives the property's stored value, or true if the property has no stored value; and the return value is true.
JS_NewExternalString
create a new jsstring whose characters are stored in external memory.
...obsolete since jsapi 13 description js_newexternalstring and js_newexternalstringwithclosure create a new jsstring whose characters are stored in external memory, i.e., memory allocated by the application, not the javascript engine.
JS_NewNumberValue
the result is an integer jsval if d can be stored that way.
... on success, js_newnumbervalue stores a numeric jsval in *rval and returns js_true.
JS_ResolveStandardClass
if the id is resolved, true is stored into *resolved if success.
...if id does not name a standard class or a top-level property induced by initializing a standard class, store false in *resolved and just return true.
JS_SET_TRACING_DETAILS
the callback stores a string describing the reference traced in buf.
...when printer is null, arg must be const char * or char * c string naming the reference and index must be either (size_t)-1 indicating that the name alone describes the reference or it must be an index into some array vector that stores the reference.
JS_SaveExceptionState
that object may then be used to restore again the context using js_restoreexceptionstate, or discarded using js_dropexceptionstate.
...see also mxr id search for js_saveexceptionstate jsexceptionstate js_restoreexceptionstate js_dropexceptionstate ...
JS_SetCompartmentNameCallback
buf char * the buffer to store the name of the compartment.
... jscompartmentnamecallback will be called when visiting the compartment, and it should store the name of the compartment into buf with null terminated string.
JS_SetGCCallback
the application may store this return value in order to restore the original callback when the new callback is no longer needed.
... to restore the original callback, call js_setgccallback a second time, and pass the old callback in as the cb argument.
JS_SetPrivate
for example, a socket class might use the private data field to store the socket handle.
...only the pointer is stored.
SpiderMonkey 1.8
in javascript 1.7 and earlier, x = [].length = "7"; would store the number 7 in x.
... now this statement stores the string "7" in x.
History Service Design
history management: provides basic and advanced apis to store and modify visits and page details.
... storing pages and visits pages (intended as uris) are stored into a table shared by both history and bookmarks, every url is unique in this table and is associated with a place id, commonly used as the foreign key on other tables.
Using the Places favicon service
the favicon service, implemented by the nsifaviconservice interface, stores the favicons for pages in bookmarks and history.
... creating the favicon service the favicon service's contract id is @mozilla.org/browser/favicon-service;1, so to gain access to the favicon service, you should do something like this: var faviconservice = components.classes["@mozilla.org/browser/favicon-service;1"] .getservice(components.interfaces.nsifaviconservice); caching the favicon service stores an expiration time for each favicon.
The Publicity Stream API
getpublicitystream( onsuccess: <function>, { [ onerror: <function> ], [ for_apps: <list> ], [ since: <date> ], [ before: <date> ], [ count: <int> ]): provides a means for a web store to receive a list of the current user's socially relevant app activity by being called from an origin which hosts a web store.
...possible error codes include: denied - if the user does not log in correctly permissiondenied - if the site is not allowed to access the publicity stream networkerror - if the publicity server is unreachable for_apps is a json list of apps that this store has (each represented as its origin url), so that stream events not relating to applications in a given presentation context can be excluded from the return value.
Avoiding leaks in JavaScript XPCOM components
don't store temporary objects permanently in global variables storing temporary objects permanently in global variables will leak memory in garbage-collected languages.
...(but since service is a global variable, just fixing the cycle doesn't fix the leak.) don't store short-lived objects as javascript properties of short-lived dom nodes i mentioned earlier that, in versions of mozilla before 1.8, setting arbitrary javascript properties on elements (or using xbl fields) causes that element's javascript wrapper to be rooted until the document stops being displayed.
Component Internals
a set of default libraries stored in this components directory makes up a typical gecko installation, providing functionality that consists of networking, layout, composition, a cross-platform user interface, and others.
...there are two types of manifests that xpcom uses to track components: component manifests when xpcom first starts up, it looks for the component manifest, which is a file that lists all registered components, and stores details on exactly what each component can do.
Packaging WebLock
the files themselves are stored in the jar file weblock.jar, which is simple a zip file with the xpi extension that sometimes also contains an internal installation file called install.js.
... the weblock installation script the installation script is the javascript file that is stored within the xpi.
Introduction to XPCOM for the DOM
an instance of a class (called an object) can be allocated dynamically (on the heap, or free store), using the syntax nsfoo *fooptr = new nsfoo; that object can then be manipulated only through fooptr.
...you pass an interface and the address of a pointer to store the interface to queryinterface().
nsACString
size_type [pruint32] type used to represent the number of bytes stored in the string.
...that is, it may be used to store utf-8 characters, ascii characters, or any random binary data.
nsAString
size_type [pruint32] type used to represent the number of double-byte units stored in the string.
...that is, it may be used to store utf-16 characters, ucs-2 characters, or any random double-byte data.
mozIRegistry
and it happens that we've chosen, up till now, to store that information in the "netscape registry" file.
... the contents of this rdf data base will be stored in a plain-text rdf/xml file so that it can easily be viewed edited.
mozIStorageVacuumParticipant
the vacuum manager will try to restore wal mode, but this will only work reliably if the participant properly resets statements.
... if the attempt to restore the journal node fails, it will remain truncate.
nsIAbCard
properties aren't stored anymore on the card, except for a handful of them.
... prefermailformat unsigned long allowed values are stored in nsiabprefermailformat.
nsIAccessibleEvent
event_table_column_delete 0x0047 0x0043 event_table_column_reorder 0x0048 0x0044 event_window_activate 0x0049 0x0045 event_window_create 0x004a 0x0046 event_window_deactivate 0x004b 0x0047 event_window_destroy 0x004c 0x0048 event_window_maximize 0x004d 0x0049 event_window_minimize 0x004e 0x004a event_window_resize 0x004f 0x004b event_window_restore 0x0050 0x004c event_hyperlink_end_index_changed 0x0051 0x004d the ending index of this link within the containing string has changed.
...le_column_delete 0x0115 event_atk_table_column_reorder 0x0116 event_atk_link_selected 0x0117 event_atk_window_activate 0x0118 event_atk_window_create 0x0119 event_atk_window_deactivate 0x0120 event_atk_window_destroy 0x0121 event_atk_window_maximize 0x0122 event_atk_window_minimize 0x0123 event_atk_window_resize 0x0124 event_atk_window_restore 0x0125 event_dom_create 0x0001 an object has been created.
nsIApplicationCache
netwerk/base/public/nsiapplicationcache.idlscriptable this interface represents an application cache, which stores resources for offline use.
...clients can open a session with nsicacheservice.createsession() using this client id and a storage policy of store_offline to access this cache.
nsICacheEntryDescriptor
predicteddatasize print64 stores the content-length specified in the http header for this entry.
...this fails if the storage policy is not store_in_memory.
nsICacheService
for example, a non-stream-based cache entry can only have a storage policy of store_in_memory.
... visitentries() this method visits entries stored in the cache.
nsIContentViewer
ashentry the history entry that the content viewer was stored in.
... the entry must have the docshells for all of the child documents stored in its child shell list.
nsICookieStorage
last changed in gecko 1.7 inherits from: nsisupports method overview void getcookie(in string acookieurl, in voidptr acookiebuffer, in pruint32ref acookiesize); void setcookie(in string acookieurl, in constvoidptr acookiebuffer, in unsigned long acookiesize); methods getcookie() retrieves a cookie from the browser's persistent cookie store.
... setcookie() stores a cookie in the browser's persistent cookie store.
nsIDBChangeListener
the calling function stores the value of astatus, changes the header ahdrtochange, then calls onhdrpropertychanged again with aprechange false.
... on this second call, the stored value of astatus is provided, so that any changes may be noted.
nsIDOMStorageWindow
data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
...data stored in session storage may be accessed by any site in the browsing context.
nsIDOMWindow
data stored in local storage may only be accessed from the same origin that inserted the data into storage in the first place.
...data stored in session storage may be accessed by any site in the browsing context.
nsIDownload
deprecated since gecko 19.0 guid astring the guid of the download that is stored in the database.
... targetfile nsilocalfile indicates the location at which the downloaded file will be (or is, if the download is complete) stored.
nsIDynamicContainer
it can use the property bag on every result node to store data associated with each item, such as a full path on disk.
...note: all result nodes implement a property bag if you need to store state.
nsIFile
the new file's serial number will almost certainly be different, because it is a different file, probably stored in a different physical location.
... the new file's serial number will almost certainly be different, because it is a different file, probably stored in a different physical location.
nsIFormHistory2
1.0 66 introduced gecko 1.8 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) note: this interface provides no means to access stored values.
... stored values are used by the formfillcontroller to generate autocomplete matches.
nsIMimeConverter
usually you would use this to store you own properties.
...thunderbird stored uint32 properties (not a complete list): indexed used for spotlight integration on osx.
nsIMsgWindow
to create an instance, use: msgwindow = components.classes["@mozilla.org/messenger/msgwindow;1"] .createinstance(components.interfaces.nsimsgwindow); in thunderbird the default message window is stored in the global variable msgwindow.
...you should not store this in a global variable.
nsIWebNavigation
when a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values and scroll position) is restored.
...when a page is loaded from session history, all content is loaded from the cache (if available) and page state (such as form values and scroll position) is restored.
nsIXPCScriptable
this will always be one of three values: jsenumerate_init a new, opaque iterator state should be allocated and stored in statep.
... you can use private_to_jsval() to tag the pointer to be stored.
nsIZipReader
the entry must be stored in the zip in either uncompressed or deflate-compressed format for the extraction to be successful.
...if aentryname is an external file which has meta-information stored in the jar, verifyexternalfile (not yet implemented) must be called before getprincipal.
XPCOM string functions
this is a low-level api.ns_cstringtoutf16the ns_cstringtoutf16 function converts the value of a nsacstring instance to utf-16 and stores the result in a nsastring instance.
...this is a low-level api.ns_utf16tocstringthe ns_utf16tocstring function converts the value of a nsastring instance from utf-16 to the specified multi-byte encoding and stores the result in a nsacstring instance.
nsCOMPtr versus RefPtr
this basic rule derives from the fact that some of the nscomptr<t> code is factored into the nscomptr_base base class, which stores the underlying mrawptr as an nsisupports*.
...since nscomptr stores the pointer as an nsisupports*, it must be possible to unambiguously cast from t* to nsisupports*.
XUL Overlays
MozillaTechXULOverlays
the chrome registry, which is a special rdf datasource into which user-specific information is persisted, or stored, contains information about the components or additional packages that have been installed with the browser.
...the overlay mechanism allows you to merge elements into existing subtrees, but it also allows you to store common ui elements in overlay files and merge them into any base files that use them.
Mail client architecture overview
messages - messages are always stored and streamed in rfc822 format.
... whenever multiple messages are stored in one file, the berkeley mailbox format is used.
Building a Thunderbird extension 3: install manifest
it is not the thunderbird version number (which is stored in the minversion and maxversion fields).
... <em:creator>jenzed</em:creator>: this optional value is used to store the extension author's name.
customDBHeaders Preference
setting the preferences although there are various ways to set preferences, i tend to just navigate to the directory where my profile is stored and edit the user.js file with my favorite text editor.
...</em:name> <em:description>test superfluous extension</em:description> <em:creator>garrett comeaux</em:creator> </description> </rdf> build process: [gcomeaux@kyle tbird-ext]$ cd superfluous/ [gcomeaux@kyle superfluous]$ make zip superfluous.xpi chrome/ chrome.manifest chrome/content/ chrome/content/superfluous.js chrome/content/superfluous_overlay.xul install.rdf adding: chrome/ (stored 0%) adding: chrome.manifest (deflated 44%) adding: chrome/content/ (stored 0%) adding: chrome/content/superfluous.js (deflated 57%) adding: chrome/content/superfluous_overlay.xul (deflated 44%) adding: install.rdf (deflated 50%) end result ultimately, you want to be able to compose a message like this: and see the superfluous column displayed in your inbox like this: thanks m...
Initialization and Destruction - Plugins
you can store the instance-specific private data in its pdata field (instance->pdata).
...also, be sure to delete any private instance-specific information stored in the plug-in's instance->pdata.
Debugger.Environment - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.environment instances refer to the same environment in the debuggee, and place its own properties on a debugger.environment instance to store metadata about particular environments.
... setvariable(name,value) storevalue as the value of the variable bound toname in this environment.name must be a string that is a valid ecmascript identifier name;value must be a debuggee value.
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
... setproperty(key, value, [receiver]) store value as the value of the referent’s property named key, creating the property if it does not exist.
Debugger.Source - Firefox Developer Tools
a debugger may place its own properties on debugger.source instances, to store metadata about particular pieces of source code.
...thus, they donot refer to the call that created the element; stored the source as the element’s text child; made the element a child of some uninserted parent node that was later inserted; or the like.
Debugger.Object - Firefox Developer Tools
this means that the debugger can use the == operator to recognize when two debugger.object instances refer to the same debuggee object, and place its own properties on a debugger.object instance to store metadata about particular debuggee objects.
... setproperty(name,value) storevalue as the value of the referent's property namedname, creating the property if it does not exist.name must be a string;value must be a debuggee value.
Examine and edit CSS - Firefox Developer Tools
any changes you make are temporary: reloading the page will restore the original styling.
... in addition, hovering over a css variable name brings up a tooltip showing what color value is stored in that variable (bug 1431949).
Storage Inspector - Firefox Developer Tools
indexeddb — all indexeddb databases created by the page or any iframes inside the page, their object stores and the items stored in these object stores.
... under "cache storage", objects are organized by origin and then by the name of the cache: indexeddb objects are organized by origin, then by database name, then by object store name: with the cookies, local storage, and session storage types, there's only one level in the hierarchy, so stored items are listed directly under each origin: you can click on each item in the tree to expand or collapse its children.
Cache.addAll() - Web APIs
WebAPICacheaddAll
the request objects created during retrieval become keys to the stored response operations.
... note: addall() will overwrite any key/value pairs previously stored in the cache that match the request, but will fail if a resulting put() operation would overwrite a previous cache entry stored by the same addall() method.
CanvasRenderingContext2D.getTransform() - Web APIs
syntax let storedtransform = ctx.gettransform(); parameters none.
... html <canvas width="240"></canvas> <canvas width="240"></canvas> css canvas { border: 1px solid black; } javascript const canvases = document.queryselectorall('canvas'); const ctx1 = canvases[0].getcontext('2d'); const ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.gettransform' in that specification.
CanvasRenderingContext2D.save() - Web APIs
syntax void ctx.save(); examples saving the drawing state this example uses the save() method to save the default state and restore() to restore it later, so that you are able to draw a rect with the default state later.
... html <canvas id="canvas"></canvas> javascript const canvas = document.getelementbyid('canvas'); const ctx = canvas.getcontext('2d'); // save the default state ctx.save(); ctx.fillstyle = 'green'; ctx.fillrect(10, 10, 100, 100); // restore the default state ctx.restore(); ctx.fillrect(150, 40, 100, 100); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.save' in that specification.
Drawing shapes with canvas - Web APIs
internally, paths are stored as a list of sub-paths (lines, arcs, etc) which together form a shape.
...both are stored as a path2d object, so that they are available for later usage.
CredentialsContainer.get() - Web APIs
this method collects credentials by calling the "collectfromcredentialstore" method for each credential type allowed by the options argument.
... for example: if options.password exists, then the passwordcredential.[[collectfromcredentialstore]] is called.
DOMMatrixReadOnly - Web APIs
the elements are stored into the array as single-precision floating-point numbers in column-major (colexographical access, or "colex") order.
...the elements are stored into the array as double-precision floating-point numbers in column-major (colexographical access access or "colex") order.
DataTransfer - Web APIs
datatransfer.mozsetdataat() a data transfer may store multiple items, each at a given zero-based index.
... datatransfer.moztypesat() holds a list of the format types of the data that is stored for an item at the specified index.
DataTransferItemList.clear() - Web APIs
the drag data store in which this list is kept is only writable while handling the dragstart event.
... while handling drop, the drag data store is in read-only mode, and this method silently does nothing.
FileSystemEntry - Web APIs
you can use the filesystem: scheme on google chrome to see all the files and folders that are stored in the origin of your app.
...chrome shows a read-only list of all the files and folders stored the origin of your app.
FileSystemEntrySync - Web APIs
you can use the filesystem: scheme on google chrome to see all the files and folders that are stored in the origin of your app.
...chrome shows a read-only list of all the files and folders stored the origin of your app.
Using the Gamepad API - Web APIs
instead of constantly storing the gamepad's latest state in a variable it only stores a snapshot, so to do the same thing in chrome you have to keep polling it and then only use the gamepad object in code when it is available.
... in current versions of chrome (version 34 as of this writing) the button values are stored as an array of double values, instead of gamepadbutton objects.
HTMLCanvasElement - Web APIs
htmlcanvaselement.toblob() creates a blob object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent.
... webglcontextrestored fired if the user agent restores the drawing buffer for a webglrenderingcontext or webgl2renderingcontext object.
Recommended Drag Types - Web APIs
these are equivalent to text/plain, and will store and retrieve plain text data.
...the data should be the url of the image, or a data: uri if the image is not stored on a web site or disk.
IDBCursor.advance() - Web APIs
WebAPIIDBCursoradvance
example in this simple fragment we create a transaction, retrieve an object store, then use a cursor to iterate through the records in the object store.
...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); } else { console.log(...
IDBCursor.continue() - 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.
...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.log('entries all displaye...
IDBCursor.continuePrimaryKey() - Web APIs
using it for cursors coming from an object store will throw an error.
... 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 setlastiterate...
IDBCursor.delete() - Web APIs
WebAPIIDBCursordelete
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.
...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.key - Web APIs
WebAPIIDBCursorkey
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.
...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(); } else { co...
IDBCursor.primaryKey - 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.
...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.continue(); } else { ...
IDBCursorWithValue.value - Web APIs
example in this example we create a transaction, retrieve an object store, then use a cursor to iterate through all the records in the object store.
...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.continue(); } else { ...
IDBDatabase.name - Web APIs
WebAPIIDBDatabasename
example this example shows a database connection being opened, the resulting idbdatabase object being stored in a db variable, and the name property then being logged.
... // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
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.
... not_found_err 3 the operation failed because the requested database object could not be found; for example, an object store did not exist but was being opened.
IDBIndex.getAll() - Web APIs
WebAPIIDBIndexgetAll
if you are trying to get an array of all the objects in an object store, though, you should use getall().
... example var myindex = objectstore.index('index'); var getallrequest = myindex.getall(); getallrequest.onsuccess = function() { console.log(getallrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
IDBKeyRange.bound() - Web APIs
WebAPIIDBKeyRangebound
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.lower - Web APIs
WebAPIIDBKeyRangelower
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.lowerBound() - Web APIs
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.lowerOpen - Web APIs
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.only() - Web APIs
WebAPIIDBKeyRangeonly
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else { console.log('entrie...
IDBKeyRange.upper - Web APIs
WebAPIIDBKeyRangeupper
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.upperBound() - Web APIs
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBKeyRange.upperOpen - Web APIs
we open a transaction (using idbtransaction) and an object store, and open a cursor with idbobjectstore.opencursor, declaring keyrangevalue as its optional key range value.
... 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.continue(); } else {...
IDBOpenDBRequest.onblocked - Web APIs
}; example var db; // let us open our database var request = indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not request.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; request.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
...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 request.onupgradeneeded = function(event) { var db = event.target.result; db.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; // create an objectstore for this database var objectstore = db.createobjectstore("todolist", { keypath: "tasktitle" }); ...
IDBRequest.onsuccess - Web APIs
}; example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the 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 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 request that inserts the item back // into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display upd...
IDBRequest.readyState - Web APIs
example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the object store in another 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 request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // log the source of this request ...
IDBRequest.result - Web APIs
WebAPIIDBRequestresult
syntax var myresult = request.result; value any example the following example requests a given record title, onsuccess gets the associated record from the idbobjectstore (made available as objectstoretitlerequest.result), updates one property of the record, and then puts the updated record back into the 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 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 request that inserts the item // back into the database var updatetitlerequest = objectstore.put(data); // when this new request succeeds, run the displaydata() // function again to update the display upd...
IDBRequest - Web APIs
idbrequest.source read only the source of the request, such as an idbindex or an idbobjectstore.
...mple live.) var db; // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being // opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database.
ImageData.data - Web APIs
WebAPIImageDatadata
data is stored as a one-dimensional array in the rgba order, with integer values between 0 and 255 (inclusive).
...the data array stores four values for each pixel, making 4 x 10,000, or 40,000 values in all.
LocalFileSystem - Web APIs
so to request storage, you need to do something like the following: var requestedbytes = 1024*1024*10; // 10mb navigator.webkitpersistentstorage.requestquota ( requestedbytes, function(grantedbytes) { window.requestfilesystem(persistent, grantedbytes, oninitfs, errorhandler); }, function(e) { console.log('error', e); } ); your user must grant your app permission to store data locally before your app can use persistent storage.
... methods requestfilesystem() requests a file system where data should be stored.
MSSiteModeEvent - Web APIs
*this property is not supported for windows store apps using javascript.
...*this property is not supported for windows store apps using javascript.
MediaStreamTrack: unmute event - Web APIs
examples in this example, event handlers are established for the mute and unmute events in order to detect when the media is not flowing from the source for the mediastreamtrack stored in the variable musictrack.
...when the track exits the muted state—detected by the arrival of an unmuted event—the background color is restored to white.
NavigatorStorage.storage - Web APIs
the returned object lets you examine and configure persistence of data stores and learn approximately how much more space your browser has available for local storage use.
... syntax var storagemanager = navigator.storage; value a storagemanager object you can use to maintain persistence for stored data, as well as to determine roughly how much room there is for data to be stored.
PannerNode - Web APIs
the orientation and position value are set and retrieved using different syntaxes, since they're stored as audioparam values.
... pannernode.setposition() defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) pannernode.setorientation() defines the direction the audio source is playing in.
PasswordCredential - Web APIs
var form = document.queryselector('#form'); var creds = new passwordcredential(form); // store the credentials.
... navigator.credentials.store(creds) .then(function(creds) { // do something with the credentials if you need to.
PaymentRequest.onpaymentmethodchange - Web APIs
examples an example payment method change handler is shown below; this example handles changes made to the payment method when using apple pay, specifically: request.onpaymentmethodchange = ev => { const { type: cardtype } = ev.methoddetails; const newstuff = {}; if (ev.methodname === "https://apple.com/apple-pay") { switch (cardtype) { case "store": // do apple pay specific handling for store card...
... // methoddetails contains the store card information const result = calculatediscount(ev.methoddetails); object.assign(newstuff, result); break; } } // finally...
PerformanceTiming - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
Request.cache - Web APIs
WebAPIRequestcache
no-store — the browser fetches the resource from the remote server without first looking in the cache, and will not update the cache with the downloaded resource.
...fetch("some.json", {cache: "no-store"}) .then(function(response) { /* consume the response */ }); // download a resource with cache busting, but update the http // cache with the downloaded resource.
Using Service Workers - Web APIs
to do this, we use service worker’s brand new storage api — cache — a global object on the service worker that allows us to store assets delivered by responses, and keyed by their requests.
...(see the browser compatibility section for more information.) if you want to use this now, you could consider using a polyfill like the one available in google's topeka demo, or perhaps store your assets in indexeddb.
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.
... syntax length = storage.length; return value the number of items stored in the storage object.
Storage - Web APIs
WebAPIStorage
it allows, for example, the addition, modification, or deletion of stored data items.
... properties storage.length read only returns an integer representing the number of data items stored in the storage object.
SubtleCrypto - Web APIs
storing keys cryptokey objects can be stored using the structured clone algorithm, meaning that you can store and retrieve them using standard web storage apis.
... the specification expects that most developers will use the indexeddb api to store cryptokey objects.
Multi-touch interaction - Web APIs
ev.target.style.border = "dashed"; // check this event for 2-touch move/pinch/zoom gesture handle_pinch_zoom(ev); } touch end handler the touchend handler restores the event target's background color back to its original color.
... function end_handler(ev) { ev.preventdefault(); if (logevents) log(ev.type, ev, false); if (ev.targettouches.length == 0) { // restore background and border to original values ev.target.style.background = "white"; ev.target.style.border = "1px solid black"; } } application ui the application uses <div> elements for the touch areas and provides buttons to enable logging and clear the log.
WEBGL_lose_context - Web APIs
webgl_lose_context.restorecontext() simulates restoring the context.
... examples with this extension, you can simulate the webglcontextlost and webglcontextrestored events: const canvas = document.getelementbyid('canvas'); const gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', (event) => { console.log(event); }); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
WebGLRenderingContext.bufferSubData() - Web APIs
the webglrenderingcontext.buffersubdata() method of the webgl api updates a subset of a buffer object's data store.
... srcdata optional an arraybuffer, sharedarraybuffer or one of the arraybufferview typed array types that will be copied into the data store.
WebGLRenderingContext.isContextLost() - Web APIs
examples include: two or more pages are using the gpu, but together place too high a demand on the gpu, so the browser tells the two contexts that they've lost the connection, then selects one of the two to restore access for.
...in this case, all contexts are lost, then restored after switching gpus.
WebGLRenderingContext - Web APIs
webglrenderingcontext.pixelstorei() specifies the pixel storage modes webglrenderingcontext.polygonoffset() specifies the scale factors and units to calculate depth values.
... webglrenderingcontext.renderbufferstorage() creates a renderbuffer data store.
Using shaders to apply color in WebGL - Web APIs
to do this, we first need to create an array of vertex colors, then store it into a webgl buffer.
...then a new webgl buffer is allocated to store these colors, and the array is converted into floats and stored into the buffer.
WebGL model view projection - Web APIs
for convenience, these shaders are stored in a <script> element that is brought into the program through the custom function mdn.createwebglprogramfromids().
...the positions and colors are stored in gl buffers, sent to the shader as attributes, and then operated upon individually.
WebRTC connectivity - Web APIs
this information is exchanged and stored using session description protocol (sdp); if you want details on the format of sdp data, you can find it in rfc 2327.
...a rollback restores the sdp offer (and the connection configuration by extension) to the configuration it had the last time the connection's signalingstate was stable.
Spaces and reference spaces: Spatial tracking in WebXR - Web APIs
since most users would prefer that you maintain the same viewer position and facing direction while performing this transition, you can use the xrframe method getviewerpose() to obtain the current xrviewerpose, switch the session, then use the saved viewer pose to restore the viewer's position and facing.
...upon recovery of tracking, a reset means tracking has been restored and the new position information represents the actual position information provided by the xr hardware, rather than cached or "best-guess" data.
Starting up and shutting down a WebXR session - Web APIs
with the new reference space in hand and stored into the worlddata object for safe-keeping, we call the session's requestanimationframe() method to schedule a callback to be executed when it's time to render the next frame of animation for the webxr session.
...you don't need a worlddata object to store everything; you can store the information you need to maintain any way you want to.
Example and tutorial: Simple synth keyboard - Web APIs
sineterms and cosineterms will be used to store the data for generating the waveform; each will contain an array that's generated when the user chooses "custom".
...the returned oscillator is stored into osclist for future reference, and data-pressed is set to yes to indicate that the note is playing so we don't start it again next time this is called.
Web audio spatialization basics - Web APIs
let's create constants that store the values we'll use for these parameters later on: const innercone = 60; const outercone = 90; const outergain = 0.3; the next parameter is distancemodel — this can only be set to linear, inverse, or exponential.
...first, we'll get references to the elements we want to move, then we'll store references to the values we'll change when we set up css transforms to actually do the movement.
Using Web Workers - Web APIs
we use the ports attribute of this event object to grab the port and store it in a variable.
... the javascript code the following javascript code is stored in the "fibonacci.js" file referenced by the html in the next section.
Window.open() - Web APIs
WebAPIWindowopen
false;" title="this link will create a new window or will re-use an already opened one" >promote firefox adoption</a></p> you can also make such function able to open only 1 secondary window and to reuse such single secondary window for other links in this manner: <script type="text/javascript"> var windowobjectreference = null; // global variable var previousurl; /* global variable that will store the url currently in the secondary window */ function openrequestedsinglepopup(url) { if(windowobjectreference == null || windowobjectreference.closed) { windowobjectreference = window.open(url, "singlesecondarywindowname", "resizable,scrollbars,status"); } else if(previousurl != url) { windowobjectreference = window.open(url, "singlesecondarywindowname",...
...*/ windowobjectreference.focus(); } else { windowobjectreference.focus(); }; previousurl = url; /* explanation: we store the current url in order to compare url in the event of another call of this function.
XRRigidTransform.matrix - Web APIs
usage notes matrix format all 4x4 transform matrices used in webgl are stored in 16-element float32arrays.
... the values are stored into the array in column-major order; that is, each column is written into the array top-down before moving to the right one column and writing the next column into the array.
Introducing the CSS Cascade - CSS: Cascading Style Sheets
WebCSSCascade
resetting styles after your content has finished altering styles, it may find itself in a situation where it needs to restore them to a known state.
... all lets you opt to immediately restore all properties to any of their initial (default) state, the state inherited from the previous level of the cascade, a specific origin (the user-agent stylesheet, the author stylesheet, or the user stylesheet), or even to clear the values of the properties entirely.
Using CSS custom properties (variables) - CSS: Cascading Style Sheets
custom properties allow a value to be stored in one place, then referenced in multiple other places.
...the value is computed where it is needed, not stored for use in other rules.
appearance (-moz-appearance, -webkit-appearance) - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
... -moz-window-button-restore firefox removed in firefox 64.
max-block-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
...they may be restored in level 4.
HTML5 - Developer guides
WebGuideHTMLHTML5
offline and storage: allowing webpages to store data on the client-side locally and operate offline more efficiently.
... whatwg client-side session and persistent storage (aka dom storage) client-side session and persistent storage allows web applications to store structured data on the client side.
HTML attribute: rel - HTML: Hypertext Markup Language
WebHTMLAttributesrel
link link link manifest web app manifest link not allowed not allowed modulepreload tells to browser to preemptively fetch the script and store it in the document's module map for later evaluation.
... modulepreload useful for improved performance, and relevant to the <link> anywhere in the document, setting rel="modulepreload" tells the browser to preemptively fetch the script (and dependencies) and store it in the document's module map for later evaluation.
<input type="button"> - HTML: Hypertext Markup Language
WebHTMLElementinputbutton
the source for this interactive example is stored in a github repository.
..."color"]'); var sizepicker = document.queryselector('input[type="range"]'); var output = document.queryselector('.output'); var clearbtn = document.queryselector('input[type="button"]'); // covert degrees to radians function degtorad(degrees) { return degrees * math.pi / 180; }; // update sizepicker output value sizepicker.oninput = function() { output.textcontent = sizepicker.value; } // store mouse pointer coordinates, and whether the button is pressed var curx; var cury; var pressed = false; // update mouse pointer coordinates document.onmousemove = function(e) { curx = (window.event) ?
<input type="color"> - HTML: Hypertext Markup Language
WebHTMLElementinputcolor
the source for this interactive example is stored in a github repository.
...while you can input the color in either upper- or lower-case, it will be stored in lower-case form.
<input type="file"> - HTML: Hypertext Markup Language
WebHTMLElementinputfile
the source for this interactive example is stored in a github repository.
... grab the filelist object that contains the information on all the selected files, and store it in a variable called curfiles.
<input type="password"> - HTML: Hypertext Markup Language
WebHTMLElementinputpassword
the source for this interactive example is stored in a github repository.
...finally, autocomplete is set to off to avoid password managers and session restore features trying to set its value, since this isn't a password at all.
<input type="search"> - HTML: Hypertext Markup Language
WebHTMLElementinputsearch
the source for this interactive example is stored in a github repository.
...the following screenshot comes from chrome: in addition, modern browsers also tend to automatically store search terms previously entered across domains, which then come up as autocomplete options when subsequent searches are performed in search inputs on that domain.
<keygen> - HTML: Hypertext Markup Language
WebHTMLElementkeygen
"smart cards") the user may also be given a choice of where to generate the key, i.e., in a smart card or in software and stored on disk.
...the private key is encrypted and stored in the local key database.
<link>: The External Resource Link element - HTML: Hypertext Markup Language
WebHTMLElementlink
the source for this interactive example is stored in a github repository.
... note: most icon formats are only able to store one single icon; therefore most of the time the sizes attribute contains only one entry.
<u>: The Unarticulated Annotation (Underline) element - HTML: Hypertext Markup Language
WebHTMLElementu
the source for this interactive example is stored in a github repository.
... usage notes along with other pure styling elements, the original html underline (<u>) element was deprecated in html 4; however, <u> was restored in html 5 with a new, semantic, meaning: to mark text as having some form of non-textual annotation applied.
dir - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
... the auto value should be used for data with an unknown directionality, like data coming from user input, eventually stored in a database.
Using the application cache - HTML: Hypertext Markup Language
the notification bar displays a message such as: this website (example.com) is asking to store data on your computer for offline use.
... in firefox, the offline cache data is stored separately from the firefox profile—next to the regular disk cache: windows vista/7: c:\users\<username>\appdata\local\mozilla\firefox\profiles\<salt>.<profile name>\offlinecache mac/linux: /users/<username>/library/caches/firefox/profiles/<salt>.<profile name>/offlinecache in firefox the current status of the offline cache can be inspected on the about:cache page (under the "offline cac...
Clear-Site-Data - HTTP
it allows web developers to have more control over the data stored locally by a browser for their origins.
... examples sign out of web site if a user signs out of your website or service, you might want to remove locally stored data.
Link prefetching FAQ - HTTP
a web page provides a set of prefetching hints to the browser, and after the browser is finished loading the page, it begins silently prefetching specified documents and stores them in its cache.
...if a prefetched document is partially downloaded, then the partial document will still be stored in the cache provided the server sent an "accept-ranges: bytes" response header.
HTTP Public Key Pinning (HPKP) - HTTP
the first time a web server tells a client via a special http header which public keys belong to it, the client stores this information for a given period of time.
...max-age=5184000 tells the client to store this information for two months, which is a reasonable time limit according to the ietf rfc.
Closures - JavaScript
they share the same function body definition, but store different lexical environments.
...you could store this function in a separate variable makecounter, and then use it to create several counters.
JavaScript data types and data structures - JavaScript
with bigints, you can safely store and operate on large integers even beyond the safe integer limit for numbers.
... accessor property associates a key with one of two accessor functions (get and set) to retrieve or store a value, and has the following attributes: attributes of an accessor property attribute type description default value [[get]] function object or undefined the function is called with an empty argument list and retrieves the property value whenever a get access to the value is performed.
TypeError: X.prototype.y called on incompatible type - JavaScript
this issue can also happen when providing a function that is stored as a property of an object as an argument to another function.
... in this case, the object that stores the function won't be the this target of that function when it is called by the other function.
Array.prototype.flat() - JavaScript
the source for this interactive example is stored in a github repository.
...on shift/unshift, but array ops on the end tends to be faster function flatten(input) { const stack = [...input]; const res = []; while(stack.length) { // pop value from stack const next = stack.pop(); if(array.isarray(next)) { // push back array items, won't modify the original input stack.push(...next); } else { res.push(next); } } // reverse to restore input order return res.reverse(); } const arr = [1, 2, [3, 4, [5, 6]]]; flatten(arr); // [1, 2, 3, 4, 5, 6] use generator function function* flatten(array, depth) { if(depth === undefined) { depth = 1; } for(const item of array) { if(array.isarray(item) && depth > 0) { yield* flatten(item, depth - 1); } else { yield item; } }...
Atomics.exchange() - JavaScript
the static atomics.exchange() method stores a given value at a given position in the array and returns the old value at that position.
... the source for this interactive example is stored in a github repository.
Atomics.notify() - JavaScript
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.
Atomics.wait() - JavaScript
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.prototype.getBigInt64() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
DataView.prototype.getBigUint64() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 64-bit int is stored in little- or big-endian format.
DataView.prototype.getFloat32() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 32-bit float is stored in little- or big-endian format.
DataView.prototype.getFloat64() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 64-bit float is stored in little- or big-endian format.
DataView.prototype.getInt16() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
DataView.prototype.getInt32() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
DataView.prototype.getUint16() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 16-bit int is stored in little- or big-endian format.
DataView.prototype.getUint32() - JavaScript
the source for this interactive example is stored in a github repository.
... littleendian optional indicates whether the 32-bit int is stored in little- or big-endian format.
Date.prototype.setSeconds() - JavaScript
the source for this interactive example is stored in a github repository.
...for example, if you use 100 for secondsvalue, the minutes stored in the date object will be incremented by 1, and 40 will be used for seconds.
Date.prototype.setUTCDate() - JavaScript
the source for this interactive example is stored in a github repository.
...for example, if you use 40 for dayvalue, and the month stored in the date object is june, the day will be changed to 10 and the month will be incremented to july.
Date.prototype.setUTCMilliseconds() - JavaScript
the source for this interactive example is stored in a github repository.
...for example, if you use 1100 for millisecondsvalue, the seconds stored in the date object will be incremented by 1, and 100 will be used for milliseconds.
Date.prototype.setUTCSeconds() - JavaScript
the source for this interactive example is stored in a github repository.
...for example, if you use 100 for secondsvalue, the minutes stored in the date object will be incremented by 1, and 40 will be used for seconds.
Map - JavaScript
maps object is similar to map—both let you set keys to values, retrieve those values, delete keys, and detect whether something is stored at a key.
...the value of 'bla' is not stored in the map for queries.
Math.imul() - JavaScript
the source for this interactive example is stored in a github repository.
...multiplying two numbers stored internally as integers (which is only possible with asmjs) with imul is the only potential circumstance where math.imul may prove performant in current browsers.
Object - JavaScript
it is used to store various keyed collections and more complex entities.
... examples using object given undefined and null types the following examples store an empty object object in o: let o = new object() let o = new object(undefined) let o = new object(null) using object to create boolean objects the following examples store boolean objects in o: // equivalent to o = new boolean(true) let o = new object(true) // equivalent to o = new boolean(false) let o = new object(boolean()) object prototypes when altering the behavior of existing...
Promise.prototype.catch() - JavaScript
the source for this interactive example is stored in a github repository.
... examples using and chaining the catch method var p1 = new promise(function(resolve, reject) { resolve('success'); }); p1.then(function(value) { console.log(value); // "success!" throw new error('oh, no!'); }).catch(function(e) { console.error(e.message); // "oh, no!" }).then(function(){ console.log('after a catch the chain is restored'); }, function () { console.log('not fired due to the catch'); }); // the following behaves the same as above p1.then(function(value) { console.log(value); // "success!" return promise.reject('oh, no!'); }).catch(function(e) { console.error(e); // "oh, no!" }).then(function(){ console.log('after a catch the chain is restored'); }, function () { console.log('not fired due to the catc...
RegExp.prototype.exec() - JavaScript
they store a lastindex from the previous match.
... the source for this interactive example is stored in a github repository.
Set() constructor - JavaScript
the set constructor lets you create set objects that store unique values of any type, whether primitive values or object references.
... the source for this interactive example is stored in a github repository.
Set - JavaScript
the set object lets you store unique values of any type, whether primitive values or object references.
... nan and undefined can also be stored in a set.
Symbol.for() - JavaScript
the source for this interactive example is stored in a github repository.
... [[symbol]] a symbol that is stored globally.
TypedArray.prototype.subarray() - JavaScript
the subarray() method returns a new typedarray on the same arraybuffer store and with the same element types as for this typedarray object.
... the source for this interactive example is stored in a github repository.
TypedArray - JavaScript
the source for this interactive example is stored in a github repository.
... typedarray.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
eval() - JavaScript
the source for this interactive example is stored in a github repository.
..."a.b.c" var result = setdescendantprop(obj, proppath, 1); // obj.a.b.c will now be 1 use functions instead of evaluating snippets of code javascript has first-class functions, which means you can pass functions as arguments to other apis, store them in variables and objects' properties, and so on.
yield - JavaScript
the source for this interactive example is stored in a github repository.
... let applestore = countapplesales() // generator { } console.log(applestore.next()) // { value: 3, done: false } console.log(applestore.next()) // { value: 7, done: false } console.log(applestore.next()) // { value: 5, done: false } console.log(applestore.next()) // { value: undefined, done: true } you can also send a value with next(value) into the generator.
Strict mode - JavaScript
many compiler optimizations rely on the ability to say that variable x is stored in that location: this is critical to fully optimizing javascript code.
...arguments objects for strict mode functions store the original arguments when the function was invoked.
related_applications - Web app manifests
type array mandatory no the related_applications field is an array of objects specifying native applications that are installable by, or accessible to, the underlying platform — for example, a native android application obtainable through the google play store.
... examples "related_applications": [ { "platform": "play", "url": "https://play.google.com/store/apps/details?id=com.example.app1", "id": "com.example.app1" }, { "platform": "itunes", "url": "https://itunes.apple.com/app/example-app1/id123456789" } ] related application values application objects may contain the following values: member description platform the platform on which the application can be found.
Web app manifests
web app manifests are part of a collection of web technologies called progressive web apps (pwas), which are websites that can be installed to a device’s homescreen without an app store.
...png" }, { "src": "images/touch/homescreen144.png", "sizes": "144x144", "type": "image/png" }, { "src": "images/touch/homescreen168.png", "sizes": "168x168", "type": "image/png" }, { "src": "images/touch/homescreen192.png", "sizes": "192x192", "type": "image/png" }], "related_applications": [{ "platform": "play", "url": "https://play.google.com/store/apps/details?id=cheeaun.hackerweb" }] } deploying a manifest web app manifests are deployed in your html pages using a <link> element in the <head> of a document: <link rel="manifest" href="/manifest.webmanifest"> note: the .webmanifest extension is specified in the media type registration section of the specification (the response of the manifest file should return content-type: applicati...
Digital video concepts - Web media technologies
yuv data representation because the image is represented using more detail in greyscale than in color, the values of y', u, and v are not typically stored together, one sample per pixel, the way rgb images are stored in memory.
...for example, in the av1 codec, a record stores the encoded luma for a tile, and a second record contains the chroma data in the form of the u and v values.
Navigation and resource timings - Web Performance
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
...if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
local - SVG: Scalable Vector Graphics
WebSVGAttributelocal
the local attribute specifies the unique id for a locally stored color profile as specified by international color consortium.
... only one element is using this attribute: <color-profile> usage notes value <string> default value none animatable no <string> this value specifies the unique id for a locally stored color profile as specified by international color consortium.
SVG documentation index - SVG: Scalable Vector Graphics
WebSVGIndex
127 local deprecated, svg, svg attribute the local attribute specifies the unique id for a locally stored color profile as specified by international color consortium.
... 306 <defs> svg, svg container the <defs> element is used to store graphical objects that will be used at a later time.
SVG 1.1 Support in Firefox - SVG: Scalable Vector Graphics
only stored in the dom, no user interface.
... only stored in the dom, no user interface.
Web security
the browser may store it and send it back with later requests to the same server.
... local storage the window object's window.localstorage property is a way for servers to store data on a client that is persistent across sessions.
Modules - Archive of obsolete content
a module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface.
Contributor's Guide - Archive of obsolete content
modules a module is a self-contained unit of code, which is usually stored in a file, and has a well defined interface.
Program ID - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
l10n - Archive of obsolete content
localized strings are supplied by the add-on developer in .properties files stored in the add-ons "locale" directory.
notifications - Archive of obsolete content
} }); this one displays an icon that's stored in the add-on's data directory.
page-mod - Archive of obsolete content
for example, here's an add-on that attaches a script to every page the user loads: var data = require("sdk/self").data; var pagemod = require("sdk/page-mod"); pagemod.pagemod({ include: "*", contentscriptfile: data.url("eaten.js") }); the content script replaces the page contents, but restores the original contents when it receives detach: // eaten.js var oldinnerhtml = window.document.body.innerhtml; window.document.body.innerhtml = "eaten!"; self.port.on("detach", function() { window.document.body.innerhtml = oldinnerhtml; }); try running the add-on, loading some pages, and then disabling the add-on in the add-ons manager.
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.
panel - Archive of obsolete content
if the panel's content is packaged along with your add-on and specified using an html file in your data directory, you can style it by embedding css directly in the html file or by referencing a css file stored under data: <!doctype html> <html> <head> <link href="panel-style.css" type="text/css" rel="stylesheet"> </head> <body> my panel content </body> </html> from firefox 31 onwards, you can style panel content using the contentstyle or contentstylefile options.
console/traceback - Archive of obsolete content
usage tracebacks are stored in json format.
places/bookmarks - Archive of obsolete content
examples creating a new bookmark let { bookmark, save } = require("sdk/places/bookmarks"); // create a new bookmark instance, unsaved let bookmark = bookmark({ title: "mozilla", url: "http://mozilla.org" }); // attempt to save the bookmark instance to the bookmarks database // and store the emitter let emitter = save(bookmark); // listen for events emitter.on("data", function (saved, inputitem) { // on a "data" event, an item has been updated, passing in the // latest snapshot from the server as `saved` (with properties // such as `updated` and `id`), as well as the initial input // item as `inputitem` console.log(saved.title === inputitem.title); // true console.lo...
places/favicon - Archive of obsolete content
the platform service (moziasyncfavicons) retrieves favicon data stored from previously visited sites, and as such, will only return favicon urls for visited sites.
window/utils - Archive of obsolete content
usage private windows with this module your add-on will see private browser windows even if it has not explicitly opted into private browsing, so you need to take care not to store any user data derived from private browser windows.
cfx - Archive of obsolete content
this includes, for example, any extra add-ons you installed, or your history, or any data stored using the simple-storage api.
cfx to jpm - Archive of obsolete content
for example: addons.mozilla.org uses it to distinguish between new add-ons and updates to existing add-ons, and the simple-storage module uses it to figure out which stored data belongs to which add-on.
Add a Context Menu Item - Archive of obsolete content
typically you'd store the image in your add-on's "data" directory, and construct the url using self.data.url(): var self = require("sdk/self"); var contextmenu = require("sdk/context-menu"); var menuitem = contextmenu.item({ label: "log selection", context: contextmenu.selectioncontext(), contentscript: 'self.on("click", function () {' + ' var text = window.getselection().tostring();' + ...
Annotator - Archive of obsolete content
the annotator stores the notes.
JavaScript Daemons Management - Archive of obsolete content
all original properties will be restored.
XPath - Archive of obsolete content
one in which it was created //add by mooring 2008-11-15 16:00 china var xhr = new ajax('post','demo.xml',parsexml,'xml'); //ajax is a class written by javascript which return responsexml object to parsexml function function parsexml(obj)//obj is the returnxml object now { if(!obj.documentelement) { alert("your browser does't support this script!"); return; } var fields = [];//store the results if(window.activexobject) { var tobj = obj.documentelement.selectnodes("/root/field/item"); for(var i=0;i<tobj.length; i++) { fields.push(tobj[i].text); } } else { var tobj = obj.evaluate("/root/field/item",obj.documentelement,null, xpathresult.any_type, null); var tmp = tobj.iteratenext(); while(tmp) { fields.push(tmp.textcontent); tmp = tobj.iteratenext(...
Install Manifests - Archive of obsolete content
note: if you want to restore the old behavior of strict compatibility checking of all add-ons, regardless of the value of this setting in their manifests, you can set the extensions.strictcompatibility preference to true.
Chapter 1: Introduction to Extensions - Archive of obsolete content
lling add-ons helps troubleshoot add-ons by disabling them and offering a safe mode confirms and runs updates provides access to add-ons' settings dialogs provides access to add-ons' support sites development environment amenities initially, there wasn't adequate documentation available, and extension developers were largely left to fend for themselves1; however, now there's a considerable store of knowledge.
Adding windows and dialogs - Archive of obsolete content
you can also set persistence programatically using the document.persist function: document.persist("xulschoolhello-some-checkbox", "checked"); persistent data is stored in the user profile, in the file localstore.rdf.
Appendix D: Loading Scripts - Archive of obsolete content
advantages performance: javascript modules are stored in a pre-compiled format in a cache, and therefore load with significantly less overhead than other types of scripts.
Connecting to Remote Content - Archive of obsolete content
rned from remote server is this: <?xml version="1.0"?> <data> <shops> <shop> <name>apple</name> <code>a001</code> </shop> <shop> <name>orange</name> </shop> </shops> <total>2</total> </data> when a valid xml response comes back from the remote server, the xml document object can be manipulated using different dom methods, to display the data in the ui or store it into a local datasource.
Intercepting Page Loads - Archive of obsolete content
we store the handler function in a private variable because later we want to remove it when we do not need it anymore.
Local Storage - Archive of obsolete content
ngfileappender(logfile, formatter); appender.level = log4moz.level["all"]; root.addappender(appender); after that, you can create a logger object for any object in your project like this: this._logger = log4moz.repository.getlogger("xulschool.someobject"); this._logger.level = log4moz.level["all"]; note: we recommend that you create a logger instance in the constructor of every object and store it in a private variable.
Setting Up a Development Environment - Archive of obsolete content
adding: install.rdf (deflated 50%) adding: chrome.manifest (deflated 50%) adding: content/browseroverlay.js (deflated 42%) adding: content/browseroverlay.xul (deflated 69%) adding: skin/browseroverlay.css (stored 0%) adding: locale/browseroverlay.dtd (deflated 52%) adding: locale/browseroverlay.properties (stored 0%) creating xpi file.
Signing an XPI - Archive of obsolete content
mytestcert u,u,cu certum root ca ct,c,c certum level iii ca ct,c,c the name given to the newly issued certificate in the mozilla firefox keystore is not the easiest key alias in the world to remember, so i've added an additional step here that lets you rename it (its not just a simple rename operation, unfortunately).
Adding preferences to an extension - Archive of obsolete content
to do so, we call the nsiprefbranch.getcharpref() method, specifying that we want the preference named "symbol", which is where we store the user's selection for the stock to watch.
CSS3 - Archive of obsolete content
the image-orientation property by adding the keyword from-image, allowing to follow exif data stored into images to be considered.
Creating a dynamic status bar extension - Archive of obsolete content
the status bar panel's label is set to indicate the current value of the stock, which is stored in fieldarray, by setting the samplepanel.label property.
Index of archived content - Archive of obsolete content
the box model the essentials of an extension useful mozilla community sites user notifications and alerts xpcom objects performance best practices in extensions search extension tutorial (draft) security best practices in extensions session store api setting up an extension development environment signing an xpi signing an extension supporting search suggestions in search plugins tabbed browser techniques promises updating addons broken by private browsing changes using dependent libraries in extension...
cert_override.txt - Archive of obsolete content
cert_override.txt is a text file generated in the user profile to store certificate exceptions specified by the user.
MCD, Mission Control Desktop, AKA AutoConfig - Archive of obsolete content
3850 01-01-2010 00:00 defaults/profile/bookmarks.html 869 01-01-2010 00:00 defaults/profile/chrome/usercontent-example.css 1165 01-01-2010 00:00 defaults/profile/chrome/userchrome-example.css 366 01-01-2010 00:00 defaults/profile/localstore.rdf 569 01-01-2010 00:00 defaults/profile/mimetypes.rdf 76 01-01-2010 00:00 defaults/preferences/firefox-l10n.js 91656 01-01-2010 00:00 defaults/preferences/firefox.js 1593 01-01-2010 00:00 defaults/preferences/firefox-branding.js 473 01-01-2010 00:00 defaults/profile/prefs.js unlike old thunderbird 8, firefox 8 didn't include prefcalls.js in omni.ja...
No Proxy For configuration - Archive of obsolete content
communicator used "network.proxy.none" limitations no ipv6 support - the backend stores ipv4 addresses as ipv6, but ipv6 formats are not supported.
Visualizing an audio spectrum - Archive of obsolete content
the function handling the loadedmetadata event stores the metadata of the audio element in global variables; the function for the mozaudioavailable event does an fft of the samples and displays them in a canvas.
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.
Enabling quicklaunch for all users - Archive of obsolete content
enabling quicklaunch for all users unlike all other settings, quicklaunch is stored in the windows registry.
Introduction - Archive of obsolete content
in the scenario described described, a bunch of client workstations running windows access a linux samba server, on which the user's home directories are stored (under drive h:).
Locked config settings - Archive of obsolete content
this file also needs to be "called" from c:\program files\mozilla.org\mozilla\defaults\pref\all.js by appending the following line at the end: pref("general.config.filename", "mozilla.cfg"); note: newer versions of mozilla or firefox store the all.js file in greprefs rather than defaults\pref the moz-byteshift.pl script allows to encode...: moz-byteshift.pl -s 13 <mozilla.cfg.txt >mozilla.cfg ...
Protecting Mozilla's registry.dat file - Archive of obsolete content
in summary, you can use the following series of commands in your logon script (usually stored in /home/samba/netlogon/startup.bat on the server): rem ================================================== rem mozilla rem ================================================== attrib -r -s "%userprofile%\application data\mozilla" >nul 2>nul attrib -r -s "%userprofile%\application data\mozilla\registry.dat" >nul 2>nul mkdir "%userprofile%\application data" >nul 2>nul mkdir "%userprofile%\applicati...
Creating a Firefox sidebar extension - Archive of obsolete content
the extension needs to provide some special manifest files that control how it is installed and where its chrome resources are stored.
Adding the structure - Archive of obsolete content
the status attribute is not part of the xul definition for the statusbarpanel element, but is used by our extension to store the current tinderbox state.
Conclusion - Archive of obsolete content
mozilla applications often store their css and image files in a separate skin subdirectory within the installation directory.
Enabling the behavior - updating the status bar panel - Archive of obsolete content
status", "busted"); else if (gxmlhttprequest.responsetext.match("ffaa00")) icon.setattribute("status", "testfailed"); else if (gxmlhttprequest.responsetext.match("11dd11")) icon.setattribute("status", "success"); else icon.setattribute("status", ""); } updatetinderboxstatus() retrieves a reference to the statusbarpanel element then searches through the retrieved html document (stored in the responsetext property of the xmlhttprequest instance) for one of several color references.
Getting Started - Archive of obsolete content
for this reason we suggest that you install a second copy into a second directory (make sure that you use a different profile as stated in the release notes) extract the chrome the chrome is stored in \mozilla\chrome and the individual modules are stored in jar files.
In-Depth - Archive of obsolete content
organizing images to organize all of your icons you can store them all in one image and then tell mozilla which portions to use.
Dehydra Object Reference - Archive of obsolete content
for example, an int[10] would have .max = 9 .variablelength boolean flag true if the type represents a c99 variable-length array type number type property type description .precision integer for floating-point types, the precision of the type .min integer for integer types, the minimum value capable of being stored .max integer for integer types, the maximum value capable of being stored .issigned boolean flag for integer types, true if the type stores signed values .isunsigned boolean flag for integer types, true if the type stores unsigned values .bitfieldbits integer if the type represents a bitfield, the number of bits used by the bitfield .bitfieldof number type object if the type repre...
Download Manager improvements in Firefox 3 - Archive of obsolete content
the download manager schema this article describes the database format used to store and track information about each download.
Document Loading - From Load Start to Finding a Handler - Archive of obsolete content
if this can't handle the content type, we loop over our stored list of possible listeners (previously registered via registercontentlistener) and ask each one in turn whether it can handle the data.
Layout System Overview - Archive of obsolete content
the frame manager is then instructed to store the mapping from a content element to the primary frame.
Repackaging Firefox - Archive of obsolete content
if you find a preference you think is generally useful to most partner repacks, please add it below, using the same style: localizable preferences browser.startup.homepage=<string> browser.startup.homepage_reset=<string> url for the default homepage, and what the homepage gets reset to when the user hits "restore to default" in the preferences.
HTTP Class Overview - Archive of obsolete content
nsirequest encapsulates a http request and response parses incoming data nshttpchunkeddecoder owned by a transaction strips chunked transfer encoding nshttprequesthead owns a nshttpheaderarray knows how to fill a request buffer nshttpresponsehead owns a nshttpheaderarray knows how to parse response lines performs common header manipulations/calculations nshttpheaderarray stores http "<header>:<value>" pairs nshttpauthcache stores authentication credentials for http auth domains nshttpbasicauth implements nsihttpauthenticator generates basic auth credentials from user:pass nshttpdigestauth implements nsihttpauthenticator generates digest auth credentials from user:pass original document information author(s): darin fisher last updated date: augus...
JavaScript crypto - Archive of obsolete content
= 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, ...
Storage - Archive of obsolete content
simple storage an easy-to-use persistent object data store file access interface for performing file i/o settings settings persist across browser sessions and are accessible to jetpacks via simple object retrieval and assignment.
Metro browser chrome tests - Archive of obsolete content
static content for tests static content (html files, images, etc.) should be stored in sub directories to avoid polluting the main test directory.
Modularization techniques - Archive of obsolete content
this mechanism can be used both inside an executable at run-time and externally using the apersist flag to tell the repository to store the class id/library relationship in its permenant store.
Mozilla Application Framework in Detail - Archive of obsolete content
the technology that makes this possible, xpinstall, allows application developers to write javascript installations that manage special cross-platform installation archives (called xpis, or "zippies"), in which packages such as new skins for the browser, patches, browser extensions, new gecko-based applications, and third party standalone applications are stored.
Mozilla Crypto FAQ - Archive of obsolete content
see the epic bookstore for more recommendations of books discussing privacy in general and public policies related to privacy issues.
Nanojit - Archive of obsolete content
once the instructions are in the lirbuffer, the application calls nanojit::compile() to produce machine code, which is stored in a nanojit::fragment.
Configuration - Archive of obsolete content
the actual icon file should be stored in the webapp bundle.
Priority Content - Archive of obsolete content
keller mostly completed*: rich-text editing in mozilla 1.3 "mostly completed" means i'm waiting for a location to store example and source files which are required for demoing the information in the articles.
Reading textual data - Archive of obsolete content
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.
Frequently Asked Questions - Archive of obsolete content
when servers send user agents an svg file they must tell the user agent that the file has the mime type "image/svg+xml", and if the svg file is stored gzipped they must tell the browser that too.
Supporting private browsing mode - Archive of obsolete content
from that point until we restore the original value of the private browsing mode setting, things are done privately.
Table Cellmap - Archive of obsolete content
introduction the table layout use the cellmap for two purposes: quick lookup of table structural data store of the border collapse data the cellmap code is contained in nscellmap.cpp and nscellmap.h this document does currently describe only the quick lookup part of the game, border collapse is still far away cellmap data - overview the entries in the cellmap contain information about the table cell frame corresponding to a given row and column number (celldata.h).
Tamarin Build System Documentation - Archive of obsolete content
; cd scripts edit environment.sh, change the basedir and buildsdir settings (around line 51) basedir=~/hg/tamarin-redux (path to my test repository) (next line) buildsdir=~/hg/builds (a directory to store downloaded builds) always set current working directory to the scripts directory when running a script run a script (e.g.) ../all/run-acceptance-release.sh <optional hg revision number like 1902> how do i navigate the build status page?
Using addresses of stack variables with NSPR threads on win16 - Archive of obsolete content
it's difficult to tell exaclty where the updated <tt>counter</tt> is being stored.
Venkman Introduction - Archive of obsolete content
as you change which views are displayed and where in the ui they appear, your preferences are stored and persisted across sessions.
Binding Implementations - Archive of obsolete content
the script is evaluated at the time of binding attachment and the resulting value is stored on the element.
XML in Mozilla - Archive of obsolete content
this feature is used mainly to localize mozilla to different languages (the ui strings are stored in external dtd files).
Trigger Scripts and Install Scripts - Archive of obsolete content
these install scripts are typically located at the top level of the xpi archives in which the installations are stored.
execute - Archive of obsolete content
you can use this method to launch an installshield installer or any install executable file stored in a xpi file.
Learn XPI Installer Scripting by Example - Archive of obsolete content
p utility) reveals the following high-level directory structure: install.js bin\ chrome\ components defaults\ icons\ plugins\ res\ note that this high-level structure parallels the directory structure of the installed browser very closely: as you will see in the installation script, the contents of the archive are installed onto the file system in much the same way that they are stored in the archive itself, though it's possible to rearrange things arbitrarily upon installation--to create new directories, to install files in system folders and other areas.
A XUL Bestiary - Archive of obsolete content
locale/ us-en/ navigator.dtd to load chrome information stored in a new package directory like this, you can use the following chrome url, chrome://navigator/skin/mynewskin/newskin.css which in turn loads the graphics in that subdirectory as needed.
decimalplaces - Archive of obsolete content
note that decimal numbers are stored as floats.
preference.type - Archive of obsolete content
the file path will be stored in the preferences.
sortDirection - Archive of obsolete content
natural the data is sorted in natural order, which means the order that it is stored in.
validate - Archive of obsolete content
this would be useful if the images are stored remotely or you plan on swapping the image frequently.
Attribute (XUL) - Archive of obsolete content
ntapply inverted iscontainer isempty key keycode keytext label lastpage lastselected last-tab left linkedpanel max maxheight maxlength maxpos maxrows maxwidth member menu menuactive min minheight minresultsforpopup minwidth mode modifiers mousethrough movetoclick multiline multiple name negate newlines next noautofocus noautohide noinitialfocus nomatch norestorefocus object observes onbeforeaccept onbookmarkgroup onchange onclick onclosetab oncommand oncommandupdate ondialogaccept ondialogcancel ondialogclosure ondialogextra1 ondialogextra2 ondialoghelp onerror onerrorcommand onextra1 onextra2 oninput onload onnewtab onpageadvanced onpagehide onpagerewound onpageshow onpaneload onpopuphidden onpopuphiding onpopupshowing onp...
Building accessible custom components in XUL - Archive of obsolete content
note that when we recreate the label element after editing, we need to explicitly restore the role attribute of the label, so that assistive technologies will continue to treat it as a cell within the spreadsheet.
Introduction to XUL - Archive of obsolete content
in general, you will want to store xul in *.xul files.
MoveResize - Archive of obsolete content
this method will change the left and top attributes to match the supplied arguments, so if these attributes are persisted the values will be restored when the window is displayed again.
Panels - Archive of obsolete content
in addition, the norestorefocus attribute should be set to true in order to prevent the previously focused element from being refocused.
Sorting and filtering a custom tree view - Archive of obsolete content
list", weapon: "none"}); } if (filtertext == "") { //show all of them table = data; } else { //filter out the ones we want to display table = []; data.foreach(function(element) { //we'll match on every property for (var i in element) { if (prepareforcomparison(element[i]).indexof(filtertext) != -1) { table.push(element); break; } } }); } sort(); //restore scroll position if (topvisiblerow) { settopvisiblerow(topvisiblerow); } } //generic custom tree view stuff function treeview(table) { this.rowcount = table.length; this.getcelltext = function(row, col) { return table[row][col.id]; }; this.getcellvalue = function(row, col) { return table[row][col.id]; }; this.settree = function(treebox) { this.treebox = treebox; }; this.iseditab...
Multiple Rule Example - Archive of obsolete content
you might notice that the ?title variable is used in the first rule whereas the ?phototitle variable is used for the second rule, despite that they both store the value of the title predicate.
RDF Modifications - Archive of obsolete content
when it had first generated the results, the builder stored extra information to specify what parts of the graph were navigated over.
Template Builder Interface - Archive of obsolete content
in a chrome context, the datasource 'rdf:local-store' is always included even if you don't specify it.
XML Templates - Archive of obsolete content
the effect is the same, but the data isn't stored in a separate file.
Adding Event Handlers to XBL-defined Elements - Archive of obsolete content
a field clipboard has been added to it to store the clipboard contents.
Creating Dialogs - Archive of obsolete content
these arguments are passed to the new dialog and placed in an array stored in the new window's arguments property.
Creating an Installer - Archive of obsolete content
the components provided with mozilla are stored in this manner.
Cross Package Overlays - Archive of obsolete content
it stores this information in the chrome/overlayinfo directory.
Custom Tree Views - Archive of obsolete content
since the view can store and retrieve the data in the most suitable manner for the kind of data used, the tree can be used even when there are hundreds of thousands of rows to be displayed.
Document Object Model - Archive of obsolete content
dom introduction the document object model (dom) is used to store the tree of xul nodes.
Features of a Window - Archive of obsolete content
gecko 1.9.2 note starting in gecko 1.9.2 (firefox 3.6), overriding the position of a window using window features will not change the persisted values saved by the session store feature.
RDF Datasources - Archive of obsolete content
however, you might want to use your own rdf datasource stored in an rdf file.
Styling a Tree - Archive of obsolete content
this is because the tree body is stored in a different way to other elements.
The Chrome URL - Archive of obsolete content
the mapping between chrome urls and jar files are specified in the manifest files stored in the chrome directory.
Trees and Templates - Archive of obsolete content
natural the data is displayed in natural order, which means the order the data is stored in the rdf datasource.
XBL Example - Archive of obsolete content
this will be a widget that stores a deck of objects, each displayed one at a time.
XPCOM Examples - Archive of obsolete content
this window, stored in the switchwindow variable, is the same as the javascript window object.
Using nsIXULAppInfo - Archive of obsolete content
for example, firefox and thunderbird 1.0 stored their id in the app.id preference (and their version in app.version), so you could use code like this to find out what application you're running under: function getappid() { var id; if("@mozilla.org/xre/app-info;1" in components.classes) { // running under mozilla 1.8 or later id = components.classes["@mozilla.org/xre/app-info;1"] .getservice(components.interface...
Using the Editor from XUL - Archive of obsolete content
as well as making the editor (which happens via nseditorshell::doeditormode()) we also hook up various listeners and observers for ui updating and user interaction, and store a file specifier for the document we opened.
XUL Coding Style Guidelines - Archive of obsolete content
making xul localizable -- mandatory in the past, ui (display) related resource descriptions are stored in *.rc (for windows client) or *.ad (for unix client) so that they can be localized for a specific language or culture.
image - Archive of obsolete content
ArchiveMozillaXULimage
this would be useful if the images are stored remotely or you plan on swapping the image frequently.
menuitem - Archive of obsolete content
this would be useful if the images are stored remotely or you plan on swapping the image frequently.
textbox - Archive of obsolete content
note that decimal numbers are stored as floats.
toolbarbutton - Archive of obsolete content
this would be useful if the images are stored remotely or you plan on swapping the image frequently.
treecol - Archive of obsolete content
natural the data is sorted in natural order, which means the order that it is stored in.
XULRunner tips - Archive of obsolete content
without these settings password manager will not store login details.
Windows and menus in XULRunner - Archive of obsolete content
the dtd is used to create entity references so strings for titles and labels are not stored directly in the xul file; this makes updating the text -- and localization of the application -- much easier.
Archived Mozilla and build documentation - Archive of obsolete content
table cellmap the table layout use the cellmap for two purposes: table cellmap - border collapse this document describes the additional information that is stored for border collapse tables in the cellmap.
2006-11-17 - Archive of obsolete content
paul reed announced that: there was a power outage at his office and the machines, which are responsible for running autoconf (configure.in -> configure), located in his office failed to boot up after power was restored.
2006-10-20 - Archive of obsolete content
neil notes that the format of localstore has changed from previous versions and that "persist" is not functioning properly using the new format.
2006-10-20 - Archive of obsolete content
location of files discussion about where are the calendar files stored and can they be moved.
NPN_Invoke - Archive of obsolete content
if the method was invoked successfully, any return value is stored in the npvariant specified by result.
NPN_InvokeDefault - Archive of obsolete content
if the default method was invoked successfully, any return value is stored in the npvariant specified by result.
NPN_SetProperty - Archive of obsolete content
<tt>value</tt> the value to store in the specified property.
NPN_SetValueForURL - Archive of obsolete content
« gecko plugin api reference « browser side plug-in api summary allows a plugin to change the stored information associated with a url, in particular its cookies.
NPP_New - Archive of obsolete content
this data is stored in instance->pdata.
NPSavedData - Archive of obsolete content
« gecko plugin api reference « plug-in side plug-in api summary block of instance information saved after the plug-in instance is deleted; can be returned to the plug-in to restore the data in future instances of the plug-in.
NP_Port - Archive of obsolete content
restore the previous port settings after drawing.
The First Install Problem - Archive of obsolete content
this information is also stored under the suffixes subkey (see below), but that key doesn't link suffixes to a particular mimetype.
Vulnerabilities - Archive of obsolete content
examples of settings are an operating system offering access to control lists that set the privileges that users have for files, and an application offering a setting to enable or disable the encryption of sensitive data stored by the application.
Common Firefox theme issues and solutions - Archive of obsolete content
operating system specific issues windows 7 windows 7 aero missing right-hand title bar buttons when tabs are on top and the menu bar is disabled, firefox is missing the min/max/restore/close button on the right side of the title bar.
E4X for templating - Archive of obsolete content
s.length(), function () <description>{elems[0]}</description>, function _else () <label>no data</label> )} note that the simple xmllist() constructor (<></>) may be useful to still be able to use an expression closure (i.e., without needing return statements and braces): {_if(elems.length(), function () <> <markup/> <markup/> </>)} note that, while it is convenient to store such e4x in separate file templates (to be eval()d at a later time, taking into account security considerations, such as escaping with the above), e4x content using such functions can also be easily serialized inline (and then perhaps converted to the dom) as needed: var list = <>{_if(elems.length(), function () <> <markup/> <markup/> </>)}</>.toxmlstring(); iterating functions s...
Using JavaScript Generators in Firefox - Archive of obsolete content
osegenerator() { settimeout(function() { generator.close(); }, 0); } // our main steps function databaseoperation() { mozindexeddb.open("mytestdatabase").onsuccess = grabevent; var event = yield; var db = event.target.result; if (db.version != "1.0") { db.setversion("1.0").onsuccess = grabevent; event = yield; var transaction = event.transaction; db.createobjectstore("stuff"); transaction.oncomplete = grabevent; yield; } db.transaction(["stuff"]).objectstore("stuff").get("foo").onsuccess = grabevent; event = yield; alert("got result: " + event.target.result); // we're all done.
Date.getVarDate() - Archive of obsolete content
not supported in windows 8.x store apps.
Debug.debuggerEnabled - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Debug.msUpdateAsyncCallbackRelation - Archive of obsolete content
also supported in store apps (windows 8.1 and windows phone 8.1).
Debug.setNonUserCodeExceptions - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Debug.write - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Debug.writeln - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Enumerator.atEnd - Archive of obsolete content
not supported in windows 8.x store apps.
Enumerator.item - Archive of obsolete content
not supported in windows 8.x store apps.
Enumerator.moveFirst - Archive of obsolete content
not supported in windows 8.x store apps.
Enumerator.moveNext - Archive of obsolete content
not supported in windows 8.x store apps.
Error.description - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Error.number - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
Error.stackTraceLimit - Archive of obsolete content
try { var err = new error("my error"); error.stacktracelimit = 7; throw err; } catch(e) { document.write("error stack trace limit: ") document.write(error.stacktracelimit); } requirements supported in internet explorer 10 and in windows 8.x store apps.
ScriptEngine() - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
ScriptEngineBuildVersion - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
ScriptEngineMajorVersion - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
ScriptEngineMinorVersion - Archive of obsolete content
also supported in store apps (windows 8 and windows phone 8.1).
VBArray.dimensions - Archive of obsolete content
not supported in windows 8.x store apps.
VBArray.getItem - Archive of obsolete content
not supported in windows 8.x store apps.
VBArray.lbound - Archive of obsolete content
not supported in windows 8.x store apps.
VBArray.toArray - Archive of obsolete content
not supported in windows 8.x store apps.
VBArray.ubound - Archive of obsolete content
not supported in windows 8.x store apps.
VBArray - Archive of obsolete content
not supported in windows 8.x store apps.
Object.prototype.__count__ - Archive of obsolete content
the __count__ property used to store the count of enumerable properties on the object, but it has been removed.
Archived JavaScript Reference - Archive of obsolete content
you can use the more general proxy object instead.object.prototype.__count__the __count__ property used to store the count of enumerable properties on the object, but it has been removed.object.prototype.__nosuchmethod__the __nosuchmethod__ property used to reference a function to be executed when a non-existent method is called on an object, but this function is no longer available.object.prototype.__parent__the __parent__ property used to point to an object's context, but it has been removed.object.protot...
Building Mozilla XForms - Archive of obsolete content
configure your build: the .mozconfig file mozilla uses a file called .mozconfig in your home directory to store the build configuration.
The Business Benefits of Web Standards - Archive of obsolete content
eliminate unwelcome future costs a very significant portion of electronically-stored information is produced for the web and written in html format.
XQuery - Archive of obsolete content
xquseme is a working proof-of-concept (so far tested on windows and linux with java installed; mac does not work) extension which allows one to perform xqueries on external urls, the currently loaded webpage (even if originally from poorly formed html), and/or xml (including well-formed xhtml) documents stored locally.
Common causes of memory leaks in extensions - Extensions
to avoid these issues, references to dom nodes in foreign document should instead be stored in an object which is specific to that document, and cleaned up when the document is unloaded, or stored as weak references.
Index - Game development
8 game distribution cocoonio, game, game publishing, games, gaming, html5, javascript, mobile game distribution, phonegap, web stores, distribution distribution is the way to give the world access to your game.
Game monetization - Game development
even though the digital market is key and you don't need to print covers and put your game in a physical store in boxes, to earn decent money on selling your games for a fixed price you have to invest your time and money in marketing.
2D collision detection - Game development
y.drawmanager.drawall) return this; }, draw: function() { var ctx = crafty.canvas.context; ctx.save(); ctx.fillstyle = this.color; ctx.beginpath(); ctx.arc( this.x + this.radius, this.y + this.radius, this.radius, 0, math.pi * 2 ); ctx.closepath(); ctx.fill(); ctx.restore(); } }); var circle1 = crafty.e("2d, canvas, circle").attr(dim1).circle(15, "red"); var circle2 = crafty.e("2d, canvas, circle, fourway").fourway(2).attr(dim2).circle(20, "blue"); circle2.bind("enterframe", function () { var dx = (circle1.x + circle1.radius) - (circle2.x + circle2.radius); var dy = (circle1.y + circle1.radius) - (circle2.y + circle2.radius); var distance = math...
Building up a basic demo with A-Frame - Game development
create a new directory to store your project in.
Building up a basic demo with PlayCanvas editor - Game development
for that we'll need a timer to store the total amount of time passed since the start of the animation.
Implementing controls using the Gamepad API - Game development
the first one is fired when the browser detects the connection of a new gamepad while the second one is fired when a gamepad is disconnected (either physically by the user or due to inactivity.) in the demo, the gamepadapi object is used to store everything related to the api: var gamepadapi = { controller: {}, turbo: false, connect: function() {}, disconnect: function() {}, update: function() {}, buttonpressed: function() {}, buttons: [], buttonscache: [], buttonsstatus: [], axesstatus: [] }; the buttons array contains the xbox 360 button layout: buttons: [ 'dpad-up','dpad-down','dpad-left','dpad-right', 'start...
Square tilemaps implementation: Static maps - Game development
the tilemap data structure to store that map data, we can use a plain object or a custom class.
Tiles and tilemaps overview - Game development
the tile atlas the most efficient way to store the tile images is in an atlas or spritesheet.
Finishing up - Game development
let's first add a variable to store the number of lives in the same place where we declared our other variables: var lives = 3; drawing the life counter looks almost the same as drawing the score counter — add the following function to your code, below the drawscore() function: function drawlives() { ctx.font = "16px arial"; ctx.fillstyle = "#0095dd"; ctx.filltext("lives: "+lives, canvas.width-65, 20); } instead o...
Paddle and keyboard controls - Game development
== "arrowright") { rightpressed = true; } else if(e.key == "left" || e.key == "arrowleft") { leftpressed = true; } } function keyuphandler(e) { if(e.key == "right" || e.key == "arrowright") { rightpressed = false; } else if(e.key == "left" || e.key == "arrowleft") { leftpressed = false; } } when we press a key down, this information is stored in a variable.
Animations and tweens - Game development
phaser extracts these and stores references to them in an array — positions 0, 1, and 2.
Build the brick field - Game development
defining new variables first, let's define the needed variables — add the following below your previous variable definitions: var bricks; var newbrick; var brickinfo; the bricks variable will be used to create a group, newbrick will be a new object added to the group on every iteration of the loop, and brickinfo will store all the data we need.
Buttons - Game development
new variables we will need a variable to store a boolean value representing whether the game is currently being played or not, and another one to represent our button.
Extra lives - Game development
new variables add the following new variables below the existing ones in your code: var lives = 3; var livestext; var lifelosttext; these respectively will store the number of lives, the text label that displays the number of lives that remain, and a text label that will be shown on screen when the player loses one of their lives.
Visual typescript game engine - Game development
| ├── examples/ | | ├── platformer/ | ├── html-components/ | | ├── register.html | | ├── login.html | | ├── games-list.html | | ├── user-profile.html | | ├── store.html | | ├── broadcaster.html | ├── index.html | ├── app-icon.ts | └── app.ts └── server/ | ├── package.json | ├── package-lock.json | ├── server-config.js | ├── database/ | | ├── database.js | | ├── common/ | | ├── email/ | | | ├── templates/ | | | | ├── confirmation.ht...
Base64 - MDN Web Docs Glossary: Definitions of Web-related terms
base64 encoding schemes are commonly used when there is a need to encode binary data that needs to be stored and transferred over media that are designed to deal with ascii.
CDN - MDN Web Docs Glossary: Definitions of Web-related terms
these servers store duplicate copies of data so that servers can fulfill data requests based on which servers are closest to the respective end-users.
Cache - MDN Web Docs Glossary: Definitions of Web-related terms
a cache (web cache or http cache) is a component that stores http responses temporarily so that it can be used for subsequent http requests as long as it meets certain conditions.
Computer Programming - MDN Web Docs Glossary: Definitions of Web-related terms
for example, a program that helps scientists with complex calculations, a database that stores huge amounts of data, a web site that allows people to download music, or animation software that allows people to create animated movies.
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.
Digest - MDN Web Docs Glossary: Definitions of Web-related terms
a digest can be used to perform several tasks: in non-cryptographic applications (e.g., the index of hash tables, or a fingerprint used to detect duplicate data or to uniquely identify files) verify message integrity (a tampered message will have a different hash) store passwords so that they can't be retrieved, but can still be checked (to do this securely, you also need to salt the password.) generate pseudo-random numbers generate keys it is critical to choose the proper hash function for your use case to avoid collisions and predictability.
Favicon - MDN Web Docs Glossary: Definitions of Web-related terms
usually, a favicon is 16 x 16 pixels in size and stored in the gif, png, or ico file format.
IIFE - MDN Web Docs Glossary: Definitions of Web-related terms
(function () { var aname = "barry"; })(); // variable aname is not accessible from the outside scope aname // throws "uncaught referenceerror: aname is not defined" assigning the iife to a variable stores the function's return value, not the function definition itself.
IMAP - MDN Web Docs Glossary: Definitions of Web-related terms
imap (internet message access protocol) is a protocol used to retrieve and store emails.
IndexedDB - MDN Web Docs Glossary: Definitions of Web-related terms
however, it uses javascript objects rather than fixed columns tables to store data.
JSON - MDN Web Docs Glossary: Definitions of Web-related terms
much like xml, json has the ability to store hierarchical data unlike the more traditional csv format.
MVC - MDN Web Docs Glossary: Definitions of Web-related terms
however, these days, more of the logic is pushed to the client with the advent of client-side data stores, and xmlhttprequest allowing partial page updates as required.
Netscape Navigator - MDN Web Docs Glossary: Definitions of Web-related terms
netscape could display a webpage while loading, used javascript for forms and interactive content, and stored session information in cookies.
Quaternion - MDN Web Docs Glossary: Definitions of Web-related terms
as such, the type dompoint (or dompointreadonly) is used to store quaternions.
RGB - MDN Web Docs Glossary: Definitions of Web-related terms
in opengl, webgl, and glsl the red-green-blue components are fractions (floating-point numbers between 0.0 and 1.0), although in the actual color buffer they are typically stored as 8-bit integers.
SMPTE (Society of Motion Picture and Television Engineers) - MDN Web Docs Glossary: Definitions of Web-related terms
the society of motion picture and television engineers (smpte) is the professional association of engineers and scientists that develop and define standards and technologies used to create, broadcast, store, and present entertainment media.
TOFU - MDN Web Docs Glossary: Definitions of Web-related terms
to do that, clients will look for identifiers (for example public keys) stored locally.
Type - MDN Web Docs Glossary: Definitions of Web-related terms
type is a characteristic of a value affecting what kind of data it can store, and the structure that the data will adhere to.
buffer - MDN Web Docs Glossary: Definitions of Web-related terms
a buffer is a storage in physical memory used to temporarily store data while it is being transferred from one place to another.
Cacheable - MDN Web Docs Glossary: Definitions of Web-related terms
a cacheable response is an http response that can be cached, that is stored to be retrieved and used later, saving a new request to the server.
lossy compression - MDN Web Docs Glossary: Definitions of Web-related terms
the process of such compression is irreversible; once lossy compression of the content has been performed, the content cannot be restored to its original state.
HTML: A good basis for accessibility - Learn web development
we check what button was pressed via the event object's keycode property; if it is the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.click().
HTML: A good basis for accessibility - Learn web development
we check what button was pressed via the event object's keycode property; if it is the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.click().
Accessible multimedia - Learn web development
we will first need to store references to each of the controls — add the following to the top of your javascript file: const playpausebtn = document.queryselector('.playpause'); const stopbtn = document.queryselector('.stop'); const rwdbtn = document.queryselector('.rwd'); const fwdbtn = document.queryselector('.fwd'); const timelabel = document.queryselector('.time'); next, we need to grab a reference to the video/audi...
Debugging CSS - Learn web development
view source in comparison, is simply the html source code as stored on the server.
What text editors are available? - Learn web development
some text editors you can find directly in the apple store to make installation even simpler.
How do I start to design my website? - Learn web development
mail?) define how people will find those contact channels from your website sell goodies create the goodies store the goodies find a way to handle shipping find a way to handle payment make a mechanism on your site for people to place orders teach music through videos record video lessons prepare video files viewable online (again, could you do this with existing web services?) give people access to your videos on some part of your website two t...
How do you upload your files to a web server? - Learn web development
navigate into the directory where you store your website (e.g.
How do I use GitHub Pages? - Learn web development
preparing your code for upload you can store any code you like in a github repository, but to use the github pages feature to full effect, your code should be structured as a typical website, e.g.
The HTML5 input types - Learn web development
to actually display the current value, and update it as it changed, you must use javascript, but this is relatively easy to do: const price = document.queryselector('#price'); const output = document.queryselector('.price-output'); output.textcontent = price.value; price.addeventlistener('input', function() { output.textcontent = price.value; }); here we store references to the range input and the output in two variables.
How the Web works - Learn web development
servers are computers that store webpages, sites, or apps.
Publishing your website - Learn web development
next, you need to create a repository to store files.
Add a hitmap on top of an image - Learn web development
alternatively, dudley storey demonstrates a way to use svg for an image map effect, along with a subsequent combined svg-raster hack for bitmap images.
From object to iframe — other embedding technologies - Learn web development
a short history of embedding a long time ago on the web, it was popular to use frames to create websites — small parts of a website stored in individual html pages.
Making asynchronous programming easier with async and await - Learn web development
in the fast-async-await.html example, timetest() looks like this: async function timetest() { const timeoutpromise1 = timeoutpromise(3000); const timeoutpromise2 = timeoutpromise(3000); const timeoutpromise3 = timeoutpromise(3000); await timeoutpromise1; await timeoutpromise2; await timeoutpromise3; } here we store the three promise objects in variables, which has the effect of setting off their associated processes all running simultaneously.
Choosing the right approach - Learn web development
being fetched, use the relevant function to decode its contents if(type === 'blob') { return response.blob(); } else if(type === 'text') { return response.text(); } }) .catch(e => { console.log(`there has been a problem with your fetch operation for resource "${url}": ` + e.message); }); } // call the fetchanddecode() method to fetch the images and the text, and store their promises in variables let coffee = fetchanddecode('coffee.jpg', 'blob'); let tea = fetchanddecode('tea.jpg', 'blob'); let description = fetchanddecode('description.txt', 'text'); // use promise.all() to run code only when all three function calls have resolved promise.all([coffee, tea, description]).then(values => { console.log(values); // store each value returned from the promises in...
Introduction to events - Learn web development
or: <button>change color</button> button { margin: 10px }; the javascript looks like so: const btn = document.queryselector('button'); function random(number) { return math.floor(math.random() * (number+1)); } btn.onclick = function() { const rndcol = 'rgb(' + random(255) + ',' + random(255) + ',' + random(255) + ')'; document.body.style.backgroundcolor = rndcol; } in this code, we store a reference to the button inside a constant called btn, using the document.queryselector() function.
Functions — reusable blocks of code - Learn web development
previous overview: building blocks next another essential concept in coding is functions, which allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
Making decisions in your code — conditionals - Learn web development
it should: look at the selected month (stored in the choice variable.
JavaScript building blocks - Learn web development
functions allow you to store a piece of code that does a single task inside a defined block, and then call that code whenever you need it using a single short command — rather than having to type out the same code multiple times.
Third-party APIs - Learn web development
for example: let map = l.mapquest.map('map', { center: [53.480759, -2.242631], layers: l.mapquest.tilelayer('map'), zoom: 12 }); here we are creating a variable to store the map information in, then creating a new map using the mapquest.map() method, which takes as its parameters the id of a <div> element you want to display the map in ('map'), and an options object containing the details of the particular map we want to display.
Client-side web APIs - Learn web development
client-side storage modern web browsers feature a number of different technologies that allow you to store data related to web sites and retrieve it when necessary allowing you to persist data long term, save sites offline, and more.
Basic math in JavaScript — numbers and operators - Learn web development
type the following lines into your browser's console: let lotsofdecimal = 1.766584958675746364; lotsofdecimal; let twodecimalplaces = lotsofdecimal.tofixed(2); twodecimalplaces; converting to number data types sometimes you might end up with a number that is stored as a string type, which makes it difficult to perform calculations with it.
Handling text — strings in JavaScript - Learn web development
being used in action — here's an example from earlier in the course: <button>press me</button> const button = document.queryselector('button'); button.onclick = function() { let name = prompt('what is your name?'); alert('hello ' + name + ', nice to see you!'); } here we're using a window.prompt() function in line 4, which asks the user to answer a question via a popup dialog box then stores the text they enter inside a given variable — in this case name.
Test your skills: variables - Learn web development
variables 2 in this task you need to add a new line to correct the value stored in the existing myname variable to your own name.
What went wrong? Troubleshooting JavaScript - Learn web development
the instance that stores the random number that we want to guess at the start of the game should be around line number 44: let randomnumber = math.floor(math.random()) + 1; and the one that generates the random number before each subsequent game is around line 113: randomnumber = math.floor(math.random()) + 1; to check whether these lines are indeed the problem, let's turn to our friend console.log() again �...
JavaScript First Steps - Learn web development
here we look at why this is useful, then explore how to create an array, retrieve, add, and remove items stored in an array, and more besides.
Adding features to our bouncing balls demo - Learn web development
in your css file, add the following rule at the bottom: p { position: absolute; margin: 0; top: 35px; right: 5px; color: #aaa; } in your javascript, make the following updates: create a variable that stores a reference to the paragraph.
JavaScript object basics - Learn web development
let's say we wanted users to be able to store custom value types in their people data, by typing the member name and value into two text inputs.
Inheritance in JavaScript - Learn web development
we use _ to create a separate value in which to store our name property.
Object building practice - Learn web development
first, we need to create somewhere to store all our balls and then populate it.
Test your skills: JSON - Learn web development
your task is to fill in the missing parts of the displaycatinfo() function to store: the names of the three mother cats, separated by commas, in the motherinfo variable.
Test your skills: Object basics - Learn web development
object basics 1 in this task you are provided with an object literal, and your tasks are to store the value of the name property inside the catname variable, using bracket notation.
Aprender y obtener ayuda - Learn web development
focused thinking is great for concentrating hard on specific subjects, getting into deep problem solving, and improving your mastery of the techniques required — strengthening the neural pathways in your brain where that information is stored.
Multimedia: Images - Learn web development
it's important to remember that when images are downloaded, they need to be stored in memory.
Ember Interactivity: Footer functionality, conditional rendering - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Ember resources and troubleshooting - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Routing in Ember - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Ember app structure and componentization - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Introduction to client-side frameworks - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Componentizing our React app - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Getting started with React - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
React interactivity: Editing, filtering, conditional rendering - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
React resources - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Using Vue computed properties - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Vue conditional rendering: editing existing todos - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Adding a new todo form: Vue events, methods, and models - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Focus management with Vue refs - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Rendering a list of Vue components - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Vue resources - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Styling Vue components with CSS - Learn web development
s using vue computed properties vue conditional rendering: editing existing todos focus management with vue refs vue resources svelte getting started with svelte starting our svelte todo list app dynamic behavior in svelte: working with variables and props componentizing our svelte app advanced svelte: reactivity, lifecycle, accessibility working with svelte stores typescript support in svelte deployment and next steps ...
Handling common accessibility problems - Learn web development
we check what button was pressed via the event object's keycode property; if it is the keycode that matches return/enter, we run the function stored in the button's onclick handler using document.activeelement.onclick().
Implementing feature detection - Learn web development
note how the javascript representations of those properties that are stored inside the htmlelement.style object use lower camel case, not hyphens, to separate the words.
Handling common HTML and CSS problems - Learn web development
store a reference to this element in a variable, for example: const test = document.getelementbyid('hplogo'); now try to set a new value for the css property you are interested in on that element; you can do this using the style property of the element, for example try typing these into the javascript console: test.style.transform = 'rotate(90deg)' test.style.webkittransform = 'rotate(90deg)' ...
Introduction to cross browser testing - Learn web development
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.
Setting up your own test automation environment - Learn web development
since you are using these twice now, you may want to create a couple of helper variables to store them in.
Git and GitHub - Learn web development
however, it is recommended that you know some coding so that you have reasonable computer literacy, and some code to store in your repositories!
Introducing a complete toolchain - Learn web development
git is the revision control tool, whereas github is an online store for git repositories (plus a number of useful tools for working with them).
Client-side tooling overview - Learn web development
you then "push" changes to a "master" version of the code inside a remote repository stored on a server somewhere.
omni.ja (formerly omni.jar)
note: starting with firefox 10 and thunderbird 10, the file extension .ja is used because windows system restore does not back up files with the .jar extension, but it does back up .ja files.
CSUN Firefox Materials
it also includes a full-featured session manager with crash recovery that can save and restore combinations of opened tabs and windows.
Embedding API for Accessibility
perhaps it can be extended to store accessibility preferences.
Multiprocess on Windows
com) interface for that accessible, and store it in acctowrap.
Mozilla’s UAAG evaluation report
(p1) g provides sequential access to links and input form controls cannot navigate to non-links and non-input form controls with event handlers cannot configure mozilla to only allow focus changes on explicit user request 9.4 restore history.
Theme concepts
static themes static themes are specified using the same resources as a browser extension: a manifest.json file to define the theme components with those components stored in the same folder as the manifest.json file or a sub folder.
Application cache implementation overview
then, nsicacheservice is asked to open nsicachesession with store_offline policy and the given client id.
A bird's-eye view of the Mozilla framework
javascript client example suppose the javascript service in figure 2 is getlink() in help.js, which responds to the user clicking on a link in thecontents panel within thehelp viewer window by obtaining the link from thecontents panel elements stored in a dom tree.
Command line options
remote control -remote remote_command this feature was removed in firefox 36.0, restored in 36.0.1 and removed again in 39.0.
Continuous Integration
the talos harness produces a single number per test (typically the median of all the replicates excluding the first 1-5), which are stored in treeherder's database, and are accessible via the perfherder interface.
Cookies Preferences in Mozilla
y used if network.cookie.lifetimepolicy is set to 1 true = accepts session cookies without prompting false = prompts for session cookies network.cookie.thirdparty.sessiononly default value: false true = restrict third party cookies to the session only false = no restrictions on third party cookies network.cookie.maxnumber default value: 1000 configures the maximum amount of cookies to be stored valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 300 network.cookie.maxperhost default value: 50 configures the maximum amount of cookies to be stored per host valid range is from 0-65535, rfc 2109 and 2965 require this to be at least 20 network.cookie.disablecookieformailnews default value: true true = do not accept any cookies from within mailnews or from mail...
Creating a Login Manager storage module
the login manager manages and stores user passwords.
mach
here is a minimal mach command module: from __future__ import print_function, unicode_literals from mach.decorators import ( commandargument, commandprovider, command, ) @commandprovider class machcommands(object): @command('doit', description='run it!') @commandargument('--debug', '-d', action='store_true', help='do it in debug mode.') def doit(self, debug=false): print('i did it!') from mach.decorators we import some python decorators which are used to define what python code corresponds to mach commands.
Displaying Places information using views
placestreeview uses this attribute to store the row index that the node is on.
Frame script environment
however, any top-level variables defined by a script are not stored on the global: instead, top-level variables are stored in a special per-script object that delegates to the per-tab global.
Limitations of chrome scripts
if an add-on wants to use a jsm to share state in this way, it's best to load the jsm in the chrome process, and have frame scripts store and access the jsm's state by sending messages to the chrome process using the message manager.
Limitations of frame scripts
for example: nsisessionstore nsiwindowmediator <need more examples> places api the places api can't be used inside a frame script.
Frame script environment
however, any top-level variables defined by a script are not stored on the global: instead, top-level variables are stored in a special per-script object that delegates to the per-tab global.
Limitations of frame scripts
for example: nsisessionstore nsiwindowmediator <need more examples> places api the places api can't be used inside a frame script.
Firefox and the "about" protocol
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
if searchactive is true, meaning that a search has been done, we want to disable the search as we hide the search options — we disable the buttons, make searchactive false, clear the entered search value, and run htmliframeelement.clearmatch(), which gets rid of any stored/highlighted search results from the browser.
mozbrowserselectionstatechanged
commands an object that stores information about what commands can be executed on the current selection.
HTMLIFrameElement.purgeHistory()
it only deletes history, not cookies or other stored information.
Overview of Mozilla embedding APIs
contract-id: ns_iunknowncontenttypehandler_contractid implemented interfaces: nsiunknowncontenttypehandler helperapp launch dialog contract-id: ns_externalhelperappservice_contractid implemented interfaces: nsiexternalhelperappservice preferences service the preferences service provides access to persistent data stored within a user's profile directory.
Internationalized Domain Names (IDN) Support in Mozilla Browsers
arabic and hebrew), and check whether or not unassigned characters in the unicode repertoire are used -- allowing them for "query strings" but disallowing them for "stored strings" such as the data input for domain name registration.
JavaScript-DOM Prototypes in Mozilla
to do this, the code figures out what the name of the immediate prototype of the class is by looking at the parent of the primary interface in the class info (if the name is a class constructor, such as htmlimageelement) or by looking at the parent of the interface that the iid stored in the nsscriptnamespacemanager for this name represents (if the name is a class prototype, such as node).
JavaScript Tips
it is often faster to store the result in a temporary variable.
Addon
getdatadirectory() requires gecko 32.0(firefox 32.0 / thunderbird 32.0 / seamonkey 2.29) returns the path of the preferred directory, within the current profile, where an add-on should store data files.
JavaScript OS.Constants
eoverflow (not always available under windows) value too large to be stored in datatype.
OS.File.Info
on older unix filesystems it is not possible to get a creation date as it was never stored, on new unix filesystems creation date is stored but the method to obtain this date differs per filesystem, bugzilla :: bug 1167143 explores implementing solutions for all these different filesystems) lastaccessdate the date at which the file was last accessed, as a javascript date object.
Bootstrapping a new locale
ng commands one after the other from your command line: $ cd [ab-cd]/browser/chrome/browser to see what is contained in "browser" type $ ls and, you should see the following output from your terminal: aboutcerterror.dtd pageinfo.dtd aboutdialog.dtd pageinfo.properties aboutprivatebrowsing.dtd pagereportfirsttime.dtd aboutrobots.dtd places aboutsessionrestore.dtd preferences aboutsupport.dtd quitdialog.properties basemenuoverlay.dtd safemode.dtd browser.dtd safebrowsing browser.properties sanitize.dtd credits.dtd search.properties enginemanager.dtd searchbar.dtd enginemanager.properties setdesktopbackground.dtd feeds ...
Localizing XLIFF files for iOS
decide where on your local computer you will store your copy of the github repo and navigate there in your terminal.
Mozilla DOM Hacking Guide
nsiclassinfo stores the interfaces available for an object and later on xpconnect uses those interfaces to lookup the right method to call.
Investigating leaks using DMD heap scan mode
firefox’s dmd heap scan mode tracks the set of all live blocks of malloc-allocated memory and their allocation stacks, and allows you to log these blocks, and the values stored in them, to a file.
Memory Profiler
the profile while recording is stored in memory in a very compact format.
Power profiling overview
in the context of computing, a fully-charged mobile device battery (as found in a laptop or smartphone) holds a certain amount of energy, and the speed at which that stored energy is depleted depends on the power consumption of the mobile device.
Profiling with the Firefox Profiler
tip: while zooming out to a previously-selected range deletes the narrower range, the browser back button can be used to restore the narrower range.
Reporting a Performance Problem
the profiler uses a fixed size buffer to store sample data.
A brief guide to Mozilla preferences
it provides a general overview of mozilla preferences, including where preferences are stored, a file-by-file analysis of preference loading sequence, and information on editing preferences.
mail.tabs.drawInTitlebar
the old behavior can be restored by setting the preference mail.tabs.drawintitlebar to false.
Patches and pushes
each plugin is stored as an xml file, with list.txt containing the names of each plugin.
Emscripten
our emscripten techniques page is a place to store useful emscripten-related ideas that haven't made it onto the emscripten wiki.
L20n Javascript API
in other words, the following two calls: ctx.updatedata({ user: { name: "bob" } }); ctx.updatedata({ user: { gender: "masculine" } }); will make the internally-stored context data look like this: { "user" : { "name": "bob", "gender": "masculine" } } ctx.getsync(id: string, ctxdata: object?) retrieve a string value of an entity called id.
Localization Use Cases
in slovenian, the ideal string would inflect the noun, like so: o firefoxu however, since we want the name of the browser to be stored in the browserbrandshortname entity, we can't modify it.
AsyncTestUtils extended framework
the tag key is not the label, but what is actually stored on the imap server.
McCoy
this is located in: %appdata%\mozilla\mccoy (windows) ~/.mozilla/mccoy (linux) ~/library/application support/mccoy (mac os x) it is highly recommended that you back up your profile folder and store it in a safe location whenever you create a new key; without a backup, there is no way to recover your private keys if they are lost!
Midas editor module security preferences
only change these settings as needed to try the demo above and to test your own add-on or firefox-internal code, and be sure to restore the default settings when you're done!
Introduction to NSPR
this arrangement implies that a system thread should not have volatile data that needs to be safely stored away.
NSPR Error Handling
pr_buffer_overflow_error the value retrieved is too large to be stored in the buffer provided.
Named Shared Memory
security considerations on unix platforms, depending on implementation, contents of the backing store for the shared memory can be exposed via the file system.
PL_HashTableLookup
keep this ambiguity in mind if you want to store null values in a hash table.
PRIOMethods
fsync flush all in-memory buffers of file to permanent store.
PRThreadType
this arrangement implies that a system thread should not have volatile data that needs to be safely stored away.
PRTime
note: keep in mind that while prtime stores times in microseconds since epoch, javascript date objects store times in milliseconds since epoch.
PR_Accept
if the addr parameter is not null, pr_accept stores the address of the connecting entity in the prnetaddr object pointed to by addr.
PR_ExplodeTime
exploded a pointer to a location where the converted time can be stored.
PR GetAddrInfoByName
use pr_enumerateaddrinfo to inspect the prnetaddr values stored in this structure.
PR GetCanonNameFromAddrInfo
returns the function returns a const pointer to the canonical hostname stored in the given praddrinfo structure.
PR_GetErrorText
copies the current thread's current error text without altering the text as stored in the thread's context.
PR_GetFileInfo
description pr_getfileinfo stores information about the file with the specified pathname in the prfileinfo structure pointed to by info.
PR_GetFileInfo64
description pr_getfileinfo64 stores information about the file with the specified pathname in the prfileinfo64 structure pointed to by info.
PR_RecvFrom
receives bytes from a socket and stores the sending peer's address.
PR_SetError
the runtime merely stores the value and returns it when requested.
PR_cnvtf
syntax #include <prdtoa.h> void pr_cnvtf ( char *buf, printn bufsz, printn prcsn, prfloat64 fval); parameters the function has these parameters: buf the address of the buffer in which to store the result.
PR_strtod
if the value of se is not (char **) null, pr_strtod stores a pointer to the character terminating the scan in *se.
Building NSS
test output is stored in tests_results/security/$host.$number/.
Cryptography functions
ymkeywithflagsperm 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_setfortezzahack mxr 3.2 and later pk11_setpasswordfunc mxr 3.2 and later pk11_setprivatekeynickname mxr 3.4 and later pk11_set...
Encrypt Decrypt MAC Keys As Session Objects
* loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char...
Encrypt and decrypt MAC using token
* loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char...
NSS 3.12.4 release notes
bug 431958: improve des and sha512 for x86_64 platform bug 433791: win16 support should be deleted from nss bug 449332: secu_parsecommandline does not validate its inputs bug 453735: when using cert9 (sqlite3) db, set or change master password fails bug 463544: warning: passing enum* for an int* argument in pkix_validate.c bug 469588: coverity errors reported for softoken bug 470055: pkix_httpcertstore_findsocketconnection reuses closed socket bug 470070: multiple object leaks reported by tinderbox bug 470479: io timeout during cert fetching makes libpkix abort validation.
NSS 3.16.4 release notes
notable changes in nss 3.16.4 the following 1024-bit root ca certificate was restored to allow more time to develop a better transition strategy for affected sites.
NSS 3.18.1 release notes
notable changes in nss 3.18.1 the following ca certificate had the websites and code signing trust bits restored to their original state to allow more time to develop a better transition strategy for affected sites.
NSS 3.27.2 Release Notes
previous versions of nss leaked the memory used to store distinguished names when ssl_settrustanchors() was used.
NSS 3.29.2 release notes
this release restores the session ticket lifetime to the intended value.
NSS 3.47 release notes
8557 - bad debug statement in tls13con.c bug 1579060 - mozilla::pkix tag definitions for issueruniqueid and subjectuniqueid shouldn't have the constructed bit set bug 1583068 - nss 3.47 should pick up fix from bug 1575821 (nspr 4.23) bug 1152625 - support aes hw acceleration on armv8 bug 1549225 - disable dsa signature schemes for tls 1.3 bug 1586947 - pk11_importandreturnprivatekey does not store nickname for ec keys bug 1586456 - unnecessary conditional in pki3hack, pk11load and stanpcertdb bug 1576307 - check mechanism param and param length before casting to mechanism-specific structs bug 1577953 - support longer (up to rfc maximum) hkdf outputs bug 1508776 - remove refcounting from sftk_freesession (cve-2019-11756) bug 1494063 - support tls exporter in tstclnt and selfserv bug 1...
NSS 3.53 release notes
this attribute provides a more graceful phase-out for certificate authorities than complete removal from the root certificate builtin store.
NSS API Guidelines
queued, linked, and hash table stored objects should be examined with special care.
Enc Dec MAC Output Public Key as CSR
* open an input file and an output file, * wrap the symmetric and mac keys using public key * write a header to the output that identifies the two wrapped keys * and public key * loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close files * report success */ secstatus rv; seckeypublickey *pubkey = null; secitem *pubkeydata = null; prfiledesc *infile = null; prfiledesc *headerfile = null; prfiledesc *encfile ...
Encrypt Decrypt_MAC_Using Token
* loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char...
NSS Sample Code Sample_3_Basic Encryption and MACing
* loop until eof(input) * read a buffer of plaintext from input file * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv * store the last block of ciphertext as the new iv * write the cipher text to intermediate file * close files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char ...
NSS Sample Code sample2
* note: iv is only needed if cipher blocking chaining (cbc) mode of encryption * is used * * the recommended approach is to store and transport wrapped (encrypted) * des keys (ivs can be in the clear).
EncDecMAC using token object - sample 3
* loop until eof(input) * read a buffer of plaintext from input file, * mac it, append the mac to the plaintext * encrypt it using cbc, using previously created iv, * store the last block of ciphertext as the new iv, * write the cipher text to intermediate file * close files * report success */ secstatus rv; prfiledesc *infile; prfiledesc *headerfile; prfiledesc *encfile; unsigned char *enckeyid = (unsigned char *) "encrypt key"; unsigned char *mackeyid = (unsigned char *) "mac key"; secitem enckeyid = { siasciistring, enckeyid, pl_strlen(enckeyid) }; secitem mackey...
Utilities for nss samples
*/ 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 */ ex...
Overview of NSS
rsa standard that governs the format used to store or transport private keys, certificates, and other secret material.
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_Digest
pdigest [out] pointer to location where recovered data is to be stored.
FC_Encrypt
pencrypteddata [out] pointer to location where encrypted data is to be stored.
FC_EncryptFinal
plastencryptedpart [out] pointer to the location that receives the last encrypted data part, if any puslastencryptedpartlen [in,out] pointer to location where the number of bytes of the last encrypted data part is to be stored.
FC_GetFunctionList
description fc_getfunctionlist stores in *ppfunctionlist a pointer to the nss cryptographic module's list of function pointers in the fips mode of operation.
FC_GetSlotInfo
description fc_getslotinfo stores the information about the slot in the ck_slot_info structure that pinfo points to.
FC_InitToken
you won't be able to decrypt the data, such as mozilla's stored passwords, that were encrypted using any of those keys.
FC_Sign
psignature [out] pointer to location where recovered data is to be stored.
NSC_InitToken
you won't be able to decrypt the data, such as mozilla's stored passwords, that were encrypted using any of those keys.
NSS functions
ymkeywithflagsperm 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_setfortezzahack mxr 3.2 and later pk11_setpasswordfunc mxr 3.2 and later pk11_setprivatekeynickname mxr 3.4 and later pk11_set...
NSS tools : pk12util
nss database types nss originally used berkeleydb databases to store security information.
NSS Tools certutil
some smart cards (for example, the litronic card) can store only one key pair.
NSS Tools crlutil
tabase this example modifies a new crl and importing it in to a database in the specified directory: crlutil -g -d certdir -n cert-nickname -c crl-script-file or crlutil -m -d certdir -n cert-nickname <<eof update=20050204153000z addcert 40-60 20050105153000z eof the crl management tool extracts existing crl from a database, will modify and sign with certificate cert-nickname and will store it in database.
NSS tools : pk12util
nss database types nss originally used berkeleydb databases to store security information.
NSS tools : signver
MozillaProjectsNSStoolssignver
signver -a -s signature_file -o output_file nss database types nss originally used berkeleydb databases to store security information.
Proxies in Necko
this means that callers can just create an nsichannel, not needing to worry about whether the channel will use a proxy or not the basic interfaces for proxies are: nsiproxyinfo, nsiprotocolproxyservice, and nsiproxiedprotocolhandler nsiproxyinfo is a simple helper which stores information about the type of the proxy, its host and its port.
Tutorial: Embedding Rhino
a context stores information about the execution environment of a script.
The JavaScript Runtime
when scripts are compiled in interpretive mode, an internal representation of the compiled form is created and stored rather than generating a java class.
Scripting Java
this works just as in java, with the use of the new operator: js> new java.util.date() thu jan 24 16:18:17 est 2002 if we store the new object in a javascript variable, we can then call methods on it: js> f = new java.io.file("test.txt") test.txt js> f.exists() true js> f.getname() test.txt static methods and fields can be accessed from the class object itself: js> java.lang.math.pi 3.141592653589793 js> java.lang.math.cos(0) 1 in javascript, unlike java, the method by itself is an object and can be evaluated as wel...
Rhino shell
deserialize(filename) restore from the specified file an object previously written by a call to serialize.
Property cache
spidermonkey mainly uses type inference to determine which properties are being accessed; in cases where type inference does not find the exact shape of the object being accessed, spidermonkey uses a pic (polymorphic inline caches) to store the result of the lookup.
INT_FITS_IN_JSVAL
starting in spidermonkey 1.8.5, jsval can store a full 32-bit integer, so this check isn't needed any longer for 32-bit integers.
JS::Add*Root
the name parameter, if present and non-null, is stored in the jsruntime's root table entry along with rp.
JS::Compile
on success, js::compile stores an object representing the newly compiled script into script, and returns true.
JS::CompileFunction
on success, js::compilefunction stores an function object representing the newly compiled function into fun and and returns true.
JS::CreateError
if successful, js::createerror stores the created error object to *rval and returns true, otherwise returns false and the value of *rval is undefined.
JS::OrdinaryToPrimitive
on success, js::ordinarytoprimitive stores the converted value in *vp and returns true.
JS::ProtoKeyToId
js::protokeytoid stores a jsid to *idp.
JS::ToInt32
on success, js::toint32 stores the converted value in *out and returns true.
JS::ToInt64
on success, js::toint64 stores the converted value in *out and returns true.
JS::ToNumber
on success, js::tonumber stores the converted value in *out and returns true.
JS::ToPrimitive
on success, js::toprimitive stores the converted value in *vp and returns true.
JS::ToUint16
on success, js::toint16 stores the converted value in *out and returns true.
JS::ToUint32
on success, js::touint32 stores the converted value in *out and returns true.
JS::ToUint64
on success, js::toint64 stores the converted value in *out and returns true.
JSFastNative
(the return value and the callee are stored in the same stack slot.) js_this(cx, vp) returns the this argument as a jsval, or jsval_null on error.
JSFinalizeOp
the finalizer's job is to clean up any resources allocated by the instance which wouldn't normally be cleaned up by the garbage collector (private data stored in the object by the application, file handles, etc.) finalizers must never store a reference to obj.
JSFreeOp
syntax jsfreeop(jsruntime *rt); name type description rt jsruntime * a runtime to store in this structure.
JSGetObjectOps
all native objects have a jsclass, which is stored as a private (int-tagged) pointer in object slots.
JSHasInstanceOp
on success, the callback stores the result of the type check in *bp.
JSObject
most properties also have a stored value.
JSObjectOps.defaultValue
on success, the callback must store the converted value here.
JSObjectOps.enumerate
then it iterates over obj's defined properties, walking the internal data structure they're stored in.
JSObjectOps.getRequiredSlot
v jsval the value to store in the slot, for jssetrequiredslotop.
JSPRINCIPALS_HOLD
application code that stores a pointer to a jsprincipals object must call jsprincipals_hold(cx, principals) before storing it and jsprincipals_drop(cx, principals) when done with it.
JS_AddArgumentFormatter
when called from js_pushargumentsva, the formatter is invoked thus: formatter(cx, "aa...", js_false, &sp, &ap); where js_false for fromjs means to wrap the c values at ap according to the format specifier and store them at sp, updating ap and sp appropriately.
JS_Add*Root
the name parameter, if present and non-null, is stored in the jsruntime's root table entry along with rp.
JS_AlreadyHasOwnProperty
for native objects—objects whose properties are stored in the default data structure provided by spidermonkey—these functions simply check that data structure to see if the specified field is present.
JS_CheckAccess
on success, *vp receives the property's stored value.
JS_CompareStrings
if the strings are identical in content and length, js_comparestrings stores 0 in *result.
JS_ConvertArguments
pointers to variables into which to store the converted values.
JS_ConvertArgumentsVA
ap va_list the list of pointers into which to store the converted types.
JS_DefaultValue
on success, js_defaultvalue stores the converted value in *vp and returns true.
JS_DefineProperties
the initial stored value of each property created is undefined.
JS_DefinePropertyWithTinyId
value jsval initial stored value for the new property.
JS_DeleteProperty2
description js_deleteproperty2 removes a specified property, name, from an object, obj, and stores true or false in *succeeded.
JS_DropExceptionState
see also mxr id search for js_dropstateexception jsexceptionstate js_saveexceptionstate js_restoreexceptionstate ...
JS_ExecuteScriptPart
if the script executes successfully, js_executescriptpart stores the value of the last-executed expression statement in the script in *rval and returns js_true.
JS_GetArrayLength
on success, js_getarraylength stores the length in *lengthp and returns true.
JS_GetClassObject
if successful, js_getclassobject stores the class constructor to *objp and returns true, otherwise returns false and the value of *objp is undefined.
JS_GetClassPrototype
if successful, js_getclassprototype stores the class prototype object to *objp and returns true, otherwise returns false and the value of *objp is undefined.
JS_GetExternalStringClosure
this article covers features introduced in spidermonkey 6 returns the string closure stored in a jsstring created by calling js_newexternalstringwithclosure.
JS_GetFunctionObject
but in the jsapi there are two separate concepts: a jsobject is what is exposed to scripts and has properties and can be stored in variables; and the corresponding jsfunction contains the code of a function.
JS_GetGlobalObject
(in javascript, global variables are stored as properties of the global object.) syntax jsobject * js_getglobalobject(jscontext *cx); name type description cx jscontext * the context from which to retrieve the global object.
JS_GetInternedStringChars
js_getinternedstringcharsandlength returns a pointer to the interned string and stores the length of it to *length.
JS_GetLatin1StringCharsAndLength
if successful, js_getlatin1stringcharsandlength and js_gettwobytestringcharsandlength return a pointer to the string, and store the length to *length, otherwise return null.
JS_GetLocaleCallbacks
passing nullptr restores the default behaviour.
JS_GetPendingException
description if an exception has been thrown in the context cx, and it has not yet been caught or cleared, js_getpendingexception stores the exception object in *vp and returns true.
JS_GetPropertyAttrsGetterAndSetter
when this attribute is present, the value stored in getterp (or setterp) does not really point to a c/c++ function; it is a jsobject *, pointing to a javascript function, cast to type jspropertyop.
JS_GetPrototype
otherwise, it stores a pointer to the prototype or null to *protop and returns true.
JS_GetStringCharAt
on successful, js_getstringcharat returns true and stores the character code into *res, otherwise returns false.
JS_GetStringCharsAndLength
description js_getstringcharsandlength gets the characters and the length of the string, str if successful, js_getstringcharsandlength returns a pointer to the string, and store the length to *length, otherwise returns null see also bug 1037869 ...
JS_HasArrayLength
if the property exists, js_hasarraylength stores the current value of the property in *lengthp.
JS_HasElement
on success, it stores true to *foundp, false otherwise.
JS_HasInstance
on success, js_hasinstance stores the result of the instanceof test in *bp and returns true.
JS_HasOwnProperty
on success, js_hasownproperty stores true in this variable if obj has an own property with the given name, and false if not.
JS_HasProperty
on success, js_hasproperty stores true in this variable if obj has a property with the given name, and false if not.
JS_IdToValue
on success, js_idtovalue stores the converted value in *vp and returns true.
JS_InitClass
once js_initclass creates the new class's constructor, it stores the constructor as a property in this object.
JS_IsExceptionPending
*/ js_clearpendingexception(cx); } /* restore the original exception.
JS_IsExtensible
if successful, js_isextensible stores [[extensible]] property to *extensible and returns true, otherwise returns false and the value of *extensible is undefined.
JS_IsIdentifier
on successful, js_isidentifier stores the test result to *isidentifier and returns true, otherwise returns false and the value of *isidentifier is undefined.
JS_LeaveLocalRootScopeWithResult
otherwise, the value is stored in an internal per-jscontext slot.
JS_LooselyEqual
if the comparison attempt was successful, the method returns js_true and stores the result in *equal; otherwise it returns js_false.
JS_NewArrayObject
the new array has the specified length, but it doesn't have any elements.) it is often better to call js_newarrayobject(cx, 0, null), store the returned object in a gc root, and then populate its elements with js_setelement or js_defineelement.
JS_NewDoubleValue
on success, js_newdoublevalue stores a numeric jsval in *rval and returns js_true.
JS_NumberValue
the result is an integer js::value if d can be stored that way.
JS_PushArguments
convert any number of arguments to jsvals and store the resulting jsvals in an array.
JS_SetCallReturnValue2
the native must store the object part of the reference value in *rval, and the argument v gives the id of the property part of the reference value.
JS_StrictlyEqual
if the comparison attempt was successful, the method returns true and stores the result in *equal; otherwise it returns false.
JS_StringEqualsAscii
on successful, js_stringequalsascii stores the comparison result into *match and returns true, otherwise returns false.
JS_ValueToBoolean
on success, js_valuetoboolean stores the converted value in *bp and returns js_true.
JS_ValueToECMAInt32
on success, js_valuetoecmaint32 stores the converted value in *ip and returns js_true.
JS_ValueToId
on success, js_valuetoid stores the converted value in *idp and returns true.
JS_ValueToInt32
on success, js_valuetoint32 stores the converted value in *ip and returns js_true.
JS_ValueToNumber
on success, js_valuetonumber stores the converted value in *dp and returns js_true.
JS_ValueToObject
on success, this function stores either null or a pointer to the resulting object in *objp and returns true.
PRIVATE_TO_JSVAL
syntax jsval private_to_jsval(void *ptr); void * jsval_to_private(jsval v); // obsoleted since jsapi 32 description with private_to_jsval(), an application can store a private data pointer, p, as a jsval.
Property attributes
(the property has no stored value.) assignment via the prototype chain is affected.
TPS Password Lists
a password asset list is an array of objects, each representing a stored password.
TPS Tests
it will include log output written by the python driver, which includes information about where the temporary profiles it uses are stored.
Secure Development Guidelines
ered introduction: gaining control (3) common issues used to gain control buffer overflows format string bugs integer overflows/underflows writing secure code: input validation input validation most vulnerabilities are a result of un-validated input always perform input validation could save you without knowing it examples: if it doesn’t have to be negative, store it in an unsigned int if the input doesn’t have to be > 512, cut it off there if the input should only be [a-za-z0-9], enforce it cross site scripting (xss) xss is a type of code injection attack typically occurs in web applications injection of arbitrary data into an html document from another site victim’s browser executes those html instructions could be used to steal u...
A Web PKI x509 certificate primer
one issue that is not commonly known is that the x509 trust graph is not a forest (a bunch of trees where each root is a trusted root) but a cyclic graph, where the same key/issuer can be a root or an intermediate for another root in the browsers key store (when roots create intermediates for each other it is called cross-signing).
Setting up an update server
don't forget to restore the backup when you are done.
Gecko events
event_table_column_insert event_table_column_delete event_table_column_reorder event_window_activate event_window_deactivate event_window_destroy event_window_maximize event_window_minimize event_window_resize event_window_restore event_hyperlink_end_index_changed the ending index of this link within the containing string has changed.
The Places database
if the mime type of the image is image/png, the data blob must be reencoded from base16 (the format in which it is stored) to base64 in order to display correctly.
Querying Places
the resulting string can be stored or bookmarked.
Using the Places tagging service
var tags = taggingsvc.gettagsforuri(uri("http://example.com/", {})); //tags = an array of tags stored in http://example.com/ see also places nsitaggingservice ...
Places
places stores its data in an sqlite database using the mozstorage interfaces.
Preferences API
preferences api allows you to save and read strings, numbers, booleans, and references to files to the preferences store.
extISessionStorage
this content covers features introduced in thunderbird 3 extisessionstorage allows an extension to store data for the life time of the application (e.g.
An Overview of XPCOM
the example in encapsulating the constructor is a simple and stateless version of factories, but real world programming isn't usually so simple, and in general factories need to store state.
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.
Using XPCOM Components
whenever a user accesses the cookie manager dialog to view, organize, or remove cookies that have been stored on the system, they are using the cookiemanager component behind the scenes.
XPCOM guide
MozillaTechXPCOMGuide
this article details those changes, and provides suggestions for how to update your code.xpcom hashtable guidea hashtable is a data construct that stores a set of items.
Interfacing with the XPCOM cycle collector
handling jsobjects fields if your class needs to store a pointer to a jsobject then you need to tell the cycle collector about it.
Components.Exception
message a string which can be displayed in the error console when your exception is thrown or in other developer-facing locations, defaulting to 'exception' result the nsresult value of the exception, which defaults to components.results.ns_error_failure stack an xpcom stack to be set on the exception (defaulting to the current stack chain) data any additional data you might want to store, defaulting to null example throw components.exception("i am throwing an exception from a javascript xpcom component."); ...
Components.utils.getWeakReference
in gecko 12.0, the previous behavior of silently failing has been restored.
nsDependentCString
class declaration nstdependentstring_chart stores a null-terminated, immutable sequence of characters.
nsDependentString
class declaration nstdependentstring_chart stores a null-terminated, immutable sequence of characters.
mozIAsyncHistory
void updateplaces( in moziplaceinfo aplaceinfo, in mozivisitinfocallback acallback optional ); parameters aplaceinfo the moziplaceinfo object[s] containing the information to store or update.
mozIStorageAggregateFunction
the implementation should store or perform some work to prepare to return a value.
mozIStorageBindingParamsArray
the mozistoragebindingparamsarray interface is a container for mozistoragebindingparams objects, and is used to store sets of bound parameters that will be used by the mozistoragestatement.executeasync().
GetState
remarks accessible states are stored as bit fields which describe boolean properties of node.
nsIAppShellService
void initialize( in nsicmdlineservice acmdlineservice, in nsisupports nativeappsupportorsplashscreen ); parameters acmdlineservice is stored and passed to appshell components as they are initialized.
nsIAppStartup
sessionrestored time session restore finished.
nsIApplicationCacheNamespace
1.0 66 introduced gecko 1.9.1 inherits from: nsisupports last changed in gecko 1.9.1 (firefox 3.5 / thunderbird 3.0 / seamonkey 2.0) application caches can store a set of namespace entries that affect loads from the application cache.
nsIArray
indexes are zero-based, such that the last element in the array is stored at the index length-1.
nsIBinaryInputStream
aarraybuffer the arraybuffer in which to store the results.
nsICacheEntryInfo
deviceid string get the id for the device that stores this cache entry.
nsIChannel
note: the content type can often be wrongly specified (for example wrong file extension, wrong mime type, wrong document type stored on a server and so on.), and the caller most likely wants to verify with the actual data.
nsICompositionStringSynthesizer
after a call of this, all stored composition string information is cleared.
nsIContentSecurityPolicy
refinepolicy() updates the policy currently stored in the content security policy to be "refined" or tightened by the one specified in the string policystring.
nsIDOMFile
this allows the file reference to be saved when the form is submitted while the user is using a web application offline, so that the data can be retrieved and uploaded once the internet connection is restored.
nsIDOMMozNetworkStatsManager
mdomrequest removealarms([optional] in long alarmid); nsidomdomrequest clearstats(in nsisupports network); nsidomdomrequest clearallstats(); nsidomdomrequest getavailablenetworks(); nsidomdomrequest getavailableservicetypes(); attributes attribute type description samplerate long minimum time in milliseconds between samples stored in the database.
nsIDOMStorageEventObsolete
1.0 66 introduced gecko 1.8 obsolete gecko 2.0 inherits from: nsidomevent last changed in gecko 1.8 (firefox 1.5 / thunderbird 1.5 / seamonkey 1.0) when a dom storage event is received, the recipient can check its domain attribute to determine which domain's data store has changed.
nsIDOMStorageList
return value the nsidomstorage object representing the data store for the specified domain.see also dom storage structured client-side storage (html 5 specification) nsidomwindow ...
nsIDOMStorageManager
dom/interfaces/storage/nsidomstoragemanager.idlscriptable this interface provides methods for managing data stored in the offline apps cache.
nsIDialogParamBlock
print32 getint( in print32 inindex ); wstring getstring( in print32 inindex ); void setint( in print32 inindex, in print32 inint ); void setnumberstrings( in print32 innumstrings ); void setstring( in print32 inindex, in wstring instring); attributes attribute type description objects nsimutablearray a place where you can store an nsimutablearray to pass nsisupports.
nsIDictionary
value the value to store.
getFile
ersonal_dir "pers" ns_win_favorites_dir "favs" ns_win_startup_dir "strt" ns_win_recent_dir "rcnt" ns_win_send_to_dir "sndto" ns_win_bitbucket_dir "buckt" ns_win_startmenu_dir "strt" same thing as ns_os_desktop_dir ns_win_desktop_directory "deskp" file sys dir which physically stores objects on desktop ns_win_drives_dir "drivs" ns_win_network_dir "netw" ns_win_nethood_dir "neth" ns_win_fonts_dir "fnts" ns_win_templates_dir "tmpls" ns_win_common_startmenu_dir "cmstrt" ns_win_common_programs_dir "cmprgs" ns_win_common_startup_dir "cmstrt" ...
nsIEventListenerService
aoutarray the array into which to store the event targets.
nsIExternalProtocolService
specifically, this looks to see whether there are any known possible application handlers in either the nsihandlerservice datastore or registered with the os.
nsIFileProtocolHandler
it also provides access to internet shortcuts stored on the host operating system's file system.
nsILocale
valid strings are stored in nsilocale.idl.
Using nsILoginManager
working with the login manager extensions often need to securely store passwords to external sites, web applications, and so on.
nsILoginManagerIEMigrationHelper
1.0 66 introduced gecko 1.9 inherits from: nsisupports last changed in gecko 1.9 (firefox 3) method overview void migrateandaddlogin(in nsilogininfo alogin); methods migrateandaddlogin() takes a login provided from nsieprofilemigrator, migrates it to the current login manager format, and adds it to the list of stored logins.
nsILoginMetaInfo
toolkit/components/passwordmgr/public/nsiloginmetainfo.idlscriptable an object that contains metadata for logins stored by the login manager.
nsIMsgProtocolInfo
defaultlocalfilepath nsilocalfile the default path under which all server data for this account type will be stored.
nsIMsgSearchTerm
* @param ascopeterm scope of search * @param aoffset offset of message in message store.
nsINavBookmarkObserver
adateadded the stored date added value, in microseconds from the epoch.
nsINavHistoryObserver
awholeentry true if this expiration will result in the entire history entry being deleted from the history store; if false, only the specified visit is being deleted.
nsINavHistoryQueryOptions
expandqueries boolean when set, allows items with "place:" uris to appear as containers, with the container's contents filled in from the stored query.
nsINavHistoryResult
result objects represent the model in which the data is stored.
nsIPrivateBrowsingService
methods removedatafromdomain() removes all data stored for the specified domain, including its subdomains.
nsIPropertyBag
xpcom/ds/nsipropertybag.idlscriptable this interface is used to store a set of properties.
nsIPropertyElement
value astring the string value stored for this property.
nsISHistory
shistoryenumerator nsisimpleenumerator called to obtain a enumerator for all the documents stored in session history.
nsIScriptableIO
ple: writing to a file var json = "{ name: 'bob', age: 37}"; var file = io.getfile("profile", null); file.append("myobject.json"); if (!file.exists()) file.create(ci.nsifile.normal_file_type, 0600); var stream = io.newoutputstream(file, "text write create truncate"); stream.writestring(json); stream.close(); example: reading from a file var file = io.getfile("profile", null); file.append("localstore.json"); if (file.exists()) { var stream = io.newinputstream(file, "text"); var json = stream.readline(); stream.close(); } see also nsifile, nsiinputstream, nsioutputstream ...
nsISearchEngine
iconuri nsiuri a nsiuri corresponding to the engine's icon, stored locally.
nsISmsDatabaseService
nsismsdatabaseservice dom/sms/interfaces/nsismsdatabaseservice.idlscriptable used to store and manage sms text messages for the websms api 1.0 66 introduced gecko 13.0 inherits from: nsisupports last changed in gecko 15.0 (firefox 15.0 / thunderbird 15.0 / seamonkey 2.12) implemented by: @mozilla.org/sms/smsdatabaseservice;1.
nsIStringBundle
string id's are assigned by the order in which they are stored in the properties file.
nsIStructuredCloneContainer
once you've initialized the container, you can get a copy of the object it stores by calling deserializetovariant().
nsISupportsChar
xpcom/ds/nsisupportsprimitives.idlscriptable this interface provides scriptable access for single character values (often used to store an ascii character).
nsISupportsInterfacePointer
dataiid nsidptr stores an iid corresponding to the data attribute.
nsIThreadInternal
calls to pusheventqueue() may be nested, and must each be paired with a corresponding call to popeventqueue() to restore the original state of the thread.
nsITransaction
undotransaction() restores the state to what it was before the transaction was executed.
nsIURI
if the uri stores information from the nsiioservice interface's nsiioservice.newuri() call that created it, other than just the parsed string, the behavior of this information when setting the spec attribute is undefined.
nsIURLFormatter
formaturlpref() formats a string url stored in a preference.
nsIUUIDGenerator
void generateuuidinplace( in nsnonconstidptr id ); parameters id an existing nsid pointer where the uuid will be stored.
nsIWebBrowser
the browser stores a weak reference to the listener to avoid any circular dependencies.
nsIWebContentHandlerRegistrar
so lets restore it back to false, which is the default value services.prefs.clearuserpref('gecko.handlerservice.allowregisterfromdifferenthost'); } register a webmail service as mailto handler without contentwindow under construction.
nsIWorkerScope
it will be stored as the data member in the event.
nsIXULBrowserWindow
inherits from: nsisupports last changed in gecko 2.0 (firefox 4 / thunderbird 3.3 / seamonkey 2.1) the xulbrowserwindow attribute exists on the nsixulwindow interface although both firefox and seamonkey also store their nsixulbrowserwindow reference in the global xulbrowserwindow object accessible from javascript code.
nsIXULTemplateQueryProcessor
if the comparison variable is null, the results may be sorted in a natural order, for instance, based on the order the data in stored in the datasource.
XPCOM Interface Reference
ernsiscripterrornsiscripterror2nsiscriptableionsiscriptableinputstreamnsiscriptableunescapehtmlnsiscriptableunicodeconverternsiscrollablensisearchenginensisearchsubmissionnsisecuritycheckedcomponentnsiseekablestreamnsiselectionnsiselection2nsiselection3nsiselectioncontrollernsiselectionimageservicensiselectionprivatensiserversocketnsiserversocketlistenernsiservicemanagernsisessionstartupnsisessionstorensisimpleenumeratornsismsdatabaseservicensismsrequestmanagernsismsservicensisocketprovidernsisocketproviderservicensisockettransportnsisockettransportservicensisoundnsispeculativeconnectnsistackframensistandardurlnsistreamconverternsistreamlistenernsistringbundlensistringbundleoverridensistringbundleservicensistringenumeratornsistructuredclonecontainernsistylesheetservicensisupportsnsisupports pro...
XPCOM primitive
the main use case is to store primitive values in a data structure that can only store xpcom objects, such as nsiarray.
XPCOM Interface Reference by grouping
tringbundleservice security cookies nsicookie nsicookie2 nsicookieacceptdialog nsicookieconsent nsicookiemanager nsicookiemanager2 nsicookiepermission nsicookiepromptservice nsicookieservice nsicookiestorage nsisessionstore crypto nsicryptohash filter nsiparentalcontrolsservice nsipermission nsipermissionmanager nsisecuritycheckedcomponent ssl nsisslerrorlistener stream stream ...
NS_CStringToUTF16
« xpcom api reference summary the ns_cstringtoutf16 function converts the value of a nsacstring instance to utf-16 and stores the result in a nsastring instance.
NS_UTF16ToCString
« xpcom api reference summary the ns_utf16tocstring function converts the value of a nsastring instance from utf-16 to the specified multi-byte encoding and stores the result in a nsacstring instance.
nsIAbCard/Thunderbird3
in a big change from the original nsiabcard, properties are now stored in a hash table instead of as attributes on the interface, allowing it to be more flexible.
nsMsgViewFlagsType
it is only used to store constants.
nsMsgViewSortOrder
it is only used to store constants.
nsMsgViewSortType
it is only used to store constants.
nsMsgViewType
it is only used to store constants.
Using IndexedDB in chrome
the indexeddb api is typically used to store data in the user's browser from content javascript.
Getting Started Guide
you only need to addref them as you store them in a structure that will live longer than the function call.
Reference Manual
because a few key routines are factored out into a common non-template base class, the actual underlying pointer is stored as an nsisupports* (except in debug builds where nscap_feature_debug_ptr_types is turned on).
XPIDL
source and binary compatibility some consumers of idl interfaces create binary plugins that expect the interfaces to be stored in a specific way in memory.
Address book sync client design
the static information that is held on the client for address book sync operations is stored in a file called absync.dat which is located in the root directory of the users profile information.
Buddy icons in mail
the reason this file name scheme was chosen was is this is how netscape 7.0 im stores buddy icons on disk.
nsIMsgCloudFileProvider
void refreshuserinfo(in boolean awithui, in nsirequestobserver acallback); parameters awithui whether or not the provider should prompt the user for credentails in the event that the stored credentials have gone stale.
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 ...
LDAP Support
consistent round tripping when editing address book attributes which are stored on an ldap server.
Mail and RDF
what else do we store?) datasources are created when each window's javascript is loaded by declaring the datasource variables in the source javascript as global variables.
Mail event system
nsifolders each store individual lists of folder listeners which are maintained with addlistener() and removelistener().
Mailnews and Mail code review requirements
thunderbird's front-end code is stored in mozilla/mail.
Spam filtering
training data is stored in a binary format, in a file named "training.dat".
Adding items to the Folder Pane
window.removeeventlistener("load", gnumbersext.load, false); let tree = document.getelementbyid("foldertree"); tree.addeventlistener("maprebuild", gnumbersext._insert, false); }, _insert: function gne__insert() { // this function is called when a rebuild occurs } }; window.addeventlistener("load", gnumbersext.load, true); the structure of folder-tree-items the folder pane stores its current display data in a property called _rowmap.
Demo Addon
then we store the folder name in a string to display it later on the screen and mark it with an * if it is the inbox.
Finding the code for a feature
here is my (edited) response: nsimsgtagservice is used to store the list of valid tags, so it is not the correct way to tag messages.
XPI
xpi archives only support files stored uncompressed or compressed using the "deflate" method.
Add to iPhoto
the string can be stored in any of a number of encodings, so you use assorted functions that know how to cope with different encodings to set and get values of cfstrings, as well as to perform typical string operations.
Declaring and Using Callbacks
warning: you must store a reference to the callback object as long as the native code might call it.
Browser Side Plug-in API - Plugins
npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies.
Plug-in Basics - Plugins
the pluginurl attribute is the url of the plug-in or of the xpi in which the plug-in is stored (see installing plug-ins for more information on the xpi file format).
Version, UI, and Status Information - Plugins
browsers communicate with http servers, which store agent software name, version, and operating system in a user_agent field.
Gecko Plugin API Reference - Plugins
npn_setvalueforurl allows a plug-in to change the stored information associated with a url, in particular its cookies.
Debugger - Firefox Developer Tools
for example, an uncaught exception hook may have access to browser-level features like the alert function, which this api’s implementation does not, making it possible to present debugger errors to the developer in a way suited to the context.) debugger handler functions each debugger instance inherits accessor properties with which you can store handler functions for spidermonkey to call when given events occur in debuggee code.
Debugger-API - Firefox Developer Tools
thus, a tool can store metadata about a shadow’s referent as a property on the shadow itself, and count on finding that metadata again if it comes across the same referent.
Migrating from Firebug - Firefox Developer Tools
storage inspector the cookies panel in firebug displays information related to the cookies created by a page and allows to manipulate the information they store.
Console messages - Firefox Developer Tools
store as global variable creates a global variable (with a name like temp0, temp1, etc.) whose value is the selected object.
Web Console Helpers - Firefox Developer Tools
$_ stores the result of the last expression executed in the console's command line.
The JavaScript input interpreter - Firefox Developer Tools
$_ stores the result of the last expression executed in the console's command line.
Web Console remoting - Firefox Developer Tools
the networkeventactor the new network event actor stores further request and response information.
AudioBuffer.duration - Web APIs
the duration property of the audiobuffer interface returns a double representing the duration, in seconds, of the pcm data stored in the buffer.
AudioBuffer.length - Web APIs
the length property of the audiobuffer interface returns an integer representing the length, in sample-frames, of the pcm data stored in the buffer.
AudioBuffer.numberOfChannels - Web APIs
the numberofchannels property of the audiobuffer interface returns an integer representing the number of discrete audio channels described by the pcm data stored in the buffer.
AudioBuffer.sampleRate - Web APIs
the samplerate property of the audiobuffer interface returns a float representing the sample rate, in samples per second, of the pcm data stored in the buffer.
AudioBufferSourceNode - Web APIs
the audiobuffersourcenode interface is an audioscheduledsourcenode which represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
AudioContext.createMediaElementSource() - Web APIs
t)(); var myaudio = document.queryselector('audio'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a gain node var gainnode = audioctx.creategain(); // create variables to store mouse pointer y coordinate // and height of screen var cury; var height = window.innerheight; // get new mouse pointer coordinates when mouse is moved // then set new gain value document.onmousemove = updatepage; function updatepage(e) { cury = (window.event) ?
AudioContext.createMediaStreamDestination() - Web APIs
the createmediastreamdestination() method of the audiocontext interface is used to create a new mediastreamaudiodestinationnode object associated with a webrtc mediastream representing an audio stream, which may be stored in a local file or sent to another computer.
AudioContext.getOutputTimestamp() - Web APIs
audiotimestamp.performancetime: an estimation of the moment when the sample frame corresponding to the stored contexttime value was rendered by the audio output device, in the same units and origin as performance.now().
AudioContext - Web APIs
audiocontext.createmediastreamdestination() creates a mediastreamaudiodestinationnode associated with a mediastream representing an audio stream which may be stored in a local file or sent to another computer.
AudioListener - Web APIs
all pannernodes spatialize in relation to the audiolistener stored in the baseaudiocontext.listener attribute.
AudioParam.value - Web APIs
WebAPIAudioParamvalue
usage notes value precision and variation the data type used internally to store value is a single-precision (32-bit) floating point number, while javascript uses 64-bit double-precision floating point numbers.
AuthenticatorAssertionResponse.authenticatorData - Web APIs
this public key will be stored on the server associated with a user's account and be used for future authentications.
AuthenticatorAttestationResponse.attestationObject - Web APIs
the attestationobject property of the authenticatorattestationresponse interface returns an arraybuffer containing the new public key, as well as signature over the entire attestationobject with a private key that is stored in the authenticator when it is manufactured.
AuthenticatorResponse.clientDataJSON - Web APIs
the clientdatajson property of the authenticatorresponse interface stores a json string in an arraybuffer, representing the client data that was passed to credentialscontainer.create() or credentialscontainer.get().
Background Tasks API - Web APIs
let logfragment = null; let statusrefreshscheduled = false; finally, we set up a couple of variables for other items: logfragment will be used to store a documentfragment that's generated by our logging functions to create content to append to the log when the next animation frame is rendered.
BaseAudioContext.decodeAudioData() - Web APIs
older callback syntax in this example, the getdata() function uses xhr to load an audio track, setting the responsetype of the request to arraybuffer so that it returns an array buffer as its response that we then store in the audiodata variable .
Blob() - Web APIs
WebAPIBlobBlob
options optional an optional object of type blobpropertybag which may specify any of the following properties: type optional the mime type of the data that will be stored into the blob.
Body.text() - Web APIs
WebAPIBodytext
example in our fetch text example (run fetch text live), we have an <article> element and three links (stored in the mylinks array.) first, we loop through all of these and give each one an onclick event handler so that the getdata() function is run — with the link's data-page identifier passed to it as an argument — when one of the links is clicked.
CSSStyleDeclaration.setProperty() - Web APIs
if so, we store a reference to this cssstylerule object in a variable.
Using the CSS Painting API - Web APIs
in our example, the paintworklet is stored on github.
Cache.add() - Web APIs
WebAPICacheadd
note: add() will overwrite any key/value pair previously stored in the cache that matches the request.
Cache - Web APIs
WebAPICache
so a response stored in a cache won't contain headers.
CacheStorage.match() - Web APIs
the match() method of the cachestorage interface checks if a given request or url string is a key for a stored response.
CanvasRenderingContext2D.setTransform() - Web APIs
html <canvas width="240"></canvas> <canvas width="240"></canvas> css canvas { border: 1px solid black; } javascript const canvases = document.queryselectorall('canvas'); const ctx1 = canvases[0].getcontext('2d'); const ctx2 = canvases[1].getcontext('2d'); ctx1.settransform(1, .2, .8, 1, 0, 0); ctx1.fillrect(25, 25, 50, 50); let storedtransform = ctx1.gettransform(); console.log(storedtransform); ctx2.settransform(storedtransform); ctx2.beginpath(); ctx2.arc(50, 50, 50, 0, 2 * math.pi); ctx2.fill(); result specifications specification status comment html living standardthe definition of 'canvasrenderingcontext2d.settransform' in that specification.
Compositing and clipping - Web APIs
ddcolorstop(0, '#232256'); lingrad.addcolorstop(1, '#143778'); ctx.fillstyle = lingrad; ctx.fillrect(-75, -75, 150, 150); // draw stars for (var j = 1; j < 50; j++) { ctx.save(); ctx.fillstyle = '#fff'; ctx.translate(75 - math.floor(math.random() * 150), 75 - math.floor(math.random() * 150)); drawstar(ctx, math.floor(math.random() * 4) + 2); ctx.restore(); } } function drawstar(ctx, r) { ctx.save(); ctx.beginpath(); ctx.moveto(r, 0); for (var i = 0; i < 9; i++) { ctx.rotate(math.pi / 5); if (i % 2 === 0) { ctx.lineto((r / 0.525731) * 0.200811, 0); } else { ctx.lineto(r, 0); } } ctx.closepath(); ctx.fill(); ctx.restore(); } <canvas id="canvas" width="150" height="150"></canvas> draw(); in the ...
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.
ConstantSourceNode.offset - Web APIs
with the linkage above in place, that can be done using this simple event handler: function handleclickevent(event) { volumeslidercontrol.value = constantsource.offset.value; } all this function has to do is fetch the current value of the slider control we're using to control the paired nodes' gains, then store that value into the constantsourcenode's offset parameter.
CredentialsContainer.preventSilentAccess() - Web APIs
mediation varies by origin, and is an added check point of browser stored credentials, informing a user of an account login status.
CredentialsContainer - Web APIs
credentialscontainer.store()secure context stores a set of credentials for a user, inside a provided credential instance and returns that instance in a promise.
DOMHighResTimeStamp - Web APIs
the domhighrestimestamp type is a double and is used to store a time value in milliseconds.
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.
DOMUserData - Web APIs
if you are interested in persisting data you might rather need to use nsisessionstore.
DataTransfer.clearData() - Web APIs
this method can only be used in the handler for the dragstart event, because that's the only time the drag operation's data store is writeable.
DataTransfer.getData() - Web APIs
caveats data availability the html5 drag and drop specification dictates a drag data store mode.
DataTransfer.mozSetDataAt() - Web APIs
a data transfer may store multiple items, each at a given zero-based index.
DataTransfer.mozTypesAt() - Web APIs
the datatransfer.moztypesat() method returns a list of the format types that are stored for an item at the specified index.
DataTransfer.setData() - Web APIs
if data for the given type does not exist, it is added at the end of the drag data store, such that the last item in the types list will be the new type.
DataTransfer.setDragImage() - Web APIs
if element is an img element, then set the drag data store bitmap to the element's image (at its intrinsic size); otherwise, set the drag data store bitmap to an image generated from the given element (the exact mechanism for doing so is not currently specified).
DataTransferItemList.add() - Web APIs
if the drag item couldn't be created (for example, if the associated datatransfer object has no data store), null is returned.
DataTransferItemList.length - Web APIs
the drag item list is considered to be disabled if the item list's datatransfer object is not associated with a drag data store.
DataTransferItemList.remove() - Web APIs
exceptions invalidstateerror the drag data store is not in read/write mode, so the item can't be removed.
Document.cookie - Web APIs
WebAPIDocumentcookie
the reason for the syntax of the document.cookie accessor property is due to the client-server nature of cookies, which differs from other client-client storage methods (like, for instance, localstorage): the server tells the client to store a cookie http/1.0 200 ok content-type: text/html set-cookie: cookie_name1=cookie_value1 set-cookie: cookie_name2=cookie_value2; expires=sun, 16 jul 3567 06:23:41 gmt [content of the page here] the client sends back to the server its cookies previously stored get /sample_page.html http/1.1 host: www.example.org cookie: cookie_name1=cookie_value1; cookie_name2=cookie_value2 accept: */* specif...
Document: drag event - Web APIs
draggable { width: 200px; height: 20px; text-align: center; background: white; } .dropzone { width: 200px; height: 20px; background: blueviolet; margin-bottom: 10px; padding: 10px; } javascript var dragged; /* events fired on the draggable target */ document.addeventlistener("drag", function(event) { }, false); document.addeventlistener("dragstart", function(event) { // store a ref.
Document.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
Document.requestStorageAccess() - Web APIs
grant the document access to cookies and other site storage and store that fact for the purposes of future calls to document.hasstorageaccess() and requeststorageaccess().
DocumentFragment - Web APIs
it is used as a lightweight version of document that stores a segment of a document structure comprised of nodes just like a standard document.
Introduction to the DOM - Web APIs
the page content is stored in the dom and may be accessed and manipulated via javascript, so that we may write this approximative equation: api = dom + javascript the dom was designed to be independent of any particular programming language, making the structural representation of the document available from a single, consistent api.
Traversing an HTML table with JavaScript and DOM Interfaces - Web APIs
this example stores in myceltext the text node of the second cell in the second row of the table.
Element.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
FederatedCredential - Web APIs
examples var cred = new federatedcredential({ id: id, name: name, provider: 'https://account.google.com', iconurl: iconurl }); // store it navigator.credentials.store(cred) .then(function() { // do something else.
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.
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 button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties of these we need to access, depending on what type of buttons they are.
GamepadButton - Web APIs
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 stored as an array of double values, whereas in firefox navigator.getgamepads doesn't need a prefix, and the button values are stored as an array of gamepadbutton objects; it is the gamepadbutton.value or gamepadbutton.pressed properties of these we need to access, depending on what type of buttons they are.
GlobalEventHandlers.onpointerdown - Web APIs
we also have a handler for pointerup events: targetbox.onpointerup = handleup; function handleup(evt) { targetbox.innerhtml = "tap me, click me, or touch me!"; evt.preventdefault(); } this code's job is to just restore the original text into the target box after the user's interaction with the element ends (for example, when they release the mouse button, or when they lift the stylus or finger from the screen).
HTMLCanvasElement.toBlob() - Web APIs
the htmlcanvaselement.toblob() method creates a blob object representing the image contained in the canvas; this file may be cached on the disk or stored in memory at the discretion of the user agent.
HTMLFormElement.reset() - Web APIs
the htmlformelement.reset() method restores a form element's default values.
HTMLImageElement.useMap - Web APIs
example the source for this interactive example is stored in a github repository.
HTMLInputElement - Web APIs
possible values are: on: the browser can autocomplete the value using previously stored value off: the user must explicity enter a value max string: returns / sets the element's max attribute, containing the maximum (numeric or date-time) value for this item, which must not be less than its minimum (min attribute) value.
The HTML DOM API - Web APIs
web storage interfaces the web_storage_api provides the ability for web sites to store data either temporarily or permanently on the user's device for later re-use.
Dragging and Dropping Multiple Items - Web APIs
for example, files are dragged using the application/x-moz-file type stored as nsifile objects.
History.pushState() - Web APIs
WebAPIHistorypushState
because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
Ajax navigation example - Web APIs
this content is stored into a php variable.</p>"; if (isset($_get["view_as"]) && $_get["view_as"] == "json") { echo json_encode(array("page" => $page_title, "content" => $page_content)); } else { ?> <!doctype html> <html> <head> <?php include "include/header.php"; echo "<title>" .
Working with the History API - Web APIs
because firefox saves state objects to the user's disk so they can be restored after the user restarts the browser, we impose a size limit of 640k characters on the serialized representation of a state object.
IDBCursor.request - Web APIs
WebAPIIDBCursorrequest
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); console.log(cu...
IDBDatabase.close() - Web APIs
WebAPIIDBDatabaseclose
// create event handlers for both success and failure of dbopenrequest.onerror = function(event) { note.innerhtml += "<li>error loading database.</li>"; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += "<li>database initialised.</li>"; // store the result of opening the database in the db variable.
IDBDatabase.onclose - Web APIs
this can happen, for example, when the application is shut down or access to the disk the database is stored on is lost while the database is open.
IDBDatabase.version - Web APIs
example // let us open our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database // being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBFactory.deleteDatabase() - Web APIs
note that attempting to delete a database that doesn't exist does not throw an exception, in contrast to idbdatabase.deleteobjectstore(), which does throw an exception if the named object store does not exist.
IDBFactory.open() - Web APIs
WebAPIIDBFactoryopen
*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened // successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db // variable.
IDBFactory - Web APIs
we don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { console.error("error loading database."); }; dbopenrequest.onsuccess = function(event) { console.info("database initialised."); // store the result of opening the database in the db variable.
IDBIndex.getAllKeys() - Web APIs
example var myindex = objectstore.index('index'); var getallkeysrequest = myindex.getallkeys(); getallkeysrequest.onsuccess = function() { console.log(getallkeysrequest.result); } specification specification status comment indexed database api draftthe definition of 'getall()' in that specification.
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;' + cursor.value.lname + '&l...
IDBTransaction.commit() - Web APIs
duplicate items not allowed.</li>'; }; // create an object store on the transaction var objectstore = transaction.objectstore("myobjstore"); // add our newitem object to the object store var objectstorerequest = objectstore.add(newitem[0]); objectstorerequest.onsuccess = function(event) { // report the success of the request (this does not mean the item // has been stored successfully in the db - for that you need transaction.onsuccess) note.innerhtml ...
IDBVersionChangeEvent.newVersion - Web APIs
don't need window.mozidb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IDBVersionChangeEvent.oldVersion - Web APIs
example var dbname = "sampledb"; var dbversion = 2; var request = indexeddb.open(dbname, dbversion); request.onupgradeneeded = function(e) { var db = request.result; if (e.oldversion < 1) { db.createobjectstore("store1"); } if (e.oldversion < 2) { db.deleteobjectstore("store1"); db.createobjectstore("store2"); } // etc.
IDBVersionChangeEvent - Web APIs
idb*) // let us open version 4 of our database var dbopenrequest = window.indexeddb.open("todolist", 4); // these two event handlers act on the database being opened successfully, or not dbopenrequest.onerror = function(event) { note.innerhtml += '<li>error loading database.</li>'; }; dbopenrequest.onsuccess = function(event) { note.innerhtml += '<li>database initialised.</li>'; // store the result of opening the database in the db variable.
IntersectionObserverEntry.intersectionRect - Web APIs
example in this simple example, an intersection callback stores the intersection rectangle for later use by the code that draws the target elements' contents, so that only the visible area is redrawn.
LocalFileSystemSync - Web APIs
methods requestfilesystemsync() requests a file system where data should be stored.
MediaElementAudioSourceNode - Web APIs
t)(); var myaudio = document.queryselector('audio'); var pre = document.queryselector('pre'); var myscript = document.queryselector('script'); pre.innerhtml = myscript.innerhtml; // create a mediaelementaudiosourcenode // feed the htmlmediaelement into it var source = audioctx.createmediaelementsource(myaudio); // create a gain node var gainnode = audioctx.creategain(); // create variables to store mouse pointer y coordinate // and height of screen var cury; var height = window.innerheight; // get new mouse pointer coordinates when mouse is moved // then set new gain value document.onmousemove = updatepage; function updatepage(e) { cury = (window.event) ?
MediaQueryList - Web APIs
a mediaquerylist object stores information on a media query applied to a document, with support for both immediate and event-driven matching against the state of the document.
MediaQueryListEvent - Web APIs
the mediaquerylistevent object stores information on the changes that have happened to a mediaquerylist object — instances are available as the event object on a function referenced by a mediaquerylist.onchange property or mediaquerylist.addlistener() call.
MediaRecorder() - Web APIs
the recorded media data will be stored in an mp4 wrapper (so if you gather the chunks of media data and save them to disk, they will be in an mp4 file).
MediaStreamTrack.applyConstraints() - Web APIs
syntax const appliedpromise = track.applyconstraints([constraints]) parameters constraints optional a mediatrackconstraints object listing the constraints to apply to the track's constrainable properties; any existing constraints are replaced with the new values specified, and any constrainable properties not included are restored to their default constraints.
MediaStreamTrack: mute event - Web APIs
when the track exits the muted state—detected by the arrival of an unmute event—the background color is restored to white.
msPlayToPreferredSourceUri - Web APIs
this enables web pages and microsoft store apps to play digital rights management (drm) protected content.
Navigation Timing API - Web APIs
performancenavigationtiming provides methods and properties to store and retrieve metrics regarding the browser's document navigation events.
Navigator.msLaunchUri() - Web APIs
if the user allows it, the user is then prompted to look in the windows store for an app to handle the protocol.
navigator.hardwareConcurrency - Web APIs
examples in this example, one worker is created for each logical processor reported by the browser and a record is created which includes a reference to the new worker as well as a boolean value indicating whether or not we're using that worker yet; these objects are, in turn, stored into an array for later use.
NavigatorLanguage.language - Web APIs
lang stores a string representing the language version as defined in bcp 47.
Node.setUserData() - Web APIs
WebAPINodesetUserData
syntax var prevuserdata = somenode.setuserdata(userkey, userdata, handler); parameters userkey is used as the key by which one may subsequently obtain the stored data.
NotificationEvent.notification - Web APIs
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.
PannerNode.setPosition() - Web APIs
the setposition() method of the pannernode interface defines the position of the audio source relative to the listener (represented by an audiolistener object stored in the audiocontext.listener attribute.) the three parameters x, y and z are unitless and describe the source's position in 3d space using the right-hand cartesian coordinate system.
ParentNode.querySelectorAll() - Web APIs
the :scope pseudo-class restores the expected behavior, only matching selectors on descendants of the base element: var select = document.queryselector('.select'); var inner = select.queryselectorall(':scope .outer .inner'); inner.length; // 0 specifications specification status comment domthe definition of 'parentnode.queryselectorall()' in that specification.
PasswordCredential.additionalData - Web APIs
it then stores the form object in the additionaldata parameter, before sending it to server in a call to fetch.
PasswordCredential - Web APIs
examples var cred = new passwordcredential({ id: id, password: password, name: name, iconurl: iconurl }); navigator.credentials.store(cred) .then(function() { // do something else.
PaymentAddress - Web APIs
the paymentaddress interface of the payment request api is used to store shipping or payment address information.
PaymentMethodChangeEvent - Web APIs
the paymentmethodchangeevent interface of the payment request api describes the paymentmethodchange event which is fired by some payment handlers when the user switches payment instruments (e.g., a user selects a "store" card to make a purchase while using apple pay).
PaymentRequest.prototype.id - Web APIs
WebAPIPaymentRequestid
const details = { id: "super-store-order-123-12312", total: { label: "total due", amount: { currency: "usd", value: "65.00" }, }, }; const request = new paymentrequest(methoddata, details); console.log(request.id); // super-store-order-123-12312 the id is then also available in the paymentresponse returned from the show() method, but under the requestid attribute.
PaymentRequest.onshippingaddresschange - Web APIs
if the address stored by the user agent changes at any time during a payment process, the event is triggered.
PaymentRequest.onshippingoptionchange - Web APIs
if the option stored by the user agent changes at any time during a payment process, the event is triggered.
performance.mark() - Web APIs
WebAPIPerformancemark
the mark()'s stores its data internally as performanceentry.
PerformanceNavigationTiming - Web APIs
the performancenavigationtiming interface provides methods and properties to store and retrieve metrics regarding the browser's document navigation events.
PerformanceObserver.takeRecords() - Web APIs
the takerecords() method of the performanceobserver interface returns the current list of performance entries stored in the performance observer, emptying it out.
PerformanceObserver - Web APIs
performanceobserver.takerecords() returns the current list of performance entries stored in the performance observer, emptying it out.
PerformanceTiming.domainLookupEnd - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
PerformanceTiming.domainLookupStart - Web APIs
if a persistent connection is used, or the information is stored in a cache or a local resource, the value will be the same as performancetiming.fetchstart.
Performance API - Web APIs
performancenavigationtiming provides methods and properties to store and retrieve high resolution timestamps or metrics regarding the browser's document navigation events.
PluginArray - Web APIs
the pluginarray interface is used to store a list of plugin objects describing the available plugins; it's returned by the window.navigator.plugins property.
Pointer Lock API - Web APIs
the values of the parameters are the same as the difference between the values of mouseevent properties, screenx and screeny, which are stored in two subsequent mousemove events, enow and eprevious.
Pinch zoom gestures - Web APIs
when this occurs, the event is removed from the event cache and the target element's background color and border are restored to their original values.
PublicKeyCredentialCreationOptions.authenticatorSelection - Web APIs
requireresidentkeyoptional a boolean which indicated that the credential private key must be stored in the authenticator, the client or in a client device.
PublicKeyCredentialCreationOptions.user - Web APIs
this is not intended to store the login of the user (see name below).
RTCDataChannel.onmessage - Web APIs
the rtcdatachannel.onmessage property stores an eventhandler which specifies a function to be called when the message event is fired on the channel.
RTCDataChannel - Web APIs
when an error occurs on the data channel, the function receives as input an errorevent object describing the error which occurred.onmessage the rtcdatachannel.onmessage property stores an eventhandler which specifies a function to be called when the message event is fired on the channel.
RTCIceCandidate.RTCIceCandidate() - Web APIs
the candidate string (which is sdp text) is parsed; each property found is stored in the corresponding field in the rtcicecandidate.
RTCIceTransport.onstatechange - Web APIs
example this snippet establishes a handler for the statechange event that looks to see if the transport has entered the "failed" state, which indicates that the connection has failed with no chance of being automatically restored.
RTCPeerConnection.generateCertificate() - Web APIs
the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, providing access to it.
RTCPeerConnection - Web APIs
onnection interface creates a new channel linked with the remote peer, over which any kind of data may be transmitted.createoffer()the createoffer() method of the rtcpeerconnection interface initiates the creation of an sdp offer for the purpose of starting a new webrtc connection to a remote peer.generatecertificate()the generatecertificate() method of the rtcpeerconnection interface creates and stores an x.509 certificate and corresponding private key then returns an rtccertificate, providing access to it.getconfiguration() the rtcpeerconnection.getconfiguration() method returns an rtcconfiguration object which indicates the current configuration of the rtcpeerconnection on which the method is called.getidentityassertion() the rtcpeerconnection.getidentityassertion() method initiates the ga...
Request.clone() - Web APIs
WebAPIRequestclone
var myrequest = new request('flowers.jpg'); var newrequest = myrequest.clone(); // a copy of the request is now stored in newrequest specifications specification status comment fetchthe definition of 'clone' in that specification.
Request.destination - Web APIs
some are simply data receptacles, where the received data is stored for processing later.
Request - Web APIs
WebAPIRequest
bodyused read only stores a boolean that declares whether the body has been used in a response yet.
Response.clone() - Web APIs
WebAPIResponseclone
the clone() method of the response interface creates a clone of a response object, identical in every way, but stored in a different variable.
Response - Web APIs
WebAPIResponse
body.bodyused read only stores a boolean that declares whether the body has been used in a response yet.
SVGAngle - Web APIs
WebAPISVGAngle
converttospecifiedunits preserve the same underlying stored value, but reset the stored unit identifier to the given unittype.
SVGLength - Web APIs
WebAPISVGLength
converttospecifiedunits(in unsigned short unittype) void preserve the same underlying stored value, but reset the stored unit identifier to the given unittype.
Screen Wake Lock API - Web APIs
it is good practice to store a reference to the sentinel object to control release later and also to reacquire the lock if need be.
SpeechGrammarList.addFromString() - Web APIs
stored in a variable) and adds it to the speechgrammarlist as a new speechgrammar object.
SpeechGrammarList - Web APIs
stored in a variable) and adds it to the speechgrammarlist as a new speechgrammar object.
Storage.clear() - Web APIs
WebAPIStorageclear
the clear() method of the storage interface clears all keys stored in a given storage object.
StorageEstimate - Web APIs
the storageestimate dictionary is used by the storagemanager to provide estimates of the size of a site's or application's data store and how much of it is in use.
Storage Access API - Web APIs
as an example, federated logins often require access to authentication cookies stored in first-party storage, and will require the user to sign in on each site separately (or completely break) if those cookies are not available.
SubtleCrypto.wrapKey() - Web APIs
wrapping a key helps protect it in untrusted environments, such as inside an otherwise unprotected data store or in transmission over an unprotected network.
Text.wholeText - Web APIs
WebAPITextwholeText
syntax str = textnode.wholetext; notes and example suppose you have the following simple paragraph within your webpage (with some whitespace added to aid formatting throughout the code samples here), whose dom node is stored in the variable para: <p>thru-hiking is great!
WEBGL_compressed_texture_astc.getSupportedProfiles() - Web APIs
an hdr image stores pixel values that span the whole tonal range of real-world scenes (100,000:1).
WEBGL_compressed_texture_atc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_etc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_etc1 - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_pvrtc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_s3tc - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_compressed_texture_s3tc_srgb - Web APIs
compressed textures reduce the amount of memory needed to store a texture on the gpu, allowing for higher resolution textures or more of the same resolution textures.
WEBGL_lose_context.loseContext() - Web APIs
the context will remain lost until webgl_lose_context.restorecontext() is called.
WebGL2RenderingContext.compressedTexSubImage3D() - Web APIs
srcdata an arraybufferview that be used as a data store for the compressed image data in memory.
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.
WebGL2RenderingContext.renderbufferStorageMultisample() - Web APIs
the webgl2renderingcontext.renderbufferstoragemultisample() method of the webgl 2 api returns creates and initializes a renderbuffer object's data store and allows specifying a number of samples to be used.
WebGL2RenderingContext.texImage3D() - Web APIs
offset a glintptr byte offset into the webglbuffer's data store.
WebGL2RenderingContext.texStorage2D() - Web APIs
internalformat a glenum specifying the texture store format.
WebGL2RenderingContext.texStorage3D() - Web APIs
internalformat a glenum specifying the texture store format.
WebGL2RenderingContext.texSubImage3D() - Web APIs
offset a glintptr byte offset into the webglbuffer's data store.
WebGLContextEvent - Web APIs
examples with the help of the webgl_lose_context extension, you can simulate the webglcontextlost and webglcontextrestored events: var canvas = document.getelementbyid('canvas'); var gl = canvas.getcontext('webgl'); canvas.addeventlistener('webglcontextlost', function(e) { console.log(e); }, false); gl.getextension('webgl_lose_context').losecontext(); // webglcontextevent event with type "webglcontextlost" is logged.
WebGLRenderingContext.compressedTexImage[23]D() - Web APIs
pixels an arraybufferview that be used as a data store for the compressed image data in memory.
WebGLRenderingContext.compressedTexSubImage2D() - Web APIs
pixels an arraybufferview that be used as a data store for the compressed image data in memory.
WebGLRenderingContext.createRenderbuffer() - Web APIs
return value a webglrenderbuffer object that stores data such an image, or can be source or target of an rendering operation.
WebGLRenderingContext.enableVertexAttribArray() - Web APIs
in webgl, values that apply to a specific vertex are stored in attributes.
WebGLRenderingContext.getError() - Web APIs
afterwards and until the context has been restored, it returns gl.no_error.
WebGLRenderingContext.renderbufferStorage() - Web APIs
the webglrenderingcontext.renderbufferstorage() method of the webgl api creates and initializes a renderbuffer object's data store.
WebGLRenderingContext.stencilFunc() - Web APIs
mask a gluint specifying a bit-wise mask that is used to and the reference value and the stored stencil value when the test is done.
WebGLRenderingContext.stencilFuncSeparate() - Web APIs
mask a gluint specifying a bit-wise mask that is used to and the reference value and the stored stencil value when the test is done.
WebGLRenderingContext.texImage2D() - Web APIs
offset (webgl 2 only) a glintptr byte offset into the webglbuffer's data store.
WebGLRenderingContext.texSubImage2D() - Web APIs
offset (webgl 2 only) a glintptr byte offset into the webglbuffer's data store.
WebGLSampler - Web APIs
the webglsampler interface is part of the webgl 2 api and stores sampling parameters for webgltexture access inside of a shader.
Color masking - Web APIs
by limiting the color channels that are written by each drawing command, you can use each channel, for example, to store a different grayscale image.
Compressed texture formats - Web APIs
if supported, textures can be stored in a compressed format in video memory.
Matrix math for the web - Web APIs
matrices are always stored in one-dimensional lists in javascript.
Using textures in WebGL - Web APIs
return { position: positionbuffer, texturecoord: texturecoordbuffer, indices: indexbuffer, }; first, this code creates a webgl buffer into which we'll store the texture coordinates for each face, then we bind that buffer as the array we'll be writing into.
WebGL types - Web APIs
WebAPIWebGL APITypes
glbitfield unsigned long a bit field that stores multiple, logical bits.
WebGL best practices - Web APIs
example usage: ext = gl.getextension('khr_parallel_shader_compile'); gl.compileprogram(vs); gl.compileprogram(fs); gl.attachshader(prog, vs); gl.attachshader(prog, fs); gl.linkprogram(prog); // store program in your data structure.
WebGL: 2D and 3D graphics for the web - Web APIs
WebAPIWebGL API
webgl_color_buffer_float webgl_compressed_texture_astc webgl_compressed_texture_atc webgl_compressed_texture_etc webgl_compressed_texture_etc1 webgl_compressed_texture_pvrtc webgl_compressed_texture_s3tc webgl_compressed_texture_s3tc_srgb webgl_debug_renderer_info webgl_debug_shaders webgl_depth_texture webgl_draw_buffers webgl_lose_context events webglcontextlost webglcontextrestored webglcontextcreationerror constants and types webgl constants webgl types webgl 2 webgl 2 is a major update to webgl which is provided through the webgl2renderingcontext interface.
Introduction to the Real-time Transport Protocol (RTP) - Web APIs
holdended() method: async function holdended(offer, micstream) { try { await peerconnection.setremotedescription(offer); await audiotransceiver.sender.replacetrack(micstream.getaudiotracks()[0]); audiotransceiver.direction = "sendrecv"; await sendanswer(); } catch(err) { /* handle the error */ } } the steps taken inside the try block here are: the received offer is stored as the remote description by calling setremotedescription().
Signaling and video calling - Web APIs
this cleanly restores our app to a state in which it's ready to start or receive another call.
Taking still photos with WebRTC - Web APIs
next, we have a <canvas> element into which the captured frames are stored, potentially manipulated in some way, and then converted into an output image file.
WebRTC API - Web APIs
most streams consist of at least one audio track and likely also a video track, and can be used to send and receive both live media or stored media information (such as a streamed movie).
Writing a WebSocket server in C# - Web APIs
0111 1111 offset = 2; if (msglen == 126) { // was touint16(bytes, offset) but the result is incorrect msglen = bitconverter.touint16(new byte[] { bytes[3], bytes[2] }, 0); offset = 4; } else if (msglen == 127) { console.writeline("todo: msglen == 127, needs qword to store msglen"); // i don't really know the byte order, please edit this // msglen = bitconverter.touint64(new byte[] { bytes[5], bytes[4], bytes[3], bytes[2], bytes[9], bytes[8], bytes[7], bytes[6] }, 0); // offset = 10; } if (msglen == 0) console.writeline("msglen == 0"); el...
Inputs and input sources - Web APIs
the target ray's transform is obtained from the pose's transform property and stored in the local targetraytransform.
Lighting a WebXR setting - Web APIs
it is at this time that the scene's lighting is considered and applied as appropriate to the pixel before the pixel is stored into the framebuffer.
Rendering and the WebXR frame animation callback - Web APIs
in this case, since the time values are stored in milliseconds, we multiply by 0.001 to convert the time into seconds.
Basic concepts behind Web Audio API - Web APIs
the left and right channels are stored like this: llllllllllllllllrrrrrrrrrrrrrrrr (for a buffer of 16 frames) this is very common in audio processing: it makes it easy to process each channel independently.
Tools for analyzing Web Audio usage - Web APIs
chrome a handy web audio inspector can be found in the chrome web store.
Background audio processing using AudioWorklet - Web APIs
to do so, first you need to get a reference to the parameter by calling the audioworkletnode's parameters property's get() method: let gainparam = myaudioworkletnode.parameters.get("gain"); the value returned and stored in gainparam is the audioparam used to store the gain parameter.
Web Audio API - Web APIs
audiobuffersourcenode the audiobuffersourcenode interface represents an audio source consisting of in-memory audio data, stored in an audiobuffer.
Functions and classes available to Web Workers - Web APIs
25 (25) no support no support no support indexeddb database to store records holding simple values and hierarchical objects.
Window.close() - Web APIs
WebAPIWindowclose
//global var to store a reference to the opened window var openedwindow; function openwindow() { openedwindow = window.open('moreinfo.htm'); } function closeopenedwindow() { openedwindow.close(); } closing the current window in the past, when you called the window object's close() method directly, rather than calling close() on a window instance, the browser closed the frontmost window, whether your script cr...
Window.mozInnerScreenX - Web APIs
syntax screenx = window.mozinnerscreenx; value screenx stores the window.mozinnerscreenx property value.
Window.mozInnerScreenY - Web APIs
syntax screeny = window.mozinnerscreeny; value screeny stores the window.mozinnerscreeny property value.
Window.mozPaintCount - Web APIs
syntax var paintcount = window.mozpaintcount; paintcount stores the window.mozpaintcount property value.
WindowOrWorkerGlobalScope.caches - Web APIs
example the following example shows how you'd use a cache in a service worker context to store assets offline.
WindowOrWorkerGlobalScope.setInterval() - Web APIs
one approach to solving this problem is to store information about the state of a timer in an object.
Worker - Web APIs
WebAPIWorker
the message is stored in the event's data property.
WorkerNavigator - Web APIs
properties the workernavigator interface implements properties from the navigatorid, navigatorlanguage, navigatoronline, navigatordatastore, and navigatorconcurrenthardware interfaces.
Synchronous and asynchronous requests - Web APIs
line 11 stores the success callback given as the second argument to loadfile in the xhr object's callback property.
Using XMLHttpRequest - Web APIs
for example, consider this snippet, which uses the responsetype of "arraybuffer" to fetch the remote content into a arraybuffer object, which stores the raw binary data.
XRReferenceSpaceEvent - Web APIs
this is an opportunity for your app to update any stored transforms, position/orientation information, or the like—or to dump any cached values based on the reference's space's origin so you can recompute them as needed.
XRSession.onsqueezestart - Web APIs
this object is then stored in a heldobject variable in the user object we're using to represent user information.
XRView.eye - Web APIs
WebAPIXRVieweye
updateinjury() returns true if the eye is still injured or false if the eye has been restored to health by the function,.
XRWebGLLayerInit.stencil - Web APIs
you can store values into each entry in the stencil bufer, then specify an operation that determines which stencil buffer values correspond to pixels which should be drawn to the screen during each frame.
Web APIs
WebAPI
ement htmlulistelement htmlunknownelement htmlvideoelement hashchangeevent headers history hkdfparams hmacimportparams hmackeygenparams i idbcursor idbcursorsync idbcursorwithvalue idbdatabase idbdatabaseexception idbdatabasesync idbenvironment idbenvironmentsync idbfactory idbfactorysync idbindex idbindexsync idbkeyrange idblocaleawarekeyrange idbmutablefile idbobjectstore idbobjectstoresync idbopendbrequest idbrequest idbtransaction idbtransactionsync idbversionchangeevent idbversionchangerequest iirfilternode idledeadline imagebitmap imagebitmaprenderingcontext imagecapture imagedata index inputdevicecapabilities inputevent installevent installtrigger intersectionobserver intersectionobserverentry interventionreportbody k keyboard keyboarde...
ARIA: Navigation Role - Accessibility
examples <div role="navigation" aria-label="customer service"> <ul> <li><a href="#">help</a></li> <li><a href="#">order tracking</li> <li><a href="#">shipping &amp; delivery</a></li> <li><a href="#">returns</a></li> <li><a href="#">contact us</a></li> <li><a href="#">find a store</a></li> </ul> </div> accessibility concerns landmark roles are intended to be used sparingly, to identify larger overall sections of the document.
Accessibility: What users can do to browse more safely - Accessibility
to reverse it, you will have to change the value back to "normal" use browser extensions gif blocker for chrome, gif blocker is an extension available at the web store.
Web Accessibility: Understanding Colors and Luminance - Accessibility
historically, graphics engines store the color channels as a single byte; that means a range of integers between 0 and 255.
Box-shadow generator - CSS: Cascading Style Sheets
manager.setvalue("blur", active.shadows[id].blur); slidermanager.setvalue("spread", active.shadows[id].spread); slidermanager.setvalue("posx", active.shadows[id].posx); slidermanager.setvalue("posy", active.shadows[id].posy); if (glow === true) addgloweffect(id); } var addgloweffect = function addgloweffect(id) { if (animate === true) return; animate = true; var store = new shadow(); var shadow = active.shadows[id]; store.copy(shadow); shadow.color.setrgba(40, 125, 200, 1); shadow.blur = 10; shadow.spread = 10; active.node.style.transition = "box-shadow 0.2s"; updateshadowcss(id); settimeout(function() { shadow.copy(store); updateshadowcss(id); settimeout(function() { active.node.style.removeproperty("transition"); ...
CSS Overflow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
Mozilla CSS extensions - CSS: Cascading Style Sheets
utton menulist-text menulist-textfield menupopup menuradio menuseparator -moz-mac-unified-toolbar -moz-win-borderless-glass -moz-win-browsertabbar-toolbox -moz-win-communications-toolbox -moz-win-glass -moz-win-media-toolbox -moz-window-button-box -moz-window-button-box-maximized -moz-window-button-close -moz-window-button-maximize -moz-window-button-minimize -moz-window-button-restore -moz-window-titlebar -moz-window-titlebar-maximized progressbar progresschunk radio radio-container radio-label radiomenuitem resizer resizerpanel scale-horizontal scalethumb-horizontal scalethumb-vertical scale-vertical scrollbarbutton-down scrollbarbutton-left scrollbarbutton-right scrollbarbutton-up scrollbar-small scrollbarthumb-horizontal scrollbarthumb-vertical scrollb...
Cubic Bezier Generator - CSS: Cascading Style Sheets
n the constant 4 should be font size dependant } ctx.lineto(cx(0), ly(i)); } ctx.stroke(); ctx.closepath(); ctx.beginpath(); // draw the y axis label ctx.save(); ctx.rotate(-math.pi / 2); ctx.textalign = "left"; ctx.filltext("output (value ratio)", -cy(0), -3 * basic_scale_size + cx(0)); ctx.restore(); // draw the x axis ctx.moveto(cx(0), cy(0)); ctx.lineto(cx(0), cy(1)); ctx.textalign = "center"; for (i = 0.1; i <= 1; i = i + 0.1) { ctx.moveto(lx(i), basic_scale_size + cy(0)); if ((i == 0.5) || (i > 0.9)) { ctx.moveto(lx(i), 2 * basic_scale_size + cy(0)); ctx.filltext(math.round(i * 10) / 10, cx...
align-content - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
align-items - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
align-self - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
all - CSS: Cascading Style Sheets
WebCSSall
the source for this interactive example is stored in a github repository.
<angle> - CSS: Cascading Style Sheets
WebCSSangle
the source for this interactive example is stored in a github repository.
animation-delay - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-direction - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-duration - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-fill-mode - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-iteration-count - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-name - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-play-state - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation-timing-function - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
animation - CSS: Cascading Style Sheets
WebCSSanimation
the source for this interactive example is stored in a github repository.
backface-visibility - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-attachment - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-blend-mode - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-clip - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-image - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-origin - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-position-x - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-position-y - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-position - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-repeat - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
background - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
<basic-shape> - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
block-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-end-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-end-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-end-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-start-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-start-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-start-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-block-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom-left-radius - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom-right-radius - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-bottom - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-collapse - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image-outset - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image-repeat - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image-slice - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image-source - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-image - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-end-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-end-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-end-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-start-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-start-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-start-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-inline-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-left-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-left-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-left-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-left - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-radius - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-right-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-right-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-right-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-right - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-spacing - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top-left-radius - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top-right-radius - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-top - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
border - CSS: Cascading Style Sheets
WebCSSborder
the source for this interactive example is stored in a github repository.
bottom - CSS: Cascading Style Sheets
WebCSSbottom
the source for this interactive example is stored in a github repository.
box-decoration-break - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
box-shadow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
box-sizing - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
calc() - CSS: Cascading Style Sheets
WebCSScalc
the source for this interactive example is stored in a github repository.
caption-side - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
caret-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
clamp() - CSS: Cascading Style Sheets
WebCSSclamp
clamp(min, val, max) is resolved as max(min, min(val, max)) the source for this interactive example is stored in a github repository.
clear - CSS: Cascading Style Sheets
WebCSSclear
the source for this interactive example is stored in a github repository.
clip-path - CSS: Cascading Style Sheets
WebCSSclip-path
the source for this interactive example is stored in a github repository.
color - CSS: Cascading Style Sheets
WebCSScolor
the source for this interactive example is stored in a github repository.
column-count - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-fill - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-gap (grid-column-gap) - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-rule-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-rule-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-rule-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-rule - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
column-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
columns - CSS: Cascading Style Sheets
WebCSScolumns
the source for this interactive example is stored in a github repository.
conic-gradient() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
counter-increment - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
counter-reset - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
cursor - CSS: Cascading Style Sheets
WebCSScursor
the source for this interactive example is stored in a github repository.
direction - CSS: Cascading Style Sheets
WebCSSdirection
the source for this interactive example is stored in a github repository.
empty-cells - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
blur() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
brightness() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
contrast() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
drop-shadow() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grayscale() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
hue-rotate() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
invert() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
opacity() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
saturate() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
sepia() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
filter - CSS: Cascading Style Sheets
WebCSSfilter
the source for this interactive example is stored in a github repository.
fit-content() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
flex-basis - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
flex-direction - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
flex-flow - CSS: Cascading Style Sheets
WebCSSflex-flow
the source for this interactive example is stored in a github repository.
flex-grow - CSS: Cascading Style Sheets
WebCSSflex-grow
the source for this interactive example is stored in a github repository.
flex-shrink - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
flex-wrap - CSS: Cascading Style Sheets
WebCSSflex-wrap
the source for this interactive example is stored in a github repository.
flex - CSS: Cascading Style Sheets
WebCSSflex
the source for this interactive example is stored in a github repository.
float - CSS: Cascading Style Sheets
WebCSSfloat
the source for this interactive example is stored in a github repository.
font-family - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-feature-settings - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-optical-sizing - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-size - CSS: Cascading Style Sheets
WebCSSfont-size
the source for this interactive example is stored in a github repository.
font-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-synthesis - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-variant-caps - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-variant-ligatures - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-variant-numeric - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-variant - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-variation-settings - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font-weight - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
font - CSS: Cascading Style Sheets
WebCSSfont
the source for this interactive example is stored in a github repository.
gap (grid-gap) - CSS: Cascading Style Sheets
WebCSSgap
the source for this interactive example is stored in a github repository.
<gradient> - CSS: Cascading Style Sheets
WebCSSgradient
the source for this interactive example is stored in a github repository.
grid-area - CSS: Cascading Style Sheets
WebCSSgrid-area
the source for this interactive example is stored in a github repository.
grid-auto-columns - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-auto-flow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-auto-rows - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-column-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-column-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-column - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-row-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-row-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-row - CSS: Cascading Style Sheets
WebCSSgrid-row
the source for this interactive example is stored in a github repository.
grid-template-areas - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-template-columns - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-template-rows - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid-template - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
grid - CSS: Cascading Style Sheets
WebCSSgrid
the source for this interactive example is stored in a github repository.
height - CSS: Cascading Style Sheets
WebCSSheight
the source for this interactive example is stored in a github repository.
hyphens - CSS: Cascading Style Sheets
WebCSShyphens
the source for this interactive example is stored in a github repository.
initial - CSS: Cascading Style Sheets
WebCSSinitial
this includes the css shorthand all, with which initial can be used to restore all css properties to their initial state.
inline-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
isolation - CSS: Cascading Style Sheets
WebCSSisolation
the source for this interactive example is stored in a github repository.
justify-content - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
justify-items - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
justify-self - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
left - CSS: Cascading Style Sheets
WebCSSleft
the source for this interactive example is stored in a github repository.
letter-spacing - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
line-height - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
linear-gradient() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
list-style-image - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
list-style-position - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
list-style-type - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
list-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-block-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-block-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-bottom - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-inline-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-inline-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-left - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-right - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin-top - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
margin - CSS: Cascading Style Sheets
WebCSSmargin
the source for this interactive example is stored in a github repository.
max-height - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
max-inline-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
max-width - CSS: Cascading Style Sheets
WebCSSmax-width
the source for this interactive example is stored in a github repository.
max() - CSS: Cascading Style Sheets
WebCSSmax
the source for this interactive example is stored in a github repository.
min-block-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
min-height - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
min-inline-size - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
min-width - CSS: Cascading Style Sheets
WebCSSmin-width
the source for this interactive example is stored in a github repository.
min() - CSS: Cascading Style Sheets
WebCSSmin
the source for this interactive example is stored in a github repository.
minmax() - CSS: Cascading Style Sheets
WebCSSminmax
the source for this interactive example is stored in a github repository.
mix-blend-mode - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
object-fit - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
object-position - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
opacity - CSS: Cascading Style Sheets
WebCSSopacity
the source for this interactive example is stored in a github repository.
order - CSS: Cascading Style Sheets
WebCSSorder
the source for this interactive example is stored in a github repository.
outline-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
outline-offset - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
outline-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
outline-width - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
outline - CSS: Cascading Style Sheets
WebCSSoutline
the source for this interactive example is stored in a github repository.
overflow-wrap - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
overflow-x - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
overflow-y - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
overflow - CSS: Cascading Style Sheets
WebCSSoverflow
the source for this interactive example is stored in a github repository.
padding-block-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-block-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-bottom - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-inline-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-inline-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-left - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-right - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding-top - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
padding - CSS: Cascading Style Sheets
WebCSSpadding
the source for this interactive example is stored in a github repository.
perspective-origin - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
perspective - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
place-content - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
place-items - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
place-self - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
pointer-events - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
position - CSS: Cascading Style Sheets
WebCSSposition
the source for this interactive example is stored in a github repository.
quotes - CSS: Cascading Style Sheets
WebCSSquotes
the source for this interactive example is stored in a github repository.
radial-gradient() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
repeating-conic-gradient() - CSS: Cascading Style Sheets
{{embedinteractiveexample("pages/css/function-repeating-conic-gradient.html")}} the source for this interactive example is stored in a github repository.
repeating-linear-gradient() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
repeating-radial-gradient() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
resize - CSS: Cascading Style Sheets
WebCSSresize
the source for this interactive example is stored in a github repository.
right - CSS: Cascading Style Sheets
WebCSSright
the source for this interactive example is stored in a github repository.
row-gap (grid-row-gap) - CSS: Cascading Style Sheets
WebCSSrow-gap
the source for this interactive example is stored in a github repository.
scroll-behavior - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-block-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-block-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-block - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-bottom - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-inline-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-inline-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-left - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-right - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin-top - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-margin - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-block-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-block-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-block - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-bottom - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-inline-end - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-inline-start - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-inline - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-left - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-right - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding-top - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-padding - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scroll-snap-type - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
shape-image-threshold - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
shape-margin - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
shape-outside - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
table-layout - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-align-last - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-align - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-decoration-color - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-decoration-line - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-decoration-skip-ink - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-decoration-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-decoration - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-emphasis - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-indent - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-orientation - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-overflow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-shadow - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-transform - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
text-underline-position - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
top - CSS: Cascading Style Sheets
WebCSStop
the source for this interactive example is stored in a github repository.
perspective() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
rotate3d() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
rotateX() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
rotateY() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
rotateZ() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scale3d() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
scaleZ() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
skew() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
skewX() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
skewY() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
translate3d() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
translateZ() - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transform-origin - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transform-style - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transform - CSS: Cascading Style Sheets
WebCSStransform
the source for this interactive example is stored in a github repository.
transition-delay - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transition-duration - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transition-property - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transition-timing-function - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
transition - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
var() - CSS: Cascading Style Sheets
WebCSSvar
the source for this interactive example is stored in a github repository.
vertical-align - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
visibility - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
white-space - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
width - CSS: Cascading Style Sheets
WebCSSwidth
the source for this interactive example is stored in a github repository.
word-break - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
word-spacing - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
writing-mode - CSS: Cascading Style Sheets
the source for this interactive example is stored in a github repository.
z-index - CSS: Cascading Style Sheets
WebCSSz-index
the source for this interactive example is stored in a github repository.
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.
Adding captions and subtitles to HTML5 video - Developer guides
initial setup as with all the other buttons, one of the first things we need to do is store a handle to the subtitles' button: var subtitles = document.getelementbyid('subtitles'); we also initially turn off all subtitles, in case the browser turns any of them on by default: for (var i = 0; i < video.texttracks.length; i++) { video.texttracks[i].mode = 'hidden'; } the video.texttracks property contains an array of all the text tracks attached to the video.
The Unicode Bidirectional Text Algorithm - Developer guides
there are two sets of control characters; one set opens the override, and another restores the original directionality.
HTML attribute reference - HTML: Hypertext Markup Language
codebase <applet> this attribute gives the absolute or relative url of the directory where applets' .class files referenced by the code attribute are stored.
<h1>–<h6>: The HTML Section Heading elements - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
<a>: The Anchor element - HTML: Hypertext Markup Language
WebHTMLElementa
the source for this interactive example is stored in a github repository.
<abbr>: The Abbreviation element - HTML: Hypertext Markup Language
WebHTMLElementabbr
the source for this interactive example is stored in a github repository.
<address>: The Contact Address element - HTML: Hypertext Markup Language
WebHTMLElementaddress
the source for this interactive example is stored in a github repository.
<applet>: The Embed Java Applet element - HTML: Hypertext Markup Language
WebHTMLElementapplet
codebase this attribute gives the absolute or relative url of the directory where applets' .class files referenced by the code attribute are stored.
<area> - HTML: Hypertext Markup Language
WebHTMLElementarea
the source for this interactive example is stored in a github repository.
<article>: The Article Contents element - HTML: Hypertext Markup Language
WebHTMLElementarticle
the source for this interactive example is stored in a github repository.
<aside>: The Aside element - HTML: Hypertext Markup Language
WebHTMLElementaside
the source for this interactive example is stored in a github repository.
<audio>: The Embed Audio element - HTML: Hypertext Markup Language
WebHTMLElementaudio
the source for this interactive example is stored in a github repository.
<b>: The Bring Attention To element - HTML: Hypertext Markup Language
WebHTMLElementb
the source for this interactive example is stored in a github repository.
<bdi>: The Bidirectional Isolate element - HTML: Hypertext Markup Language
WebHTMLElementbdi
the source for this interactive example is stored in a github repository.
<bdo>: The Bidirectional Text Override element - HTML: Hypertext Markup Language
WebHTMLElementbdo
the source for this interactive example is stored in a github repository.
<blockquote>: The Block Quotation element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
<body>: The Document Body element - HTML: Hypertext Markup Language
WebHTMLElementbody
ononline function to call when network communication has been restored.
<br>: The Line Break element - HTML: Hypertext Markup Language
WebHTMLElementbr
the source for this interactive example is stored in a github repository.
<button>: The Button element - HTML: Hypertext Markup Language
WebHTMLElementbutton
the source for this interactive example is stored in a github repository.
<caption>: The Table Caption element - HTML: Hypertext Markup Language
WebHTMLElementcaption
the source for this interactive example is stored in a github repository.
<cite>: The Citation element - HTML: Hypertext Markup Language
WebHTMLElementcite
the source for this interactive example is stored in a github repository.
<code>: The Inline Code element - HTML: Hypertext Markup Language
WebHTMLElementcode
the source for this interactive example is stored in a github repository.
<col> - HTML: Hypertext Markup Language
WebHTMLElementcol
the source for this interactive example is stored in a github repository.
<colgroup> - HTML: Hypertext Markup Language
WebHTMLElementcolgroup
the source for this interactive example is stored in a github repository.
<data> - HTML: Hypertext Markup Language
WebHTMLElementdata
the source for this interactive example is stored in a github repository.
<datalist>: The HTML Data List element - HTML: Hypertext Markup Language
WebHTMLElementdatalist
the source for this interactive example is stored in a github repository.
<dd>: The Description Details element - HTML: Hypertext Markup Language
WebHTMLElementdd
the source for this interactive example is stored in a github repository.
<del>: The Deleted Text element - HTML: Hypertext Markup Language
WebHTMLElementdel
the source for this interactive example is stored in a github repository.
<details>: The Details disclosure element - HTML: Hypertext Markup Language
WebHTMLElementdetails
the source for this interactive example is stored in a github repository.
<dfn>: The Definition element - HTML: Hypertext Markup Language
WebHTMLElementdfn
the source for this interactive example is stored in a github repository.
<div>: The Content Division element - HTML: Hypertext Markup Language
WebHTMLElementdiv
the source for this interactive example is stored in a github repository.
<dl>: The Description List element - HTML: Hypertext Markup Language
WebHTMLElementdl
the source for this interactive example is stored in a github repository.
<dt>: The Description Term element - HTML: Hypertext Markup Language
WebHTMLElementdt
the source for this interactive example is stored in a github repository.
<em>: The Emphasis element - HTML: Hypertext Markup Language
WebHTMLElementem
the source for this interactive example is stored in a github repository.
<embed>: The Embed External Content element - HTML: Hypertext Markup Language
WebHTMLElementembed
the source for this interactive example is stored in a github repository.
<fieldset>: The Field Set element - HTML: Hypertext Markup Language
WebHTMLElementfieldset
the source for this interactive example is stored in a github repository.
<figcaption>: The Figure Caption element - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
<figure>: The Figure with Optional Caption element - HTML: Hypertext Markup Language
WebHTMLElementfigure
the source for this interactive example is stored in a github repository.
<footer> - HTML: Hypertext Markup Language
WebHTMLElementfooter
the source for this interactive example is stored in a github repository.
<form> - HTML: Hypertext Markup Language
WebHTMLElementform
the source for this interactive example is stored in a github repository.
<header> - HTML: Hypertext Markup Language
WebHTMLElementheader
the source for this interactive example is stored in a github repository.
<hgroup> - HTML: Hypertext Markup Language
WebHTMLElementhgroup
the source for this interactive example is stored in a github repository.
<hr>: The Thematic Break (Horizontal Rule) element - HTML: Hypertext Markup Language
WebHTMLElementhr
the source for this interactive example is stored in a github repository.
<i>: The Idiomatic Text element - HTML: Hypertext Markup Language
WebHTMLElementi
the source for this interactive example is stored in a github repository.
<iframe>: The Inline Frame element - HTML: Hypertext Markup Language
WebHTMLElementiframe
the source for this interactive example is stored in a github repository.
<img>: The Image Embed element - HTML: Hypertext Markup Language
WebHTMLElementimg
the source for this interactive example is stored in a github repository.
<input type="checkbox"> - HTML: Hypertext Markup Language
WebHTMLElementinputcheckbox
the source for this interactive example is stored in a github repository.
<input type="date"> - HTML: Hypertext Markup Language
WebHTMLElementinputdate
the source for this interactive example is stored in a github repository.
<input type="email"> - HTML: Hypertext Markup Language
WebHTMLElementinputemail
the source for this interactive example is stored in a github repository.
<input type="hidden"> - HTML: Hypertext Markup Language
WebHTMLElementinputhidden
improving website security hidden inputs are also used to store and submit security tokens or secrets, for the purposes of improving website security.
<input type="image"> - HTML: Hypertext Markup Language
WebHTMLElementinputimage
the source for this interactive example is stored in a github repository.
<input type="month"> - HTML: Hypertext Markup Language
WebHTMLElementinputmonth
the source for this interactive example is stored in a github repository.
<input type="number"> - HTML: Hypertext Markup Language
WebHTMLElementinputnumber
the source for this interactive example is stored in a github repository.
<input type="radio"> - HTML: Hypertext Markup Language
WebHTMLElementinputradio
the source for this interactive example is stored in a github repository.
<input type="range"> - HTML: Hypertext Markup Language
WebHTMLElementinputrange
the source for this interactive example is stored in a github repository.
<input type="reset"> - HTML: Hypertext Markup Language
WebHTMLElementinputreset
the source for this interactive example is stored in a github repository.
<input type="tel"> - HTML: Hypertext Markup Language
WebHTMLElementinputtel
the source for this interactive example is stored in a github repository.
<input type="text"> - HTML: Hypertext Markup Language
WebHTMLElementinputtext
the source for this interactive example is stored in a github repository.
<input type="time"> - HTML: Hypertext Markup Language
WebHTMLElementinputtime
the source for this interactive example is stored in a github repository.
<input type="url"> - HTML: Hypertext Markup Language
WebHTMLElementinputurl
the source for this interactive example is stored in a github repository.
<input type="week"> - HTML: Hypertext Markup Language
WebHTMLElementinputweek
the source for this interactive example is stored in a github repository.
<input>: The Input (Form Input) element - HTML: Hypertext Markup Language
WebHTMLElementinput
the source for this interactive example is stored in a github repository.
<ins> - HTML: Hypertext Markup Language
WebHTMLElementins
the source for this interactive example is stored in a github repository.
<kbd>: The Keyboard Input element - HTML: Hypertext Markup Language
WebHTMLElementkbd
the source for this interactive example is stored in a github repository.
<label> - HTML: Hypertext Markup Language
WebHTMLElementlabel
the source for this interactive example is stored in a github repository.
<legend> - HTML: Hypertext Markup Language
WebHTMLElementlegend
the source for this interactive example is stored in a github repository.
<li> - HTML: Hypertext Markup Language
WebHTMLElementli
the source for this interactive example is stored in a github repository.
<main> - HTML: Hypertext Markup Language
WebHTMLElementmain
the source for this interactive example is stored in a github repository.
<map> - HTML: Hypertext Markup Language
WebHTMLElementmap
the source for this interactive example is stored in a github repository.
<mark>: The Mark Text element - HTML: Hypertext Markup Language
WebHTMLElementmark
the source for this interactive example is stored in a github repository.
<meter>: The HTML Meter element - HTML: Hypertext Markup Language
WebHTMLElementmeter
the source for this interactive example is stored in a github repository.
<nav>: The Navigation Section element - HTML: Hypertext Markup Language
WebHTMLElementnav
the source for this interactive example is stored in a github repository.
<object> - HTML: Hypertext Markup Language
WebHTMLElementobject
the source for this interactive example is stored in a github repository.
<ol>: The Ordered List element - HTML: Hypertext Markup Language
WebHTMLElementol
the source for this interactive example is stored in a github repository.
<optgroup> - HTML: Hypertext Markup Language
WebHTMLElementoptgroup
the source for this interactive example is stored in a github repository.
<option>: The HTML Option element - HTML: Hypertext Markup Language
WebHTMLElementoption
the source for this interactive example is stored in a github repository.
<p>: The Paragraph element - HTML: Hypertext Markup Language
WebHTMLElementp
the source for this interactive example is stored in a github repository.
<param>: The Object Parameter element - HTML: Hypertext Markup Language
WebHTMLElementparam
ref: the value is a uri to a resource where run-time values are stored.
<picture>: The Picture element - HTML: Hypertext Markup Language
WebHTMLElementpicture
the source for this interactive example is stored in a github repository.
<pre>: The Preformatted Text element - HTML: Hypertext Markup Language
WebHTMLElementpre
the source for this interactive example is stored in a github repository.
<progress>: The Progress Indicator element - HTML: Hypertext Markup Language
WebHTMLElementprogress
the source for this interactive example is stored in a github repository.
<q>: The Inline Quotation element - HTML: Hypertext Markup Language
WebHTMLElementq
the source for this interactive example is stored in a github repository.
<rb>: The Ruby Base element - HTML: Hypertext Markup Language
WebHTMLElementrb
{{embedinteractiveexample("pages/tabbed/rb.html", "tabbed-standard")}} the source for this interactive example is stored in a github repository.
<rp>: The Ruby Fallback Parenthesis element - HTML: Hypertext Markup Language
WebHTMLElementrp
the source for this interactive example is stored in a github repository.
<rt>: The Ruby Text element - HTML: Hypertext Markup Language
WebHTMLElementrt
the source for this interactive example is stored in a github repository.
<rtc>: The Ruby Text Container element - HTML: Hypertext Markup Language
WebHTMLElementrtc
the source for this interactive example is stored in a github repository.
<ruby> - HTML: Hypertext Markup Language
WebHTMLElementruby
the source for this interactive example is stored in a github repository.
<s> - HTML: Hypertext Markup Language
WebHTMLElements
the source for this interactive example is stored in a github repository.
<samp>: The Sample Output element - HTML: Hypertext Markup Language
WebHTMLElementsamp
the source for this interactive example is stored in a github repository.
<section>: The Generic Section element - HTML: Hypertext Markup Language
WebHTMLElementsection
the source for this interactive example is stored in a github repository.
<select>: The HTML Select element - HTML: Hypertext Markup Language
WebHTMLElementselect
the html <select> element represents a control that provides a menu of options: the source for this interactive example is stored in a github repository.
<small>: the side comment element - HTML: Hypertext Markup Language
WebHTMLElementsmall
the source for this interactive example is stored in a github repository.
<source>: The Media or Image Source element - HTML: Hypertext Markup Language
WebHTMLElementsource
the source for this interactive example is stored in a github repository.
<span> - HTML: Hypertext Markup Language
WebHTMLElementspan
the source for this interactive example is stored in a github repository.
<strong>: The Strong Importance element - HTML: Hypertext Markup Language
WebHTMLElementstrong
the source for this interactive example is stored in a github repository.
<style>: The Style Information element - HTML: Hypertext Markup Language
WebHTMLElementstyle
the source for this interactive example is stored in a github repository.
<sub>: The Subscript element - HTML: Hypertext Markup Language
WebHTMLElementsub
the source for this interactive example is stored in a github repository.
<summary>: The Disclosure Summary element - HTML: Hypertext Markup Language
WebHTMLElementsummary
the source for this interactive example is stored in a github repository.
<sup>: The Superscript element - HTML: Hypertext Markup Language
WebHTMLElementsup
the source for this interactive example is stored in a github repository.
<table>: The Table element - HTML: Hypertext Markup Language
WebHTMLElementtable
the source for this interactive example is stored in a github repository.
<tbody>: The Table Body element - HTML: Hypertext Markup Language
WebHTMLElementtbody
the source for this interactive example is stored in a github repository.
<td>: The Table Data Cell element - HTML: Hypertext Markup Language
WebHTMLElementtd
the source for this interactive example is stored in a github repository.
<template>: The Content Template element - HTML: Hypertext Markup Language
WebHTMLElementtemplate
think of a template as a content fragment that is being stored for subsequent use in the document.
<textarea> - HTML: Hypertext Markup Language
WebHTMLElementtextarea
the source for this interactive example is stored in a github repository.
<tfoot>: The Table Foot element - HTML: Hypertext Markup Language
WebHTMLElementtfoot
the source for this interactive example is stored in a github repository.
<th> - HTML: Hypertext Markup Language
WebHTMLElementth
the source for this interactive example is stored in a github repository.
<thead>: The Table Head element - HTML: Hypertext Markup Language
WebHTMLElementthead
the source for this interactive example is stored in a github repository.
<time> - HTML: Hypertext Markup Language
WebHTMLElementtime
the source for this interactive example is stored in a github repository.
<tr>: The Table Row element - HTML: Hypertext Markup Language
WebHTMLElementtr
the source for this interactive example is stored in a github repository.
<track>: The Embed Text Track element - HTML: Hypertext Markup Language
WebHTMLElementtrack
the source for this interactive example is stored in a github repository.
<ul>: The Unordered List element - HTML: Hypertext Markup Language
WebHTMLElementul
the source for this interactive example is stored in a github repository.
<var>: The Variable element - HTML: Hypertext Markup Language
WebHTMLElementvar
the source for this interactive example is stored in a github repository.
<video>: The Video Embed element - HTML: Hypertext Markup Language
WebHTMLElementvideo
the source for this interactive example is stored in a github repository.
<wbr> - HTML: Hypertext Markup Language
WebHTMLElementwbr
the source for this interactive example is stored in a github repository.
accesskey - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
class - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
contenteditable - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
data-* - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
hidden - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
id - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
lang - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
spellcheck - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
style - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
tabindex - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
title - HTML: Hypertext Markup Language
the source for this interactive example is stored in a github repository.
HTML documentation index - HTML: Hypertext Markup Language
WebHTMLIndex
226 link types: modulepreload attribute, html, link, link types, reference the modulepreload keyword for the rel attribute of the <link> element provides a declarative way to preemptively fetch a module script and its dependencies, and store them in the document's module map for later evaluation.
Link types: modulepreload - HTML: Hypertext Markup Language
the modulepreload keyword for the rel attribute of the <link> element provides a declarative way to preemptively fetch a module script and its dependencies, and store them in the document's module map for later evaluation.
Preloading content with rel="preload" - HTML: Hypertext Markup Language
store in the cache for future requests, reusing the resource if appropriate.
Content Security Policy (CSP) - HTTP
WebHTTPCSP
to enable violation reporting, you need to specify the report-uri policy directive, providing at least one uri to which to deliver the reports: content-security-policy: default-src 'self'; report-uri http://reportcollector.example.com/collector.cgi then you need to set up your server to receive the reports; it can store or process them in whatever manner you determine is appropriate.
Compression in HTTP - HTTP
unlike text, these other media types use lot of space to store their data and the need to optimize storage and regain space was apparent very early.
Configuring servers for Ogg media - HTTP
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.
CSP: base-uri - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: child-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: connect-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: default-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: font-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: form-action - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: frame-ancestors - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: frame-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: img-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: manifest-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: media-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: navigate-to - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: object-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: prefetch-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: report-to - HTTP
the content-security-policy report-to http response header field instructs the user agent to store reporting endpoints for an origin.
CSP: script-src-attr - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: script-src-elem - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: script-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: style-src-attr - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: style-src-elem - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: style-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
CSP: worker-src - HTTP
https://store.example.com: matches all attempts to access store.example.com using https:.
Cookie - HTTP
WebHTTPHeadersCookie
the cookie http request header contains stored http cookies previously sent by the server with the set-cookie header.
Expect-CT - HTTP
expect-ct: max-age=86400, enforce, report-uri="https://foo.example/report" notes root cas manually added to the trust store override and suppress expect-ct reports/enforcement.
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-Match - HTTP
WebHTTPHeadersIf-Match
the comparison with the stored etag uses the strong comparison algorithm, meaning two files are considered identical byte to byte only.
If-None-Match - HTTP
the comparison with the stored etag uses the weak comparison algorithm, meaning two files are considered identical if the content is equivalent — they don't have to be identical byte for byte.
If-Range - HTTP
WebHTTPHeadersIf-Range
the most common use case is to resume a download, to guarantee that the stored resource has not been modified since the last fragment has been received.
If-Unmodified-Since - HTTP
there are two common use cases: in conjunction with non-safe methods, like post, it can be used to implement an optimistic concurrency control, like done by some wikis: editions are rejected if the stored document has been modified since the original has been retrieved.
Last-Modified - HTTP
it is used as a validator to determine if a resource received or stored is the same.
Public-Key-Pins - HTTP
max-age=5184000 tells the client to store this information for two months, which is a reasonable time limit according to the ietf rfc.
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.
Warning - HTTP
WebHTTPHeadersWarning
the first digit indicates whether the warning is required to be deleted from a stored response after validation.
An overview of HTTP - HTTP
WebHTTPOverview
the client can instruct intermediate cache proxies to ignore the stored document.
Proxy servers and tunneling - HTTP
they store and forward internet services (like the dns, or web pages) to reduce and control the bandwidth used by the group.
HTTP range requests - HTTP
ontent-length: 282 --3d6b6a416f9b5 content-type: text/html content-range: bytes 0-50/1270 <!doctype html> <html> <head> <title>example do --3d6b6a416f9b5 content-type: text/html content-range: bytes 100-150/1270 eta http-equiv="content-type" content="text/html; c --3d6b6a416f9b5-- conditional range requests when resuming to request more parts of a resource, you need to guarantee that the stored resource has not been modified since the last fragment has been received.
A typical HTTP session - HTTP
WebHTTPSession
(contains a site-customized page helping the user to find the missing resource) notification that the requested resource doesn't exist: http/1.1 404 not found content-type: text/html; charset=utf-8 content-length: 38217 connection: keep-alive cache-control: no-cache, no-store, must-revalidate, max-age=0 content-language: en-us date: thu, 06 dec 2018 17:35:13 gmt expires: thu, 06 dec 2018 17:35:13 gmt server: meinheld/0.6.1 strict-transport-security: max-age=63072000 x-content-type-options: nosniff x-frame-options: deny x-xss-protection: 1; mode=block vary: accept-encoding,cookie x-cache: error from cloudfront <!doctype html...
507 Insufficient Storage - HTTP
WebHTTPStatus507
it indicates that a method could not be performed because the server cannot store the representation needed to successfully complete the request.
HTTP response status codes - HTTP
WebHTTPStatus
507 insufficient storage (webdav) the method could not be performed on the resource because the server is unable to store the representation needed to successfully complete the request.
Functions - JavaScript
the inner variables of the inner functions act as safe stores for the outer arguments and variables.
Numbers and dates - JavaScript
the two languages have many of the same date methods, and both languages store dates as the number of milliseconds since january 1, 1970, 00:00:00, with a unix timestamp being the number of seconds since january 1, 1970, 00:00:00.
Regular expression syntax cheatsheet - JavaScript
(?<name>x) named capturing group: matches "x" and stores it on the groups property of the returned matches under the name specified by <name>.
Groups and ranges - JavaScript
(?<name>x) named capturing group: matches "x" and stores it on the groups property of the returned matches under the name specified by <name>.
Text formatting - JavaScript
can't change individual characters because strings are immutable array-like objects: const hello = 'hello, world!'; const hellolength = hello.length; hello[0] = 'l'; // this has no effect, because strings are immutable hello[0]; // this returns "h" characters whose unicode scalar values are greater than u+ffff (such as some rare chinese/japanese/korean/vietnamese characters and some emoji) are stored in utf-16 with two surrogate code units each.
Working with objects - JavaScript
you can also access properties by using a string value that is stored in a variable: var propertyname = 'make'; mycar[propertyname] = 'ford'; propertyname = 'model'; mycar[propertyname] = 'mustang'; you can use the bracket notation with for...in to iterate over all the enumerable properties of an object.
Inheritance and the prototype chain - JavaScript
during this initialization, the constructor may store unique information that must be generated per-object.
Memory Management - JavaScript
var d = new date(); // allocates a date object var e = document.createelement('div'); // allocates a dom element some methods allocate new values or objects: var s = 'azerty'; var s2 = s.substr(0, 3); // s2 is a new string // since strings are immutable values, // javascript may decide to not allocate memory, // but just store the [0, 3] range.
constructor - JavaScript
the source for this interactive example is stored in a github repository.
extends - JavaScript
the source for this interactive example is stored in a github repository.
static - JavaScript
the source for this interactive example is stored in a github repository.
TypeError: can't access dead object - JavaScript
to avoid these issues, references to dom nodes in foreign document should instead be stored in an object which is specific to that document, and cleaned up when the document is unloaded, or stored as weak references.
RangeError: invalid array length - JavaScript
the length property of an array or an arraybuffer is represented with an unsigned 32-bit integer, that can only store values which are in the range from 0 to 232-1.
TypeError: invalid assignment to const "x" - JavaScript
this means that you can't mutate the value stored in a variable: const obj = {foo: 'bar'}; obj = {foo: 'baz'}; // typeerror: invalid assignment to const `obj' but you can mutate the properties in a variable: obj.foo = 'baz'; obj; // object { foo: "baz" } ...
TypeError: "x" is not a non-null object - JavaScript
mber), will throw an error: object.defineproperty({}, 'key', 1); // typeerror: 1 is not a non-null object object.defineproperty({}, 'key', null); // typeerror: null is not a non-null object a valid property descriptor object might look like this: object.defineproperty({}, 'key', { value: 'foo', writable: false }); weakmap and weakset objects require object keys weakmap and weakset objects store object keys.
Default parameters - JavaScript
the source for this interactive example is stored in a github repository.
Method definitions - JavaScript
the source for this interactive example is stored in a github repository.
The arguments object - JavaScript
the source for this interactive example is stored in a github repository.
getter - JavaScript
the source for this interactive example is stored in a github repository.
Rest parameters - JavaScript
the source for this interactive example is stored in a github repository.
setter - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.reduce() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.reduceRight() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.concat() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.copyWithin() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.entries() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.every() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.fill() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.filter() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.find() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.findIndex() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.flatMap() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.forEach() - JavaScript
the source for this interactive example is stored in a github repository.
Array.from() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.includes() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.indexOf() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.join() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.keys() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.lastIndexOf() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.length - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.map() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.pop() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.reverse() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.shift() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.slice() - JavaScript
the source for this interactive demo is stored in a github repository.
Array.prototype.some() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.sort() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.splice() - JavaScript
the source for this interactive example is stored in a github repository.
Array.prototype.values() - JavaScript
value: there are no values stored in the array iterator object; instead it stores the address of the array used in its creation and so depends on the values stored in that array.
Array - JavaScript
since an array's length can change at any time, and data can be stored at non-contiguous locations in the array, javascript arrays are not guaranteed to be dense; this depends on how the programmer chooses to use them.
ArrayBuffer() constructor - JavaScript
the source for this interactive example is stored in a github repository.
ArrayBuffer.prototype.byteLength - JavaScript
the source for this interactive example is stored in a github repository.
ArrayBuffer.isView() - JavaScript
the source for this interactive example is stored in a github repository.
ArrayBuffer.prototype.slice() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.add() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.and() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.compareExchange() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.isLockFree() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.load() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.or() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.sub() - JavaScript
the source for this interactive example is stored in a github repository.
Atomics.xor() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt.asIntN() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt.asUintN() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt.prototype.toLocaleString() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt.prototype.valueOf() - JavaScript
the source for this interactive example is stored in a github repository.
BigInt64Array - JavaScript
bigint64array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
BigUint64Array - JavaScript
biguint64array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Boolean() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Boolean.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Boolean.prototype.valueOf() - JavaScript
the source for this interactive example is stored in a github repository.
DataView() constructor - JavaScript
the source for this interactive example is stored in a github repository.
DataView.prototype.buffer - JavaScript
the source for this interactive example is stored in a github repository.
DataView.prototype.byteLength - JavaScript
the source for this interactive example is stored in a github repository.
DataView.prototype.byteOffset - JavaScript
the source for this interactive example is stored in a github repository.
DataView.prototype.getInt8() - JavaScript
the source for this interactive example is stored in a github repository.
DataView.prototype.getUint8() - JavaScript
the source for this interactive example is stored in a github repository.
Date() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Date.UTC() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getDate() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getDay() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getFullYear() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getHours() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getMilliseconds() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getMonth() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getSeconds() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getTime() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getTimezoneOffset() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getUTCDay() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getUTCFullYear() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getUTCHours() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.getUTCMonth() - JavaScript
the source for this interactive example is stored in a github repository.
Date.parse() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setDate() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setFullYear() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setHours() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setMilliseconds() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setMinutes() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setTime() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setUTCFullYear() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setUTCHours() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setUTCMinutes() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.setUTCMonth() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toDateString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toISOString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toJSON() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toLocaleDateString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toLocaleString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toLocaleTimeString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toTimeString() - JavaScript
the source for this interactive example is stored in a github repository.
Date.prototype.toUTCString() - JavaScript
based on rfc7231 and modified according to ecma-262 toutcstring, it can have negative values in the 2021 version the source for this interactive example is stored in a github repository.
Float32Array - JavaScript
float32array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Float64Array - JavaScript
float64array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Function() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Function.prototype.apply() - JavaScript
the source for this interactive example is stored in a github repository.
Function.prototype.bind() - JavaScript
the source for this interactive example is stored in a github repository.
Function.prototype.call() - JavaScript
the source for this interactive example is stored in a github repository.
Function.length - JavaScript
the source for this interactive example is stored in a github repository.
Function.name - JavaScript
the source for this interactive example is stored in a github repository.
Function.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Infinity - JavaScript
property attributes of infinity writable no enumerable no configurable no the source for this interactive example is stored in a github repository.
Int16Array - JavaScript
int16array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Int32Array - JavaScript
int32array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Int8Array - JavaScript
int8array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Intl.Collator() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Collator.prototype.compare() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Collator.prototype.resolvedOptions() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Collator.supportedLocalesOf() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Collator - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat.prototype.format() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat.prototype.formatRange() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat.prototype.formatRangeToParts() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat.prototype.resolvedOptions() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat.supportedLocalesOf() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DateTimeFormat - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DisplayNames() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DisplayNames.prototype.of() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.DisplayNames - JavaScript
the source for this interactive example is stored in a github repository.
Intl.ListFormat() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Intl.ListFormat - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Locale.prototype.maximize() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Locale.prototype.minimize() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Locale.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.Locale - JavaScript
additional information about the locale is stored in the optional extension tags.
Intl.NumberFormat() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Intl.NumberFormat.prototype.format() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.NumberFormat.prototype.resolvedOptions() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.NumberFormat.supportedLocalesOf() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.NumberFormat - JavaScript
the source for this interactive example is stored in a github repository.
Intl.RelativeTimeFormat.prototype.format() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.RelativeTimeFormat.prototype.formatToParts() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.RelativeTimeFormat.prototype.resolvedOptions() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.RelativeTimeFormat.supportedLocalesOf() - JavaScript
the source for this interactive example is stored in a github repository.
Intl.RelativeTimeFormat - JavaScript
the source for this interactive example is stored in a github repository.
Intl.getCanonicalLocales() - JavaScript
the source for this interactive example is stored in a github repository.
JSON.parse() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype[@@iterator]() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype[@@toStringTag] - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.clear() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.delete() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.entries() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.forEach() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.get() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.has() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.keys() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.set() - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.size - JavaScript
the source for this interactive example is stored in a github repository.
Map.prototype.values() - JavaScript
the source for this interactive example is stored in a github repository.
Math.E - JavaScript
math.e=e≈2.718\mathtt{\mi{math.e}} = e \approx 2.718 the source for this interactive example is stored in a github repository.
Math.LN10 - JavaScript
the math.ln10 property represents the natural logarithm of 10, approximately 2.302: math.ln10=ln(10)≈2.302\mathtt{\mi{math.ln10}} = \ln(10) \approx 2.302 the source for this interactive example is stored in a github repository.
Math.LN2 - JavaScript
the math.ln2 property represents the natural logarithm of 2, approximately 0.693: math.ln2=ln(2)≈0.693\mathtt{\mi{math.ln2}} = \ln(2) \approx 0.693 the source for this interactive example is stored in a github repository.
Math.LOG10E - JavaScript
the math.log10e property represents the base 10 logarithm of e, approximately 0.434: math.log10e=log10(e)≈0.434\mathtt{\mi{math.log10e}} = \log_10(e) \approx 0.434 the source for this interactive example is stored in a github repository.
Math.LOG2E - JavaScript
the math.log2e property represents the base 2 logarithm of e, approximately 1.442: math.log2e=log2(e)≈1.442\mathtt{\mi{math.log2e}} = \log_2(e) \approx 1.442 the source for this interactive example is stored in a github repository.
Math.PI - JavaScript
the math.pi property represents the ratio of the circumference of a circle to its diameter, approximately 3.14159: math.pi=π≈3.14159\mathtt{\mi{math.pi}} = \pi \approx 3.14159 the source for this interactive example is stored in a github repository.
Math.SQRT1_2 - JavaScript
the math.sqrt1_2 property represents the square root of 1/2 which is approximately 0.707: math.sqrt1_2=12=12≈0.707\mathtt{\mi{math.sqrt1_2}} = \sqrt{\frac{1}{2}} = \frac{1}{\sqrt{2}} \approx 0.707 the source for this interactive example is stored in a github repository.
Math.SQRT2 - JavaScript
the math.sqrt2 property represents the square root of 2, approximately 1.414: math.sqrt2=2≈1.414\mathtt{\mi{math.sqrt2}} = \sqrt{2} \approx 1.414 the source for this interactive example is stored in a github repository.
Math.abs() - JavaScript
the math.abs() function returns the absolute value of a number, that is math.abs(x)=|x|={xifx>00ifx=0-xifx<0{\mathtt{\operatorname{math.abs}(z)}} = {|z|} = \begin{cases} x & \text{if} \quad x \geq 0 \\ x & \text{if} \quad x < 0 \end{cases} the source for this interactive example is stored in a github repository.
Math.acos() - JavaScript
the math.acos() function returns the arccosine (in radians) of a number, that is ∀x∊[-1;1],math.acos(x)=arccos(x)= the unique y∊[0;π]such thatcos(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.acos}(x)} = \arccos(x) = \text{ the unique } \; y \in [0; \pi] \, \text{such that} \; \cos(y) = x the source for this interactive example is stored in a github repository.
Math.acosh() - JavaScript
the math.acosh() function returns the hyperbolic arc-cosine of a number, that is ∀x≥1,math.acosh(x)=arcosh(x)= the unique y≥0such thatcosh(y)=x\forall x \geq 1, \mathtt{\operatorname{math.acosh}(x)} = \operatorname{arcosh}(x) = \text{ the unique } \; y \geq 0 \; \text{such that} \; \cosh(y) = x the source for this interactive example is stored in a github repository.
Math.asin() - JavaScript
the math.asin() function returns the arcsine (in radians) of a number, that is ∀x∊[-1;1],math.asin(x)=arcsin(x)= the unique y∊[-π2;π2]such thatsin(y)=x\forall x \in [{-1};1],\;\mathtt{\operatorname{math.asin}(x)} = \arcsin(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \sin(y) = x the source for this interactive example is stored in a github repository.
Math.asinh() - JavaScript
the math.asinh() function returns the hyperbolic arcsine of a number, that is math.asinh(x)=arsinh(x)= the unique ysuch thatsinh(y)=x\mathtt{\operatorname{math.asinh}(x)} = \operatorname{arsinh}(x) = \text{ the unique } \; y \; \text{such that} \; \sinh(y) = x the source for this interactive example is stored in a github repository.
Math.atan() - JavaScript
the math.atan() function returns the arctangent (in radians) of a number, that is math.atan(x)=arctan(x)= the unique y∊[-π2;π2]such thattan(y)=x\mathtt{\operatorname{math.atan}(x)} = \arctan(x) = \text{ the unique } \; y \in \left[-\frac{\pi}{2}; \frac{\pi}{2}\right] \, \text{such that} \; \tan(y) = x the source for this interactive example is stored in a github repository.
Math.atan2() - JavaScript
the source for this interactive example is stored in a github repository.
Math.atanh() - JavaScript
the math.atanh() function returns the hyperbolic arctangent of a number, that is ∀x∊(-1,1),math.atanh(x)=arctanh(x)= the unique ysuch thattanh(y)=x\forall x \in \left( -1, 1 \right), \mathtt{\operatorname{math.atanh}(x)} = \operatorname{arctanh}(x) = \text{ the unique } \; y \; \text{such that} \; \tanh(y) = x the source for this interactive example is stored in a github repository.
Math.cbrt() - JavaScript
the math.cbrt() function returns the cube root of a number, that is math.cbrt(x)=x3=the uniqueysuch thaty3=x\mathtt{math.cbrt(x)} = \sqrt[3]{x} = \text{the unique} \; y \; \text{such that} \; y^3 = x the source for this interactive example is stored in a github repository.
Math.ceil() - JavaScript
the source for this interactive example is stored in a github repository.
Math.clz32() - JavaScript
the source for this interactive example is stored in a github repository.
Math.cos() - JavaScript
the source for this interactive example is stored in a github repository.
Math.cosh() - JavaScript
the math.cosh() function returns the hyperbolic cosine of a number, that can be expressed using the constant e: math.cosh(x)=ex+e-x2\mathtt{\operatorname{math.cosh(x)}} = \frac{e^x + e^{-x}}{2} the source for this interactive example is stored in a github repository.
Math.exp() - JavaScript
the source for this interactive example is stored in a github repository.
Math.expm1() - JavaScript
the source for this interactive example is stored in a github repository.
Math.floor() - JavaScript
the source for this interactive example is stored in a github repository.
Math.fround() - JavaScript
the source for this interactive example is stored in a github repository.
Math.hypot() - JavaScript
the math.hypot() function returns the square root of the sum of squares of its arguments, that is: math.hypot(v1,v2,…,vn)=∑i=1nvi2=v12+v22+…+vn2\mathtt{\operatorname{math.hypot}(v_1, v_2, \dots, v_n)} = \sqrt{\sum_{i=1}^n v_i^2} = \sqrt{v_1^2 + v_2^2 + \dots + v_n^2} the source for this interactive example is stored in a github repository.
Math.log() - JavaScript
the source for this interactive example is stored in a github repository.
Math.log10() - JavaScript
the math.log10() function returns the base 10 logarithm of a number, that is ∀x>0,math.log10(x)=log10(x)=the uniqueysuch that10y=x\forall x > 0, \mathtt{\operatorname{math.log10}(x)} = \log_10(x) = \text{the unique} \; y \; \text{such that} \; 10^y = x the source for this interactive example is stored in a github repository.
Math.log1p() - JavaScript
the math.log1p() function returns the natural logarithm (base e) of 1 + a number, that is ∀x>-1,math.log1p(x)=ln(1+x)\forall x > -1, \mathtt{\operatorname{math.log1p}(x)} = \ln(1 + x) the source for this interactive example is stored in a github repository.
Math.log2() - JavaScript
the math.log2() function returns the base 2 logarithm of a number, that is ∀x>0,math.log2(x)=log2(x)=the uniqueysuch that2y=x\forall x > 0, \mathtt{\operatorname{math.log2}(x)} = \log_2(x) = \text{the unique} \; y \; \text{such that} \; 2^y = x the source for this interactive example is stored in a github repository.
Math.max() - JavaScript
the source for this interactive example is stored in a github repository.
Math.min() - JavaScript
the source for this interactive example is stored in a github repository.
Math.pow() - JavaScript
the source for this interactive example is stored in a github repository.
Math.round() - JavaScript
the source for this interactive example is stored in a github repository.
Math.sign() - JavaScript
the source for this interactive example is stored in a github repository.
Math.sin() - JavaScript
the source for this interactive example is stored in a github repository.
Math.sinh() - JavaScript
the math.sinh() function returns the hyperbolic sine of a number, that can be expressed using the constant e: math.sinh(x)=ex-e-x2\mathtt{\operatorname{math.sinh(x)}} = \frac{e^x - e^{-x}}{2} the source for this interactive example is stored in a github repository.
Math.sqrt() - JavaScript
the math.sqrt() function returns the square root of a number, that is ∀x≥0,math.sqrt(x)=x=the uniquey≥0such thaty2=x\forall x \geq 0, \mathtt{math.sqrt(x)} = \sqrt{x} = \text{the unique} \; y \geq 0 \; \text{such that} \; y^2 = x the source for this interactive example is stored in a github repository.
Math.tan() - JavaScript
the source for this interactive example is stored in a github repository.
Math.trunc() - JavaScript
the source for this interactive example is stored in a github repository.
NaN - JavaScript
property attributes of nan writable no enumerable no configurable no the source for this interactive example is stored in a github repository.
Number.EPSILON - JavaScript
the source for this interactive example is stored in a github repository.
Number.MAX_SAFE_INTEGER - JavaScript
the source for this interactive example is stored in a github repository.
Number.MAX_VALUE - JavaScript
the source for this interactive example is stored in a github repository.
Number.MIN_SAFE_INTEGER - JavaScript
the source for this interactive example is stored in a github repository.
Number.MIN_VALUE - JavaScript
the source for this interactive example is stored in a github repository.
Number.NEGATIVE_INFINITY - JavaScript
the source for this interactive example is stored in a github repository.
Number.POSITIVE_INFINITY - JavaScript
the source for this interactive example is stored in a github repository.
Number.isFinite() - JavaScript
the source for this interactive example is stored in a github repository.
Number.isInteger() - JavaScript
the source for this interactive example is stored in a github repository.
Number.isNaN() - JavaScript
the source for this interactive example is stored in a github repository.
Number.isSafeInteger() - JavaScript
the source for this interactive example is stored in a github repository.
Number.parseFloat() - JavaScript
the source for this interactive example is stored in a github repository.
Number.parseInt() - JavaScript
the source for this interactive example is stored in a github repository.
Number.prototype.toExponential() - JavaScript
the source for this interactive example is stored in a github repository.
Number.prototype.toFixed() - JavaScript
the source for this interactive example is stored in a github repository.
Number.prototype.toLocaleString() - JavaScript
the source for this interactive example is stored in a github repository.
Number.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Number.prototype.valueOf() - JavaScript
the source for this interactive example is stored in a github repository.
Number - JavaScript
this means it can represent fractional values, but there are some limits to what it can store.
Object() constructor - JavaScript
examples creating a new object let o = new object() o.foo = 42 console.log(o) // object { foo: 42 } using object given undefined and null types the following examples store an empty object object in o: let o = new object() let o = new object(undefined) let o = new object(null) specifications specification ecmascript (ecma-262)the definition of 'object constructor' in that specification.
Object.assign() - JavaScript
the source for this interactive example is stored in a github repository.
Object.create() - JavaScript
the source for this interactive example is stored in a github repository.
Object.defineProperties() - JavaScript
the source for this interactive example is stored in a github repository.
Object.entries() - JavaScript
the source for this interactive example is stored in a github repository.
Object.freeze() - JavaScript
the source for this interactive example is stored in a github repository.
Object.fromEntries() - JavaScript
the source for this interactive example is stored in a github repository.
Object.getOwnPropertyDescriptor() - JavaScript
the source for this interactive example is stored in a github repository.
Object.getOwnPropertySymbols() - JavaScript
the source for this interactive example is stored in a github repository.
Object.getPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.hasOwnProperty() - JavaScript
the source for this interactive example is stored in a github repository.
Object.isExtensible() - JavaScript
the source for this interactive example is stored in a github repository.
Object.isFrozen() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.isPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
Object.isSealed() - JavaScript
the source for this interactive example is stored in a github repository.
Object.keys() - JavaScript
the source for this interactive example is stored in a github repository.
Object.preventExtensions() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.propertyIsEnumerable() - JavaScript
the source for this interactive example is stored in a github repository.
Object.seal() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.toLocaleString() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Object.prototype.valueOf() - JavaScript
the source for this interactive example is stored in a github repository.
Object.values() - JavaScript
(the only difference is that a for...in loop enumerates properties in the prototype chain as well.) the source for this interactive example is stored in a github repository.
Promise() constructor - JavaScript
the source for this interactive demo is stored in a github repository.
Promise.all() - JavaScript
the source for this interactive demo is stored in a github repository.
Promise.race() - JavaScript
the source for this interactive demo is stored in a github repository.
Promise.reject() - JavaScript
the source for this interactive example is stored in a github repository.
Promise.prototype.then() - JavaScript
the source for this interactive demo is stored in a github repository.
handler.apply() - JavaScript
the source for this interactive example is stored in a github repository.
handler.construct() - JavaScript
the source for this interactive example is stored in a github repository.
handler.defineProperty() - JavaScript
the source for this interactive example is stored in a github repository.
handler.deleteProperty() - JavaScript
the source for this interactive example is stored in a github repository.
handler.get() - JavaScript
the source for this interactive example is stored in a github repository.
handler.getOwnPropertyDescriptor() - JavaScript
the source for this interactive example is stored in a github repository.
handler.getPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
handler.has() - JavaScript
the source for this interactive example is stored in a github repository.
handler.isExtensible() - JavaScript
the source for this interactive example is stored in a github repository.
handler.ownKeys() - JavaScript
the source for this interactive example is stored in a github repository.
handler.preventExtensions() - JavaScript
the source for this interactive example is stored in a github repository.
handler.set() - JavaScript
the source for this interactive example is stored in a github repository.
handler.setPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.apply() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.construct() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.defineProperty() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.deleteProperty() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.get() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.getOwnPropertyDescriptor() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.getPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.has() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.isExtensible() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.ownKeys() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.preventExtensions() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.set() - JavaScript
the source for this interactive example is stored in a github repository.
Reflect.setPrototypeOf() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype[@@match]() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype[@@matchAll]() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype[@@replace]() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype[@@search]() - JavaScript
the source for this interactive example is stored in a github repository.
get RegExp[@@species] - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype[@@split]() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp() constructor - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.flags - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.global - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.ignoreCase - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.multiline - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.source - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.sticky - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.test() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
RegExp.prototype.unicode - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype[@@iterator]() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.add() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.clear() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.delete() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.entries() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.forEach() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.has() - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.size - JavaScript
the source for this interactive example is stored in a github repository.
Set.prototype.values() - JavaScript
the source for this interactive example is stored in a github repository.
SharedArrayBuffer() constructor - JavaScript
the source for this interactive example is stored in a github repository.
SharedArrayBuffer.prototype.byteLength - JavaScript
the source for this interactive example is stored in a github repository.
SharedArrayBuffer.prototype.slice() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype[@@iterator]() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.charAt() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.charCodeAt() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.codePointAt() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.concat() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.endsWith() - JavaScript
the source for this interactive example is stored in a github repository.
String.fromCharCode() - JavaScript
the source for this interactive example is stored in a github repository.
String.fromCodePoint() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.includes() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.indexOf() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.lastIndexOf() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.localeCompare() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.match() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.matchAll() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.normalize() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.padEnd() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.padStart() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.repeat() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.replace() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.replaceAll() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.search() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.slice() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.split() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.startsWith() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.substr() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.substring() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.toLocaleLowerCase() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.toLocaleUpperCase() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.toLowerCase() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.toUpperCase() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.trim() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.trimEnd() - JavaScript
the source for this interactive example is stored in a github repository.
String.prototype.trimStart() - JavaScript
the source for this interactive example is stored in a github repository.
Symbol() constructor - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.asyncIterator - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.prototype.description - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.hasInstance - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.isConcatSpreadable - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.iterator - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.keyFor() - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.match - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.matchAll - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.replace - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.search - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.species - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.split - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.toPrimitive - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.toStringTag - JavaScript
the source for this interactive example is stored in a github repository.
Symbol.unscopables - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.BYTES_PER_ELEMENT - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.buffer - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.byteLength - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.copyWithin() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.entries() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.every() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.fill() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.filter() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.find() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.findIndex() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.from() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.includes() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.indexOf() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.join() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.keys() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.lastIndexOf() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.length - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.map() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.name - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.of() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.reduce() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.reverse() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.slice() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.some() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.sort() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.toString() - JavaScript
the source for this interactive example is stored in a github repository.
TypedArray.prototype.values() - JavaScript
the source for this interactive example is stored in a github repository.
Uint16Array - JavaScript
uint16array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Uint32Array - JavaScript
uint32array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Uint8Array - JavaScript
uint8array.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
Uint8ClampedArray - JavaScript
uint8clampedarray.prototype.set() stores multiple values in the typed array, reading input values from a specified array.
WeakMap.prototype.delete() - JavaScript
the source for this interactive example is stored in a github repository.
WeakMap.prototype.get() - JavaScript
the source for this interactive example is stored in a github repository.
WeakMap.prototype.has() - JavaScript
the source for this interactive example is stored in a github repository.
WeakMap.prototype.set() - JavaScript
the source for this interactive example is stored in a github repository.
WeakSet() constructor - JavaScript
the weakset constructor lets you create weakset objects that store weakly held objects in a collection.
WeakSet.prototype.add() - JavaScript
the source for this interactive example is stored in a github repository.
WeakSet.prototype.delete() - JavaScript
the source for this interactive example is stored in a github repository.
WeakSet.prototype.has() - JavaScript
the source for this interactive example is stored in a github repository.
WebAssembly.Memory() constructor - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
WebAssembly.Memory.prototype.buffer - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
WebAssembly.Memory - JavaScript
it then stores some values in that memory, then exports a function and uses it to sum some values.
WebAssembly - JavaScript
webassembly.table() an array-like structure representing a webassembly table, which stores function references.
decodeURI() - JavaScript
the source for this interactive example is stored in a github repository.
decodeURIComponent() - JavaScript
the source for this interactive example is stored in a github repository.
encodeURI() - JavaScript
the source for this interactive example is stored in a github repository.
encodeURIComponent() - JavaScript
the source for this interactive example is stored in a github repository.
globalThis - JavaScript
the source for this interactive example is stored in a github repository.
isFinite() - JavaScript
the source for this interactive example is stored in a github repository.
null - JavaScript
the source for this interactive example is stored in a github repository.
parseFloat() - JavaScript
the source for this interactive example is stored in a github repository.
parseInt() - JavaScript
the source for this interactive example is stored in a github repository.
undefined - JavaScript
property attributes of undefined writable no enumerable no configurable no the source for this interactive example is stored in a github repository.
Addition (+) - JavaScript
the source for this interactive example is stored in a github repository.
Addition assignment (+=) - JavaScript
the source for this interactive example is stored in a github repository.
Assignment (=) - JavaScript
chaining the assignment operator is possible in order to assign a single value to multiple variables the source for this interactive example is stored in a github repository.
Bitwise AND (&) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise AND assignment (&=) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise NOT (~) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise OR (|) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise OR assignment (|=) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise XOR (^) - JavaScript
the source for this interactive example is stored in a github repository.
Bitwise XOR assignment (^=) - JavaScript
the source for this interactive example is stored in a github repository.
Comma operator (,) - JavaScript
the source for this interactive example is stored in a github repository.
Conditional (ternary) operator - JavaScript
the source for this interactive example is stored in a github repository.
Decrement (--) - JavaScript
the source for this interactive example is stored in a github repository.
Destructuring assignment - JavaScript
the source for this interactive example is stored in a github repository.
Division (/) - JavaScript
the source for this interactive example is stored in a github repository.
Division assignment (/=) - JavaScript
the source for this interactive example is stored in a github repository.
Equality (==) - JavaScript
the source for this interactive example is stored in a github repository.
Exponentiation (**) - JavaScript
the source for this interactive example is stored in a github repository.
Exponentiation assignment (**=) - JavaScript
the source for this interactive example is stored in a github repository.
Greater than (>) - JavaScript
the source for this interactive example is stored in a github repository.
Greater than or equal (>=) - JavaScript
the source for this interactive example is stored in a github repository.
Grouping operator ( ) - JavaScript
the source for this interactive example is stored in a github repository.
Increment (++) - JavaScript
the source for this interactive example is stored in a github repository.
Inequality (!=) - JavaScript
the source for this interactive example is stored in a github repository.
Left shift (<<) - JavaScript
the source for this interactive example is stored in a github repository.
Left shift assignment (<<=) - JavaScript
the source for this interactive example is stored in a github repository.
Less than (<) - JavaScript
the source for this interactive example is stored in a github repository.
Less than or equal (<=) - JavaScript
the source for this interactive example is stored in a github repository.
Logical AND (&&) - JavaScript
the source for this interactive example is stored in a github repository.
Logical AND assignment (&&=) - JavaScript
the source for this interactive example is stored in a github repository.
Logical NOT (!) - JavaScript
the source for this interactive example is stored in a github repository.
Logical OR (||) - JavaScript
the source for this interactive example is stored in a github repository.
Logical OR assignment (||=) - JavaScript
the source for this interactive example is stored in a github repository.
Logical nullish assignment (??=) - JavaScript
the source for this interactive example is stored in a github repository.
Multiplication (*) - JavaScript
the source for this interactive example is stored in a github repository.
Multiplication assignment (*=) - JavaScript
the source for this interactive example is stored in a github repository.
Nullish coalescing operator (??) - JavaScript
the source for this interactive example is stored in a github repository.
Object initializer - JavaScript
the source for this interactive example is stored in a github repository.
Operator precedence - JavaScript
the source for this interactive example is stored in a github repository.
Optional chaining (?.) - JavaScript
the source for this interactive example is stored in a github repository.
Property accessors - JavaScript
the source for this interactive example is stored in a github repository.
Remainder (%) - JavaScript
the source for this interactive example is stored in a github repository.
Remainder assignment (%=) - JavaScript
the source for this interactive example is stored in a github repository.
Right shift (>>) - JavaScript
the source for this interactive example is stored in a github repository.
Right shift assignment (>>=) - JavaScript
the source for this interactive example is stored in a github repository.
Spread syntax (...) - JavaScript
the source for this interactive example is stored in a github repository.
Strict equality (===) - JavaScript
the source for this interactive example is stored in a github repository.
Strict inequality (!==) - JavaScript
the source for this interactive example is stored in a github repository.
Subtraction (-) - JavaScript
the source for this interactive example is stored in a github repository.
Subtraction assignment (-=) - JavaScript
the source for this interactive example is stored in a github repository.
Unary negation (-) - JavaScript
the source for this interactive example is stored in a github repository.
Unary plus (+) - JavaScript
the source for this interactive example is stored in a github repository.
Unsigned right shift (>>>) - JavaScript
the source for this interactive example is stored in a github repository.
Unsigned right shift assignment (>>>=) - JavaScript
the source for this interactive example is stored in a github repository.
class expression - JavaScript
the source for this interactive example is stored in a github repository.
delete operator - JavaScript
the source for this interactive example is stored in a github repository.
function* expression - JavaScript
the source for this interactive example is stored in a github repository.
Function expression - JavaScript
the source for this interactive example is stored in a github repository.
in operator - JavaScript
the source for this interactive example is stored in a github repository.
instanceof - JavaScript
the source for this interactive example is stored in a github repository.
new.target - JavaScript
the source for this interactive example is stored in a github repository.
this - JavaScript
the source for this interactive example is stored in a github repository.
typeof - JavaScript
the source for this interactive example is stored in a github repository.
void operator - JavaScript
the source for this interactive example is stored in a github repository.
yield* - JavaScript
the source for this interactive example is stored in a github repository.
empty - JavaScript
the source for this interactive example is stored in a github repository.
async function - JavaScript
the source for this interactive demo is stored in a github repository.
block - JavaScript
the block is delimited by a pair of braces ("curly brackets") and may optionally be labelled: the source for this interactive example is stored in a github repository.
break - JavaScript
the source for this interactive example is stored in a github repository.
class - JavaScript
the source for this interactive example is stored in a github repository.
const - JavaScript
the source for this interactive example is stored in a github repository.
continue - JavaScript
the source for this interactive example is stored in a github repository.
do...while - JavaScript
the source for this interactive example is stored in a github repository.
for...in - JavaScript
the source for this interactive example is stored in a github repository.
for...of - JavaScript
the source for this interactive example is stored in a github repository.
for - JavaScript
the source for this interactive example is stored in a github repository.
function* - JavaScript
the source for this interactive example is stored in a github repository.
function declaration - JavaScript
the source for this interactive example is stored in a github repository.
if...else - JavaScript
the source for this interactive example is stored in a github repository.
label - JavaScript
the source for this interactive example is stored in a github repository.
let - JavaScript
the source for this interactive example is stored in a github repository.
return - JavaScript
the source for this interactive example is stored in a github repository.
switch - JavaScript
the source for this interactive example is stored in a github repository.
throw - JavaScript
the source for this interactive example is stored in a github repository.
try...catch - JavaScript
the source for this interactive example is stored in a github repository.
var - JavaScript
the source for this interactive example is stored in a github repository.
while - JavaScript
the source for this interactive example is stored in a github repository.
with - JavaScript
note, however, that in many cases this benefit can be achieved by using a temporary variable to store a reference to the desired object.
iarc_rating_id - Web app manifests
note: the same code can be shared across multiple participating storefronts, as long as the distributed product remains the same (i.e., doesn’t serve totally different code paths on different storefronts).
screenshots - Web app manifests
these images are intended to be used by progressive web app stores.
Handling media support issues in web content - Web media technologies
<img src="/images/stafff-photo-huge-progressive.jpg" alt="staff photo, taken in january of 1972"> when using a progressive image, the data is stored in such a way that the browser is able to render a low-quality representation of the image as soon as possible, then update the image as it loads—or after it's finished loading—to present it in full quality.
Codecs used by WebRTC - Web media technologies
this is due to a change in google play store requirements that prevent firefox from downloading and installing the openh264 codec needed to handle h.264 in webrtc connections.
The "codecs" parameter in common media types - Web media technologies
the option to encode each frame as three separate color planes (that is, each color's data is stored as if it were a single monochrome frame).
Media type and format guide: image, audio, and video content - Web media technologies
WebMediaFormats
guides concepts digital audio concepts an introduction to how audio is converted into digital form and stored for use by computers.
OpenSearch description format
(you can generate a data: uri from an icon file at the data: uri kitchen.) <image height="16" width="16" type="image/x-icon">https://example.com/favicon.ico</image> <!-- or --> <image height="16" width="16">data:image/x-icon;base64,aaabaaeaebaaa … daaa=</image> firefox caches the icon as a base64 data: uri (search plug-ins are stored in the profile's searchplugins/ folder).
Performance fundamentals - Web Performance
an ideal system would maintain 100% of user state at all times: all applications in the system would run simultaneously, and all applications would retain the state created by the user the last time the user interacted with the application (application state is stored in computer memory, which is why the approximation is close).
Progressive loading - Progressive web apps (PWAs)
the js13kpwa app uses a placeholder image instead, which is small and lightweight, while the final paths to target images are stored in data-src attributes: <img src='data/img/placeholder.png' data-src='data/img/slug.jpg' alt='name'> those images will be loaded via javascript after the site finishes building the html structure.
Making PWAs work offline with Service workers - Progressive web apps (PWAs)
if not, we use another fetch request to fetch it from the network, then store the response in the cache so it will be available there next time it is requested.
How to make PWAs re-engageable using Notifications and Push - Progressive web apps (PWAs)
the server stores all the information received when the user subscribed, so the messages can be sent later on when needed.
Mobile first - Progressive web apps (PWAs)
modernizr stores the results of all its feature tests as classes on the html element.
Web API reference - Web technology reference
WebReferenceAPI
data management apis user data can be stored and managed using this set of apis.
textLength - SVG: Scalable Vector Graphics
note that we have to dive into textlength to get its baseval property; textlength is stored as an svglength object, so we can't treat it like a plain number.
<defs> - SVG: Scalable Vector Graphics
WebSVGElementdefs
the <defs> element is used to store graphical objects that will be used at a later time.
Tools for SVG - SVG: Scalable Vector Graphics
to store inkscape specific data, it extends the svg file with elements and attributes in a custom namespace, but you can also choose to export as plain svg.
mimeTypes.rdf corruption - SVG: Scalable Vector Graphics
for files loaded locally, it first looks in a cache of filename extension to media type mappings (stored in a mozilla profile file called mimetypes.rdf), and if it doesn't find a media type there, it asks the operating system.
Certificate Transparency - Web security
browser vendors and root store maintainers are also empowered to make more informed decisions regarding problematic cas that they may decide to distrust.
Insecure passwords - Web security
note on password reuse sometimes websites require username and passwords but don't actually store data that is very sensitive.
XML introduction - XML: Extensible Markup Language
this is a powerful way to store data in a format that can be stored, searched, and shared.
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.
WebAssembly Concepts - WebAssembly
to functions) that could not otherwise be stored as raw bytes in memory (for safety and portability reasons).
Index - WebAssembly
2 caching compiled webassembly modules caching, indexeddb, javascript, module, webassembly, compile, wasm caching is useful for improving the performance of an app — we can store compiled webassembly modules on the client so they don't have to be downloaded and compiled every time.